Re: [PATCH 2/3] power: supply: add cros-ec USB PD charger driver.

From: Aishwarya Pant
Date: Thu Jan 18 2018 - 00:56:57 EST


On Wed, Jan 17, 2018 at 06:59:31PM +0100, Enric Balletbo i Serra wrote:
> From: Sameer Nanda <snanda@xxxxxxxxxxxx>
>
> This driver gets various bits of information about what is connected to
> USB PD ports from the EC and converts that into power_supply properties.
>
> Signed-off-by: Sameer Nanda <snanda@xxxxxxxxxxxx>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@xxxxxxxxxxxxx>
> ---
> drivers/power/supply/Kconfig | 11 +
> drivers/power/supply/Makefile | 1 +
> drivers/power/supply/cros_usbpd-charger.c | 953 ++++++++++++++++++++++++++++++
> include/linux/mfd/cros_ec.h | 3 +
> 4 files changed, 968 insertions(+)
> create mode 100644 drivers/power/supply/cros_usbpd-charger.c

<snip>

> +static DEVICE_ATTR(ext_current_lim, 0664, get_ec_ext_current_lim,
> + set_ec_ext_current_lim);
> +static DEVICE_ATTR(ext_voltage_lim, 0664, get_ec_ext_voltage_lim,
> + set_ec_ext_voltage_lim);
> +

Hi

I see that you have added new files to the sysfs ABI. It would probably be a
good idea to have these new interfaces documented in Documentation/ABI.

Aishwarya

> +static struct attribute *__ext_power_cmds_attrs[] = {
> + &dev_attr_ext_current_lim.attr,
> + &dev_attr_ext_voltage_lim.attr,
> + NULL,
> +};

<snip>