linux-stable/drivers/platform
Prashant Malani 3fc8196862 platform/chrome: cros_ec_typec: Check for EC device
commit ffebd90532 upstream.

The Type C ACPI device on older Chromebooks is not generated correctly
(since their EC firmware doesn't support the new commands required). In
such cases, the crafted ACPI device doesn't have an EC parent, and it is
therefore not useful (it shouldn't be generated in the first place since
the EC firmware doesn't support any of the Type C commands).

To handle devices which use these older firmware revisions, check for
the parent EC device handle, and fail the probe if it's not found.

Fixes: fdc6b21e24 ("platform/chrome: Add Type C connector class driver")
Reported-by: Alyssa Ross <hi@alyssa.is>
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Alyssa Ross <hi@alyssa.is>
Tested-by: Alyssa Ross <hi@alyssa.is>
Link: https://lore.kernel.org/r/20220126190219.3095419-1-pmalani@chromium.org
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08 14:24:12 +02:00
..
chrome platform/chrome: cros_ec_typec: Check for EC device 2022-04-08 14:24:12 +02:00
goldfish platform/goldfish: Convert pipe tasklet to threaded irq 2021-01-27 14:57:06 +01:00
mellanox platform/mellanox: mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters 2022-01-05 12:42:33 +01:00
mips MIPS: Loongson: Fix boot warning about hwmon_device_register() 2020-07-16 10:49:55 +02:00
olpc Platform: OLPC: Constify static struct regulator_ops 2021-02-08 16:59:21 +01:00
surface surface: surface3_power: Fix battery readings on batteries without a serial number 2022-03-02 11:47:59 +01:00
x86 platform/x86: huawei-wmi: check the return value of device_create_file() 2022-04-08 14:23:38 +02:00
Kconfig platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00
Makefile platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00