diff mbox series

iio: adc: axp288: Override TS pin bias current for some models

Message ID 20220506095040.21008-1-hdegoede@redhat.com (mailing list archive)
State Accepted
Headers show
Series iio: adc: axp288: Override TS pin bias current for some models | expand

Commit Message

Hans de Goede May 6, 2022, 9:50 a.m. UTC
Since commit 9bcf15f75cac ("iio: adc: axp288: Fix TS-pin handling") we
preserve the bias current set by the firmware at boot. This fixes issues
we were seeing on various models.

Some models like the Nuvision Solo 10 Draw tablet actually need the
old hardcoded 80ųA bias current for battery temperature monitoring
to work properly.

Add a quirk entry for the Nuvision Solo 10 Draw to the DMI quirk table
to restore setting the bias current to 80ųA on this model.

Fixes: 9bcf15f75cac ("iio: adc: axp288: Fix TS-pin handling")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215882
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/iio/adc/axp288_adc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Jonathan Cameron May 7, 2022, 2:22 p.m. UTC | #1
On Fri,  6 May 2022 11:50:40 +0200
Hans de Goede <hdegoede@redhat.com> wrote:

> Since commit 9bcf15f75cac ("iio: adc: axp288: Fix TS-pin handling") we
> preserve the bias current set by the firmware at boot. This fixes issues
> we were seeing on various models.
> 
> Some models like the Nuvision Solo 10 Draw tablet actually need the
> old hardcoded 80ųA bias current for battery temperature monitoring
> to work properly.
> 
> Add a quirk entry for the Nuvision Solo 10 Draw to the DMI quirk table
> to restore setting the bias current to 80ųA on this model.
> 
> Fixes: 9bcf15f75cac ("iio: adc: axp288: Fix TS-pin handling")
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215882
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied to the fixes-togreg branch of iio.git.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/axp288_adc.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/iio/adc/axp288_adc.c b/drivers/iio/adc/axp288_adc.c
> index a4b8be5b8f88..580361bd9849 100644
> --- a/drivers/iio/adc/axp288_adc.c
> +++ b/drivers/iio/adc/axp288_adc.c
> @@ -196,6 +196,14 @@ static const struct dmi_system_id axp288_adc_ts_bias_override[] = {
>  		},
>  		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
>  	},
> +	{
> +		/* Nuvision Solo 10 Draw */
> +		.matches = {
> +		  DMI_MATCH(DMI_SYS_VENDOR, "TMAX"),
> +		  DMI_MATCH(DMI_PRODUCT_NAME, "TM101W610L"),
> +		},
> +		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
> +	},
>  	{}
>  };
>
diff mbox series

Patch

diff --git a/drivers/iio/adc/axp288_adc.c b/drivers/iio/adc/axp288_adc.c
index a4b8be5b8f88..580361bd9849 100644
--- a/drivers/iio/adc/axp288_adc.c
+++ b/drivers/iio/adc/axp288_adc.c
@@ -196,6 +196,14 @@  static const struct dmi_system_id axp288_adc_ts_bias_override[] = {
 		},
 		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
 	},
+	{
+		/* Nuvision Solo 10 Draw */
+		.matches = {
+		  DMI_MATCH(DMI_SYS_VENDOR, "TMAX"),
+		  DMI_MATCH(DMI_PRODUCT_NAME, "TM101W610L"),
+		},
+		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
+	},
 	{}
 };