public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2 4/9] dt-bindings: mfd: add pf1550
       [not found]   ` <31542315-5ea1-4849-b2f9-686cabce914a@kernel.org>
@ 2025-05-21 16:16     ` Samuel Kayode
  2025-05-21 16:22       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Kayode @ 2025-05-21 16:16 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lee Jones, Liam Girdwood, Mark Brown, Dmitry Torokhov,
	Sebastian Reichel, Robin Gong, linux-kernel, linux-pm, linux-imx,
	linux-input, Abel Vesa, Abel Vesa, Robin Gong,
	Enric Balletbo Serra, Conor Dooley, devicetree, Rob Herring

On Sat, May 17, 2025 at 01:16:38PM +0200, Krzysztof Kozlowski wrote:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  regulators:
> > +    $ref: /schemas/regulator/pf1550.yaml
> > +
> > +  charger:
> > +    $ref: /schemas/power/supply/pf1550_charger.yaml
> > +
> > +  onkey:
> > +    $ref: /schemas/input/pf1550_onkey.yaml
> 
> This makes merging via separate trees not possible...
> 
> Just fold everything here, drop compatibles and then put binding in the
> regulator. Unless children are re-usable which would justify
> compatibles, but then please provide arguments for that.

Yes, compatibles are not needed for the children. For adding binding to the
regulator, did you mean for all children: charger and onkey included? So,
replacing the separate yaml for all children with bindings in the mfd yaml?

Thanks,
Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 4/9] dt-bindings: mfd: add pf1550
  2025-05-21 16:16     ` [PATCH v2 4/9] dt-bindings: mfd: add pf1550 Samuel Kayode
@ 2025-05-21 16:22       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-21 16:22 UTC (permalink / raw)
  To: Samuel Kayode
  Cc: Lee Jones, Liam Girdwood, Mark Brown, Dmitry Torokhov,
	Sebastian Reichel, Robin Gong, linux-kernel, linux-pm, linux-imx,
	linux-input, Abel Vesa, Abel Vesa, Robin Gong,
	Enric Balletbo Serra, Conor Dooley, devicetree, Rob Herring

On 21/05/2025 18:16, Samuel Kayode wrote:
> On Sat, May 17, 2025 at 01:16:38PM +0200, Krzysztof Kozlowski wrote:
>>> +    maxItems: 1
>>> +
>>> +  interrupts:
>>> +    maxItems: 1
>>> +
>>> +  regulators:
>>> +    $ref: /schemas/regulator/pf1550.yaml
>>> +
>>> +  charger:
>>> +    $ref: /schemas/power/supply/pf1550_charger.yaml
>>> +
>>> +  onkey:
>>> +    $ref: /schemas/input/pf1550_onkey.yaml
>>
>> This makes merging via separate trees not possible...
>>
>> Just fold everything here, drop compatibles and then put binding in the
>> regulator. Unless children are re-usable which would justify
>> compatibles, but then please provide arguments for that.
> 
> Yes, compatibles are not needed for the children. For adding binding to the
> regulator, did you mean for all children: charger and onkey included? So,
> replacing the separate yaml for all children with bindings in the mfd yaml?

Up to you. Onkey looks small so could be folded for sure, but other
bindings are not big either, so I would personally fold everything.
Otherwise you will need to be sure MFD is not applied before they reach
mainline.

Due to lack of testing I did not review charger patch, but just after
quick glance I see already that you miss power supply ref, thus it seems
you duplicate some of the existing properties from monitored-battery.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 7/9] input: pf1550: add onkey support
       [not found]   ` <pnfj4tyj3hovtu5ttnecmgozdq7hm2clxhl4xpuzrahlrzqmdm@qpdr4z2y5ylg>
@ 2025-05-21 21:00     ` Samuel Kayode
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Kayode @ 2025-05-21 21:00 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Lee Jones, Liam Girdwood, Mark Brown, Sebastian Reichel,
	Robin Gong, linux-kernel, linux-pm, linux-imx, linux-input,
	Abel Vesa, Abel Vesa, Robin Gong, Enric Balletbo Serra,
	Krzysztof Kozlowski, devicetree, Conor Dooley, Rob Herring

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-21 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1747409892.git.samuel.kayode@savoirfairelinux.com>
     [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
     [not found] ` <7d80afedf1ad9e98c9739163751bcb2785009e74.1747409892.git.samuel.kayode@savoirfairelinux.com>
     [not found]   ` <pnfj4tyj3hovtu5ttnecmgozdq7hm2clxhl4xpuzrahlrzqmdm@qpdr4z2y5ylg>
2025-05-21 21:00     ` [PATCH v2 7/9] input: pf1550: add onkey support Samuel Kayode

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox