public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Kayode <samuel.kayode@savoirfairelinux.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Lee Jones <lee@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Sebastian Reichel <sre@kernel.org>,
	Robin Gong <yibin.gong@nxp.com>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-imx@nxp.com, linux-input@vger.kernel.org,
	Abel Vesa <abelvesa@linux.com>, Abel Vesa <abel.vesa@nxp.com>,
	Robin Gong <b38343@freescale.com>,
	Enric Balletbo Serra <eballetbo@gmail.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	devicetree@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
	Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v2 7/9] input: pf1550: add onkey support
Date: Wed, 21 May 2025 17:00:30 -0400	[thread overview]
Message-ID: <aC4-7pNAFn9jN-DI@fedora> (raw)
In-Reply-To: <pnfj4tyj3hovtu5ttnecmgozdq7hm2clxhl4xpuzrahlrzqmdm@qpdr4z2y5ylg>

On Fri, May 16, 2025 at 03:55:02PM -0700, Dmitry Torokhov wrote:
> > +	input->name = pdev->name;
> > +	input->phys = "pf1550-onkey/input0";
> > +	input->id.bustype = BUS_HOST;
> > +
> > +	input_set_capability(input, EV_KEY, onkey->keycode);
> > +
> > +	for (i = 0; i < ARRAY_SIZE(pf1550_onkey_irqs); i++) {
> > +		struct pf1550_irq_info *onkey_irq =
> > +						&pf1550_onkey_irqs[i];
> > +		unsigned int virq = 0;
> > +
> > +		virq = regmap_irq_get_virq(pf1550->irq_data_onkey,
> > +					   onkey_irq->irq);
> > +		if (!virq)
> > +			return -EINVAL;
> > +
> > +		onkey_irq->virq = virq;
> 
> I think this kind of mapping needs to be done in the core part of your
> driver.
>
Without doing the mapping in the MFD children, a list of all virqs for the PMIC
would have to be maintained in addition to the (regmap_irq) irqs. Perhaps,
there is a better way to implement this?
> > +
> > +		error = devm_request_threaded_irq(&pdev->dev, virq, NULL,
> > +						  pf1550_onkey_irq_handler,
> > +					IRQF_NO_SUSPEND,
> > +					onkey_irq->name, onkey);
Thanks,
Sam

  reply	other threads:[~2025-05-21 21:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16 18:29 [PATCH v2 0/9] add support for pf1550 PMIC MFD-based drivers Samuel Kayode
2025-05-16 18:47 ` [PATCH v2 1/9] dt-bindings: power: supply: add pf1550 Samuel Kayode
2025-05-17 11:12   ` Krzysztof Kozlowski
2025-05-16 18:50 ` [PATCH v2 2/9] dt-bindings: regulator: " Samuel Kayode
2025-05-17 11:13   ` Krzysztof Kozlowski
2025-05-16 18:52 ` [PATCH v2 3/9] dt-bindings: input: " Samuel Kayode
2025-05-17 11:14   ` Krzysztof Kozlowski
2025-05-16 18:54 ` [PATCH v2 5/9] mfd: pf1550: add core mfd driver Samuel Kayode
2025-05-17 11:18   ` Krzysztof Kozlowski
2025-05-20 13:25   ` kernel test robot
2025-05-16 18:55 ` [PATCH v2 6/9] regulator: pf1550: add support for regulator Samuel Kayode
2025-05-17 20:13   ` kernel test robot
2025-05-16 18:57 ` [PATCH v2 7/9] input: pf1550: add onkey support Samuel Kayode
2025-05-16 22:55   ` Dmitry Torokhov
2025-05-21 21:00     ` Samuel Kayode [this message]
2025-05-18 16:03   ` kernel test robot
2025-05-16 18:58 ` [PATCH v2 8/9] power: supply: pf1550: add battery charger support Samuel Kayode
2025-05-17 11:20   ` Krzysztof Kozlowski
2025-05-16 18:59 ` [PATCH v2 9/9] MAINTAINERS: add an entry for pf1550 mfd driver Samuel Kayode
     [not found] ` <8be1626f970c9fab8b50ae9ad45e0ddd88fa36bf.1747409892.git.samuel.kayode@savoirfairelinux.com>
     [not found]   ` <31542315-5ea1-4849-b2f9-686cabce914a@kernel.org>
2025-05-21 16:16     ` [PATCH v2 4/9] dt-bindings: mfd: add pf1550 Samuel Kayode
2025-05-21 16:22       ` Krzysztof Kozlowski

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=aC4-7pNAFn9jN-DI@fedora \
    --to=samuel.kayode@savoirfairelinux.com \
    --cc=abel.vesa@nxp.com \
    --cc=abelvesa@linux.com \
    --cc=b38343@freescale.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=eballetbo@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    --cc=yibin.gong@nxp.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