linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabien Parent <fparent@baylibre.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	eballetbo@gmail.com, gpain@baylibre.com,
	Fabien Parent <fparent@baylibre.com>
Subject: [PATCH 1/3] mfd: cros: add charger port count command definition
Date: Tue, 29 May 2018 20:17:02 -0700	[thread overview]
Message-ID: <20180530031704.18597-2-fparent@baylibre.com> (raw)
In-Reply-To: <20180530031704.18597-1-fparent@baylibre.com>

A new more command has been added to the ChromeOS embedded controller
that allows to get the number of charger port count. Unlike
EC_CMD_USB_PD_PORTS, this new command also includes the dedicated
port if present.

This command will be used to expose the dedicated charger port
in the ChromeOS charger driver.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 include/linux/mfd/cros_ec_commands.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
index 0d926492ac3a..e3187f8bdb7e 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -3005,6 +3005,16 @@ struct ec_params_usb_pd_info_request {
 	uint8_t port;
 } __packed;
 
+/*
+ * This command will return the number of USB PD charge port + the number
+ * of dedicated port present.
+ * EC_CMD_USB_PD_PORTS does NOT include the dedicated ports
+ */
+#define EC_CMD_CHARGE_PORT_COUNT 0x0105
+struct ec_response_charge_port_count {
+	uint8_t port_count;
+} __packed;
+
 /* Read USB-PD Device discovery info */
 #define EC_CMD_USB_PD_DISCOVERY 0x0113
 struct ec_params_usb_pd_discovery_entry {
-- 
2.17.0

  reply	other threads:[~2018-05-30  3:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30  3:17 [PATCH 0/3] power: supply: cros: add support for dedicated port and expose connected ports Fabien Parent
2018-05-30  3:17 ` Fabien Parent [this message]
2018-06-01 16:40   ` [PATCH 1/3] mfd: cros: add charger port count command definition Enric Balletbo Serra
2018-06-04  8:59   ` Lee Jones
2018-06-04 17:12     ` Fabien Parent
2018-06-05  7:11       ` Lee Jones
2018-05-30  3:17 ` [PATCH 2/3] power: supply: cros: add support for dedicated port Fabien Parent
2018-06-13 10:57   ` Fabien Parent
2018-05-30  3:17 ` [PATCH 3/3] power: supply: cros: add property to detect connected ports Fabien Parent
2018-06-01 16:30   ` Enric Balletbo Serra
2018-06-04 17:13 ` [PATCH 0/3] power: supply: cros: add support for dedicated port and expose " Fabien Parent

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=20180530031704.18597-2-fparent@baylibre.com \
    --to=fparent@baylibre.com \
    --cc=eballetbo@gmail.com \
    --cc=gpain@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.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 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).