linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gwendal Grignou <gwendal@chromium.org>
To: enric.balletbo@collabora.com, bleung@chromium.org,
	groeck@chromium.org, lee.jones@linaro.org, jic23@kernel.org,
	broonie@kernel.org, cychiang@chromium.org, tiwai@suse.com
Cc: linux-iio@vger.kernel.org, alsa-devel@alsa-project.org,
	Gwendal Grignou <gwendal@chromium.org>
Subject: [PATCH v2 08/30] mfd: cros_ec: move HDMI CEC API definition
Date: Fri,  3 May 2019 15:02:11 -0700	[thread overview]
Message-ID: <20190503220233.64546-9-gwendal@chromium.org> (raw)
In-Reply-To: <20190503220233.64546-1-gwendal@chromium.org>

Move near the end of file.

Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---
 include/linux/mfd/cros_ec_commands.h | 148 ++++++++++++++-------------
 1 file changed, 75 insertions(+), 73 deletions(-)

diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
index 6538c5789c43..67e15c29e083 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -3124,6 +3124,81 @@ struct ec_response_battery_vendor_param {
 } __ec_align4;
 
 /*****************************************************************************/
+/*
+ * HDMI CEC commands
+ *
+ * These commands are for sending and receiving message via HDMI CEC
+ */
+
+#define MAX_CEC_MSG_LEN 16
+
+/* CEC message from the AP to be written on the CEC bus */
+#define EC_CMD_CEC_WRITE_MSG 0x00B8
+
+/**
+ * struct ec_params_cec_write - Message to write to the CEC bus
+ * @msg: message content to write to the CEC bus
+ */
+struct ec_params_cec_write {
+	uint8_t msg[MAX_CEC_MSG_LEN];
+} __ec_align1;
+
+/* Set various CEC parameters */
+#define EC_CMD_CEC_SET 0x00BA
+
+/**
+ * struct ec_params_cec_set - CEC parameters set
+ * @cmd: parameter type, can be CEC_CMD_ENABLE or CEC_CMD_LOGICAL_ADDRESS
+ * @val: in case cmd is CEC_CMD_ENABLE, this field can be 0 to disable CEC
+ *	or 1 to enable CEC functionality, in case cmd is
+ *	CEC_CMD_LOGICAL_ADDRESS, this field encodes the requested logical
+ *	address between 0 and 15 or 0xff to unregister
+ */
+struct ec_params_cec_set {
+	uint8_t cmd; /* enum cec_command */
+	uint8_t val;
+} __ec_align1;
+
+/* Read various CEC parameters */
+#define EC_CMD_CEC_GET 0x00BB
+
+/**
+ * struct ec_params_cec_get - CEC parameters get
+ * @cmd: parameter type, can be CEC_CMD_ENABLE or CEC_CMD_LOGICAL_ADDRESS
+ */
+struct ec_params_cec_get {
+	uint8_t cmd; /* enum cec_command */
+} __ec_align1;
+
+/**
+ * struct ec_response_cec_get - CEC parameters get response
+ * @val: in case cmd was CEC_CMD_ENABLE, this field will 0 if CEC is
+ *	disabled or 1 if CEC functionality is enabled,
+ *	in case cmd was CEC_CMD_LOGICAL_ADDRESS, this will encode the
+ *	configured logical address between 0 and 15 or 0xff if unregistered
+ */
+struct ec_response_cec_get {
+	uint8_t val;
+} __ec_align1;
+
+/* CEC parameters command */
+enum cec_command {
+	/* CEC reading, writing and events enable */
+	CEC_CMD_ENABLE,
+	/* CEC logical address  */
+	CEC_CMD_LOGICAL_ADDRESS,
+};
+
+/* Events from CEC to AP */
+enum mkbp_cec_event {
+	/* Outgoing message was acknowledged by a follower */
+	EC_MKBP_CEC_SEND_OK			= BIT(0),
+	/* Outgoing message was not acknowledged */
+	EC_MKBP_CEC_SEND_FAILED			= BIT(1),
+};
+
+/*****************************************************************************/
+
 /* Commands for I2S recording on audio codec. */
 
 #define EC_CMD_CODEC_I2S 0x00BC
@@ -3252,79 +3327,6 @@ struct ec_params_reboot_ec {
  */
 #define EC_CMD_GET_PANIC_INFO 0x00D3
 
-/*****************************************************************************/
-/*
- * HDMI CEC commands
- *
- * These commands are for sending and receiving message via HDMI CEC
- */
-#define EC_MAX_CEC_MSG_LEN 16
-
-/* CEC message from the AP to be written on the CEC bus */
-#define EC_CMD_CEC_WRITE_MSG 0x00B8
-
-/**
- * struct ec_params_cec_write - Message to write to the CEC bus
- * @msg: message content to write to the CEC bus
- */
-struct ec_params_cec_write {
-	uint8_t msg[EC_MAX_CEC_MSG_LEN];
-} __ec_align1;
-
-/* Set various CEC parameters */
-#define EC_CMD_CEC_SET 0x00BA
-
-/**
- * struct ec_params_cec_set - CEC parameters set
- * @cmd: parameter type, can be CEC_CMD_ENABLE or CEC_CMD_LOGICAL_ADDRESS
- * @val: in case cmd is CEC_CMD_ENABLE, this field can be 0 to disable CEC
- *	or 1 to enable CEC functionality, in case cmd is CEC_CMD_LOGICAL_ADDRESS,
- *	this field encodes the requested logical address between 0 and 15
- *	or 0xff to unregister
- */
-struct ec_params_cec_set {
-	uint8_t cmd; /* enum cec_command */
-	uint8_t val;
-} __ec_align1;
-
-/* Read various CEC parameters */
-#define EC_CMD_CEC_GET 0x00BB
-
-/**
- * struct ec_params_cec_get - CEC parameters get
- * @cmd: parameter type, can be CEC_CMD_ENABLE or CEC_CMD_LOGICAL_ADDRESS
- */
-struct ec_params_cec_get {
-	uint8_t cmd; /* enum cec_command */
-} __ec_align1;
-
-/**
- * struct ec_response_cec_get - CEC parameters get response
- * @val: in case cmd was CEC_CMD_ENABLE, this field will 0 if CEC is
- *	disabled or 1 if CEC functionality is enabled,
- *	in case cmd was CEC_CMD_LOGICAL_ADDRESS, this will encode the
- *	configured logical address between 0 and 15 or 0xff if unregistered
- */
-struct ec_response_cec_get {
-	uint8_t val;
-} __ec_align1;
-
-/* CEC parameters command */
-enum ec_cec_command {
-	/* CEC reading, writing and events enable */
-	CEC_CMD_ENABLE,
-	/* CEC logical address  */
-	CEC_CMD_LOGICAL_ADDRESS,
-};
-
-/* Events from CEC to AP */
-enum mkbp_cec_event {
-	/* Outgoing message was acknowledged by a follower */
-	EC_MKBP_CEC_SEND_OK			= BIT(0),
-	/* Outgoing message was not acknowledged */
-	EC_MKBP_CEC_SEND_FAILED			= BIT(1),
-};
-
 /*****************************************************************************/
 /*
  * Special commands
-- 
2.21.0.1020.gf2820cf01a-goog


  parent reply	other threads:[~2019-05-03 22:02 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 22:02 [PATCH v2 00/30] Update cros_ec_commands.h Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 01/30] mfd: cros_ec: Update license term Gwendal Grignou
2019-05-05 15:46   ` Jonathan Cameron
2019-05-03 22:02 ` [PATCH v2 02/30] mfd: cros_ec: Zero BUILD_ macro Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 03/30] mfd: cros_ec: set comments properly Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 04/30] mfd: cros_ec: add ec_align macros Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 05/30] mfd: cros_ec: Define commands as 4-digit UPPER CASE hex values Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 06/30] mfd: cros_ec: use BIT macro Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 07/30] mfd: cros_ec: Update ACPI interface definition Gwendal Grignou
2019-05-03 22:02 ` Gwendal Grignou [this message]
2019-05-03 22:02 ` [PATCH v2 09/30] mfd: cros_ec: Remove zero-size structs Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 10/30] mfd: cros_ec: Add Flash V2 commands API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 11/30] mfd: cros_ec: Add PWM_SET_DUTY API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 12/30] mfd: cros_ec: Add lightbar v2 API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 13/30] mfd: cros_ec: Expand hash API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 14/30] mfd: cros_ec: Add EC transport protocol v4 Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 15/30] mfd: cros_ec: Complete MEMS sensor API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 16/30] mfd: cros_ec: Fix event processing API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 17/30] mfd: cros_ec: Add fingerprint API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 18/30] mfd: cros_ec: Fix temperature API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 19/30] mfd: cros_ec: Complete Power and USB PD API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 20/30] mfd: cros_ec: Add API for keyboard testing Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 21/30] mfd: cros_ec: Add Hibernate API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 22/30] mfd: cros_ec: Add Smart Battery Firmware update API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 23/30] mfd: cros_ec: Add I2C passthru protection API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 24/30] mfd: cros_ec: Add API for EC-EC communication Gwendal Grignou
2019-05-08 23:22   ` Benson Leung
2019-05-03 22:02 ` [PATCH v2 25/30] mfd: cros_ec: Add API for Touchpad support Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 26/30] mfd: cros_ec: Add API for Fingerprint support Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 27/30] mfd: cros_ec: Add API for rwsig Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 28/30] mfd: cros_ec: Add SKU ID and Secure storage API Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 29/30] mfd: cros_ec: Add Management API entry points Gwendal Grignou
2019-05-03 22:02 ` [PATCH v2 30/30] mfd: cros_ec: Update I2S API Gwendal Grignou
2019-05-07  9:50   ` Cheng-yi Chiang
2019-05-07  9:44 ` [PATCH v2 00/30] Update cros_ec_commands.h Lee Jones
2019-05-08 23:19   ` Benson Leung
2019-05-09  6:11     ` 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=20190503220233.64546-9-gwendal@chromium.org \
    --to=gwendal@chromium.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bleung@chromium.org \
    --cc=broonie@kernel.org \
    --cc=cychiang@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=jic23@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=tiwai@suse.com \
    /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).