mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag
PATCH 1/1 mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag
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.
--- drivers/mfd/intel_soc_pmic_chtdc_ti.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mfd/intel_soc_pmic_chtdc_ti.c +2 -0
@@ -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[] = {
Signature · 1 line
2.49.0
Quoted 8 lines · Hans de Goede
Testing has shown that reading multiple registers at once (for 10 bit adc values) does not work. Set the
use_single_readregmap_configflag to make regmap split these for is.This should fix temperature opregion accesses done by
drivers/acpi/pmic/intel_pmic_chtdc_ti.cand is also necessary for the upcoming drivers for the ADC and battery MFD cells.
...
drivers/mfd/intel_soc_pmic_chtdc_ti.c static const struct regmap_config chtdc_ti_regmap_config = { · line 86
Quoted 2 lines
drivers/mfd/intel_soc_pmic_chtdc_ti.c +2
-0+/* 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.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy,
Quoted 10 lines · Andy Shevchenko
Quoted 8 lines · Hans de Goede
Testing has shown that reading multiple registers at once (for 10 bit adc values) does not work. Set the
use_single_readregmap_configflag to make regmap split these for is.This should fix temperature opregion accesses done by
drivers/acpi/pmic/intel_pmic_chtdc_ti.cand is also necessary for the upcoming drivers for the ADC and battery MFD cells.
Quoted 8 lines
...
drivers/mfd/intel_soc_pmic_chtdc_ti.c static const struct regmap_config chtdc_ti_regmap_config = { · line 86
Quoted 2 lines
drivers/mfd/intel_soc_pmic_chtdc_ti.c +2
-0+/* 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.
Quoted 2 lines
As a quick fix I am fine with this.
Reviewed-by Andy Shevchenko <[email protected]>
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.
Quoted 2 lines · Hans de Goede
Quoted 1 line · Andy Shevchenko
On Mon, Aug 4, 2025 at 10:34 AM Hans de Goede <[email protected]> wrote:
...
Quoted 7 lines
Quoted 6 lines
drivers/mfd/intel_soc_pmic_chtdc_ti.c static const struct regmap_config chtdc_ti_regmap_config = { · line 86
Quoted 2 lines
drivers/mfd/intel_soc_pmic_chtdc_ti.c +2
-0+/* 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/
?
Quoted 6 lines
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,
0xffor 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?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi,
Quoted 17 lines · Andy Shevchenko
Quoted 2 lines · Hans de Goede
Quoted 1 line · Andy Shevchenko
On Mon, Aug 4, 2025 at 10:34 AM Hans de Goede <[email protected]> wrote:
...
Quoted 10 lines
Quoted 6 lines
drivers/mfd/intel_soc_pmic_chtdc_ti.c static const struct regmap_config chtdc_ti_regmap_config = { · line 86
Quoted 2 lines
drivers/mfd/intel_soc_pmic_chtdc_ti.c +2
-0+/* 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.
Quoted 5 lines
Quoted 2 lines
1) I don't remember if it was 0,
0xffor 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