resource: Add battery resource driver 56/271256/7
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 17 Feb 2022 04:12:49 +0000 (13:12 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 18 Feb 2022 07:52:00 +0000 (16:52 +0900)
commite032d2cb1a2ce83d6483f78b93208c1ff90e9f93
treef13925c8ae3f98d00b6dbbf2705ac7f858bc41ad
parent32757ea50f80db04a045ba2aa22c60d1ff0537c7
resource: Add battery resource driver

Add battery resouce driver which read the Linux standard power_supply
interface to get the battery information.

[Detailed description of battery attributes]
- BATTERY_CAPACITY indicates the SoC (State of Charging)and unit is %.
- BATTERY_STATUS indicates the charging status.
- BATTERY_TEMPERATURE indicates the battery temperature.
- BATTERY_VOLTAGE_NOW indicates the voltage value now.
- BATTERY_CURRENT_NOW indicates the current value now.
- BATTERY_PRESENT indicates the connection status of battery.
- BATTERY_ONLINE indicates the connection status of charging cable.

Change-Id: I6011e155d3e401f82538abbccba7ba02e33d796b
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
CMakeLists.txt
lib/tmonitor/tmonitor.h
src/resource/resource-battery.c [new file with mode: 0644]