public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/23] iio: make masklength __private (final round)
@ 2024-07-26  8:22 Nuno Sa via B4 Relay
  2024-07-26  8:22 ` [PATCH 01/23] iio: accel: adxl380: make use of iio_get_masklength() Nuno Sa via B4 Relay
                   ` (23 more replies)
  0 siblings, 24 replies; 28+ messages in thread
From: Nuno Sa via B4 Relay @ 2024-07-26  8:22 UTC (permalink / raw)
  To: linux-iio, linux-staging
  Cc: Lars-Peter Clausen, Michael Hennerich, Ramona Gradinariu,
	Antoniu Miclaus, Jonathan Cameron, Marcus Folkesson,
	Kent Gustavsson, Matthias Brugger, AngeloGioacchino Del Regno,
	Heiko Stuebner, Maxime Coquelin, Alexandre Torgue,
	Francesco Dolcini, João Paulo Gonçalves, Haibo Chen,
	Michal Simek, Benson Leung, Guenter Roeck, Greg Kroah-Hartman

Hi Jonathan,

Here it goes the final conversion round.  On the testing branch a git
grep:

git grep "\->masklength"

Gives no more users so hopefully I did it right :).

Not entirely related with this but I'll mention it anyways :). Looking
at the other [INTERN] fields, I see:

* active_scan_mask: which seems to be pretty similar to masklength;
* scan_timestamp: Has some apparently valid  users;
* scan_bytes: Also has a few users;
* trig: may need a bit more inspection.

The first 3 look like valid RO fields that drivers are allowed to
access. I mean, for scan_bytes I guess drivers could calculate that
based on the active_scan_mask but I think that's just not worth it given
the core already did it for us.
 
So I wonder if a similar work would be valuable? scan_timestamp and
scan_bytes would be pretty trivial but for active_scan_mask we do have
lots of users (but also trivial I think).

For Trig, most of the writes are drivers doing

indio_dev->trig = iio_trigger_get(data->trig);

So we either assume it's public or remove that line from drivers. Though
that could break userland apps relying on some trigger to be
automatically set after device probe. We can anyways have another helper
to do that for drivers (not sure this field is accessed in some
fastpath).

Also need to better check if there are any readers for it.

Anyways, it would be nice to get your inputs on the last [INTERNAL] fields
in struct iio_dev

Also want to mention that I deliberately removed some mailing lists
given by get_maintainers as this is fairly simple and so I don't think
the "spam" is worth it :). 

---
Nuno Sa (23):
      iio: accel: adxl380: make use of iio_get_masklength()
      iio: adc: max1118: make use of iio_for_each_active_channel()
      iio: adc: max1118: make use of iio_for_each_active_channel()
      iio: adc: mcp3911: make use of iio_for_each_active_channel()
      iio: adc: mt6360-adc: make use of iio_for_each_active_channel()
      iio: adc: rockchip_saradc: make use of iio_for_each_active_channel()
      iio: adc: rtq6056: make use of iio_for_each_active_channel()
      iio: adc: stm32-adc: make use of iio_get_masklength()
      iio: adc: stm32-dfsdm-adc: make use of iio_get_masklength()
      iio: adc: ti-adc0832: make use of iio_for_each_active_channel()
      iio: adc: ti-adc084s021: make use of iio_for_each_active_channel()
      iio: adc: ti-ads1015: make use of iio_get_masklength()
      iio: adc: ti-ads1119: make use of iio_get_masklength()
      iio: adc: ti-ads1298: make use of iio_for_each_active_channel()
      iio: adc: ti-adc12138: make use of iio_for_each_active_channel()
      iio: adc: ti-ads124s08: make use of iio_for_each_active_channel()
      iio: adc: ti-ads131e08: make use of iio_for_each_active_channel()
      iio: adc: ti-ads8688: make use of iio_for_each_active_channel()
      iio: adc: vf610_adc: make use of iio_get_masklength()
      iio: adc: xilinx-xadc-core: use new '.masklength' accessors
      iio: common: cros_ec_sensors_core: use new '.masklength' accessors
      staging: iio: impedance-analyzer: ad5933: make use of iio_get_masklength()
      iio: core: annotate masklength as __private

 drivers/iio/accel/adxl380.c                               | 2 +-
 drivers/iio/adc/ina2xx-adc.c                              | 3 +--
 drivers/iio/adc/max1118.c                                 | 3 +--
 drivers/iio/adc/mcp3911.c                                 | 2 +-
 drivers/iio/adc/mt6360-adc.c                              | 2 +-
 drivers/iio/adc/rockchip_saradc.c                         | 2 +-
 drivers/iio/adc/rtq6056.c                                 | 2 +-
 drivers/iio/adc/stm32-adc.c                               | 4 ++--
 drivers/iio/adc/stm32-dfsdm-adc.c                         | 2 +-
 drivers/iio/adc/ti-adc0832.c                              | 3 +--
 drivers/iio/adc/ti-adc084s021.c                           | 3 +--
 drivers/iio/adc/ti-adc12138.c                             | 3 +--
 drivers/iio/adc/ti-ads1015.c                              | 2 +-
 drivers/iio/adc/ti-ads1119.c                              | 4 ++--
 drivers/iio/adc/ti-ads124s08.c                            | 3 +--
 drivers/iio/adc/ti-ads1298.c                              | 3 +--
 drivers/iio/adc/ti-ads131e08.c                            | 2 +-
 drivers/iio/adc/ti-ads8688.c                              | 4 +---
 drivers/iio/adc/vf610_adc.c                               | 2 +-
 drivers/iio/adc/xilinx-xadc-core.c                        | 5 ++---
 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 8 +++-----
 drivers/iio/industrialio-buffer.c                         | 2 +-
 drivers/staging/iio/impedance-analyzer/ad5933.c           | 5 +++--
 include/linux/iio/iio.h                                   | 4 ++--
 24 files changed, 32 insertions(+), 43 deletions(-)
---
base-commit: 472438c7e0e2261c6737a8321f46ef176eef1c8f
change-id: 20240724-dev-iio-masklength-private3-7a2d819acc7d
--

Thanks!
- Nuno Sá



^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2024-08-14 18:46 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26  8:22 [PATCH 00/23] iio: make masklength __private (final round) Nuno Sa via B4 Relay
2024-07-26  8:22 ` [PATCH 01/23] iio: accel: adxl380: make use of iio_get_masklength() Nuno Sa via B4 Relay
2024-07-26  8:22 ` [PATCH 02/23] iio: adc: max1118: make use of iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-26  8:22 ` [PATCH 03/23] " Nuno Sa via B4 Relay
2024-07-26  8:22 ` [PATCH 04/23] iio: adc: mcp3911: " Nuno Sa via B4 Relay
2024-07-26  8:22 ` [PATCH 05/23] iio: adc: mt6360-adc: " Nuno Sa via B4 Relay
2024-07-26 12:14   ` AngeloGioacchino Del Regno
2024-07-26  8:22 ` [PATCH 06/23] iio: adc: rockchip_saradc: " Nuno Sa via B4 Relay
2024-07-29 16:52   ` Heiko Stübner
2024-07-26  8:22 ` [PATCH 07/23] iio: adc: rtq6056: " Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 08/23] iio: adc: stm32-adc: make use of iio_get_masklength() Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 09/23] iio: adc: stm32-dfsdm-adc: " Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 10/23] iio: adc: ti-adc0832: make use of iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 11/23] iio: adc: ti-adc084s021: " Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 12/23] iio: adc: ti-ads1015: make use of iio_get_masklength() Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 13/23] iio: adc: ti-ads1119: " Nuno Sa via B4 Relay
2024-07-28 19:55   ` João Paulo Gonçalves
2024-07-26  8:23 ` [PATCH 14/23] iio: adc: ti-ads1298: make use of iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 15/23] iio: adc: ti-adc12138: " Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 16/23] iio: adc: ti-ads124s08: " Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 17/23] iio: adc: ti-ads131e08: " Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 18/23] iio: adc: ti-ads8688: " Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 19/23] iio: adc: vf610_adc: make use of iio_get_masklength() Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 20/23] iio: adc: xilinx-xadc-core: use new '.masklength' accessors Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 21/23] iio: common: cros_ec_sensors_core: " Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 22/23] staging: iio: impedance-analyzer: ad5933: make use of iio_get_masklength() Nuno Sa via B4 Relay
2024-07-26  8:23 ` [PATCH 23/23] iio: core: annotate masklength as __private Nuno Sa via B4 Relay
2024-08-14 18:46 ` [PATCH 00/23] iio: make masklength __private (final round) Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox