[lkml]   [2019]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v2 0/4] power: supply: MAX17040: Add IRQ for low level and alert SOC changes
This series add IRQ handler for low level SOC alert, define a devicetree 
binding attribute to configure the alert level threshold and check for
changes in SOC for send uevents.

Max17040 have a pin for alert host about low level state of charge and
this alert can be configured in a threshold from 1% up to 32% of SOC.

Tested on Toradex Colibri iMX7D, with a SparkFun Lipo Fuel Gauge module
based on MAXIM MAX17043.

Thanks Krzysztof Kozlowski for your time reviewing it, and forgive me for
the delay in working on it, now I'm back to the patchs. Let me know what
you think about the fixes and I'm open to maintainers suggestions.

Changes since v1:
(Suggested by Krzysztof Kozlowski)
- Put common code from max17040_work and max17040_thread_handler in a function
- Code style fixes
- Define mask and low level threshold alert default
- Check return value from max17040_set_soc_threshold
- Set low level state of charge threshold before IRQ
- CC maintainers from drivers/mfd/max14577
- Use flags from FDT client->flags instead hard coded it
- Mention interrupts on DT Documentation
- Fix "maxim,max77836-battery" missed from DT Documentation
- Fix commit description

Matheus Castello (4):
power: supply: max17040: Add IRQ handler for low SOC alert
dt-bindings: power: supply: Max17040: Add low level SOC alert
power: supply: max17040: Config alert SOC low level threshold from FDT
power: supply: max17040: Send uevent in SOC changes

.../power/supply/max17040_battery.txt | 24 ++++
drivers/power/supply/max17040_battery.c | 118 +++++++++++++++++-
2 files changed, 138 insertions(+), 4 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/supply/max17040_battery.txt


 \ /
  Last update: 2019-04-15 03:48    [W:0.198 / U:3.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site