Skip to contentSkip to conversation

iio: adc: ad4080: use lowercase device name

PATCH In review Antoniu Miclaus 2 participants 3 messages May 26, 2025 – May 31, 2025

Subsystems (3)
lore
Share & tools
lore

Antoniu Miclaus

author maintainer
#0 lore raw

PATCH v2 1/2 iio: adc: ad4080: use lowercase device name

Update the .name field in the ad4080_chip_info struct from "AD4080" to "ad4080" to follow the common convention in IIO drivers of using lowercase names for device identifiers.

Fixes 1ff3f56f846b ("iio: adc: ad4080: add driver support")

---
changes in v2:
- drop "no functional changes" from commit body
- add fixes tag

 drivers/iio/adc/ad4080.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad4080.c +1 -1
index e8b2e5e7a68a..c36eb41d738a 100644
@@ -433,7 +433,7 @@ static const struct iio_chan_spec ad4080_channel = {
 };
 
 static const struct ad4080_chip_info ad4080_chip_info = {
-	.name = "AD4080",
+	.name = "ad4080",
 	.product_id = AD4080_CHIP_ID,
 	.scale_table = ad4080_scale_table,
 	.num_scales = ARRAY_SIZE(ad4080_scale_table),
Signature · 1 line
2.49.0
author maintainer
#1 lore raw

PATCH v2 2/2 iio: adc: ad4080: extend check for data lanes num

Extend the check for st->num_lanes to ensure it is not greater than 2, preventing invalid configurations.

The AD4080 only supports up to 2 data lanes.

---
no changes in v2.

 drivers/iio/adc/ad4080.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad4080.c +1 -1
index c36eb41d738a..6e61787ed321 100644
@@ -516,7 +516,7 @@ static int ad4080_properties_parse(struct ad4080_state *st)
 
 	st->num_lanes = 1;
 	device_property_read_u32(dev, "adi,num-lanes", &st->num_lanes);
-	if (!st->num_lanes)
+	if (!st->num_lanes || st->num_lanes > 2)
 		return dev_err_probe(dev, -EINVAL,
 				     "Invalid 'adi,num-lanes' value: %u",
 				     st->num_lanes);
Signature · 1 line
2.49.0
maintainer
#2 lore raw
In reply to Antoniu Miclaus
Quoted 7 lines · On Mon, 26 May 2025 11:22:27 +0300 Antoniu Miclaus…

Update the .name field in the ad4080_chip_info struct from "AD4080" to "ad4080" to follow the common convention in IIO drivers of using lowercase names for device identifiers.

Fixes 1ff3f56f846b ("iio: adc: ad4080: add driver support")

I squashed both patches into the original commit as that is still on a tree that I can rebase as I'll do that on rc1 anyway once available.

Thanks,

Jonathan

Quoted 20 lines

---
changes in v2:
- drop "no functional changes" from commit body
- add fixes tag

 drivers/iio/adc/ad4080.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad4080.c +1 -1
index e8b2e5e7a68a..c36eb41d738a 100644
@@ -433,7 +433,7 @@ static const struct iio_chan_spec ad4080_channel = {
 };
 
 static const struct ad4080_chip_info ad4080_chip_info = {
-	.name = "AD4080",
+	.name = "ad4080",
 	.product_id = AD4080_CHIP_ID,
 	.scale_table = ad4080_scale_table,
 	.num_scales = ARRAY_SIZE(ad4080_scale_table),