diff options
| author | Gwendal Grignou <gwendal@chromium.org> | 2019-06-03 14:33:54 -0400 |
|---|---|---|
| committer | Lee Jones <lee.jones@linaro.org> | 2019-06-10 04:15:08 -0400 |
| commit | a47bc8a4e88b35d9ea97ecd773cd7e0688b3322a (patch) | |
| tree | 431e980c877230529d820946fffabd8f1fc4dc65 /include/linux/mfd | |
| parent | 77c48c76ad91cf774df26c6e5c74c76842943802 (diff) | |
mfd: cros_ec: Add I2C passthru protection API
Prevent direct i2c access to device behind EC when not in development mode.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/cros_ec_commands.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h index 49ea905cfd18..59ad6bae3f9b 100644 --- a/include/linux/mfd/cros_ec_commands.h +++ b/include/linux/mfd/cros_ec_commands.h | |||
| @@ -4318,6 +4318,28 @@ struct ec_params_entering_mode { | |||
| 4318 | 4318 | ||
| 4319 | /*****************************************************************************/ | 4319 | /*****************************************************************************/ |
| 4320 | /* | 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 | |||
| 4341 | /*****************************************************************************/ | ||
| 4342 | /* | ||
| 4321 | * HDMI CEC commands | 4343 | * HDMI CEC commands |
| 4322 | * | 4344 | * |
| 4323 | * These commands are for sending and receiving message via HDMI CEC | 4345 | * These commands are for sending and receiving message via HDMI CEC |
