From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Antheas Kapenekakis <lkml@antheas.dev>
Cc: platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
linux-hwmon@vger.kernel.org, "Hans de Goede" <hansg@kernel.org>,
"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>
Subject: Re: [PATCH v2 5/6] platform/x86: ayaneo-ec: Move Ayaneo devices from oxpec to ayaneo-ec
Date: Wed, 15 Oct 2025 12:09:45 +0300 (EEST) [thread overview]
Message-ID: <d25bba2d-c48c-e687-f349-c011f5f9a2a7@linux.intel.com> (raw)
In-Reply-To: <20251015084414.1391595-6-lkml@antheas.dev>
[-- Attachment #1: Type: text/plain, Size: 9231 bytes --]
On Wed, 15 Oct 2025, Antheas Kapenekakis wrote:
> Currently, the oxpec driver contains Ayaneo devices. Move them to the
> new ayaneo-ec driver, which is dedicated to them.
>
> As this driver supports charge inhibition for Ayaneo, add support for it
> for the AIR, AIR 1S, AB05-Medoncino, AIR Pro, and Kun, referenced from
> the out-of-tree ayaneo-platform driver.
>
> In addition, update the readmes of oxpec to reflect this change.
>
> Link: https://github.com/ShadowBlip/ayaneo-platform
> Tested-by: Derek J. Clark <derekjohn.clark@gmail.com>
> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
> ---
> drivers/platform/x86/Kconfig | 4 +-
> drivers/platform/x86/ayaneo-ec.c | 65 +++++++++++++++++
> drivers/platform/x86/oxpec.c | 115 +------------------------------
> 3 files changed, 67 insertions(+), 117 deletions(-)
>
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index f5b2edc6bc67..4d4be1634152 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -1043,9 +1043,7 @@ config OXP_EC
> help
> Enables support for the platform EC of OneXPlayer and AOKZOE
> handheld devices. This includes fan speed, fan controls, and
> - disabling the default TDP behavior of the device. Due to legacy
> - reasons, this driver also provides hwmon functionality to Ayaneo
> - devices and the OrangePi Neo.
> + disabling the default TDP behavior of the device.
>
> source "drivers/platform/x86/tuxedo/Kconfig"
>
> diff --git a/drivers/platform/x86/ayaneo-ec.c b/drivers/platform/x86/ayaneo-ec.c
> index 363b61fc6e12..73e9dd39c703 100644
> --- a/drivers/platform/x86/ayaneo-ec.c
> +++ b/drivers/platform/x86/ayaneo-ec.c
> @@ -49,6 +49,15 @@ struct ayaneo_ec_platform_data {
> struct acpi_battery_hook battery_hook;
> };
>
> +static const struct ayaneo_ec_quirk quirk_fan = {
> + .has_fan_control = true,
> +};
> +
> +static const struct ayaneo_ec_quirk quirk_charge_limit = {
> + .has_fan_control = true,
> + .has_charge_control = true,
> +};
> +
> static const struct ayaneo_ec_quirk ayaneo3 = {
> .has_fan_control = true,
> .has_charge_control = true,
> @@ -56,6 +65,62 @@ static const struct ayaneo_ec_quirk ayaneo3 = {
> };
>
> static const struct dmi_system_id dmi_table[] = {
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> + DMI_MATCH(DMI_BOARD_NAME, "AYANEO 2"),
> + },
> + .driver_data = (void *)&quirk_fan,
> + },
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> + DMI_MATCH(DMI_BOARD_NAME, "FLIP"),
> + },
> + .driver_data = (void *)&quirk_fan,
> + },
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> + DMI_MATCH(DMI_BOARD_NAME, "GEEK"),
> + },
> + .driver_data = (void *)&quirk_fan,
> + },
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> + DMI_EXACT_MATCH(DMI_BOARD_NAME, "AIR"),
> + },
> + .driver_data = (void *)&quirk_charge_limit,
> + },
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> + DMI_EXACT_MATCH(DMI_BOARD_NAME, "AIR 1S"),
> + },
> + .driver_data = (void *)&quirk_charge_limit,
> + },
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> + DMI_EXACT_MATCH(DMI_BOARD_NAME, "AB05-Mendocino"),
> + },
> + .driver_data = (void *)&quirk_charge_limit,
> + },
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> + DMI_EXACT_MATCH(DMI_BOARD_NAME, "AIR Pro"),
> + },
> + .driver_data = (void *)&quirk_charge_limit,
> + },
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> + DMI_EXACT_MATCH(DMI_BOARD_NAME, "KUN"),
> + },
> + .driver_data = (void *)&quirk_charge_limit,
> + },
> {
> .matches = {
> DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> diff --git a/drivers/platform/x86/oxpec.c b/drivers/platform/x86/oxpec.c
> index 54377b282ff8..144a454103b9 100644
> --- a/drivers/platform/x86/oxpec.c
> +++ b/drivers/platform/x86/oxpec.c
> @@ -1,8 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0+
> /*
> - * Platform driver for OneXPlayer and AOKZOE devices. For the time being,
> - * it also exposes fan controls for AYANEO, and OrangePi Handhelds via
> - * hwmon sysfs.
> + * Platform driver for OneXPlayer and AOKZOE devices.
> *
> * Fan control is provided via pwm interface in the range [0-255].
> * Old AMD boards use [0-100] as range in the EC, the written value is
> @@ -43,14 +41,6 @@ static bool unlock_global_acpi_lock(void)
>
> enum oxp_board {
> aok_zoe_a1 = 1,
> - aya_neo_2,
> - aya_neo_air,
> - aya_neo_air_1s,
> - aya_neo_air_plus_mendo,
> - aya_neo_air_pro,
> - aya_neo_flip,
> - aya_neo_geek,
> - aya_neo_kun,
> orange_pi_neo,
> oxp_2,
> oxp_fly,
> @@ -131,62 +121,6 @@ static const struct dmi_system_id dmi_table[] = {
> },
> .driver_data = (void *)oxp_fly,
> },
> - {
> - .matches = {
> - DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> - DMI_MATCH(DMI_BOARD_NAME, "AYANEO 2"),
> - },
> - .driver_data = (void *)aya_neo_2,
> - },
> - {
> - .matches = {
> - DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> - DMI_EXACT_MATCH(DMI_BOARD_NAME, "AIR"),
> - },
> - .driver_data = (void *)aya_neo_air,
> - },
> - {
> - .matches = {
> - DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> - DMI_EXACT_MATCH(DMI_BOARD_NAME, "AIR 1S"),
> - },
> - .driver_data = (void *)aya_neo_air_1s,
> - },
> - {
> - .matches = {
> - DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> - DMI_EXACT_MATCH(DMI_BOARD_NAME, "AB05-Mendocino"),
> - },
> - .driver_data = (void *)aya_neo_air_plus_mendo,
> - },
> - {
> - .matches = {
> - DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> - DMI_EXACT_MATCH(DMI_BOARD_NAME, "AIR Pro"),
> - },
> - .driver_data = (void *)aya_neo_air_pro,
> - },
> - {
> - .matches = {
> - DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> - DMI_MATCH(DMI_BOARD_NAME, "FLIP"),
> - },
> - .driver_data = (void *)aya_neo_flip,
> - },
> - {
> - .matches = {
> - DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> - DMI_MATCH(DMI_BOARD_NAME, "GEEK"),
> - },
> - .driver_data = (void *)aya_neo_geek,
> - },
> - {
> - .matches = {
> - DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
> - DMI_EXACT_MATCH(DMI_BOARD_NAME, "KUN"),
> - },
> - .driver_data = (void *)aya_neo_kun,
> - },
> {
> .matches = {
> DMI_MATCH(DMI_BOARD_VENDOR, "OrangePi"),
> @@ -672,13 +606,6 @@ static int oxp_pwm_enable(void)
> case orange_pi_neo:
> return write_to_ec(ORANGEPI_SENSOR_PWM_ENABLE_REG, PWM_MODE_MANUAL);
> case aok_zoe_a1:
> - case aya_neo_2:
> - case aya_neo_air:
> - case aya_neo_air_plus_mendo:
> - case aya_neo_air_pro:
> - case aya_neo_flip:
> - case aya_neo_geek:
> - case aya_neo_kun:
> case oxp_2:
> case oxp_fly:
> case oxp_mini_amd:
> @@ -699,14 +626,6 @@ static int oxp_pwm_disable(void)
> case orange_pi_neo:
> return write_to_ec(ORANGEPI_SENSOR_PWM_ENABLE_REG, PWM_MODE_AUTO);
> case aok_zoe_a1:
> - case aya_neo_2:
> - case aya_neo_air:
> - case aya_neo_air_1s:
> - case aya_neo_air_plus_mendo:
> - case aya_neo_air_pro:
> - case aya_neo_flip:
> - case aya_neo_geek:
> - case aya_neo_kun:
> case oxp_2:
> case oxp_fly:
> case oxp_mini_amd:
> @@ -727,14 +646,6 @@ static int oxp_pwm_read(long *val)
> case orange_pi_neo:
> return read_from_ec(ORANGEPI_SENSOR_PWM_ENABLE_REG, 1, val);
> case aok_zoe_a1:
> - case aya_neo_2:
> - case aya_neo_air:
> - case aya_neo_air_1s:
> - case aya_neo_air_plus_mendo:
> - case aya_neo_air_pro:
> - case aya_neo_flip:
> - case aya_neo_geek:
> - case aya_neo_kun:
> case oxp_2:
> case oxp_fly:
> case oxp_mini_amd:
> @@ -774,14 +685,6 @@ static int oxp_pwm_fan_speed(long *val)
> case oxp_g1_i:
> return read_from_ec(OXP_2_SENSOR_FAN_REG, 2, val);
> case aok_zoe_a1:
> - case aya_neo_2:
> - case aya_neo_air:
> - case aya_neo_air_1s:
> - case aya_neo_air_plus_mendo:
> - case aya_neo_air_pro:
> - case aya_neo_flip:
> - case aya_neo_geek:
> - case aya_neo_kun:
> case oxp_fly:
> case oxp_mini_amd:
> case oxp_mini_amd_a07:
> @@ -810,14 +713,6 @@ static int oxp_pwm_input_write(long val)
> /* scale to range [0-184] */
> val = (val * 184) / 255;
> return write_to_ec(OXP_SENSOR_PWM_REG, val);
> - case aya_neo_2:
> - case aya_neo_air:
> - case aya_neo_air_1s:
> - case aya_neo_air_plus_mendo:
> - case aya_neo_air_pro:
> - case aya_neo_flip:
> - case aya_neo_geek:
> - case aya_neo_kun:
> case oxp_mini_amd:
> case oxp_mini_amd_a07:
> /* scale to range [0-100] */
> @@ -854,14 +749,6 @@ static int oxp_pwm_input_read(long *val)
> /* scale from range [0-184] */
> *val = (*val * 255) / 184;
> break;
> - case aya_neo_2:
> - case aya_neo_air:
> - case aya_neo_air_1s:
> - case aya_neo_air_plus_mendo:
> - case aya_neo_air_pro:
> - case aya_neo_flip:
> - case aya_neo_geek:
> - case aya_neo_kun:
> case oxp_mini_amd:
> case oxp_mini_amd_a07:
> ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val);
>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
next prev parent reply other threads:[~2025-10-15 9:09 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 8:44 [PATCH v2 0/6] platform/x86: ayaneo-ec: Add Ayaneo Embedded Controller platform driver Antheas Kapenekakis
2025-10-15 8:44 ` [PATCH v2 1/6] " 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 [this message]
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=d25bba2d-c48c-e687-f349-c011f5f9a2a7@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkml@antheas.dev \
--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