Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v3 0/2] power: supply: max17042: cleanup and more features
@ 2024-11-18 10:09 Dzmitry Sankouski
  2024-11-18 10:09 ` [PATCH v3 1/2] power: supply: max17042: make interrupt shared Dzmitry Sankouski
  2024-11-18 10:09 ` [PATCH v3 2/2] power: supply: max17042: add platform driver variant Dzmitry Sankouski
  0 siblings, 2 replies; 5+ messages in thread
From: Dzmitry Sankouski @ 2024-11-18 10:09 UTC (permalink / raw)
  To: Hans de Goede, Krzysztof Kozlowski, Marek Szyprowski,
	Sebastian Krzyszkowiak, Purism Kernel Team, Sebastian Reichel,
	Rob Herring, Conor Dooley, Alim Akhtar, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, imx, linux-arm-msm, Dzmitry Sankouski

Fuelgauge blocks often are incorporated in bigger chip,
which may use only 1 line for interrupts. Shared-irq
handles that case by requesting irq as shared.

Maxim PMICs may include fuel gauge with additional features, which is
out of single Linux power supply driver scope.

For example, in max77705 PMIC fuelgauge has additional registers,
like IIN_REG, VSYS_REG, ISYS_REG. Those needed to measure PMIC input
current, system voltage and current respectively. Those measurements
cannot be bound to any of fuelgauge properties.

The solution here add and option to use max17042 driver as a MFD
sub device, thus allowing any additional functionality be implemented as
another sub device. This will help to reduce code duplication in MFD
fuel gauge drivers.

Make max17042 interrupt shared, and add platform driver
version.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
Changes in v3:
- pass dev pointer to probe
- Link to v2: https://lore.kernel.org/r/20241108-b4-max17042-v2-0-f058f7a16bab@gmail.com

Changes in v2:
- drop NACKed commits
- make shared interrupts unconditionally
- rework descriptions
- add platform driver version
- Link to v1: https://lore.kernel.org/r/20241109-b4-max17042-v1-0-9e2b07e54e76@gmail.com

---
Dzmitry Sankouski (2):
      power: supply: max17042: make interrupt shared
      power: supply: max17042: add platform driver variant

 drivers/power/supply/max17042_battery.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 91 insertions(+), 32 deletions(-)
---
base-commit: ae58226b89ac0cffa05ba7357733776542e40216
change-id: 20241108-b4-max17042-9306fc75afae

Best regards,
-- 
Dzmitry Sankouski <dsankouski@gmail.com>


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

end of thread, other threads:[~2024-11-18 11:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-18 10:09 [PATCH v3 0/2] power: supply: max17042: cleanup and more features Dzmitry Sankouski
2024-11-18 10:09 ` [PATCH v3 1/2] power: supply: max17042: make interrupt shared Dzmitry Sankouski
2024-11-18 10:55   ` Hans de Goede
2024-11-18 10:09 ` [PATCH v3 2/2] power: supply: max17042: add platform driver variant Dzmitry Sankouski
2024-11-18 11:03   ` 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