[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vch9ud6fP=jg0tFx4WjHKYyfZjwaELBzfSubBVksQ7hSQ@mail.gmail.com>
Date: Wed, 31 Dec 2025 00:55:50 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Tomas Borquez <tomasborquez13@...il.com>
Cc: Jonathan Cameron <jic23@...nel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Lars-Peter Clausen <lars@...afoo.de>, Michael Hennerich <Michael.Hennerich@...log.com>,
David Lechner <dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
linux-staging@...ts.linux.dev
Subject: Re: [PATCH v2 5/6] staging: iio: ad9832: convert to iio channels and
ext_info attrs
On Tue, Dec 30, 2025 at 10:35 PM Tomas Borquez <tomasborquez13@...il.com> wrote:
>
> Convert ad9832 from sysfs attributes to standard channel interface
> using a single IIO_ALTCURRENT channel with ext_info attributes, as this
> device is a current source DAC with one output.
...
> -static int ad9832_write_frequency(struct ad9832_state *st,
> - unsigned int addr, unsigned long fout)
> +static ssize_t ad9832_write_frequency(struct iio_dev *indio_dev,
> + uintptr_t private,
Torvalds said that uintptr_t shouldn't be used in the Linux kernel,
the unsigned long suffice and enough. Why do we need it here?
> +static IIO_DEVICE_ATTR(out_altcurrent0_frequency_symbol, 0644,
> + ad9832_show, ad9832_store, AD9832_FREQ_SYM);
> +static IIO_DEVICE_ATTR(out_altcurrent0_phase_symbol, 0644,
> + ad9832_show, ad9832_store, AD9832_PHASE_SYM);
> +static IIO_DEVICE_ATTR(out_altcurrent0_enable, 0644,
> + ad9832_show, ad9832_store, AD9832_OUTPUT_EN);
Why not IIO_DEVICE_ATTR_RW()?
...
> + &iio_dev_attr_out_altcurrent0_frequency_symbol.dev_attr.attr,
> + &iio_dev_attr_out_altcurrent0_phase_symbol.dev_attr.attr,
> + &iio_dev_attr_out_altcurrent0_enable.dev_attr.attr,
> + &iio_dev_attr_out_altcurrent0_pincontrol_en.dev_attr.attr,
> NULL,
At some point we may also drop the comma in the terminator entry.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists