power: supply: Add HWMON compatibility layer
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Wed, 12 Jun 2019 08:44:04 +0000 (01:44 -0700)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sun, 23 Jun 2019 17:47:48 +0000 (19:47 +0200)
commite67d4dfc9ff19dbe74b29617cf2592ccc50c3920
tree53334515e7f23b3ae073935f57d9af7784160414
parent22ee8384dc688cbcb8ac03112ce81c43d55a961b
power: supply: Add HWMON compatibility layer

Add code implementing HWMON adapter/compatibility layer to allow
expositing various sensors present on power supply devices via HWMON
subsystem. This is done in order to allow userspace to use single
ABI/library(libsensors) to access/manipulate all of the sensors of the
system.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Chris Healy <cphealy@gmail.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Cory Tusar <cory.tusar@zii.aero>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/Kconfig
drivers/power/supply/Makefile
drivers/power/supply/power_supply_core.c
drivers/power/supply/power_supply_hwmon.c [new file with mode: 0644]
include/linux/power_supply.h