* [PATCH 1/2] iio: adc: ad4080: use lowercase device name
@ 2025-05-20 11:01 Antoniu Miclaus
2025-05-20 11:01 ` [PATCH 2/2] iio: adc: ad4080: extend check for data lanes num Antoniu Miclaus
2025-05-20 14:08 ` [PATCH 1/2] iio: adc: ad4080: use lowercase device name Nuno Sá
0 siblings, 2 replies; 6+ messages in thread
From: Antoniu Miclaus @ 2025-05-20 11:01 UTC (permalink / raw)
To: jic23, linux-iio, linux-kernel; +Cc: 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.
No functional changes are introduced.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/ad4080.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
index e8b2e5e7a68a..c36eb41d738a 100644
--- a/drivers/iio/adc/ad4080.c
+++ b/drivers/iio/adc/ad4080.c
@@ -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),
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] iio: adc: ad4080: extend check for data lanes num
2025-05-20 11:01 [PATCH 1/2] iio: adc: ad4080: use lowercase device name Antoniu Miclaus
@ 2025-05-20 11:01 ` Antoniu Miclaus
2025-05-20 14:09 ` Nuno Sá
2025-05-20 14:08 ` [PATCH 1/2] iio: adc: ad4080: use lowercase device name Nuno Sá
1 sibling, 1 reply; 6+ messages in thread
From: Antoniu Miclaus @ 2025-05-20 11:01 UTC (permalink / raw)
To: jic23, linux-iio, linux-kernel; +Cc: Antoniu Miclaus
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.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/ad4080.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
index c36eb41d738a..6e61787ed321 100644
--- a/drivers/iio/adc/ad4080.c
+++ b/drivers/iio/adc/ad4080.c
@@ -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);
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] iio: adc: ad4080: use lowercase device name
2025-05-20 11:01 [PATCH 1/2] iio: adc: ad4080: use lowercase device name Antoniu Miclaus
2025-05-20 11:01 ` [PATCH 2/2] iio: adc: ad4080: extend check for data lanes num Antoniu Miclaus
@ 2025-05-20 14:08 ` Nuno Sá
2025-05-25 14:11 ` Jonathan Cameron
1 sibling, 1 reply; 6+ messages in thread
From: Nuno Sá @ 2025-05-20 14:08 UTC (permalink / raw)
To: Antoniu Miclaus, jic23, linux-iio, linux-kernel
On Tue, 2025-05-20 at 14:01 +0300, Antoniu Miclaus wrote:
> 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.
>
> No functional changes are introduced.
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> ---
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> drivers/iio/adc/ad4080.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
> index e8b2e5e7a68a..c36eb41d738a 100644
> --- a/drivers/iio/adc/ad4080.c
> +++ b/drivers/iio/adc/ad4080.c
> @@ -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),
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] iio: adc: ad4080: extend check for data lanes num
2025-05-20 11:01 ` [PATCH 2/2] iio: adc: ad4080: extend check for data lanes num Antoniu Miclaus
@ 2025-05-20 14:09 ` Nuno Sá
2025-05-25 14:12 ` Jonathan Cameron
0 siblings, 1 reply; 6+ messages in thread
From: Nuno Sá @ 2025-05-20 14:09 UTC (permalink / raw)
To: Antoniu Miclaus, jic23, linux-iio, linux-kernel
On Tue, 2025-05-20 at 14:01 +0300, Antoniu Miclaus wrote:
> 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.
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> ---
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> drivers/iio/adc/ad4080.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
> index c36eb41d738a..6e61787ed321 100644
> --- a/drivers/iio/adc/ad4080.c
> +++ b/drivers/iio/adc/ad4080.c
> @@ -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);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] iio: adc: ad4080: use lowercase device name
2025-05-20 14:08 ` [PATCH 1/2] iio: adc: ad4080: use lowercase device name Nuno Sá
@ 2025-05-25 14:11 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2025-05-25 14:11 UTC (permalink / raw)
To: Nuno Sá; +Cc: Antoniu Miclaus, linux-iio, linux-kernel
On Tue, 20 May 2025 15:08:52 +0100
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Tue, 2025-05-20 at 14:01 +0300, Antoniu Miclaus wrote:
> > 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.
> >
> > No functional changes are introduced.
Isn't this what is read back from /sys/bus/iio/devices/iio\:device0/name?
changing it is a functional change. I'd argue it's a fix and deserved
a fixed tag.
> >
> > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> > ---
>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
>
> > drivers/iio/adc/ad4080.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
> > index e8b2e5e7a68a..c36eb41d738a 100644
> > --- a/drivers/iio/adc/ad4080.c
> > +++ b/drivers/iio/adc/ad4080.c
> > @@ -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),
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] iio: adc: ad4080: extend check for data lanes num
2025-05-20 14:09 ` Nuno Sá
@ 2025-05-25 14:12 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2025-05-25 14:12 UTC (permalink / raw)
To: Nuno Sá; +Cc: Antoniu Miclaus, linux-iio, linux-kernel
On Tue, 20 May 2025 15:09:25 +0100
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Tue, 2025-05-20 at 14:01 +0300, Antoniu Miclaus wrote:
> > 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.
> >
> > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> > ---
>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
This is fine. I'll pick it up once I have a fixes tag for patch 1.
Send a v2 with that in place and picking up
Nuno's tags.
Thanks,
Jonathan
>
> > drivers/iio/adc/ad4080.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
> > index c36eb41d738a..6e61787ed321 100644
> > --- a/drivers/iio/adc/ad4080.c
> > +++ b/drivers/iio/adc/ad4080.c
> > @@ -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);
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-05-25 14:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-20 11:01 [PATCH 1/2] iio: adc: ad4080: use lowercase device name Antoniu Miclaus
2025-05-20 11:01 ` [PATCH 2/2] iio: adc: ad4080: extend check for data lanes num Antoniu Miclaus
2025-05-20 14:09 ` Nuno Sá
2025-05-25 14:12 ` Jonathan Cameron
2025-05-20 14:08 ` [PATCH 1/2] iio: adc: ad4080: use lowercase device name Nuno Sá
2025-05-25 14:11 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox