]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7606: Add PWM support for conversion trigger
authorGuillaume Stols <gstols@baylibre.com>
Tue, 15 Oct 2024 13:56:17 +0000 (13:56 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 21 Oct 2024 18:19:26 +0000 (19:19 +0100)
commit29121b825e05f784db489fc2be4c9ef394cc118a
tree3e1b9382176bd2390edd0794040859af67e14288
parent1346e2566a7bb3dd0e51d7a1487a9215abb42d93
iio: adc: ad7606: Add PWM support for conversion trigger

Until now, the conversion were triggered by setting high the GPIO
connected to the convst pin. This commit gives the possibility to
connect the convst pin to a PWM.
Connecting a PWM allows to have a better control on the samplerate,
but it must be handled with care, as it is completely decorrelated of
the driver's busy pin handling.
Hence it is not recommended to be used "as is" but must be exploited
in conjunction with IIO backend, and for now only a mock functionality
is enabled, i.e PWM never swings, but is used as a GPIO, i.e duty_cycle
== period equals high state, duty_cycle == 0 equals low state.

This mock functionality will be disabled after the IIO backend usecase
is introduced.

Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Link: https://patch.msgid.link/20241015-ad7606_add_iio_backend_support-v5-4-654faf1ae08c@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7606.c
drivers/iio/adc/ad7606.h