Linux Power Management development
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Vladimir <anykey196@gmail.com>
Cc: Chen-Yu Tsai <wens@kernel.org>,
	Samuel Holland <samuel@sholland.org>,
	 linux-input@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-sunxi@lists.linux.dev
Subject: Re: [PATCH v2] Input: axp20x-pek - add AXP313a support
Date: Fri, 25 Sep 2026 20:48:49 -0700	[thread overview]
Message-ID: <arc-Q9D1xcFn8I1q@google.com> (raw)
In-Reply-To: <20260923110741.1880-1-anykey196@gmail.com>

On Wed, Sep 23, 2026 at 04:07:41PM +0500, Vladimir wrote:
> 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.  Unlike the other variants the AXP313a has
> no PEK key/startup/shutdown registers - AXP20X_PEK_KEY (0x36) lies beyond
> its register map (max_register = AXP313A_IRQ_STATE, 0x21) - so give it its
> own axp20x_info without start-up/shutdown times and hide the corresponding
> sysfs attributes, instead of exposing files that always fail with -EIO.
> 
> Tested on: OrangePi Zero 2W (Allwinner H618 + AXP313a), kernel 7.1.13.
> 
> Signed-off-by: Vladimir <anykey196@gmail.com>

While we no longer require legal names on sign-offs we do need a "known
identity" and just the first name does not cut.

> ---
>  drivers/input/misc/axp20x-pek.c | 39 ++++++++++++++++++++++++++++++++-
>  1 file changed, 38 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c
> index 24f9e9d893d..b912f13b607 100644
> --- a/drivers/input/misc/axp20x-pek.c
> +++ b/drivers/input/misc/axp20x-pek.c
> @@ -85,6 +85,16 @@ static const struct axp20x_info axp221_info = {
>  	.shutdown_mask = AXP20X_PEK_SHUTDOWN_MASK,
>  };
>  
> +static const struct axp20x_info axp313a_info = {
> +	/*
> +	 * The AXP313a has no PEK key/startup/shutdown registers: AXP20X_PEK_KEY
> +	 * (0x36) lies beyond the end of its register map (max_register =
> +	 * AXP313A_IRQ_STATE, 0x21).  Leaving startup_time/shutdown_time unset
> +	 * keeps the matching sysfs attributes from being created, so they
> +	 * cannot fail with -EIO.
> +	 */

Maybe just say:

	.startup_time = NULL, /* not supported */
	.shutdown_time = NULL, /* not supported */
> +};
> +

Thanks.

-- 
Dmitry

      reply	other threads:[~2026-09-26  3:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 11:07 [PATCH v2] Input: axp20x-pek - add AXP313a support Vladimir
2026-09-26  3:48 ` Dmitry Torokhov [this message]

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=arc-Q9D1xcFn8I1q@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=anykey196@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=samuel@sholland.org \
    --cc=wens@kernel.org \
    /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