power: supply: sbs-manager: Add alert callback and battery change notification

This adds smb alert support via the smbus_alert driver to generate
power_supply_changed notifications when either external power is
removed / applied or a battery inserted / removed.
Use the i2c alert callback to notify the attached battery driver that a
change has occurred.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Phil Reid 2017-08-24 17:31:09 +08:00 • committed by Wolfram Sang
commit a0b8839e2a
2 changed files with 127 additions and 5 deletions