On Mon, Apr 30, 2018 at 3:14 PM, Enric Balletbo i Serra
<enric.balle...@collabora.com> wrote:
> From: Sameer Nanda <sna...@chromium.org>
>
> 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 <sna...@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balle...@collabora.com>
> ---
>
> Changes in v2:
> - [2/3] Add SPDX header, use devm_ variant and drop .owner
> - [2/3] Removed the PD log functionality (will be send on a follow up patch)
> - [2/3] Removed the extra custom sysfs attributes (will be send on a follow 
> up patch)
>
>  drivers/power/supply/Kconfig              |  10 +
>  drivers/power/supply/Makefile             |   1 +
>  drivers/power/supply/cros_usbpd-charger.c | 511 ++++++++++++++++++++++
>  include/linux/mfd/cros_ec.h               |   2 +
>  4 files changed, 524 insertions(+)
>  create mode 100644 drivers/power/supply/cros_usbpd-charger.c
>
> diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
> index 428b426842f4..046eb23ba6f0 100644
> --- a/drivers/power/supply/Kconfig
> +++ b/drivers/power/supply/Kconfig
> @@ -624,4 +624,14 @@ config CHARGER_RT9455
>         help
>           Say Y to enable support for Richtek RT9455 battery charger.
>
> +config CHARGER_CROS_USBPD
> +       tristate "ChromeOS EC based USBPD charger"
> +       depends on MFD_CROS_EC
> +       default n
> +       help
> +         Say Y here to enable ChromeOS EC based USBPD charger
> +         driver. 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.
> +
>  endif # POWER_SUPPLY
> diff --git a/drivers/power/supply/Makefile b/drivers/power/supply/Makefile
> index e83aa843bcc6..907e26f824b2 100644
> --- a/drivers/power/supply/Makefile
> +++ b/drivers/power/supply/Makefile
> @@ -83,3 +83,4 @@ obj-$(CONFIG_CHARGER_TPS65090)        += tps65090-charger.o
>  obj-$(CONFIG_CHARGER_TPS65217) += tps65217_charger.o
>  obj-$(CONFIG_AXP288_FUEL_GAUGE) += axp288_fuel_gauge.o
>  obj-$(CONFIG_AXP288_CHARGER)   += axp288_charger.o
> +obj-$(CONFIG_CHARGER_CROS_USBPD)       += cros_usbpd-charger.o
> diff --git a/drivers/power/supply/cros_usbpd-charger.c 
> b/drivers/power/supply/cros_usbpd-charger.c
> new file mode 100644
> index 000000000000..c57d1c41828c
> --- /dev/null
> +++ b/drivers/power/supply/cros_usbpd-charger.c
> @@ -0,0 +1,511 @@
> +// SPDX-License-Identifier: GPL-2.0

If this is GPL-2.0...

> +/*
> + * Power supply driver for ChromeOS EC based USB PD Charger.
> + *
> + * Copyright (c) 2014 - 2018 Google, Inc
> + */
> +
> +
> +module_platform_driver(cros_usbpd_charger_driver);
> +
> +MODULE_LICENSE("GPL");

...then this should be "GPL v2":
https://elixir.bootlin.com/linux/v4.17-rc3/source/include/linux/module.h#L175

Cheers,
Miguel

Reply via email to