summaryrefslogtreecommitdiff
path: root/drivers/power/supply/cros_peripheral_charger.c
AgeCommit message (Collapse)AuthorFilesLines
2021-07-16power: supply: PCHG: Peripheral device chargerDaisuke Nojiri1-0/+386
This patch adds a driver for PCHG (Peripheral CHarGer). PCHG is a framework managing power supplies for peripheral devices. This driver creates a sysfs node for each peripheral charge port: /sys/class/power_supply/peripheral<n> where <n> is the index of a charge port. For example, when a stylus is connected to a NFC/WLC port, the node returns: /sys/class/power_supply/peripheral0/ capacity=50 charge_type=Standard scope=Device status=Charging type=Battery Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>