Re: [PATCH v7 1/2] power: supply: PCHG: Peripheral device charger
From: Sebastian Reichel
Date: Fri Jul 16 2021 - 09:57:31 EST
Hi,
On Wed, Jun 16, 2021 at 11:51:24AM -0700, 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/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@xxxxxxxxxxxx>
> ---
> [...]
> +static enum power_supply_property cros_pchg_props[] = {
> + POWER_SUPPLY_PROP_STATUS,
> + POWER_SUPPLY_PROP_CHARGE_TYPE,
> + POWER_SUPPLY_PROP_CAPACITY,
> + POWER_SUPPLY_PROP_SCOPE,
> + /*
> + * todo: Add the following.
> + *
> + * POWER_SUPPLY_PROP_TECHNOLOGY,
> + * POWER_SUPPLY_PROP_ERROR,
> + * POWER_SUPPLY_PROP_SERIAL_NUMBER,
> + *
> + * POWER_SUPPLY_PROP_ONLINE can't be used because it indicates the
> + * system is powered by AC.
> + */
> +};
> [...]
Thanks, I queued the driver with the above TODO removed. Please
track this downstream, the note is not useful in mainline kernel,
since we do not have (AFAIK) the necessary documentation to add
more features.
-- Sebastian
Attachment:
signature.asc
Description: PGP signature