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 <dnoj...@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

Reply via email to