lkml.org 
[lkml]   [2021]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 1/2] power: supply: PCHG: Peripheral device charger
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@chromium.org>
> ---
> [...]
> +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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-07-16 15:57    [W:0.043 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site