Message ID | 20250321-wip-bl-ad3552r-fixes-v1-0-3c1aa249d163@baylibre.com (mailing list archive) |
---|---|
Headers | show |
Series | iio: ad3552r-hs: add support for internal ramp generator | expand |
On Fri, 21 Mar 2025 21:28:47 +0100 Angelo Dureghello <adureghello@baylibre.com> wrote: > Add support to enable the HDL IP core internal ramp generator, > actually managed by the adi-axi-dac backend. What is it for? Circuit testing or something else? We have in the past had pattern generators in IIO (currently under frequency drivers, though I'm not sure what we have in the way of waveforms in the stuff outside staging) so I'd like to be sure this is about debug rather than a pattern that is actually expected to be useful. Jonathan > > It works this way: > > /sys/bus/iio/devices/iio:device0# echo 1 > buffer0/out_voltage0_en > /sys/bus/iio/devices/iio:device0# echo 1 > buffer0/out_voltage1_en > /sys/bus/iio/devices/iio:device0# echo 1 > buffer0/enable > > Activating ramp generator: > > /sys/kernel/debug/iio/iio:device0# echo -n backend-ramp-generator > data_source > > Deactivating: > > /sys/kernel/debug/iio/iio:device0# echo -n iio-buffer > data_source > > Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> > --- > Angelo Dureghello (4): > docs: iio: add documentation for ad3552r driver > iio: backend: add support for data source get > iio: dac: adi-axi-dac: add data source get > iio: dac: ad3552r-hs: add support for internal ramp > > Documentation/iio/ad3552r.rst | 65 +++++++++++++++++++++++ > Documentation/iio/index.rst | 1 + > MAINTAINERS | 1 + > drivers/iio/dac/ad3552r-hs.c | 106 ++++++++++++++++++++++++++++++++++--- > drivers/iio/dac/adi-axi-dac.c | 27 ++++++++++ > drivers/iio/industrialio-backend.c | 28 ++++++++++ > include/linux/iio/backend.h | 5 ++ > 7 files changed, 227 insertions(+), 6 deletions(-) > --- > base-commit: eb870a5af7db1e5ca59330875125230b28e630f9 > change-id: 20250321-wip-bl-ad3552r-fixes-4a386944c170 > > Best regards,
Hi Jonathan, On 30.03.2025 17:53, Jonathan Cameron wrote: > On Fri, 21 Mar 2025 21:28:47 +0100 > Angelo Dureghello <adureghello@baylibre.com> wrote: > > > Add support to enable the HDL IP core internal ramp generator, > > actually managed by the adi-axi-dac backend. > > What is it for? Circuit testing or something else? > We have in the past had pattern generators in IIO (currently under > frequency drivers, though I'm not sure what we have in the way of > waveforms in the stuff outside staging) so I'd like to be sure > this is about debug rather than a pattern that is actually expected > to be useful. > Sorry form some reason seen this too late, just sent a v2. Anyway, the signal is a tooth wave at 280Hz, not sure that pattern can be of any use except for some dabug cases, or noise tests. Regards, angelo > Jonathan > > > > > It works this way: > > > > /sys/bus/iio/devices/iio:device0# echo 1 > buffer0/out_voltage0_en > > /sys/bus/iio/devices/iio:device0# echo 1 > buffer0/out_voltage1_en > > /sys/bus/iio/devices/iio:device0# echo 1 > buffer0/enable > > > > Activating ramp generator: > > > > /sys/kernel/debug/iio/iio:device0# echo -n backend-ramp-generator > data_source > > > > Deactivating: > > > > /sys/kernel/debug/iio/iio:device0# echo -n iio-buffer > data_source > > > > Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> > > --- > > Angelo Dureghello (4): > > docs: iio: add documentation for ad3552r driver > > iio: backend: add support for data source get > > iio: dac: adi-axi-dac: add data source get > > iio: dac: ad3552r-hs: add support for internal ramp > > > > Documentation/iio/ad3552r.rst | 65 +++++++++++++++++++++++ > > Documentation/iio/index.rst | 1 + > > MAINTAINERS | 1 + > > drivers/iio/dac/ad3552r-hs.c | 106 ++++++++++++++++++++++++++++++++++--- > > drivers/iio/dac/adi-axi-dac.c | 27 ++++++++++ > > drivers/iio/industrialio-backend.c | 28 ++++++++++ > > include/linux/iio/backend.h | 5 ++ > > 7 files changed, 227 insertions(+), 6 deletions(-) > > --- > > base-commit: eb870a5af7db1e5ca59330875125230b28e630f9 > > change-id: 20250321-wip-bl-ad3552r-fixes-4a386944c170 > > > > Best regards, >
On Mon, 2025-03-31 at 21:11 +0200, Angelo Dureghello wrote: > Hi Jonathan, > > On 30.03.2025 17:53, Jonathan Cameron wrote: > > On Fri, 21 Mar 2025 21:28:47 +0100 > > Angelo Dureghello <adureghello@baylibre.com> wrote: > > > > > Add support to enable the HDL IP core internal ramp generator, > > > actually managed by the adi-axi-dac backend. > > > > What is it for? Circuit testing or something else? > > We have in the past had pattern generators in IIO (currently under > > frequency drivers, though I'm not sure what we have in the way of > > waveforms in the stuff outside staging) so I'd like to be sure > > this is about debug rather than a pattern that is actually expected > > to be useful. > > > > Sorry form some reason seen this too late, just sent a v2. > > Anyway, the signal is a tooth wave at 280Hz, not sure that pattern > can be of any use except for some dabug cases, or noise tests. > Yes, typical usecase for this is to debug/validate the serial interfaces. I'm used to this see for LVDS/CMOS though (but I would assume the principle to be the same). - Nuno Sá
Add support to enable the HDL IP core internal ramp generator, actually managed by the adi-axi-dac backend. It works this way: /sys/bus/iio/devices/iio:device0# echo 1 > buffer0/out_voltage0_en /sys/bus/iio/devices/iio:device0# echo 1 > buffer0/out_voltage1_en /sys/bus/iio/devices/iio:device0# echo 1 > buffer0/enable Activating ramp generator: /sys/kernel/debug/iio/iio:device0# echo -n backend-ramp-generator > data_source Deactivating: /sys/kernel/debug/iio/iio:device0# echo -n iio-buffer > data_source Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> --- Angelo Dureghello (4): docs: iio: add documentation for ad3552r driver iio: backend: add support for data source get iio: dac: adi-axi-dac: add data source get iio: dac: ad3552r-hs: add support for internal ramp Documentation/iio/ad3552r.rst | 65 +++++++++++++++++++++++ Documentation/iio/index.rst | 1 + MAINTAINERS | 1 + drivers/iio/dac/ad3552r-hs.c | 106 ++++++++++++++++++++++++++++++++++--- drivers/iio/dac/adi-axi-dac.c | 27 ++++++++++ drivers/iio/industrialio-backend.c | 28 ++++++++++ include/linux/iio/backend.h | 5 ++ 7 files changed, 227 insertions(+), 6 deletions(-) --- base-commit: eb870a5af7db1e5ca59330875125230b28e630f9 change-id: 20250321-wip-bl-ad3552r-fixes-4a386944c170 Best regards,