From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f169.google.com (mail-dy1-f169.google.com [74.125.82.169]) (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 BC3221A9F87 for ; Thu, 25 Jun 2026 18:33:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782412397; cv=none; b=GLfPgedheDsV6N+EiZyZU/mZ+LLyRwrPqifae0XQTNtT50oWq5kZMPy9bP1OtRGqmE7+FZLj9rlClYdXYx7ptd9s8Ejbj3w4pa39NVzU5h6FOIWyUG1fLM9mFyVYcuw+80jTvv1MtiDmnUmakv7BZ3bk4MZVwhxoRDc3r9zkbzo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782412397; c=relaxed/simple; bh=n8yooMz/Is2XRVE54FA4JpGsniOqUHsmrdkUAha+FlM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F2ovBFQa+uMa5Ikf2t9V6ZWH3Q1+xIbum0le/hMPHE5HGZozTg823HbMo/RR1Zih6RDHHxbYAkoeLI5282MAulCMzbesmZZUDSUpcimB3Jjt7QCRoXPy2TNeVV1xh/boMvg0CV7H7sijoBrWr07ODuY/lfWdkxblp49KzcFvcuQ= 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=NELfAGJ1; arc=none smtp.client-ip=74.125.82.169 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NELfAGJ1" Received: by mail-dy1-f169.google.com with SMTP id 5a478bee46e88-30c6836fea9so919874eec.1 for ; Thu, 25 Jun 2026 11:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782412396; x=1783017196; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=6lNDqBTVvWInTMFgV+KdAnZyzXiIrd6+ajbsKNCfOTQ=; b=NELfAGJ1dOyg+BXzLT9Ep2BVq8tCA4/5EbmvTnNjsruAxVF7OAQZkVDs6WHIVueJM+ E2NMwA2Ug9fMwlOMJr4Hf1iQtTndDRyaeOWz1ngiN8+3YnLUKQJB7/fGHG90R5mHpWrb F+QIuCtyDsozvgCgnRHcNmeiq/r6X2KZdS+Ndm0ydehaJxOSLuP1IuFJM5baOY+yFl5s bnpM6IVP1n9R8O7xzR4tgJYMtKFb3gZ0OMbblnaiPoagIiXqaiizthZ946Bn2XGIBlmR 4XngH+ZHbgSXDyAgB4Hn24t94py6f7V3M0sLBRS0qmOw2XDSm10noCdb8oi7EpfsN3C3 Wvdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782412396; x=1783017196; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6lNDqBTVvWInTMFgV+KdAnZyzXiIrd6+ajbsKNCfOTQ=; b=AyTb+tNbFaXkceBLc3zK4CzK0nxlnOIAplz9EdfY5ulm6I575r8y33gTxuRhrkI/eS YiZyP7TgLwKspBewW7ykV7LFIHWtMomkU1Ll7a/OD15rl/msnkmRz+rFnY6PewM6tBeH xvE1kK50N9bQZLXNZt1OjeZkXydVDxFK60IUIvlGkx06hJ0vNpJEgv1h3Si31wJ5Jh5E 5aciaFnI9oOpCTDYgUCApOYSQUMuBGdsziS4pePYcsb3d2euGSpwZm6RzxYuoddBxuAH 9Svxe6fZHBpd/FXyikNcAg6QfcMGVDlG1MH/Asm/UpWRqJ/YUjzz7NSHAHrq2qqLAA6p F8iQ== X-Forwarded-Encrypted: i=1; AHgh+Ro+nJdv44NASdLhkRovgZbg0kBHEsEyoAFQDDuN7nBNJkR517yT+KaVXZPfCy779svMs/5azVujDjUaBwg=@vger.kernel.org X-Gm-Message-State: AOJu0YwjU11KLmSvFzXFw2+vur4SqMmdavjX24tsmXlfrvysZfW1G/uk 81cHJmRCy8PGJD1qc+oJS76p8p8pu8OnsrHaBDOx8xlbb9uZHXQRarjNj9sQew== X-Gm-Gg: AfdE7cnwpQN569L9iPNQJaohvwjBMSCVwEuz9BX7kmi10l/SgZJS1HNFh+91YekQTSh 4z4gFQswNN0c79MvRd9aOPo+p3yiI0l744Hfj/Lutk19FvYJUl0Ky2wBwOUHZa01dmaI/4uMZGJ qb6Q5PVr97NdG2zhHO/qAqTejA7OEfqpDlBen3WzeUdbpx6rRO0cWU7z3nT+vMW698sYhS47aXz 3FaqawQHF7jf5/5MYXLLLXhlhRIY3hM014AlOB/iKfAfwyxzPk0WE1Fx0Gte8VrNhv5gTebIrpe FXX9LWjGOmO0CIouOhomX3BIVUcB1sMWbFXOhaj6ar484eCnCV1p/ReT3C0CBgh/sNcBDGnFbRA JejZnhvfEv52iQMn2GrjwFyDjewfVfzDUVUrRWhle3EFPBID4sCkgt3gda2oNwOa0gKFIYsrZOF gBdyYI4GBzTPfjPcq1NCefnLKgvj1T0hfR4LN9Z0+C79KcqU3sHAMkOw== X-Received: by 2002:a05:7300:e8a4:b0:30a:e52f:9b99 with SMTP id 5a478bee46e88-30c850ccd63mr3128943eec.0.1782412395742; Thu, 25 Jun 2026 11:33:15 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:c782:a4ca:fcbd:6ba7]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30c7ca438ddsm10467506eec.23.2026.06.25.11.33.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 11:33:15 -0700 (PDT) Date: Thu, 25 Jun 2026 11:33:12 -0700 From: Dmitry Torokhov To: Matti Vaittinen Cc: Lee Jones , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mfd: rohm: Factor out power button registration Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > > Assisted-by: Antigravity:gemini-3.5-flash > > Signed-off-by: Dmitry Torokhov > > 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