* [PATCH] mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag
@ 2025-08-04 8:34 Hans de Goede
2025-08-04 8:47 ` Andy Shevchenko
0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2025-08-04 8:34 UTC (permalink / raw)
To: Lee Jones, Andy Shevchenko; +Cc: Hans de Goede, linux-kernel, stable
Testing has shown that reading multiple registers at once (for 10 bit
adc values) does not work. Set the use_single_read regmap_config flag
to make regmap split these for is.
This should fix temperature opregion accesses done by
drivers/acpi/pmic/intel_pmic_chtdc_ti.c and is also necessary for
the upcoming drivers for the ADC and battery MFD cells.
Fixes: 6bac0606fdba ("mfd: Add support for Cherry Trail Dollar Cove TI PMIC")
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hansg@kernel.org>
---
drivers/mfd/intel_soc_pmic_chtdc_ti.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/intel_soc_pmic_chtdc_ti.c b/drivers/mfd/intel_soc_pmic_chtdc_ti.c
index 4c1a68c9f575..a23bda8ddae8 100644
--- a/drivers/mfd/intel_soc_pmic_chtdc_ti.c
+++ b/drivers/mfd/intel_soc_pmic_chtdc_ti.c
@@ -82,6 +82,8 @@ static const struct regmap_config chtdc_ti_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 0xff,
+ /* Reading multiple registers at once is not supported */
+ .use_single_read = true,
};
static const struct regmap_irq chtdc_ti_irqs[] = {
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag
2025-08-04 8:34 [PATCH] mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag Hans de Goede
@ 2025-08-04 8:47 ` Andy Shevchenko
2025-08-04 8:51 ` Hans de Goede
0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2025-08-04 8:47 UTC (permalink / raw)
To: Hans de Goede; +Cc: Lee Jones, Andy Shevchenko, linux-kernel, stable
On Mon, Aug 4, 2025 at 10:34 AM Hans de Goede <hansg@kernel.org> wrote:
>
> Testing has shown that reading multiple registers at once (for 10 bit
> adc values) does not work. Set the use_single_read regmap_config flag
> to make regmap split these for is.
>
> This should fix temperature opregion accesses done by
> drivers/acpi/pmic/intel_pmic_chtdc_ti.c and is also necessary for
> the upcoming drivers for the ADC and battery MFD cells.
...
> + /* Reading multiple registers at once is not supported */
> + .use_single_read = true,
By HW or by problem in regmap as being suggested here:
https://lore.kernel.org/linux-gpio/CALNFmy1ZRqHz6_DD_2qamm-iLQ51AOFQH=ahCWRN7SAk3pfZ_A@mail.gmail.com/
?
(OTOH it mentioned cache init and you seems referring to run-time,
however it might be well related)
As a quick fix I am fine with this.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag
2025-08-04 8:47 ` Andy Shevchenko
@ 2025-08-04 8:51 ` Hans de Goede
2025-08-04 8:57 ` Andy Shevchenko
0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2025-08-04 8:51 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Lee Jones, Andy Shevchenko, linux-kernel, stable
Hi Andy,
On 4-Aug-25 10:47 AM, Andy Shevchenko wrote:
> On Mon, Aug 4, 2025 at 10:34 AM Hans de Goede <hansg@kernel.org> wrote:
>>
>> Testing has shown that reading multiple registers at once (for 10 bit
>> adc values) does not work. Set the use_single_read regmap_config flag
>> to make regmap split these for is.
>>
>> This should fix temperature opregion accesses done by
>> drivers/acpi/pmic/intel_pmic_chtdc_ti.c and is also necessary for
>> the upcoming drivers for the ADC and battery MFD cells.
>
> ...
>
>> + /* Reading multiple registers at once is not supported */
>> + .use_single_read = true,
>
> By HW or by problem in regmap as being suggested here:
> https://lore.kernel.org/linux-gpio/CALNFmy1ZRqHz6_DD_2qamm-iLQ51AOFQH=ahCWRN7SAk3pfZ_A@mail.gmail.com/
> ?
This is a hw limitation. I tried with i2ctransfer to directly
access the chip and it returns invalid values (1) after
the first byte read.
> As a quick fix I am fine with this.
> Reviewed-by: Andy Shevchenko <andy@kernel.org>
Thank you.
Regards,
Hans
1) I don't remember if it was 0, 0xff or repeating
of the first byte. But it definitely did not work.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag
2025-08-04 8:51 ` Hans de Goede
@ 2025-08-04 8:57 ` Andy Shevchenko
2025-08-04 12:08 ` Hans de Goede
0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2025-08-04 8:57 UTC (permalink / raw)
To: Hans de Goede; +Cc: Lee Jones, Andy Shevchenko, linux-kernel, stable
On Mon, Aug 4, 2025 at 10:51 AM Hans de Goede <hansg@kernel.org> wrote:
> On 4-Aug-25 10:47 AM, Andy Shevchenko wrote:
> > On Mon, Aug 4, 2025 at 10:34 AM Hans de Goede <hansg@kernel.org> wrote:
...
> >> + /* Reading multiple registers at once is not supported */
> >> + .use_single_read = true,
> >
> > By HW or by problem in regmap as being suggested here:
> > https://lore.kernel.org/linux-gpio/CALNFmy1ZRqHz6_DD_2qamm-iLQ51AOFQH=ahCWRN7SAk3pfZ_A@mail.gmail.com/
> > ?
>
> This is a hw limitation. I tried with i2ctransfer to directly
> access the chip and it returns invalid values (1) after
> the first byte read.
> 1) I don't remember if it was 0, 0xff or repeating
> of the first byte. But it definitely did not work.
Perhaps elaborate the above in the comment, by at least putting
keyword HW there?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag
2025-08-04 8:57 ` Andy Shevchenko
@ 2025-08-04 12:08 ` Hans de Goede
0 siblings, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2025-08-04 12:08 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Lee Jones, Andy Shevchenko, linux-kernel, stable
Hi,
On 4-Aug-25 10:57 AM, Andy Shevchenko wrote:
> On Mon, Aug 4, 2025 at 10:51 AM Hans de Goede <hansg@kernel.org> wrote:
>> On 4-Aug-25 10:47 AM, Andy Shevchenko wrote:
>>> On Mon, Aug 4, 2025 at 10:34 AM Hans de Goede <hansg@kernel.org> wrote:
>
> ...
>
>>>> + /* Reading multiple registers at once is not supported */
>>>> + .use_single_read = true,
>>>
>>> By HW or by problem in regmap as being suggested here:
>>> https://lore.kernel.org/linux-gpio/CALNFmy1ZRqHz6_DD_2qamm-iLQ51AOFQH=ahCWRN7SAk3pfZ_A@mail.gmail.com/
>>> ?
>>
>> This is a hw limitation. I tried with i2ctransfer to directly
>> access the chip and it returns invalid values (1) after
>> the first byte read.
>
>> 1) I don't remember if it was 0, 0xff or repeating
>> of the first byte. But it definitely did not work.
>
> Perhaps elaborate the above in the comment, by at least putting
> keyword HW there?
Ok, I've just send out a v2 clarifying the comment.
Regards,
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-04 12:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 8:34 [PATCH] mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag Hans de Goede
2025-08-04 8:47 ` Andy Shevchenko
2025-08-04 8:51 ` Hans de Goede
2025-08-04 8:57 ` Andy Shevchenko
2025-08-04 12:08 ` 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;
as well as URLs for NNTP newsgroup(s).