[PATCH v2] mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag

Hans de Goede posted 1 patch 2 months ago
There is a newer version of this series
drivers/mfd/intel_soc_pmic_chtdc_ti.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH v2] mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag
Posted by Hans de Goede 2 months ago
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
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hansg@kernel.org>
---
Changes in v2:
- Update comment to: "The hardware does not support reading multiple
  registers at once"
---
 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..6daf33e07ea0 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,
+	/* The hardware does not support reading multiple registers at once */
+	.use_single_read = true,
 };
 
 static const struct regmap_irq chtdc_ti_irqs[] = {
-- 
2.49.0
Re: [PATCH v2] mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag
Posted by Andy Shevchenko 2 months ago
On Mon, Aug 4, 2025 at 2:08 PM Hans de Goede <hansg@kernel.org> wrote:

Thanks for the update, but I just have noticed a few style / spelling
errors in the commit message, see below.

> Testing has shown that reading multiple registers at once (for 10 bit

10-bit

> adc values) does not work. Set the use_single_read regmap_config flag

ADC

> to make regmap split these for is.

us

> 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.

...

The updated comment LGTM.

-- 
With Best Regards,
Andy Shevchenko