mfd: cros_ec: Add convenience struct to define autodetectable CrOS EC subdevices
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Mon, 2 Sep 2019 09:53:08 +0000 (11:53 +0200)
committerLee Jones <lee.jones@linaro.org>
Mon, 2 Sep 2019 10:34:18 +0000 (11:34 +0100)
commit832a636f6afe16aa95cb7281c4eb2194b402515d
tree42e0d84fec896109cccae63dc4be2c2f6db22c64
parentb027dcf7c4c3e0d22b9ce84011eaf02cf0adf559
mfd: cros_ec: Add convenience struct to define autodetectable CrOS EC subdevices

The CrOS EC is gaining lots of subdevices that are autodetectable by
sending the EC_FEATURE_GET_CMD, it takes fair amount of boiler plate
code to add those devices. So, add a struct that can be used to quickly
add new subdevices without having to duplicate code.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/cros_ec_dev.c