@@ -112,6 +112,10 @@ static const struct mfd_cell cros_ec_ucsi_cells[] = {
{ .name = "cros_ec_ucsi", },
};
+static const struct mfd_cell cros_ec_charge_state_cells[] = {
+ { .name = "cros-ec-charge-state", },
+};
+
static const struct cros_feature_to_cells cros_subdevices[] = {
{
.id = EC_FEATURE_CEC,
@@ -148,6 +152,11 @@ static const struct cros_feature_to_cells cros_subdevices[] = {
.mfd_cells = cros_ec_keyboard_leds_cells,
.num_cells = ARRAY_SIZE(cros_ec_keyboard_leds_cells),
},
+ {
+ .id = EC_FEATURE_BATTERY,
+ .mfd_cells = cros_ec_charge_state_cells,
+ .num_cells = ARRAY_SIZE(cros_ec_charge_state_cells),
+ },
};
static const struct mfd_cell cros_ec_platform_cells[] = {
The driver of controlling the charge chip connected on the ChromeOS Embedded Controller (EC) is added in the commit "platform/chrome: cros_ec_charge_state: add new driver to control charge". To register the charge state sub-devices, add mfd cells in the cros-ec-dev mfd driver, and register charge state sub-devices based on whether the EC supports battery feature. Signed-off-by: Sung-Chi, Li <lschyi@chromium.org> --- drivers/mfd/cros_ec_dev.c | 9 +++++++++ 1 file changed, 9 insertions(+)