History

mfd: cros_ec: move HDMI CEC API definition

Move near the end of file.

Gwendal Grignou committed 7 years ago

Commit e849b871 parent ce86c871 file · +75 −73Browse files

Unified · Split

include/linux/mfd/cros_ec_commands.h+75−73
@@ -3211,6 +3211,81 @@ struct ec_response_battery_vendor_param { · 3210 unmodified lines
32113211 } __ec_align4;
32123212
32133213 /*****************************************************************************/
3214+/*
3215+ * HDMI CEC commands
3216+ *
3217+ * These commands are for sending and receiving message via HDMI CEC
3218+ */
3219+
3220+#define MAX_CEC_MSG_LEN 16
3221+
3222+/* CEC message from the AP to be written on the CEC bus */
3223+#define EC_CMD_CEC_WRITE_MSG 0x00B8
3224+
3225+/**
3226+ * struct ec_params_cec_write - Message to write to the CEC bus
3227+ * @msg: message content to write to the CEC bus
3228+ */
3229+struct ec_params_cec_write {
3230+ uint8_t msg[MAX_CEC_MSG_LEN];
3231+} __ec_align1;
3232+
3233+/* Set various CEC parameters */
3234+#define EC_CMD_CEC_SET 0x00BA
3235+
3236+/**
3237+ * struct ec_params_cec_set - CEC parameters set
3238+ * @cmd: parameter type, can be CEC_CMD_ENABLE or CEC_CMD_LOGICAL_ADDRESS
3239+ * @val: in case cmd is CEC_CMD_ENABLE, this field can be 0 to disable CEC
3240+ * or 1 to enable CEC functionality, in case cmd is
3241+ * CEC_CMD_LOGICAL_ADDRESS, this field encodes the requested logical
3242+ * address between 0 and 15 or 0xff to unregister
3243+ */
3244+struct ec_params_cec_set {
3245+ uint8_t cmd; /* enum cec_command */
3246+ uint8_t val;
3247+} __ec_align1;
3248+
3249+/* Read various CEC parameters */
3250+#define EC_CMD_CEC_GET 0x00BB
3251+
3252+/**
3253+ * struct ec_params_cec_get - CEC parameters get
3254+ * @cmd: parameter type, can be CEC_CMD_ENABLE or CEC_CMD_LOGICAL_ADDRESS
3255+ */
3256+struct ec_params_cec_get {
3257+ uint8_t cmd; /* enum cec_command */
3258+} __ec_align1;
3259+
3260+/**
3261+ * struct ec_response_cec_get - CEC parameters get response
3262+ * @val: in case cmd was CEC_CMD_ENABLE, this field will 0 if CEC is
3263+ * disabled or 1 if CEC functionality is enabled,
3264+ * in case cmd was CEC_CMD_LOGICAL_ADDRESS, this will encode the
3265+ * configured logical address between 0 and 15 or 0xff if unregistered
3266+ */
3267+struct ec_response_cec_get {
3268+ uint8_t val;
3269+} __ec_align1;
3270+
3271+/* CEC parameters command */
3272+enum cec_command {
3273+ /* CEC reading, writing and events enable */
3274+ CEC_CMD_ENABLE,
3275+ /* CEC logical address */
3276+ CEC_CMD_LOGICAL_ADDRESS,
3277+};
3278+
3279+/* Events from CEC to AP */
3280+enum mkbp_cec_event {
3281+ /* Outgoing message was acknowledged by a follower */
3282+ EC_MKBP_CEC_SEND_OK = BIT(0),
3283+ /* Outgoing message was not acknowledged */
3284+ EC_MKBP_CEC_SEND_FAILED = BIT(1),
3285+};
3286+
3287+/*****************************************************************************/
3288+
32143289 /* Commands for I2S recording on audio codec. */
32153290
32163291 #define EC_CMD_CODEC_I2S 0x00BC
@@ -3339,79 +3414,6 @@ struct ec_params_reboot_ec { · 122 unmodified lines
33393414 */
33403415 #define EC_CMD_GET_PANIC_INFO 0x00D3
33413416
3342−/*****************************************************************************/
3343−/*
3344− * HDMI CEC commands
3345− *
3346− * These commands are for sending and receiving message via HDMI CEC
3347− */
3348−#define EC_MAX_CEC_MSG_LEN 16
3349−
3350−/* CEC message from the AP to be written on the CEC bus */
3351−#define EC_CMD_CEC_WRITE_MSG 0x00B8
3352−
3353−/**
3354− * struct ec_params_cec_write - Message to write to the CEC bus
3355− * @msg: message content to write to the CEC bus
3356− */
3357−struct ec_params_cec_write {
3358− uint8_t msg[EC_MAX_CEC_MSG_LEN];
3359−} __ec_align1;
3360−
3361−/* Set various CEC parameters */
3362−#define EC_CMD_CEC_SET 0x00BA
3363−
3364−/**
3365− * struct ec_params_cec_set - CEC parameters set
3366− * @cmd: parameter type, can be CEC_CMD_ENABLE or CEC_CMD_LOGICAL_ADDRESS
3367− * @val: in case cmd is CEC_CMD_ENABLE, this field can be 0 to disable CEC
3368− * or 1 to enable CEC functionality, in case cmd is CEC_CMD_LOGICAL_ADDRESS,
3369− * this field encodes the requested logical address between 0 and 15
3370− * or 0xff to unregister
3371− */
3372−struct ec_params_cec_set {
3373− uint8_t cmd; /* enum cec_command */
3374− uint8_t val;
3375−} __ec_align1;
3376−
3377−/* Read various CEC parameters */
3378−#define EC_CMD_CEC_GET 0x00BB
3379−
3380−/**
3381− * struct ec_params_cec_get - CEC parameters get
3382− * @cmd: parameter type, can be CEC_CMD_ENABLE or CEC_CMD_LOGICAL_ADDRESS
3383− */
3384−struct ec_params_cec_get {
3385− uint8_t cmd; /* enum cec_command */
3386−} __ec_align1;
3387−
3388−/**
3389− * struct ec_response_cec_get - CEC parameters get response
3390− * @val: in case cmd was CEC_CMD_ENABLE, this field will 0 if CEC is
3391− * disabled or 1 if CEC functionality is enabled,
3392− * in case cmd was CEC_CMD_LOGICAL_ADDRESS, this will encode the
3393− * configured logical address between 0 and 15 or 0xff if unregistered
3394− */
3395−struct ec_response_cec_get {
3396− uint8_t val;
3397−} __ec_align1;
3398−
3399−/* CEC parameters command */
3400−enum ec_cec_command {
3401− /* CEC reading, writing and events enable */
3402− CEC_CMD_ENABLE,
3403− /* CEC logical address */
3404− CEC_CMD_LOGICAL_ADDRESS,
3405−};
3406−
3407−/* Events from CEC to AP */
3408−enum mkbp_cec_event {
3409− /* Outgoing message was acknowledged by a follower */
3410− EC_MKBP_CEC_SEND_OK = BIT(0),
3411− /* Outgoing message was not acknowledged */
3412− EC_MKBP_CEC_SEND_FAILED = BIT(1),
3413−};
3414−
34153417 /*****************************************************************************/
34163418 /*
34173419 * Special commands

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t