mfd: ntxec: Add version number for EC in Tolino Vision

Message ID 20230123230114.3134400-1-andreas@kemnade.info
State New
Headers
Series mfd: ntxec: Add version number for EC in Tolino Vision |

Commit Message

Andreas Kemnade Jan. 23, 2023, 11:01 p.m. UTC
  The EC firmware has a different version number than anything
defined until now.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
 drivers/mfd/ntxec.c       | 1 +
 include/linux/mfd/ntxec.h | 4 ++++
 2 files changed, 5 insertions(+)
  

Comments

Lee Jones Jan. 27, 2023, 2:34 p.m. UTC | #1
On Tue, 24 Jan 2023, Andreas Kemnade wrote:

> The EC firmware has a different version number than anything
> defined until now.
> 
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> ---
>  drivers/mfd/ntxec.c       | 1 +
>  include/linux/mfd/ntxec.h | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/mfd/ntxec.c b/drivers/mfd/ntxec.c
> index e16a7a82a929..b02785b10d48 100644
> --- a/drivers/mfd/ntxec.c
> +++ b/drivers/mfd/ntxec.c
> @@ -175,6 +175,7 @@ static int ntxec_probe(struct i2c_client *client)
>  	/* Bail out if we encounter an unknown firmware version */
>  	switch (version) {
>  	case NTXEC_VERSION_KOBO_AURA:
> +	case NTXEC_VERSION_TOLINO_VISION:
>  		subdevs = ntxec_subdev;
>  		n_subdevs = ARRAY_SIZE(ntxec_subdev);
>  		break;
> diff --git a/include/linux/mfd/ntxec.h b/include/linux/mfd/ntxec.h
> index cc6f07bfa2b3..562895eb9a31 100644
> --- a/include/linux/mfd/ntxec.h
> +++ b/include/linux/mfd/ntxec.h
> @@ -35,4 +35,8 @@ static inline u16 ntxec_reg8(u8 value)
>  #define NTXEC_VERSION_KOBO_AURA	0xd726	/* found in Kobo Aura */
>  #define NTXEC_VERSION_TOLINO_SHINE2 0xf110 /* found in Tolino Shine 2 HD */
>  
> +/*
> + * found in Tolino Vision, contains RTC, ADC, PWM, home pad
> + */

Could you please use the same formatting as the others.

> +#define NTXEC_VERSION_TOLINO_VISION 0xe135
>  #endif
> -- 
> 2.30.2
>
  

Patch

diff --git a/drivers/mfd/ntxec.c b/drivers/mfd/ntxec.c
index e16a7a82a929..b02785b10d48 100644
--- a/drivers/mfd/ntxec.c
+++ b/drivers/mfd/ntxec.c
@@ -175,6 +175,7 @@  static int ntxec_probe(struct i2c_client *client)
 	/* Bail out if we encounter an unknown firmware version */
 	switch (version) {
 	case NTXEC_VERSION_KOBO_AURA:
+	case NTXEC_VERSION_TOLINO_VISION:
 		subdevs = ntxec_subdev;
 		n_subdevs = ARRAY_SIZE(ntxec_subdev);
 		break;
diff --git a/include/linux/mfd/ntxec.h b/include/linux/mfd/ntxec.h
index cc6f07bfa2b3..562895eb9a31 100644
--- a/include/linux/mfd/ntxec.h
+++ b/include/linux/mfd/ntxec.h
@@ -35,4 +35,8 @@  static inline u16 ntxec_reg8(u8 value)
 #define NTXEC_VERSION_KOBO_AURA	0xd726	/* found in Kobo Aura */
 #define NTXEC_VERSION_TOLINO_SHINE2 0xf110 /* found in Tolino Shine 2 HD */
 
+/*
+ * found in Tolino Vision, contains RTC, ADC, PWM, home pad
+ */
+#define NTXEC_VERSION_TOLINO_VISION 0xe135
 #endif