1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright 2020 Jonathan Neuschäfer
5 * Register access and version information for the Netronix embedded
12 #include <linux/types.h>
19 struct regmap *regmap;
23 * Some registers, such as the battery status register (0x41), are in
24 * big-endian, but others only have eight significant bits, which are in the
25 * first byte transmitted over I2C (the MSB of the big-endian value).
26 * This convenience function converts an 8-bit value to 16-bit for use in the
27 * second kind of register.
29 static inline u16 ntxec_reg8(u8 value)
34 /* Known firmware versions */
35 #define NTXEC_VERSION_KOBO_AURA 0xd726 /* found in Kobo Aura */
36 #define NTXEC_VERSION_TOLINO_SHINE2 0xf110 /* found in Tolino Shine 2 HD */
37 #define NTXEC_VERSION_TOLINO_VISION 0xe135 /* found in Tolino Vision, contains RTC, ADC, PWM, home pad */