Commit 76a67e39 authored by David Lechner's avatar David Lechner Committed by Jonathan Cameron
Browse files

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: default avatarTrevor Gamblin <tgamblin@baylibre.com>
Reviewed-by: default avatarNuno Sá <nuno.sa@analog.com>
Signed-off-by: default avatarDavid Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-4-4aee1b9f1b89@baylibre.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 51924ff5
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@
#define AD4695_REG_ACCESS_SCLK_HZ	(10 * MEGA)

/* Max number of voltage input channels. */
#define AD4695_MAX_CHANNELS		16
#define AD4695_MAX_VIN_CHANNELS		16

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