diff options
| author | Andrei Kuchynski <akuchynski@chromium.org> | 2026-06-08 21:15:17 +0000 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2026-07-23 17:02:38 +0100 |
| commit | d6ae9f9b9bd373461442f17ef157ed9ee850a413 (patch) | |
| tree | c4e407d26fc76073c996a91b2f60e92d6f38f699 /include/linux/platform_data | |
| parent | dc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff) | |
| download | linux-d6ae9f9b9bd373461442f17ef157ed9ee850a413.tar.gz linux-d6ae9f9b9bd373461442f17ef157ed9ee850a413.zip | |
platform/chrome: cros_ec_proto: Introduce cros_ec_read_features helper
Extract the EC feature-reading logic from cros_ec_check_features() into
cros_ec_read_features() helper function.
Currently, cros_ec_check_features() swallows command transfer errors. By
isolating the transaction logic into an explicit helper that returns the
actual transfer error code, subsequent callers (such as the cros_ec_dev
driver during device probing) can catch a read error.
Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Acked-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20260608211518.2214740-2-akuchynski@chromium.org
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/cros_ec_proto.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h index 6ed1c4c5ce2e..a1ccecf5e1f8 100644 --- a/include/linux/platform_data/cros_ec_proto.h +++ b/include/linux/platform_data/cros_ec_proto.h @@ -271,6 +271,8 @@ int cros_ec_get_next_event(struct cros_ec_device *ec_dev, u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev); +int cros_ec_read_features(struct cros_ec_dev *ec); + bool cros_ec_check_features(struct cros_ec_dev *ec, int feature); int cros_ec_get_sensor_count(struct cros_ec_dev *ec); |
