The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Lee Jones <lee@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: rohm: Factor out power button registration
Date: Thu, 25 Jun 2026 11:33:12 -0700	[thread overview]
Message-ID: <aj1zmqgyXta8EM8E@google.com> (raw)
In-Reply-To: <a867d076-55cf-4686-a46f-6cb9fd198b90@gmail.com>

Hi Matti,

On Thu, Jun 25, 2026 at 11:00:08AM +0300, Matti Vaittinen wrote:
> On 18/06/2026 21:58, Dmitry Torokhov wrote:
> > Factor out the power button registration logic using software nodes
> > from rohm-bd718x7 and rohm-bd71828 drivers into a shared module
> > rohm-pwrbutton.
> > 
> > This reduces duplication and makes it easier to support other ROHM
> > PMICs with similar power button configurations.
> > 
> > Suggested-by: Lee Jones <lee@kernel.org>
> > Assisted-by: Antigravity:gemini-3.5-flash
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> 
> Thanks a lot Dmitry. I like the idea of having generic helpers for crearting
> the swnodes for the power-button!
> 
> > ---
> >   MAINTAINERS                  |   2 +
> >   drivers/mfd/Kconfig          |   6 ++
> >   drivers/mfd/Makefile         |   1 +
> >   drivers/mfd/rohm-bd71828.c   |  84 ++------------------------
> >   drivers/mfd/rohm-bd718x7.c   |  84 ++------------------------
> >   drivers/mfd/rohm-pwrbutton.c | 112 +++++++++++++++++++++++++++++++++++
> >   drivers/mfd/rohm-pwrbutton.h |  12 ++++
> >   7 files changed, 141 insertions(+), 160 deletions(-)
> > 
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index f1caa6e5198b..40c46a7363fb 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -23524,6 +23524,8 @@ F:	drivers/mfd/rohm-bd71828.c
> >   F:	drivers/mfd/rohm-bd718x7.c
> >   F:	drivers/mfd/rohm-bd9576.c
> >   F:	drivers/mfd/rohm-bd96801.c
> > +F:	drivers/mfd/rohm-pwrbutton.c
> > +F:	drivers/mfd/rohm-pwrbutton.h
> >   F:	drivers/regulator/bd71815-regulator.c
> >   F:	drivers/regulator/bd71828-regulator.c
> >   F:	drivers/regulator/bd718x7-regulator.c
> > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > index 763ce6a34782..8d04e1b1f8c8 100644
> > --- a/drivers/mfd/Kconfig
> > +++ b/drivers/mfd/Kconfig
> > @@ -2208,6 +2208,10 @@ config MFD_STW481X
> >   	  in various ST Microelectronics and ST-Ericsson embedded
> >   	  Nomadik series.
> > +config MFD_ROHM_PWRBUTTON
> > +	tristate
> > +	select MFD_CORE
> 
> I would drop the MFD dependency from the helper. It'd be nice to be able to
> add the SW-nodes representing power-button(s) outside MFD as well.

Do you have potential users in mind for this? I mean specifically
single IRQ-backed buttons besides these 2 ROHM controllers?

I would prefer no over-generalize if there are no users. Kernel modules
are not totally free.

Thanks.

-- 
Dmitry

  reply	other threads:[~2026-06-25 18:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 18:58 [PATCH] mfd: rohm: Factor out power button registration Dmitry Torokhov
2026-06-19  9:02 ` Lee Jones
2026-06-25  8:00 ` Matti Vaittinen
2026-06-25 18:33   ` Dmitry Torokhov [this message]
2026-06-26  7:35     ` Matti Vaittinen

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=aj1zmqgyXta8EM8E@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mazziesaccount@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