Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: adc: axp288: Add TS bias override for Haier HV103H
@ 2026-09-04 13:31 Vladyslav Ivashchenko
  2026-09-04 19:48 ` Hans de Goede
  0 siblings, 1 reply; 4+ messages in thread
From: Vladyslav Ivashchenko @ 2026-09-04 13:31 UTC (permalink / raw)
  To: Jonathan Cameron, Hans de Goede
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Chen-Yu Tsai,
	linux-iio, linux-kernel, Vladyslav Ivashchenko

The Haier HV103H firmware configures the AXP288 TS pin bias
current to 60 uA. This causes the battery temperature reading to
cross the charging temperature threshold under load, incorrectly
stopping battery charging.

Setting the TS bias current to 80 uA fixes the temperature
measurement and prevents charging from being incorrectly disabled.

Add a DMI quirk to use the 80 uA TS bias current on the Haier
HV103H.

Signed-off-by: Vladyslav Ivashchenko <cactucatu4eckuu@gmail.com>
---
 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 c8283279c47..c98863d612a 100644
--- a/drivers/iio/adc/axp288_adc.c
+++ b/drivers/iio/adc/axp288_adc.c
@@ -207,6 +207,14 @@ static const struct dmi_system_id axp288_adc_ts_bias_override[] = {
 		},
 		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
 	},
+	{
+		/* Haier HV103H */
+		.matches = {
+		  DMI_MATCH(DMI_SYS_VENDOR, "Haier"),
+		  DMI_MATCH(DMI_PRODUCT_NAME, "HV103H"),
+		},
+		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
+	},
 	{ }
 };
 
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] iio: adc: axp288: Add TS bias override for Haier HV103H
  2026-09-04 13:31 [PATCH] iio: adc: axp288: Add TS bias override for Haier HV103H Vladyslav Ivashchenko
@ 2026-09-04 19:48 ` Hans de Goede
  2026-09-05  1:42   ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2026-09-04 19:48 UTC (permalink / raw)
  To: Vladyslav Ivashchenko, Jonathan Cameron
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Chen-Yu Tsai,
	linux-iio, linux-kernel

Hi,

On 4-Sep-26 3:31 PM, Vladyslav Ivashchenko wrote:
> The Haier HV103H firmware configures the AXP288 TS pin bias
> current to 60 uA. This causes the battery temperature reading to
> cross the charging temperature threshold under load, incorrectly
> stopping battery charging.
> 
> Setting the TS bias current to 80 uA fixes the temperature
> measurement and prevents charging from being incorrectly disabled.
> 
> Add a DMI quirk to use the 80 uA TS bias current on the Haier
> HV103H.
> 
> Signed-off-by: Vladyslav Ivashchenko <cactucatu4eckuu@gmail.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>

Regards,

Hans


> ---
>  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 c8283279c47..c98863d612a 100644
> --- a/drivers/iio/adc/axp288_adc.c
> +++ b/drivers/iio/adc/axp288_adc.c
> @@ -207,6 +207,14 @@ static const struct dmi_system_id axp288_adc_ts_bias_override[] = {
>  		},
>  		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
>  	},
> +	{
> +		/* Haier HV103H */
> +		.matches = {
> +		  DMI_MATCH(DMI_SYS_VENDOR, "Haier"),
> +		  DMI_MATCH(DMI_PRODUCT_NAME, "HV103H"),
> +		},
> +		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
> +	},
>  	{ }
>  };
>  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iio: adc: axp288: Add TS bias override for Haier HV103H
  2026-09-04 19:48 ` Hans de Goede
@ 2026-09-05  1:42   ` Jonathan Cameron
  2026-09-05 12:33     ` Hans de Goede
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2026-09-05  1:42 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Vladyslav Ivashchenko, David Lechner, Nuno Sá,
	Andy Shevchenko, Chen-Yu Tsai, linux-iio, linux-kernel

On Fri, 4 Sep 2026 21:48:21 +0200
Hans de Goede <hansg@kernel.org> wrote:

> Hi,
> 
> On 4-Sep-26 3:31 PM, Vladyslav Ivashchenko wrote:
> > The Haier HV103H firmware configures the AXP288 TS pin bias
> > current to 60 uA. This causes the battery temperature reading to
> > cross the charging temperature threshold under load, incorrectly
> > stopping battery charging.
> > 
> > Setting the TS bias current to 80 uA fixes the temperature
> > measurement and prevents charging from being incorrectly disabled.
> > 
> > Add a DMI quirk to use the 80 uA TS bias current on the Haier
> > HV103H.
> > 
> > Signed-off-by: Vladyslav Ivashchenko <cactucatu4eckuu@gmail.com>  
> 
> Thanks, patch looks good to me:
> 
> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> 
> Regards,
> 
> Hans
> 

Fixes tag appropriate?  There was the original dance of keeping the firmware
version, then this table was added to fix that up.  Anyhow, I'm thinking yes
and tag should be:


Fixes: 9bcf15f75cac ("iio: adc: axp288: Fix TS-pin handling")

But bit awkward as anyone trying to just back port to that better have
been paying attention and picked up the following, so lets have that as well with comment
Fixes: 048058399f19 ("iio: adc: axp288: Override TS pin bias current for some models") # Add necessary infrastructure

With those two, applied to the fixes-togreg branch of iio.git

Shout if you think this should be done differently.
> 
> > ---
> >  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 c8283279c47..c98863d612a 100644
> > --- a/drivers/iio/adc/axp288_adc.c
> > +++ b/drivers/iio/adc/axp288_adc.c
> > @@ -207,6 +207,14 @@ static const struct dmi_system_id axp288_adc_ts_bias_override[] = {
> >  		},
> >  		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
> >  	},
> > +	{
> > +		/* Haier HV103H */
> > +		.matches = {
> > +		  DMI_MATCH(DMI_SYS_VENDOR, "Haier"),
> > +		  DMI_MATCH(DMI_PRODUCT_NAME, "HV103H"),
> > +		},
> > +		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
> > +	},
> >  	{ }
> >  };
> >    
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iio: adc: axp288: Add TS bias override for Haier HV103H
  2026-09-05  1:42   ` Jonathan Cameron
@ 2026-09-05 12:33     ` Hans de Goede
  0 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2026-09-05 12:33 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Vladyslav Ivashchenko, David Lechner, Nuno Sá,
	Andy Shevchenko, Chen-Yu Tsai, linux-iio, linux-kernel

Hi Jonathan,

On 5-Sep-26 03:42, Jonathan Cameron wrote:
> On Fri, 4 Sep 2026 21:48:21 +0200
> Hans de Goede <hansg@kernel.org> wrote:
> 
>> Hi,
>>
>> On 4-Sep-26 3:31 PM, Vladyslav Ivashchenko wrote:
>>> The Haier HV103H firmware configures the AXP288 TS pin bias
>>> current to 60 uA. This causes the battery temperature reading to
>>> cross the charging temperature threshold under load, incorrectly
>>> stopping battery charging.
>>>
>>> Setting the TS bias current to 80 uA fixes the temperature
>>> measurement and prevents charging from being incorrectly disabled.
>>>
>>> Add a DMI quirk to use the 80 uA TS bias current on the Haier
>>> HV103H.
>>>
>>> Signed-off-by: Vladyslav Ivashchenko <cactucatu4eckuu@gmail.com>  
>>
>> Thanks, patch looks good to me:
>>
>> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
>>
>> Regards,
>>
>> Hans
>>
> 
> Fixes tag appropriate?  There was the original dance of keeping the firmware
> version, then this table was added to fix that up.  Anyhow, I'm thinking yes
> and tag should be:
> 
> 
> Fixes: 9bcf15f75cac ("iio: adc: axp288: Fix TS-pin handling")
> 
> But bit awkward as anyone trying to just back port to that better have
> been paying attention and picked up the following, so lets have that as well with comment
> Fixes: 048058399f19 ("iio: adc: axp288: Override TS pin bias current for some models") # Add necessary infrastructure
> 
> With those two, applied to the fixes-togreg branch of iio.git
> 
> Shout if you think this should be done differently.

This sounds good to me, thank you for taking care of this.

Regards,

Hans


>>
>>> ---
>>>  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 c8283279c47..c98863d612a 100644
>>> --- a/drivers/iio/adc/axp288_adc.c
>>> +++ b/drivers/iio/adc/axp288_adc.c
>>> @@ -207,6 +207,14 @@ static const struct dmi_system_id axp288_adc_ts_bias_override[] = {
>>>  		},
>>>  		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
>>>  	},
>>> +	{
>>> +		/* Haier HV103H */
>>> +		.matches = {
>>> +		  DMI_MATCH(DMI_SYS_VENDOR, "Haier"),
>>> +		  DMI_MATCH(DMI_PRODUCT_NAME, "HV103H"),
>>> +		},
>>> +		.driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
>>> +	},
>>>  	{ }
>>>  };
>>>    
>>
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-05 12:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04 13:31 [PATCH] iio: adc: axp288: Add TS bias override for Haier HV103H Vladyslav Ivashchenko
2026-09-04 19:48 ` Hans de Goede
2026-09-05  1:42   ` Jonathan Cameron
2026-09-05 12:33     ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox