History

mfd: cros_ec: Add I2C passthru protection API

Prevent direct i2c access to device behind EC when not in development mode.

Gwendal Grignou committed 7 years ago

Commit a47bc8a1 parent 77c48c71 file · +22 −0Browse files

Unified · Split

include/linux/mfd/cros_ec_commands.h+22−0
@@ -4316,6 +4316,28 @@ struct ec_params_entering_mode { · 4315 unmodified lines
43164316 #define VBOOT_MODE_DEVELOPER 1
43174317 #define VBOOT_MODE_RECOVERY 2
43184318
4319+/*****************************************************************************/
4320+/*
4321+ * I2C passthru protection command: Protects I2C tunnels against access on
4322+ * certain addresses (board-specific).
4323+ */
4324+#define EC_CMD_I2C_PASSTHRU_PROTECT 0x00B7
4325+
4326+enum ec_i2c_passthru_protect_subcmd {
4327+ EC_CMD_I2C_PASSTHRU_PROTECT_STATUS = 0x0,
4328+ EC_CMD_I2C_PASSTHRU_PROTECT_ENABLE = 0x1,
4329+};
4330+
4331+struct ec_params_i2c_passthru_protect {
4332+ uint8_t subcmd;
4333+ uint8_t port; /* I2C port number */
4334+} __ec_align1;
4335+
4336+struct ec_response_i2c_passthru_protect {
4337+ uint8_t status; /* Status flags (0: unlocked, 1: locked) */
4338+} __ec_align1;
4339+
4340+
43194341 /*****************************************************************************/
43204342 /*
43214343 * HDMI CEC 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