mfd: cros_ec_dev: Add GPIO device if feature present on EC
authorStephen Boyd <swboyd@chromium.org>
Mon, 19 Feb 2024 20:23:24 +0000 (12:23 -0800)
committerLee Jones <lee@kernel.org>
Fri, 23 Feb 2024 17:14:13 +0000 (17:14 +0000)
commit8f49b623b9348e3374491df1a18ca2de285fc7da
tree96a5e57a43dff29f89746c0d9721df13bf45e341
parent7b79740d42e7535901296f7acbab1043633422e6
mfd: cros_ec_dev: Add GPIO device if feature present on EC

The ChromeOS embedded controller (EC) supports setting the state of
GPIOs when the system is unlocked, and getting the state of GPIOs in all
cases. Check for the feature support by checking for the GPIO feature
and then populate a sub-device for the gpio hardware on the EC.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20240219202325.4095816-3-swboyd@chromium.org
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/cros_ec_dev.c