Message ID | 20250317115247.3735016-5-u.kleine-koenig@baylibre.com (mailing list archive) |
---|---|
Headers | show |
Series | iio: adc: ad7124: Fix 3dB filter frequency reading | expand |
On Mon, 17 Mar 2025 12:52:46 +0100 Uwe Kleine-König <u.kleine-koenig@baylibre.com> wrote: > Hello, > > (implicit) v1 of this patch set is available at > https://lore.kernel.org/linux-iio/cover.1741801853.git.u.kleine-koenig@baylibre.com > . > > Changes since then: > > - Reorder patches to have the cleanup ("Make register naming > consistent") last > - Drop write support for the filter_low_pass_3db_frequency property > which is completely broken. > - trivially rebase to todays iio/togreg > > I wonder if there is a way to remove the writable permission of the > filter_low_pass_3db_frequency sysfs file instead of erroring out when a > value is written. Hints welcome. Unfortunately not. With a lot of hindsight that is a flaw in the way we generate sysfs attributes. IIRC when hwmon added similar they avoided that trap. To retrofit it onto IIO now we'd have to have some form of complex permissions query or duplicate all the masks to allow r and w separately. Jonathan > > Best regards > Uwe > > Uwe Kleine-König (3): > iio: adc: ad7124: Fix 3dB filter frequency reading > iio: adc: ad7124: Remove ability to write > filter_low_pass_3db_frequency > iio: adc: ad7124: Make register naming consistent > > drivers/iio/adc/ad7124.c | 208 ++++++++++++++++----------------------- > 1 file changed, 84 insertions(+), 124 deletions(-) > > > base-commit: 8dbeb413806f9f810d97d25284f585b201aa3bdc
Hello Jonathan, On Mon, Mar 17, 2025 at 07:00:31PM +0000, Jonathan Cameron wrote: > On Mon, 17 Mar 2025 12:52:46 +0100 > Uwe Kleine-König <u.kleine-koenig@baylibre.com> wrote: > > > Hello, > > > > (implicit) v1 of this patch set is available at > > https://lore.kernel.org/linux-iio/cover.1741801853.git.u.kleine-koenig@baylibre.com > > . > > > > Changes since then: > > > > - Reorder patches to have the cleanup ("Make register naming > > consistent") last > > - Drop write support for the filter_low_pass_3db_frequency property > > which is completely broken. > > - trivially rebase to todays iio/togreg > > > > I wonder if there is a way to remove the writable permission of the > > filter_low_pass_3db_frequency sysfs file instead of erroring out when a > > value is written. Hints welcome. > > Unfortunately not. With a lot of hindsight that is a flaw in the way > we generate sysfs attributes. IIRC when hwmon added similar they > avoided that trap. To retrofit it onto IIO now we'd have to have > some form of complex permissions query or duplicate all the masks > to allow r and w separately. OK, fine for me, so I didn't miss anything :-) I have another patch in my queue for ad7124. For that it would be great to know if you intend to apply this patch set. If yes, I continue to build on top of this stack. Best regards Uwe
On Mon, 24 Mar 2025 10:44:52 +0100 Uwe Kleine-König <u.kleine-koenig@baylibre.com> wrote: > Hello Jonathan, > > On Mon, Mar 17, 2025 at 07:00:31PM +0000, Jonathan Cameron wrote: > > On Mon, 17 Mar 2025 12:52:46 +0100 > > Uwe Kleine-König <u.kleine-koenig@baylibre.com> wrote: > > > > > Hello, > > > > > > (implicit) v1 of this patch set is available at > > > https://lore.kernel.org/linux-iio/cover.1741801853.git.u.kleine-koenig@baylibre.com > > > . > > > > > > Changes since then: > > > > > > - Reorder patches to have the cleanup ("Make register naming > > > consistent") last > > > - Drop write support for the filter_low_pass_3db_frequency property > > > which is completely broken. > > > - trivially rebase to todays iio/togreg > > > > > > I wonder if there is a way to remove the writable permission of the > > > filter_low_pass_3db_frequency sysfs file instead of erroring out when a > > > value is written. Hints welcome. > > > > Unfortunately not. With a lot of hindsight that is a flaw in the way > > we generate sysfs attributes. IIRC when hwmon added similar they > > avoided that trap. To retrofit it onto IIO now we'd have to have > > some form of complex permissions query or duplicate all the masks > > to allow r and w separately. > > OK, fine for me, so I didn't miss anything :-) > > I have another patch in my queue for ad7124. For that it would be great > to know if you intend to apply this patch set. If yes, I continue to > build on top of this stack. Sorry for slow reply. Bunch of travel (and being a tourist on either end of the work bit ;) Subject to the question on patch 1 from Marcelo I'm fine with this. I'll probably take all 3 for next merge window though as patch 1 is a minor fix I think in something that people probably haven't really been using and splitting it makes for a messy cycle. Jonathan > > Best regards > Uwe