All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: 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@vger.kernel.org, Benson Leung <bleung@chromium.org>,
	miguel.ojeda.sandonis@gmail.com
Subject: Re: [PATCH v2 1/3] mfd: cros_ec: Add USBPD charger commands and struct definitions.
Date: Tue, 1 May 2018 09:29:05 +0100	[thread overview]
Message-ID: <20180501082905.GJ5147@dell> (raw)
In-Reply-To: <20180430131403.14296-2-enric.balletbo@collabora.com>

On Mon, 30 Apr 2018, Enric Balletbo i Serra wrote:

> From: Sameer Nanda <snanda@chromium.org>
> 
> The USBPD charger driver gets information from the ChromeOS EC, this
> patch adds the USBPD charger definitions needed by this driver.
> 
> Signed-off-by: Sameer Nanda <snanda@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> 
> Changes in v2: None
> 
>  include/linux/mfd/cros_ec_commands.h | 132 ++++++++++++++++++++++++++-
>  1 file changed, 128 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
> index f2edd9969b40..94dcf331796c 100644
> --- a/include/linux/mfd/cros_ec_commands.h
> +++ b/include/linux/mfd/cros_ec_commands.h

[...]

> +struct ec_response_pd_log {
> +	uint32_t timestamp; /* relative timestamp in milliseconds */
> +	uint8_t type;       /* event type : see PD_EVENT_xx below */
> +	uint8_t size_port;  /* [7:5] port number [4:0] payload size in bytes */
> +	uint16_t data;      /* type-defined data payload */
> +	uint8_t payload[0]; /* optional additional data payload: 0..16 bytes */
> +} __packed;

I think this whole file should be converted to Kerneldoc format.

[...]

> +/*
> + * PD_EVENT_MCU_CHARGE event definition :
> + * the payload is "struct usb_chg_measures"
> + * the data field contains the port state flags as defined below :
> + */
> +/* Port partner is a dual role device */
> +#define CHARGE_FLAGS_DUAL_ROLE         (1 << 15)

BIT()?

> +/* Port is the pending override port */
> +#define CHARGE_FLAGS_DELAYED_OVERRIDE  (1 << 14)
> +/* Port is the override port */
> +#define CHARGE_FLAGS_OVERRIDE          (1 << 13)

[...]

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2018-05-01  8:29 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 USBPD charger driver 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 [this message]
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
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=20180501082905.GJ5147@dell \
    --to=lee.jones@linaro.org \
    --cc=bleung@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=snanda@chromium.org \
    --cc=sre@kernel.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.