[v2,0/3] Add optional properties to MAX17040

Message ID 20230730172648.71578-1-clamor95@gmail.com
Headers
Series Add optional properties to MAX17040 |

Message

Svyatoslav Ryhel July 30, 2023, 5:26 p.m. UTC
  Extend properties supported by max17040 fuel gauge if it is accompanied
by different devices.

If max17040 is coupled with a charger, pass charger status since it should
match and max17040 has no dedicated status detection ability.

max17040_get_online can be reused for PRESENT property since if it is
online it must be present.

Finally, max17040 may be coupled with a dedicated thermal sensor which
monitors battery temperature so lets add support for iio channel to match
hw setup.

---
Changes from v1:
- documentation dropped monitored-battery and power-supplies (inherited
  from inclusion)
- dropped passing charger health as battery health
- dropped patch for simple battery cell support
- switched iio_read_channel_raw to iio_read_channel_processed_scale
- switched iio_channel_get to devm_iio_channel_get
- re-organized implementation of temp channel (implemented in way 
  *_get_optional functions usually act)
---

Svyatoslav Ryhel (3):
  dt-bindings: power: supply: maxim,max17040: update properties
  power: max17040: pass status property from supplier
  power: max17040: get thermal data from adc if available

 .../bindings/power/supply/maxim,max17040.yaml | 31 +++++++++++++++++++
 drivers/power/supply/max17040_battery.c       | 27 ++++++++++++++++
 2 files changed, 58 insertions(+)