[PATCH v1] platform/x86: ayaneo-ec: Add AYANEO 2S charge control

Antheas Kapenekakis posted 1 patch 4 days, 1 hour ago
drivers/platform/x86/ayaneo-ec.c | 7 +++++++
1 file changed, 7 insertions(+)
[PATCH v1] platform/x86: ayaneo-ec: Add AYANEO 2S charge control
Posted by Antheas Kapenekakis 4 days, 1 hour ago
The AYANEO 2S uses the same EC fan interface as the AYANEO 2 and
additionally supports charge limiting. Add an exact match ahead of the
broader AYANEO 2 match so the charge-control quirk is selected.

Reported-by: Tiago Silva <tiago.paulo@live.com>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
 drivers/platform/x86/ayaneo-ec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/platform/x86/ayaneo-ec.c b/drivers/platform/x86/ayaneo-ec.c
index 41a24e091248..81dac81262e7 100644
--- a/drivers/platform/x86/ayaneo-ec.c
+++ b/drivers/platform/x86/ayaneo-ec.c
@@ -76,6 +76,13 @@ static const struct ayaneo_ec_quirk quirk_ayaneo3 = {
 };
 
 static const struct dmi_system_id dmi_table[] = {
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "AYANEO 2S"),
+		},
+		.driver_data = (void *)&quirk_charge_limit,
+	},
 	{
 		.matches = {
 			DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),

base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
-- 
2.55.0