mfd / platform: cros_ec: Add sensor_count and make check_features public
authorGwendal Grignou <gwendal@chromium.org>
Tue, 19 Nov 2019 12:45:45 +0000 (13:45 +0100)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Thu, 21 Nov 2019 10:23:13 +0000 (11:23 +0100)
commita16b2e28190255a0729c27902fa88fb8fff39bb0
treed60b0f6df3daffb6cc9aad7f76d0d79495208bae
parentc9b465683a554212c3dd92915ed2088849c513bf
mfd / platform: cros_ec: Add sensor_count and make check_features public

Add a new function to return the number of MEMS sensors available in a
ChromeOS Embedded Controller. It uses MOTIONSENSE_CMD_DUMP if available
or a specific memory map ACPI registers to find out.

Also, make check_features public as it can be useful for other drivers
to know what the Embedded Controller supports.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
drivers/mfd/cros_ec_dev.c
drivers/platform/chrome/cros_ec_proto.c
include/linux/platform_data/cros_ec_proto.h