platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] platform/x86: ayaneo-ec: Add Ayaneo Embedded Controller platform driver
@ 2025-10-31 16:36 Antheas Kapenekakis
  2025-10-31 16:36 ` [PATCH v3 1/6] " Antheas Kapenekakis
                   ` (6 more replies)
  0 siblings, 7 replies; 30+ messages in thread
From: Antheas Kapenekakis @ 2025-10-31 16:36 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: linux-kernel, linux-hwmon, Hans de Goede, Ilpo Järvinen,
	Derek John Clark, Joaquín Ignacio Aramendía,
	Jean Delvare, Guenter Roeck, Antheas Kapenekakis

This series introduces a platform driver for Ayaneo devices, ayaneo-ec.
This driver provides hwmon support, power management, and module management
(for the new Ayaneo 3 device). Module management is done through the new
firmware attributes sysfs interface.

Luckily, all Ayaneo devices with an ACPI mapped EC use the same registers.
Older devices also use a memory mapped region for RGB[1], but that is
replaced by HID in the new Ayaneo 3. Therefore, this allows for a simple
driver design that provides robust future support. The memory mapped region
can be upstreamed as a different RGB driver in the future or remain
out-of-tree[1].

This change also allows cleaning up the oxpec driver, by removing Ayaneo
devices from it. In parallel, charge limiting is added for these devices.

[1] https://github.com/ShadowBlip/ayaneo-platform

---

V3: https://lore.kernel.org/all/20251015084414.1391595-1-lkml@antheas.dev/
V2: https://lore.kernel.org/all/20251015084414.1391595-1-lkml@antheas.dev/
V1: https://lore.kernel.org/all/20250820160628.99678-1-lkml@antheas.dev/

Changes since V3:
  - Fix various non-functional nits
  - On hibernation restore, use restore instead of thaw, switch to bools,
    and restore fan pwm mode, but only after the first pwm write after
    hibernation. Also, release pwm when entering hibernation.

Changes since V2:
  - Remove i counter from suspend hook by hardcoding the index
    (we already allocate the maximum size for the cache anyway)
  - Rename quirks to end in quirks
  - Add missing includes to controller sysfs patch, use switch statement

Changes since V1:
  - Use plain sysfs attrs for magic module attributes
  - Combine quirk for power and modules, so attribute tree is simpler
  - Use switch statement in hwmon
  - Add hibernation hook for charge bypass in last patch
    - Restoring fan speed is a liability so it is omitted, see patch notes
      Note that for EC managed fan curves, it would be acceptable
    - Regmap comment: Using regmap is unprecedented for ACPI mapped ECs
      and overkill for one value (> 100 LOC)
  - fixp_linear_interpolate() comment: it requires importing an extra header,
    is not used for static parameters in other modules, and expands to the
    same equation for parameters used, so it is omitted

Antheas Kapenekakis (6):
  platform/x86: ayaneo-ec: Add Ayaneo Embedded Controller platform
    driver
  platform/x86: ayaneo-ec: Add hwmon support
  platform/x86: ayaneo-ec: Add charge control support
  platform/x86: ayaneo-ec: Add controller power and modules attributes
  platform/x86: ayaneo-ec: Move Ayaneo devices from oxpec to ayaneo-ec
  platform/x86: ayaneo-ec: Add suspend hook

 .../ABI/testing/sysfs-platform-ayaneo-ec      |  19 +
 MAINTAINERS                                   |   7 +
 drivers/platform/x86/Kconfig                  |  16 +-
 drivers/platform/x86/Makefile                 |   3 +
 drivers/platform/x86/ayaneo-ec.c              | 582 ++++++++++++++++++
 drivers/platform/x86/oxpec.c                  | 115 +---
 6 files changed, 625 insertions(+), 117 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-ayaneo-ec
 create mode 100644 drivers/platform/x86/ayaneo-ec.c


base-commit: 211ddde0823f1442e4ad052a2f30f050145ccada
-- 
2.51.1



^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2025-11-10 12:11 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-31 16:36 [PATCH v3 0/6] platform/x86: ayaneo-ec: Add Ayaneo Embedded Controller platform driver Antheas Kapenekakis
2025-10-31 16:36 ` [PATCH v3 1/6] " Antheas Kapenekakis
2025-11-02 18:21   ` Armin Wolf
2025-11-02 18:35     ` Armin Wolf
     [not found]     ` <CAGwozwGO=sZjGro7NaKH=zC4x_GR8H7kaPSn8NP60H7EZ4s3+g@mail.gmail.com>
2025-11-04 19:58       ` Armin Wolf
2025-10-31 16:36 ` [PATCH v3 2/6] platform/x86: ayaneo-ec: Add hwmon support Antheas Kapenekakis
2025-11-02 18:22   ` Armin Wolf
2025-10-31 16:36 ` [PATCH v3 3/6] platform/x86: ayaneo-ec: Add charge control support Antheas Kapenekakis
2025-11-02 18:26   ` Armin Wolf
2025-11-02 18:37     ` Antheas Kapenekakis
2025-11-04 20:00       ` Armin Wolf
2025-10-31 16:36 ` [PATCH v3 4/6] platform/x86: ayaneo-ec: Add controller power and modules attributes Antheas Kapenekakis
2025-11-02 18:30   ` Armin Wolf
2025-11-02 18:46     ` Antheas Kapenekakis
2025-11-04 20:03       ` Armin Wolf
2025-11-05 12:33         ` Antheas Kapenekakis
2025-11-05 13:24           ` Ilpo Järvinen
2025-11-05 13:38             ` Antheas Kapenekakis
2025-11-05 22:20             ` Armin Wolf
2025-10-31 16:36 ` [PATCH v3 5/6] platform/x86: ayaneo-ec: Move Ayaneo devices from oxpec to ayaneo-ec Antheas Kapenekakis
2025-10-31 16:36 ` [PATCH v3 6/6] platform/x86: ayaneo-ec: Add suspend hook Antheas Kapenekakis
2025-11-02 18:35   ` Armin Wolf
2025-11-02 18:58     ` Antheas Kapenekakis
2025-11-10 12:11       ` Ilpo Järvinen
2025-11-03 16:51   ` Mario Limonciello (AMD) (kernel.org)
2025-11-03 21:20     ` Antheas Kapenekakis
2025-11-03 21:33       ` Mario Limonciello (AMD) (kernel.org)
2025-11-03 22:09         ` Antheas Kapenekakis
2025-10-31 16:38 ` [PATCH v3 0/6] platform/x86: ayaneo-ec: Add Ayaneo Embedded Controller platform driver Antheas Kapenekakis
2025-10-31 16:39   ` Antheas Kapenekakis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).