| Message ID | 20260923105215.1633-1-anykey196@gmail.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-26171-sunxi=pue.re@lists.linux.dev>
X-Original-To: noreply@patchwork.local
Delivered-To: noreply@patchwork.local
Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mxe881.netcup.net (Postfix) with ESMTPS id 6DA501C13FD
for <noreply@patchwork.local>; Wed, 23 Sep 2026 13:03:31 +0200 (CEST)
Authentication-Results: mxe881;
dkim=pass header.d=gmail.com;
spf=pass (sender IP is 172.105.105.114)
smtp.mailfrom=linux-sunxi+bounces-26171-noreply=patchwork.local@lists.linux.dev
smtp.helo=tor.lore.kernel.org
Received-SPF: pass (mxe881: domain of lists.linux.dev designates
172.105.105.114 as permitted sender) client-ip=172.105.105.114;
envelope-from=linux-sunxi+bounces-26171-noreply=patchwork.local@lists.linux.dev;
helo=tor.lore.kernel.org;
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org
[100.90.174.1])
by tor.lore.kernel.org (Postfix) with ESMTP id DDFA12C90D
for <noreply@patchwork.local>; Wed, 23 Sep 2026 10:55:02 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 172463B388E;
Wed, 23 Sep 2026 10:52:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
header.b="TTx0q0a2"
X-Original-To: linux-sunxi@lists.linux.dev
Received: from mail-lf2-f13.google.com (mail-lf2-f13.google.com
[74.125.229.205])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A912645629E
for <linux-sunxi@lists.linux.dev>; Wed, 23 Sep 2026 10:52:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
arc=none smtp.client-ip=74.125.229.205
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1790160756; cv=none;
b=SHwQR8KtgH/R6whwHfZFZNBHH8nDZBgIjL3QnS0V4mFQe4rueMjTm9xu3O+y1UnzIRD7EPJKepfXc/Va0eVx2+Pb3cRFmys7tpnPXApP4DhsnhKeLceaLI2lqnE99h/8jZe8ziNoJ8phA8dHt0zHRSv7lwXuUymOSgaZL0oS+Y8=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1790160756; c=relaxed/simple;
bh=xrHgSFEJMs78mvMQZzVM9Z+570q3BIZmlyKkhqlhnVM=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version;
b=PFzbaXmXJ5CkMgbmaWUlUjBCxBDcX1FCQ9sRC56/507lxKyYBB52rmZvzjiyH2Zk9WYo1Pw92zHufRp58WyPyhdi1TEV88mlywx71Du9JdIHFzw8HLmad/b4w6fSqfksQ1/Tz6Y+jGjF2Jk37H0kKR3H4kX91JoZlmUWu5YOi0w=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
header.b=TTx0q0a2; arc=none smtp.client-ip=74.125.229.205
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org;
spf=pass smtp.mailfrom=gmail.com
Received: by mail-lf2-f13.google.com with SMTP id
2adb3069b0e04-5b5e4f1744fso899791e87.2
for <linux-sunxi@lists.linux.dev>;
Wed, 23 Sep 2026 03:52:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1790160739; x=1790765539;
darn=lists.linux.dev;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=zKBPC/HUfOeYNRheVRrqScAzgVBluDo4sVjYT3kJwDs=;
b=TTx0q0a27LIYJDdD0h2Y/D9jJNXX0pL/I6scrWv0sB0kPEgPLLu3/TxFeA5ezH32YL
zfioO9xQ80YfR+sq/bfsqY9T8ktuh7PrDLiybUWyBR6pjG7r7hUrTnwwGSx0wx9JUTcp
JhyWxW0TAcPVtvlHXyY26Y0eCfeFLy4XxiMkLR/LfblpO1+DYReh2znXkhodnpH+ev4h
TJhXCgt4OwNkjGgf87Z0kx9JdAeYHd8TvLuRPvJWMWriXHXCNwDjUvY+ZHn1k1xa7Lq7
R7VaJN/ELcE2LvatE3o6poLSC8FLKGfD2GTIHiW2ELdWp8xViek4z1f5XplvibcvT4A0
EbBw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1790160739; x=1790765539;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=zKBPC/HUfOeYNRheVRrqScAzgVBluDo4sVjYT3kJwDs=;
b=WzNuiH3osoFm0fqZ+uzNTO0Eq258U5/04SoH1sPt13EuLovocwL/gKZOF0jkYQPZRJ
y/dLUJwduofKJDh17OM+NNtIJsOtbpibrjKBuj99gGGIscwKDwcPhHgwxgq/RucouA/O
dVtJdwIpHjQs1+oMdR0uwPAtA24JUqWwY29Cqm3IRLSRbuc/ylxfnELUCInw7gPYPceg
Q9aBF521f3vpiTPq8oD/rHU5kbjfIajeKKWL4OClzArOOFpAKHVwJelG/V1phUIGqGJZ
uv81TBlBvSE15QQL98ATcGpzQi20IXFWrcHCCoH1fj3ChJwR/B3uNVsG9r6k/GIWb7Mc
fTdQ==
X-Forwarded-Encrypted: i=1;
AKwUvBwwLxzBtg2giCO7qPxvn0g9VfEKDm3lCo6+mdmlIRQw3C0JlgrkvZj3FrVUDfgqFZlXCVwfS6v1s/YuTA==@lists.linux.dev
X-Gm-Message-State: AFuF++le6kvx1uRFks5AecmdjGUAPRCP9nFmBnFileRaiIQ5PYbynx8Q
9bB8MBpL96pWXrRgTdloe9tc6xvtz4AqSsLimo7fpM4dgOTCZWlbGJ44oBwyQhHJGpnBfA==
X-Gm-Gg: AYBFou09wXgs/ccS22SlVl+Q810DeLl0tHa83KjvKAXes5lvLPCS9Kfo9CKupN6rgN3
KRWLVun24UT5H9nrXdz2S/NdrAhm4GOJrAzIHtn1XULnYxGr9WhqZsp8msPz02auRjLlQFjhDOy
2/Rm6dfrPZxGtpzt7KDy+oNSNSA18oCF5VjCWSAxlKcyYd2SVowekKn3vItt4gZGs3V0Z/wVTGt
wSniEjW7hxLQXBJOCo1pdL01idPtoLu9K415U9NPMqRwNnr6S7rqotwT7U3v2ojmC1OgtEo4e8p
AdxjeC2sKOkzUYrPDstNL33pQW7ofANT+pxl4ylaTgNwgKFsiqVprvGxoq+hk7CNg9uXLudhaDl
DUAN9YELLMvZ/6XpHN7Jj5RMMgDqiLAcdEtedqIGj+oX2MTRFo4vwbK51ESWZeGkYF/MQ93bamH
0Fj91VkXNyEHdUj6oJ84oEQGRfJVJ3ReLelVQlXj5bFqJq52JuM6GlGVvOgGwfIusWdtsxn4H7v
Um3xH0uU4ij98yBHvppppmeMmhsMA==
X-Received: by 2002:a05:6512:b1d:b0:5b5:e66f:2ac2 with SMTP id
2adb3069b0e04-5b8d8952ef2mr759840e87.6.1790160738756;
Wed, 23 Sep 2026 03:52:18 -0700 (PDT)
Received: from DESKTOP-7GRJKK0 ([188.226.104.175])
by smtp.gmail.com with ESMTPSA id
2adb3069b0e04-5b8d8589e1csm503208e87.54.2026.09.23.03.52.16
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 23 Sep 2026 03:52:18 -0700 (PDT)
From: Vladimir <anykey196@gmail.com>
To: Chen-Yu Tsai <wens@kernel.org>,
Samuel Holland <samuel@sholland.org>
Cc: linux-input@vger.kernel.org,
linux-sunxi@lists.linux.dev,
Vladnwx <vladnwx@users.noreply.github.com>
Subject: [PATCH] Input: axp20x-pek - add AXP313a support
Date: Wed, 23 Sep 2026 15:52:14 +0500
Message-ID: <20260923105215.1633-1-anykey196@gmail.com>
X-Mailer: git-send-email 2.55.0.windows.3
Precedence: bulk
X-Mailing-List: linux-sunxi@lists.linux.dev
List-Id: <linux-sunxi.lists.linux.dev>
List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev>
List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Rspamd-Server: rspamd-worker-8404
X-Spamd-Result: default: False [-1.16 / 15.00];
BAYES_HAM(-5.50)[100.00%];
RBL_SENDERSCORE(2.00)[172.105.105.114:from];
DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed),
No valid DKIM,none];
MID_CONTAINS_FROM(1.00)[];
R_MISSING_CHARSET(0.50)[];
MAILLIST(-0.15)[generic];
BAD_REP_POLICIES(0.10)[];
MIME_GOOD(-0.10)[text/plain];
HAS_LIST_UNSUB(-0.01)[];
FROM_HAS_DN(0.00)[];
PRECEDENCE_BULK(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
DBL_BLOCKED_OPENRESOLVER(0.00)[tor.lore.kernel.org:rdns,tor.lore.kernel.org:helo];
RCVD_COUNT_FIVE(0.00)[6];
FROM_NEQ_ENVFROM(0.00)[anykey196@gmail.com,linux-sunxi@lists.linux.dev];
ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG];
FORGED_SENDER_MAILLIST(0.00)[];
FREEMAIL_FROM(0.00)[gmail.com];
R_SPF_ALLOW(0.00)[+ip4:172.105.105.114];
TO_DN_SOME(0.00)[];
RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.90.174.1:received,188.226.104.175:received];
TAGGED_FROM(0.00)[bounces-26171-noreply=patchwork.local];
RCPT_COUNT_FIVE(0.00)[5];
MIME_TRACE(0.00)[0:+];
FORGED_RECIPIENTS_MAILLIST(0.00)[];
ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1];
RCVD_TLS_LAST(0.00)[];
RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.105.105.114:from]
X-Rspamd-Queue-Id: 6DA501C13FD
X-MORS-Enabled: yes
X-MORS-DOMAIN: patchwork.local
X-MORS-HOSTING: hosting172546
X-MORS-USER: hosting172546
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
|
| Series |
Input: axp20x-pek - add AXP313a support
|
|
Commit Message
Влад СВН
Sept. 23, 2026, 10:52 a.m. UTC
From: Vladnwx <vladnwx@users.noreply.github.com> The AXP313a MFD driver registers its power button cell as "axp313a-pek", but the axp20x-pek platform id table only matches "axp20x-pek" and "axp221-pek". The power button therefore never probes on boards using the AXP313a PMIC (e.g. the OrangePi Zero 2W). Add the missing id table entry. The register layout used by the driver matches the AXP313a, so the generic axp20x_info is reused. Tested on: OrangePi Zero 2W (Allwinner H618 + AXP313a), kernel 7.1.13. Signed-off-by: Vladnwx <vladnwx@users.noreply.github.com> --- drivers/input/misc/axp20x-pek.c | 4 ++++ 1 file changed, 4 insertions(+)
Comments
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] sysfs: broken startup/shutdown attributes for axp313a -- commit 2573be3a312f98b032ff9523708d368661f8e004 Author: Vladnwx <vladnwx@users.noreply.github.com> Input: axp20x-pek - add AXP313a support The AXP313a MFD driver registers its power button cell as "axp313a-pek", but the axp20x-pek platform id table only matches "axp20x-pek" and "axp221-pek". The power button therefore never probes on boards using the AXP313a PMIC (e.g. the OrangePi Zero 2W). > diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c > index 24f9e9d893de3..d4e2fc9a937ff 100644 > --- a/drivers/input/misc/axp20x-pek.c > +++ b/drivers/input/misc/axp20x-pek.c > @@ -393,6 +393,10 @@ static const struct platform_device_id axp_pek_id_match[] = { > .name = "axp221-pek", > .driver_data = (kernel_ulong_t)&axp221_info, > }, > + { > + .name = "axp313a-pek", > + .driver_data = (kernel_ulong_t)&axp20x_info, > + }, [Severity: Medium] Will using axp20x_info result in broken sysfs attributes for AXP313a? The AXP313a platform binding unconditionally exposes startup and shutdown sysfs files because they are hardcoded in axp20x_groups. Reading or writing these files attempts to access the AXP20X_PEK_KEY register (0x36) in axp20x_show_attr() and axp20x_store_attr(): drivers/input/misc/axp20x-pek.c:axp20x_show_attr() { ... ret = regmap_read(axp20x_pek->axp20x->regmap, AXP20X_PEK_KEY, &val); ... } drivers/input/misc/axp20x-pek.c:axp20x_store_attr() { ... ret = regmap_update_bits(axp20x_pek->axp20x->regmap, AXP20X_PEK_KEY, mask, idx); ... } However, the AXP313a regmap configuration restricts max_register to AXP313A_IRQ_STATE (0x21). The regmap core blocks accesses to registers beyond max_register, meaning these sysfs accesses will definitively fail with -EIO. Could the axp313a-pek driver be updated to avoid exposing these broken sysfs attributes? > { /* sentinel */ } > }; > MODULE_DEVICE_TABLE(platform, axp_pek_id_match);
Thanks. Correct: the AXP313a register map ends at AXP313A_IRQ_STATE (0x21), so AXP20X_PEK_KEY (0x36) is unreachable and the startup/shutdown sysfs files would always fail with -EIO. v2 no longer reuses axp20x_info. The AXP313a gets its own axp313a_info with no start-up/shutdown times, and those two attributes are hidden via an is_visible() callback, so they are simply not created for this variant. Tested on: OrangePi Zero 2W (Allwinner H618 + AXP313a). ср, 23 сент. 2026 г. в 16:14, Влад СВН <anykey196@gmail.com>: > > Thanks. Correct: the AXP313a register map ends at AXP313A_IRQ_STATE (0x21), so AXP20X_PEK_KEY (0x36) is unreachable and the startup/shutdown sysfs files would always fail with -EIO. > > v2 no longer reuses axp20x_info. The AXP313a gets its own axp313a_info with no start-up/shutdown times, and those two attributes are hidden via an is_visible() callback, so they are simply not created for this variant. > > Tested on: OrangePi Zero 2W (Allwinner H618 + AXP313a). > > ср, 23 сент. 2026 г. в 16:02, <sashiko-bot@kernel.org>: >> >> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: >> - [Medium] sysfs: broken startup/shutdown attributes for axp313a >> -- >> >> commit 2573be3a312f98b032ff9523708d368661f8e004 >> Author: Vladnwx <vladnwx@users.noreply.github.com> >> >> Input: axp20x-pek - add AXP313a support >> >> The AXP313a MFD driver registers its power button cell as "axp313a-pek", >> but the axp20x-pek platform id table only matches "axp20x-pek" and >> "axp221-pek". The power button therefore never probes on boards using the >> AXP313a PMIC (e.g. the OrangePi Zero 2W). >> >> > diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c >> > index 24f9e9d893de3..d4e2fc9a937ff 100644 >> > --- a/drivers/input/misc/axp20x-pek.c >> > +++ b/drivers/input/misc/axp20x-pek.c >> > @@ -393,6 +393,10 @@ static const struct platform_device_id axp_pek_id_match[] = { >> > .name = "axp221-pek", >> > .driver_data = (kernel_ulong_t)&axp221_info, >> > }, >> > + { >> > + .name = "axp313a-pek", >> > + .driver_data = (kernel_ulong_t)&axp20x_info, >> > + }, >> >> [Severity: Medium] >> Will using axp20x_info result in broken sysfs attributes for AXP313a? >> >> The AXP313a platform binding unconditionally exposes startup and shutdown >> sysfs files because they are hardcoded in axp20x_groups. Reading or writing >> these files attempts to access the AXP20X_PEK_KEY register (0x36) in >> axp20x_show_attr() and axp20x_store_attr(): >> >> drivers/input/misc/axp20x-pek.c:axp20x_show_attr() { >> ... >> ret = regmap_read(axp20x_pek->axp20x->regmap, AXP20X_PEK_KEY, &val); >> ... >> } >> >> drivers/input/misc/axp20x-pek.c:axp20x_store_attr() { >> ... >> ret = regmap_update_bits(axp20x_pek->axp20x->regmap, AXP20X_PEK_KEY, >> mask, idx); >> ... >> } >> >> However, the AXP313a regmap configuration restricts max_register to >> AXP313A_IRQ_STATE (0x21). The regmap core blocks accesses to registers beyond >> max_register, meaning these sysfs accesses will definitively fail with -EIO. >> >> Could the axp313a-pek driver be updated to avoid exposing these broken sysfs >> attributes? >> >> > { /* sentinel */ } >> > }; >> > MODULE_DEVICE_TABLE(platform, axp_pek_id_match); >> >> -- >> Sashiko AI review · https://sashiko.dev/#/patchset/20260923105215.1633-1-anykey196@gmail.com?part=1
Thanks. Correct: the AXP313a register map ends at AXP313A_IRQ_STATE (0x21), so AXP20X_PEK_KEY (0x36) is unreachable and the startup/shutdown sysfs files would always fail with -EIO. v2 no longer reuses axp20x_info. The AXP313a gets its own axp313a_info with no start-up/shutdown times, and those two attributes are hidden via an is_visible() callback, so they are simply not created for this variant. Tested on: OrangePi Zero 2W (Allwinner H618 + AXP313a).
diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c index 24f9e9d89..d4e2fc9a9 100644 --- a/drivers/input/misc/axp20x-pek.c +++ b/drivers/input/misc/axp20x-pek.c @@ -393,6 +393,10 @@ static const struct platform_device_id axp_pek_id_match[] = { .name = "axp221-pek", .driver_data = (kernel_ulong_t)&axp221_info, }, + { + .name = "axp313a-pek", + .driver_data = (kernel_ulong_t)&axp20x_info, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(platform, axp_pek_id_match);