public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Antheas Kapenekakis <lkml@antheas.dev>
To: platform-driver-x86@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Derek John Clark" <derekjohn.clark@gmail.com>,
	"Joaquín Ignacio Aramendía" <samsagax@gmail.com>,
	"Jean Delvare" <jdelvare@suse.com>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"Antheas Kapenekakis" <lkml@antheas.dev>
Subject: [PATCH v2 0/6] platform/x86: ayaneo-ec: Add Ayaneo Embedded Controller platform driver
Date: Wed, 15 Oct 2025 10:44:08 +0200	[thread overview]
Message-ID: <20251015084414.1391595-1-lkml@antheas.dev> (raw)

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

---

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

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         |  19 +
 MAINTAINERS                                   |   7 +
 drivers/platform/x86/Kconfig                  |  17 +-
 drivers/platform/x86/Makefile                 |   3 +
 drivers/platform/x86/ayaneo-ec.c              | 541 ++++++++++++++++++
 drivers/platform/x86/oxpec.c                  | 115 +---
 6 files changed, 585 insertions(+), 117 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-ayaneo
 create mode 100644 drivers/platform/x86/ayaneo-ec.c


base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
-- 
2.51.0



             reply	other threads:[~2025-10-15  8:46 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15  8:44 Antheas Kapenekakis [this message]
2025-10-15  8:44 ` [PATCH v2 1/6] platform/x86: ayaneo-ec: Add Ayaneo Embedded Controller platform driver Antheas Kapenekakis
2025-10-15  9:04   ` Ilpo Järvinen
2025-10-26 22:25   ` Armin Wolf
2025-10-15  8:44 ` [PATCH v2 2/6] platform/x86: ayaneo-ec: Add hwmon support Antheas Kapenekakis
2025-10-26 22:33   ` Armin Wolf
2025-10-15  8:44 ` [PATCH v2 3/6] platform/x86: ayaneo-ec: Add charge control support Antheas Kapenekakis
2025-10-26 22:35   ` Armin Wolf
2025-10-15  8:44 ` [PATCH v2 4/6] platform/x86: ayaneo-ec: Add controller power and modules attributes Antheas Kapenekakis
2025-10-15  9:05   ` Ilpo Järvinen
2025-10-15  9:08     ` Ilpo Järvinen
2025-10-26 22:42   ` Armin Wolf
2025-10-15  8:44 ` [PATCH v2 5/6] platform/x86: ayaneo-ec: Move Ayaneo devices from oxpec to ayaneo-ec Antheas Kapenekakis
2025-10-15  9:09   ` Ilpo Järvinen
2025-10-26 22:45   ` Armin Wolf
2025-10-15  8:44 ` [PATCH v2 6/6] platform/x86: ayaneo-ec: Add suspend hook Antheas Kapenekakis
2025-10-15  9:11   ` Ilpo Järvinen
2025-10-15  9:16     ` Antheas Kapenekakis
2025-10-15  9:27       ` Ilpo Järvinen
2025-10-15  9:36         ` Antheas Kapenekakis
2025-10-26 22:49   ` Armin Wolf
2025-10-26 23:17     ` Antheas Kapenekakis
2025-10-28 13:50       ` Armin Wolf
2025-10-28 15:20         ` Antheas Kapenekakis
2025-10-28 15:25           ` Armin Wolf
2025-10-28 17:49             ` Antheas Kapenekakis
2025-10-28 23:14               ` Armin Wolf
2025-10-28 20:26   ` Mario Limonciello
2025-10-28 20:34     ` Antheas Kapenekakis
2025-10-28 21:21       ` Mario Limonciello
2025-10-28 21:39         ` Antheas Kapenekakis
2025-10-29  3:36           ` Mario Limonciello (AMD) (kernel.org)
2025-10-29  8:48             ` Antheas Kapenekakis
2025-10-29 10:22               ` Guenter Roeck
2025-10-29 10:49                 ` Antheas Kapenekakis
2025-10-29 14:25                   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251015084414.1391595-1-lkml@antheas.dev \
    --to=lkml@antheas.dev \
    --cc=derekjohn.clark@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=samsagax@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox