[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aC4-7pNAFn9jN-DI@fedora>
Date: Wed, 21 May 2025 17:00:30 -0400
From: Samuel Kayode <samuel.kayode@...oirfairelinux.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Lee Jones <lee@...nel.org>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Sebastian Reichel <sre@...nel.org>,
Robin Gong <yibin.gong@....com>, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, linux-imx@....com,
linux-input@...r.kernel.org, Abel Vesa <abelvesa@...ux.com>,
Abel Vesa <abel.vesa@....com>, Robin Gong <b38343@...escale.com>,
Enric Balletbo Serra <eballetbo@...il.com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
devicetree@...r.kernel.org, Conor Dooley <conor+dt@...nel.org>,
Rob Herring <robh@...nel.org>
Subject: Re: [PATCH v2 7/9] input: pf1550: add onkey support
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
Powered by blists - more mailing lists