]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/chrome: cros_ec_proto: Introduce cros_ec_cmd_readmem()
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 29 May 2024 06:27:11 +0000 (08:27 +0200)
committerTzung-Bi Shih <tzungbi@kernel.org>
Mon, 3 Jun 2024 01:14:42 +0000 (01:14 +0000)
commita14a569a9918a0c7e340257a17dbc088bb27db72
tree932f1901daaf478d5951c8b0a197be318e5c1eb5
parent7b44d5381e541de3da3cee2e948456b250f41f25
platform/chrome: cros_ec_proto: Introduce cros_ec_cmd_readmem()

To read from the EC memory different mechanism are possible.
ECs connected via LPC expose their memory via a ->cmd_readmem operation.
Other protocols require the usage of EC_CMD_READ_MEMMAP, which on the
other hand is not implemented by LPC ECs.

Provide a helper that automatically selects the correct mechanism.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240529-cros_ec-hwmon-v4-1-5cdf0c5db50a@weissschuh.net
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/cros_ec_proto.c
include/linux/platform_data/cros_ec_proto.h