Nuno Sa
1e17feb4ad
iio: adc: ad9467: fix scale setting
...
[ Upstream commit b73f08bb7f ]
When reading in_voltage_scale we can get something like:
root@analog:/sys/bus/iio/devices/iio:device2# cat in_voltage_scale
0.038146
However, when reading the available options:
root@analog:/sys/bus/iio/devices/iio:device2# cat
in_voltage_scale_available
2000.000000 2100.000006 2200.000007 2300.000008 2400.000009 2500.000010
which does not make sense. Moreover, when trying to set a new scale we
get an error because there's no call to __ad9467_get_scale() to give us
values as given when reading in_voltage_scale. Fix it by computing the
available scales during probe and properly pass the list when
.read_available() is called.
While at it, change to use .read_available() from iio_info. Also note
that to properly fix this, adi-axi-adc.c has to be changed accordingly.
Fixes: ad67971202 ("iio: adc: ad9467: add support AD9467 ADC")
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-4-a4a33bc4d70e@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-25 14:37:54 -08:00
..
2022-12-19 12:27:32 +01:00
2023-08-30 16:23:11 +02:00
2023-11-08 17:30:47 +01:00
2023-06-28 10:28:13 +02:00
2024-01-25 14:37:54 -08:00
2023-05-17 11:47:36 +02:00
2023-11-20 11:06:52 +01:00
2023-11-28 16:54:55 +00:00
2023-12-08 08:46:16 +01:00
2023-10-10 21:53:38 +02:00
2023-12-13 18:26:57 +01:00
2023-06-05 09:07:02 +02:00
2023-06-28 10:28:08 +02:00
2023-09-23 11:01:05 +02:00
2023-01-14 10:15:11 +01:00
2023-11-28 16:54:53 +00:00
2023-09-19 12:20:23 +02:00
2023-09-23 11:01:05 +02:00
2023-10-10 21:53:33 +02:00
2023-09-19 12:20:28 +02:00
2023-05-17 11:47:32 +02:00
2023-03-11 16:40:15 +01:00
2023-07-27 08:43:37 +02:00
2023-10-10 21:53:37 +02:00
2023-10-10 21:53:35 +02:00
2023-10-10 21:53:33 +02:00
2024-01-25 14:37:49 -08:00
2023-08-30 16:23:19 +02:00
2023-08-16 18:21:00 +02:00
2023-12-13 18:26:56 +01:00
2023-08-30 16:23:17 +02:00
2023-12-20 15:44:30 +01:00
2023-01-14 10:15:19 +01:00
2023-01-14 10:16:31 +01:00
2023-12-08 08:46:15 +01:00
2023-05-30 12:57:45 +01:00
2024-01-25 14:37:50 -08:00
2023-01-14 10:16:50 +01:00
2023-01-04 11:39:22 +01:00
2023-01-04 11:39:18 +01:00
2023-07-27 08:43:39 +02:00
2023-09-19 12:20:06 +02:00
2023-01-04 11:39:17 +01:00
2023-01-04 11:39:18 +01:00
2023-12-08 08:46:15 +01:00
2023-04-20 12:10:23 +02:00
2023-12-08 08:46:08 +01:00
2023-01-14 10:16:42 +01:00
2023-12-13 18:26:56 +01:00
2023-02-22 12:55:56 +01:00
2023-01-14 10:16:13 +01:00
2023-11-20 11:06:56 +01:00
2023-09-19 12:20:22 +02:00
2023-10-10 21:53:28 +02:00
2023-12-20 15:44:28 +01:00
2023-03-11 16:40:00 +01:00
2023-07-27 08:43:37 +02:00
2023-01-14 10:15:58 +01:00
2023-01-04 11:39:23 +01:00
2023-08-26 15:26:43 +02:00
2023-10-25 11:54:20 +02:00
2023-10-25 11:54:14 +02:00
2023-03-17 08:45:07 +01:00
2023-03-17 08:45:07 +01:00
2023-03-17 08:45:08 +01:00
2023-11-08 17:30:43 +01:00
2023-03-11 16:39:19 +01:00
2023-06-21 15:45:35 +02:00
2023-04-20 12:10:29 +02:00
2024-01-05 15:12:25 +01:00
2023-03-11 16:39:59 +01:00
2023-06-21 15:45:35 +02:00
2023-10-10 21:53:35 +02:00
2023-11-28 16:55:00 +00:00
2023-01-14 10:16:44 +01:00
2022-12-14 11:31:59 +01:00
2023-10-25 11:54:15 +02:00
2023-08-26 15:26:48 +02:00
2023-09-02 09:18:12 +02:00
2023-01-04 11:39:16 +01:00
2023-01-04 11:39:24 +01:00
2023-11-20 11:06:46 +01:00
2023-06-21 15:45:38 +02:00
2023-06-21 15:45:38 +02:00
2023-10-10 21:53:24 +02:00
2023-03-11 16:39:38 +01:00
2023-09-19 12:20:04 +02:00
2023-07-27 08:43:40 +02:00
2023-02-25 11:55:03 +01:00
2023-04-05 11:23:36 +02:00
2023-05-17 11:47:51 +02:00
2023-02-22 12:55:54 +01:00
2023-08-26 15:26:57 +02:00
2023-04-05 11:23:34 +02:00
2024-01-25 14:37:40 -08:00
2023-11-20 11:06:44 +01:00
2023-11-20 11:06:52 +01:00
2023-11-08 17:30:51 +01:00
2023-07-27 08:43:56 +02:00
2023-12-13 18:27:04 +01:00
2023-07-27 08:43:58 +02:00
2023-07-27 08:43:31 +02:00
2023-11-08 17:30:47 +01:00
2023-08-11 11:57:55 +02:00
2023-05-17 11:47:31 +02:00
2023-06-05 09:07:03 +02:00
2023-05-17 11:48:19 +02:00
2023-01-14 10:15:28 +01:00
2023-11-28 16:54:53 +00:00
2023-10-25 11:54:13 +02:00
2023-10-25 11:54:13 +02:00
2023-08-30 16:23:18 +02:00
2023-07-27 08:44:13 +02:00
2023-02-25 11:55:02 +01:00
2024-01-25 14:37:46 -08:00
2022-11-25 17:45:49 +01:00
2023-11-08 17:30:47 +01:00
2023-08-30 16:23:18 +02:00
2023-10-10 21:53:28 +02:00
2023-07-27 08:44:31 +02:00
2023-03-22 13:30:02 +01:00
2023-04-26 11:27:35 +02:00
2023-01-04 11:39:17 +01:00
2022-11-25 17:45:54 +01:00
2023-02-22 12:55:53 +01:00
2023-06-21 15:45:35 +02:00
2023-01-04 11:39:23 +01:00
2023-06-28 10:28:09 +02:00
2023-01-04 11:39:23 +01:00
2023-07-27 08:44:43 +02:00
2023-05-17 11:47:32 +02:00
2023-01-14 10:15:16 +01:00
2023-01-18 11:44:52 +01:00
2023-11-28 16:55:02 +00:00
2023-01-04 11:39:22 +01:00
2023-03-22 13:30:03 +01:00
2023-05-17 11:48:09 +02:00
2023-03-11 16:39:51 +01:00
2023-01-04 11:39:16 +01:00
2023-02-01 08:23:23 +01:00
2023-12-08 08:46:15 +01:00
2023-02-15 17:22:10 +01:00
2023-08-26 15:26:53 +02:00
2023-05-17 11:47:56 +02:00
2023-12-08 08:46:13 +01:00