mfd: cros_ec_dev: Only register PCHG device if present
authorStephen Boyd <swboyd@chromium.org>
Tue, 19 Apr 2022 00:04:08 +0000 (17:04 -0700)
committerLee Jones <lee.jones@linaro.org>
Tue, 26 Apr 2022 18:23:24 +0000 (19:23 +0100)
commitff23a46e4657a4ac2d2f4a481ca8e1e45a892136
treef541ca200a272c57aec14e5d3988c3c29ec00eb8
parent4a901e305011e3a77873543386bd1c783b6509c0
mfd: cros_ec_dev: Only register PCHG device if present

Don't create a device for the peripheral charger (PCHG) if there aren't
any peripheral charger ports. This removes a device on most ChromeOS
systems, because the peripheral charger functionality isn't always
present.

Cc: Prashant Malani <pmalani@chromium.org>
Cc: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: Daisuke Nojiri <dnojiri@chromium.org>
Cc: Benson Leung <bleung@chromium.org>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: <chrome-platform@lists.linux.dev>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Prashant Malani <pmalani@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220419000408.3202635-1-swboyd@chromium.org
drivers/mfd/cros_ec_dev.c