Skip to content

Commit 76a67e3

Browse files
dlechjic23
authored andcommitted
iio: adc: ad4695: rename AD4695_MAX_VIN_CHANNELS
Rename AD4695_MAX_CHANNELS to AD4695_MAX_VIN_CHANNELS. It has been a point of confusion that this macro is only the voltage input channels and not all channels. Reviewed-by: Trevor Gamblin <[email protected]> Reviewed-by: Nuno Sá <[email protected]> Signed-off-by: David Lechner <[email protected]> Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-4-4aee1b9f1b89@baylibre.com Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 51924ff commit 76a67e3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/iio/adc/ad4695.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
#define AD4695_REG_ACCESS_SCLK_HZ (10 * MEGA)
106106

107107
/* Max number of voltage input channels. */
108-
#define AD4695_MAX_CHANNELS 16
108+
#define AD4695_MAX_VIN_CHANNELS 16
109109

110110
enum ad4695_in_pair {
111111
AD4695_IN_PAIR_REFGND,
@@ -143,8 +143,8 @@ struct ad4695_state {
143143
/* offload also requires separate gpio to manually control CNV */
144144
struct gpio_desc *cnv_gpio;
145145
/* voltages channels plus temperature and timestamp */
146-
struct iio_chan_spec iio_chan[AD4695_MAX_CHANNELS + 2];
147-
struct ad4695_channel_config channels_cfg[AD4695_MAX_CHANNELS];
146+
struct iio_chan_spec iio_chan[AD4695_MAX_VIN_CHANNELS + 2];
147+
struct ad4695_channel_config channels_cfg[AD4695_MAX_VIN_CHANNELS];
148148
const struct ad4695_chip_info *chip_info;
149149
int sample_freq_range[3];
150150
/* Reference voltage. */
@@ -157,10 +157,10 @@ struct ad4695_state {
157157
* to control CS and add a delay between the last SCLK and next
158158
* CNV rising edges.
159159
*/
160-
struct spi_transfer buf_read_xfer[AD4695_MAX_CHANNELS * 2 + 3];
160+
struct spi_transfer buf_read_xfer[AD4695_MAX_VIN_CHANNELS * 2 + 3];
161161
struct spi_message buf_read_msg;
162162
/* Raw conversion data received. */
163-
IIO_DECLARE_DMA_BUFFER_WITH_TS(u16, buf, AD4695_MAX_CHANNELS + 1);
163+
IIO_DECLARE_DMA_BUFFER_WITH_TS(u16, buf, AD4695_MAX_VIN_CHANNELS + 1);
164164
u16 raw_data;
165165
/* Commands to send for single conversion. */
166166
u16 cnv_cmd;

0 commit comments

Comments
 (0)