* PWM-GPIO driver: how to configure it?
@ 2024-10-02 18:41 Jean-Michaël Celerier
2024-10-04 7:06 ` Kent Gibson
0 siblings, 1 reply; 5+ messages in thread
From: Jean-Michaël Celerier @ 2024-10-02 18:41 UTC (permalink / raw)
To: linux-gpio
Hello!
I am curious of trying the new pwm-gpio driver in Linux 6.11 with a
Diolan DLN-2 chip, which exposes a gpiochip accessible to linux over
USB.
I haven't managed to see where the configuration options of the driver
are set: for instance, let's say I want to create a PWM output channel
over gpiochip1 line 4, 6 and 12, what should my modprobe line look
like ?
Kind regards,
------
Jean-Michaël Celerier
Société des Arts Technologiques
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PWM-GPIO driver: how to configure it?
2024-10-02 18:41 PWM-GPIO driver: how to configure it? Jean-Michaël Celerier
@ 2024-10-04 7:06 ` Kent Gibson
2024-10-04 13:57 ` Uwe Kleine-König
0 siblings, 1 reply; 5+ messages in thread
From: Kent Gibson @ 2024-10-04 7:06 UTC (permalink / raw)
To: Jean-Michaël Celerier; +Cc: linux-gpio, linux-pwm
On Wed, Oct 02, 2024 at 02:41:06PM -0400, Jean-Michaël Celerier wrote:
> Hello!
>
This is probably best asked on the PWM list, so cross-posting.
> I am curious of trying the new pwm-gpio driver in Linux 6.11 with a
> Diolan DLN-2 chip, which exposes a gpiochip accessible to linux over
> USB.
>
> I haven't managed to see where the configuration options of the driver
> are set: for instance, let's say I want to create a PWM output channel
> over gpiochip1 line 4, 6 and 12, what should my modprobe line look
> like ?
>
Good question.
I think it has to be setup by device tree, but that is just a guess.
Cheers,
Kent.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PWM-GPIO driver: how to configure it?
2024-10-04 7:06 ` Kent Gibson
@ 2024-10-04 13:57 ` Uwe Kleine-König
2024-10-04 14:00 ` Jean-Michaël Celerier
[not found] ` <CAA=GyxZskkS0D6R+dD8Auq3d+O_Jk-Hg12rGJTxqgv_RAoatEQ@mail.gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2024-10-04 13:57 UTC (permalink / raw)
To: Kent Gibson; +Cc: Jean-Michaël Celerier, linux-gpio, linux-pwm
[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]
Hello,
On Fri, Oct 04, 2024 at 03:06:55PM +0800, Kent Gibson wrote:
> On Wed, Oct 02, 2024 at 02:41:06PM -0400, Jean-Michaël Celerier wrote:
>
> This is probably best asked on the PWM list, so cross-posting.
>
> > I am curious of trying the new pwm-gpio driver in Linux 6.11 with a
> > Diolan DLN-2 chip, which exposes a gpiochip accessible to linux over
> > USB.
> >
> > I haven't managed to see where the configuration options of the driver
> > are set: for instance, let's say I want to create a PWM output channel
> > over gpiochip1 line 4, 6 and 12, what should my modprobe line look
> > like ?
>
> Good question.
> I think it has to be setup by device tree, but that is just a guess.
Setting up the pwm-gpio device via device tree only works if you manage
to describe the USB gpio chip in the device tree, too, as teh pwm-gpio
device must have valid gpio descriptors.
Otherwise you'd need to extend the pwm-gpio driver to instantiate
devices dynamically somehow.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PWM-GPIO driver: how to configure it?
2024-10-04 13:57 ` Uwe Kleine-König
@ 2024-10-04 14:00 ` Jean-Michaël Celerier
[not found] ` <CAA=GyxZskkS0D6R+dD8Auq3d+O_Jk-Hg12rGJTxqgv_RAoatEQ@mail.gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Jean-Michaël Celerier @ 2024-10-04 14:00 UTC (permalink / raw)
Cc: linux-gpio, linux-pwm
Thanks, my understanding is then that it is not really possible as of
now to instantiate this driver with hot-plug USB devices, right ?
I'd gladly look into contributing a patch but have never contributed
to the kernel and would have no clue as to where to start.
Kind regards,
Jean-Michaël
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAA=GyxZskkS0D6R+dD8Auq3d+O_Jk-Hg12rGJTxqgv_RAoatEQ@mail.gmail.com>]
* Re: PWM-GPIO driver: how to configure it?
[not found] ` <CAA=GyxZskkS0D6R+dD8Auq3d+O_Jk-Hg12rGJTxqgv_RAoatEQ@mail.gmail.com>
@ 2024-10-04 16:37 ` Uwe Kleine-König
0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2024-10-04 16:37 UTC (permalink / raw)
To: Jean-Michaël Celerier; +Cc: Kent Gibson, linux-gpio, linux-pwm
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
Hello Jean-Michaël,
On Fri, Oct 04, 2024 at 09:59:00AM -0400, Jean-Michaël Celerier wrote:
> Thanks, my understanding is then that it is not really possible as of now
> to instantiate this driver with hot-plug USB devices, right ?
Not 100% sure. It's possible to add information for pci devices to the
device tree, too, even though that bus is hotpluggable and usually
autodetected.
> I'd gladly look into contributing a patch but have never contributed to the
> kernel and would have no clue as to where to start.
For the generic solution you would need to create a sysfs file similar
to the "new_device" property for i2c (implemented in
drivers/i2c/i2c-core-base.c:new_device_store()). Instead of creating a
i2c device you'd create a platform device then. But the details are
different enough that this isn't an easy task for a kernel newcomer.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-04 16:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 18:41 PWM-GPIO driver: how to configure it? Jean-Michaël Celerier
2024-10-04 7:06 ` Kent Gibson
2024-10-04 13:57 ` Uwe Kleine-König
2024-10-04 14:00 ` Jean-Michaël Celerier
[not found] ` <CAA=GyxZskkS0D6R+dD8Auq3d+O_Jk-Hg12rGJTxqgv_RAoatEQ@mail.gmail.com>
2024-10-04 16:37 ` Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).