The laptop contains an embedded controller that provides a set of features: - Battery and charger monitoring - USB Type-C DP alt mode HPD monitoring - Lid status detection - Small amount of keyboard configuration* [*] The keyboard is handled by the same EC but it has a dedicated i2c bus and is already enabled. This port only provides fn key behavior configuration. Unfortunately, while all this functionality is implemented in ACPI, it's currently not possible to use ACPI to boot Linux on such Qualcomm devices. Thus this series implements and enables a new driver that provides support for the EC features. The EC would be one of the last pieces to get almost full support for the Acer Aspire 1 laptop in the upstream Linux kernel. This series is similar to the EC driver for Lenovo Yoga C630, proposed in [1] but seemingly never followed up... [1] https://lore.kernel.org/all/20230205152809.2233436-1-dmitry.baryshkov@xxxxxxxxxx/ Signed-off-by: Nikita Travkin <nikita@xxxxxxx> --- Changes in v4: - Move to platform/arm64 (Sebastian, Hans) - Drop fn mode dt property (Rob) - Add fn_lock attribute in sysfs (Rob) - Report psy present correctly (Sebastian) - Link to v3: https://lore.kernel.org/r/20240220-aspire1-ec-v3-0-02cb139a4931@xxxxxxx Changes in v3: - Supress warning on few no-op events. - Invert the fn key behavior (Rob, Conor) - Link to v2: https://lore.kernel.org/r/20231212-aspire1-ec-v2-0-ca495ea0a7ac@xxxxxxx Changes in v2: - Drop incorrectly allowed reg in the ec connector binding (Krzysztof) - Minor style changes (Konrad) - Link to v1: https://lore.kernel.org/r/20231207-aspire1-ec-v1-0-ba9e1c227007@xxxxxxx --- Nikita Travkin (4): dt-bindings: platform: Add Acer Aspire 1 EC platform: Add ARM64 platform directory platform: arm64: Add Acer Aspire 1 embedded controller driver arm64: dts: qcom: acer-aspire1: Add embedded controller .../bindings/platform/acer,aspire1-ec.yaml | 60 +++ MAINTAINERS | 9 + arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts | 40 +- drivers/platform/Kconfig | 2 + drivers/platform/Makefile | 1 + drivers/platform/arm64/Kconfig | 35 ++ drivers/platform/arm64/Makefile | 8 + drivers/platform/arm64/acer-aspire1-ec.c | 555 +++++++++++++++++++++ 8 files changed, 709 insertions(+), 1 deletion(-) --- base-commit: a1184cae56bcb96b86df3ee0377cec507a3f56e0 change-id: 20231206-aspire1-ec-6b3d2cac1a72 Best regards, -- Nikita Travkin <nikita@xxxxxxx>