lkml.org 
[lkml]   [2020]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] power: supply: PCHG: Peripheral device charger
On Mon, 14 Dec 2020, Daisuke Nojiri wrote:

> 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/PCHGn
>
> where <n> is the index of a charge port.
>
> For example, when a stylus is connected to a NFC/WLC port, the node
> prints:
>
> /sys/class/power_supply/PCHG0/
> capacity=50
> status=Charging
> type=Wireless
>
> Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
> ---
>
> drivers/mfd/cros_ec_dev.c | 1 +

This should be a separate patch.

> drivers/power/supply/Kconfig | 10 +
> drivers/power/supply/Makefile | 1 +
> .../power/supply/cros_peripheral_charger.c | 346 ++++++++++++++++++
> .../linux/platform_data/cros_ec_commands.h | 48 +++
> 5 files changed, 406 insertions(+)
> create mode 100644 drivers/power/supply/cros_peripheral_charger.c
>
> diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
> index 6135321592b76c..945565fc46a319 100644
> --- a/drivers/mfd/cros_ec_dev.c
> +++ b/drivers/mfd/cros_ec_dev.c
> @@ -85,6 +85,7 @@ static const struct mfd_cell cros_ec_sensorhub_cells[] = {
> static const struct mfd_cell cros_usbpd_charger_cells[] = {
> { .name = "cros-usbpd-charger", },
> { .name = "cros-usbpd-logger", },
> + { .name = "cros-pchg", },
> };

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

\
 
 \ /
  Last update: 2020-12-15 08:58    [W:0.046 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site