LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: Lee Jones <lee.jones@linaro.org>,
	Sebastian Reichel <sre@kernel.org>,
	Gwendal Grignou <gwendal@chromium.org>,
	Sameer Nanda <snanda@chromium.org>,
	linux-pm@vger.kernel.org, Guenter Roeck <groeck@chromium.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Benson Leung <bleung@chromium.org>
Subject: Re: [PATCH v2 2/3] power: supply: add cros-ec USBPD charger driver.
Date: Mon, 30 Apr 2018 15:20:27 +0200	[thread overview]
Message-ID: <CANiq72=CcaLadgp3NDa_rZ_DGeLUu3ZPhKZ5CCHJGypMfKrn-g@mail.gmail.com> (raw)
In-Reply-To: <20180430131403.14296-3-enric.balletbo@collabora.com>

On Mon, Apr 30, 2018 at 3:14 PM, Enric Balletbo i Serra
<enric.balletbo@collabora.com> wrote:
> From: Sameer Nanda <snanda@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 <snanda@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@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	other threads:[~2018-04-30 13:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30 13:14 [PATCH v2 0/3] mfd/power: cros_ec: add support for " Enric Balletbo i Serra
2018-04-30 13:14 ` [PATCH v2 1/3] mfd: cros_ec: Add USBPD charger commands and struct definitions Enric Balletbo i Serra
2018-05-01  8:29   ` Lee Jones
2018-05-02  9:33     ` Enric Balletbo i Serra
2018-05-02  9:56       ` Lee Jones
2018-04-30 13:14 ` [PATCH v2 2/3] power: supply: add cros-ec USBPD charger driver Enric Balletbo i Serra
2018-04-30 13:20   ` Miguel Ojeda [this message]
2018-04-30 13:37     ` Enric Balletbo Serra
2018-05-01  8:29   ` Lee Jones
2018-05-01 12:17   ` Sebastian Reichel
2018-05-01 13:27     ` Lee Jones
2018-04-30 13:14 ` [PATCH v2 3/3] mfd: cros_ec_dev: Register cros_usbpd-charger driver as a subdevice Enric Balletbo i Serra
2018-05-01  8:32   ` Lee Jones
2018-05-02  9:42     ` Enric Balletbo i Serra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANiq72=CcaLadgp3NDa_rZ_DGeLUu3ZPhKZ5CCHJGypMfKrn-g@mail.gmail.com' \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=bleung@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=snanda@chromium.org \
    --cc=sre@kernel.org \
    --subject='Re: [PATCH v2 2/3] power: supply: add cros-ec USBPD charger driver.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).