RE: Intel Timed-IO driver in IIO/Counter subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Linus,

Friday, June 17, 2022 4:40 AM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:

> For 2. I am uncertain. Periodic events sound like PWM to me.

I do not think TGPIO periodic output is useful for PWM. There are two output
modes: edge output and pulse output. In edge mode output, where the an edge
is produced periodically based on the programmed period the duty cycle is
always 50%. In pulse mode output where a pulse is produced each output
period, the width of the pulse is two ART ticks which on current Intel
client platforms is about 50 ns. The pulse width is not adjustable.

We want to be able to output a clock from 1 Hz (1 PPS) up to 1 KHz that is
synchronized with the system clock.

It is possible to represent the periodic output function as a PWM device,
but the PWM subsystem output - without modification - is not aligned to
any clock which breaks the timing application.

> If a "single event" is something
> like pulling a GPIO line high/low at a specific (wall clock) time in the
> future, it should probably be in the GPIO subsystem, like a triggered
> GPIO event or so, that sounds a bit hard but certainly doable with some
> thinking and tinkering.

Earlier, we proposed a linereq_write() method in addition to the already
existing linereq_read().

https://lkml.org/lkml/2021/8/24/807

This is for "single shot" scheduled output only. This is fairly easy to
implement using the Timed I/O hardware because the clock used to schedule
output events is directly related to TSC and system time.

The difficult part is implementing this for devices that are not time
aware.

> Yours,
> Linus Walleij

Thanks,
Christopher




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux