[PATCH v4 3/5] iio: adc: ti-adc128s052: cleanup changes

From: Sukrut Bellary
Date: Sat Jun 14 2025 - 05:15:59 EST


Arrange device IDs in alphabetical and numerical order. new device ID addition
can follow the same convention. Also, arrange the structures in order.
This is a cosmetic change only, and the functionality remains unchanged.

Co-developed-by: Nishanth Menon <nm@xxxxxx>
Signed-off-by: Nishanth Menon <nm@xxxxxx>
Signed-off-by: Sukrut Bellary <sbellary@xxxxxxxxxxxx>
---
drivers/iio/adc/ti-adc128s052.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
index 2b206745e53d..fbf15c83c127 100644
--- a/drivers/iio/adc/ti-adc128s052.c
+++ b/drivers/iio/adc/ti-adc128s052.c
@@ -112,27 +112,27 @@ static int adc128_read_raw(struct iio_dev *indio_dev,

#define ADC128_VOLTAGE_CHANNEL(num) _ADC128_VOLTAGE_CHANNEL(num, 12)

-static const struct iio_chan_spec adc128s052_channels[] = {
+static const struct iio_chan_spec adc122s021_channels[] = {
ADC128_VOLTAGE_CHANNEL(0),
ADC128_VOLTAGE_CHANNEL(1),
- ADC128_VOLTAGE_CHANNEL(2),
- ADC128_VOLTAGE_CHANNEL(3),
- ADC128_VOLTAGE_CHANNEL(4),
- ADC128_VOLTAGE_CHANNEL(5),
- ADC128_VOLTAGE_CHANNEL(6),
- ADC128_VOLTAGE_CHANNEL(7),
};

-static const struct iio_chan_spec adc122s021_channels[] = {
+static const struct iio_chan_spec adc124s021_channels[] = {
ADC128_VOLTAGE_CHANNEL(0),
ADC128_VOLTAGE_CHANNEL(1),
+ ADC128_VOLTAGE_CHANNEL(2),
+ ADC128_VOLTAGE_CHANNEL(3),
};

-static const struct iio_chan_spec adc124s021_channels[] = {
+static const struct iio_chan_spec adc128s052_channels[] = {
ADC128_VOLTAGE_CHANNEL(0),
ADC128_VOLTAGE_CHANNEL(1),
ADC128_VOLTAGE_CHANNEL(2),
ADC128_VOLTAGE_CHANNEL(3),
+ ADC128_VOLTAGE_CHANNEL(4),
+ ADC128_VOLTAGE_CHANNEL(5),
+ ADC128_VOLTAGE_CHANNEL(6),
+ ADC128_VOLTAGE_CHANNEL(7),
};

static const char * const bd79104_regulators[] = { "iovdd" };
@@ -216,27 +216,27 @@ static int adc128_probe(struct spi_device *spi)
}

static const struct of_device_id adc128_of_match[] = {
- { .compatible = "ti,adc128s052", .data = &adc128s052_config },
+ { .compatible = "rohm,bd79104", .data = &bd79104_config },
{ .compatible = "ti,adc122s021", .data = &adc122s021_config },
{ .compatible = "ti,adc122s051", .data = &adc122s021_config },
{ .compatible = "ti,adc122s101", .data = &adc122s021_config },
{ .compatible = "ti,adc124s021", .data = &adc124s021_config },
{ .compatible = "ti,adc124s051", .data = &adc124s021_config },
{ .compatible = "ti,adc124s101", .data = &adc124s021_config },
- { .compatible = "rohm,bd79104", .data = &bd79104_config },
+ { .compatible = "ti,adc128s052", .data = &adc128s052_config },
{ }
};
MODULE_DEVICE_TABLE(of, adc128_of_match);

static const struct spi_device_id adc128_id[] = {
- { "adc128s052", (kernel_ulong_t)&adc128s052_config },
{ "adc122s021", (kernel_ulong_t)&adc122s021_config },
{ "adc122s051", (kernel_ulong_t)&adc122s021_config },
{ "adc122s101", (kernel_ulong_t)&adc122s021_config },
{ "adc124s021", (kernel_ulong_t)&adc124s021_config },
{ "adc124s051", (kernel_ulong_t)&adc124s021_config },
{ "adc124s101", (kernel_ulong_t)&adc124s021_config },
- { "bd79104", (kernel_ulong_t)&bd79104_config },
+ { "adc128s052", (kernel_ulong_t)&adc128s052_config },
+ { "bd79104", (kernel_ulong_t)&bd79104_config },
{ }
};
MODULE_DEVICE_TABLE(spi, adc128_id);
--
2.34.1