All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benson Leung <bleung@chromium.org>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Sameer Nanda" <snanda@chromium.org>,
	"Enric Balletbò" <enric.balletbo@collabora.co.uk>,
	"Vic Yang" <victoryang@chromium.org>,
	"Vincent Palatin" <vpalatin@chromium.org>,
	"Randall Spangler" <rspangler@chromium.org>,
	"Gwendal Grignou" <gwendal@chromium.org>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Dmitry Eremin-Solenikov" <dbaryshkov@gmail.com>,
	"David Woodhouse" <dwmw2@infradead.org>,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH v1 3/6] power_supply: Add types for USB Type C and PD chargers
Date: Fri, 5 Feb 2016 10:38:44 -0800	[thread overview]
Message-ID: <CANLzEktsLH_hMPoaspuP1tZue-HkA3rqY2PbqOPOAOB7qm5+pA@mail.gmail.com> (raw)
In-Reply-To: <1454679181-8949-4-git-send-email-tomeu.vizoso@collabora.com>

Thanks for putting this up Tomeu!


On Fri, Feb 5, 2016 at 5:32 AM, Tomeu Vizoso <tomeu.vizoso@collabora.com> wrote:
> From: Benson Leung <bleung@chromium.org>
>
> This adds power supply types for USB chargers defined in
> the USB Type-C Specification 1.1 and in the
> USB Power Delivery Specification Revision 2.0 V1.1.
>
> The following are added :
> POWER_SUPPLY_TYPE_USB_TYPE_C,   /* Type C Port */
> POWER_SUPPLY_TYPE_USB_PD,       /* Type C Power Delivery Port */
> POWER_SUPPLY_TYPE_USB_PD_DRP,   /* Type C PD Dual Role Port */

I authored this patch, but in looking back, the comments should be tweaked.
USB_PD and USB_PD_DRP are not necessarily Type-C ports, as you may
have USB_PD ports that are either Type-A or Type-B as well.

Could you change these to be "USB Power Delivery Port" and "USB PD
Dual Role Port"?

>
> Signed-off-by: Benson Leung <bleung@chromium.org>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> Reviewed-by: Alec Berg <alecaberg@chromium.org>
> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
> Reviewed-by: Todd Broch <tbroch@chromium.org>
> ---
>
>  drivers/power/power_supply_sysfs.c | 3 ++-
>  include/linux/power_supply.h       | 3 +++
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
> index ed2d7fd0c734..80fed98832f9 100644
> --- a/drivers/power/power_supply_sysfs.c
> +++ b/drivers/power/power_supply_sysfs.c
> @@ -45,7 +45,8 @@ static ssize_t power_supply_show_property(struct device *dev,
>                                           char *buf) {
>         static char *type_text[] = {
>                 "Unknown", "Battery", "UPS", "Mains", "USB",
> -               "USB_DCP", "USB_CDP", "USB_ACA"
> +               "USB_DCP", "USB_CDP", "USB_ACA", "USB_C",
> +               "USB_PD", "USB_PD_DRP"
>         };
>         static char *status_text[] = {
>                 "Unknown", "Charging", "Discharging", "Not charging", "Full"
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index ef9f1592185d..206c3384c6fa 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -163,6 +163,9 @@ enum power_supply_type {
>         POWER_SUPPLY_TYPE_USB_DCP,      /* Dedicated Charging Port */
>         POWER_SUPPLY_TYPE_USB_CDP,      /* Charging Downstream Port */
>         POWER_SUPPLY_TYPE_USB_ACA,      /* Accessory Charger Adapters */
> +       POWER_SUPPLY_TYPE_USB_TYPE_C,   /* Type C Port */
> +       POWER_SUPPLY_TYPE_USB_PD,       /* Type C Power Delivery Port */
> +       POWER_SUPPLY_TYPE_USB_PD_DRP,   /* Type C PD Dual Role Port */

Same change as in commit message. Thanks!

>  };
>
>  enum power_supply_notifier_events {




-- 
Benson Leung
Senior Software Engineer, Chrom* OS
bleung@chromium.org

  reply	other threads:[~2016-02-05 18:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05 13:32 [PATCH v1 0/6] EC-based USB Power Delivery support for Chrome machines Tomeu Vizoso
2016-02-05 13:32 ` [PATCH v1 1/6] mfd: cros_ec: small kerneldoc fix Tomeu Vizoso
2016-02-05 18:46   ` Benson Leung
2016-02-10 16:25   ` Lee Jones
2016-02-05 13:32 ` [PATCH v1 2/6] mfd: cros_ec: Add MKBP event support Tomeu Vizoso
2016-02-10 17:41   ` Gwendal Grignou
2016-02-11  9:15     ` Lee Jones
2016-02-11  9:15       ` Lee Jones
     [not found]   ` <CAMHSBOXRvC7U_KWeg+rX3Qymaos0-3FN6AuaXT2cyP=gAN47mA@mail.gmail.com>
2016-02-11 14:52     ` Tomeu Vizoso
2016-02-11 14:52       ` Tomeu Vizoso
2016-02-11 18:49       ` Gwendal Grignou
2016-02-05 13:32 ` [PATCH v1 3/6] power_supply: Add types for USB Type C and PD chargers Tomeu Vizoso
2016-02-05 18:38   ` Benson Leung [this message]
2016-02-11 10:00     ` Tomeu Vizoso
2016-02-11 15:05       ` Benson Leung
2016-02-05 13:32 ` [PATCH v1 4/6] power: cros_usbpd-charger: Add EC-based USB PD charger driver Tomeu Vizoso
2016-02-10 16:49   ` Lee Jones
2016-02-12 11:07     ` Tomeu Vizoso
2016-02-05 13:33 ` [PATCH v1 5/6] platform/chrome: Register USB PD charger device Tomeu Vizoso
2016-02-10 16:46   ` Lee Jones
2016-02-12 11:06     ` Tomeu Vizoso
2016-02-05 13:33 ` [PATCH v1 6/6] platform/chrome: Check the USB PD feature before creating a charger Tomeu Vizoso
2016-02-10 16:28   ` Lee Jones

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=CANLzEktsLH_hMPoaspuP1tZue-HkA3rqY2PbqOPOAOB7qm5+pA@mail.gmail.com \
    --to=bleung@chromium.org \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=enric.balletbo@collabora.co.uk \
    --cc=gwendal@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rspangler@chromium.org \
    --cc=snanda@chromium.org \
    --cc=sre@kernel.org \
    --cc=tomeu.vizoso@collabora.com \
    --cc=victoryang@chromium.org \
    --cc=vpalatin@chromium.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.