Message ID | 20240514-ad4111-v2-6-29be6a55efb5@analog.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Add support for AD411x | expand |
On Tue, May 14, 2024 at 2:23 AM Dumitru Ceclan via B4 Relay <devnull+dumitru.ceclan.analog.com@kernel.org> wrote: > > From: Dumitru Ceclan <dumitru.ceclan@analog.com> > > Add missing names from the device info struct for 3 models to ensure > consistency with the rest of the models. > This affects userspace, right? So probably needs a Fixes: to make sure this gets into the 6.10 release? > Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com> > --- > drivers/iio/adc/ad7173.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c > index 1e9ba3070770..d965b66d4d5a 100644 > --- a/drivers/iio/adc/ad7173.c > +++ b/drivers/iio/adc/ad7173.c > @@ -227,6 +227,7 @@ static const struct ad7173_device_info ad7173_device_info[] = { > .num_sinc5_data_rates = ARRAY_SIZE(ad7173_sinc5_data_rates), > }, > [ID_AD7172_4] = { > + .name = "ad7172-4", > .id = AD7172_4_ID, > .num_inputs = 9, > .num_channels = 8, > @@ -272,6 +273,7 @@ static const struct ad7173_device_info ad7173_device_info[] = { > .num_sinc5_data_rates = ARRAY_SIZE(ad7175_sinc5_data_rates), > }, > [ID_AD7175_8] = { > + .name = "ad7175-8", > .id = AD7175_8_ID, > .num_inputs = 17, > .num_channels = 16, > @@ -302,6 +304,7 @@ static const struct ad7173_device_info ad7173_device_info[] = { > .num_sinc5_data_rates = ARRAY_SIZE(ad7175_sinc5_data_rates), > }, > [ID_AD7177_2] = { > + .name = "ad7177-2", > .id = AD7177_ID, > .num_inputs = 5, > .num_channels = 4, > > -- > 2.43.0 > >
On 16/05/2024 02:32, David Lechner wrote: > On Tue, May 14, 2024 at 2:23 AM Dumitru Ceclan via B4 Relay > <devnull+dumitru.ceclan.analog.com@kernel.org> wrote: >> >> From: Dumitru Ceclan <dumitru.ceclan@analog.com> >> >> Add missing names from the device info struct for 3 models to ensure >> consistency with the rest of the models. >> > > This affects userspace, right? So probably needs a Fixes: to make sure > this gets into the 6.10 release? > I don't think that it breaks userspace, just creates an additional file. This creates the file "name" in the iio:deviceX directory that reads the string. I do not consider the Fixes: tag a necessity. I consider that it resolves inconsistencies in the _device_info struct. >> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com> >> --- >> drivers/iio/adc/ad7173.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c >> index 1e9ba3070770..d965b66d4d5a 100644 >> --- a/drivers/iio/adc/ad7173.c >> +++ b/drivers/iio/adc/ad7173.c >> @@ -227,6 +227,7 @@ static const struct ad7173_device_info ad7173_device_info[] = { >> .num_sinc5_data_rates = ARRAY_SIZE(ad7173_sinc5_data_rates), >> }, >> [ID_AD7172_4] = { >> + .name = "ad7172-4", >> .id = AD7172_4_ID, >> .num_inputs = 9, >> .num_channels = 8, >> @@ -272,6 +273,7 @@ static const struct ad7173_device_info ad7173_device_info[] = { >> .num_sinc5_data_rates = ARRAY_SIZE(ad7175_sinc5_data_rates), >> }, >> [ID_AD7175_8] = { >> + .name = "ad7175-8", >> .id = AD7175_8_ID, >> .num_inputs = 17, >> .num_channels = 16, >> @@ -302,6 +304,7 @@ static const struct ad7173_device_info ad7173_device_info[] = { >> .num_sinc5_data_rates = ARRAY_SIZE(ad7175_sinc5_data_rates), >> }, >> [ID_AD7177_2] = { >> + .name = "ad7177-2", >> .id = AD7177_ID, >> .num_inputs = 5, >> .num_channels = 4, >> >> -- >> 2.43.0 >> >>
On Thu, May 16, 2024 at 11:09 AM Ceclan, Dumitru <mitrutzceclan@gmail.com> wrote: > > On 16/05/2024 02:32, David Lechner wrote: > > On Tue, May 14, 2024 at 2:23 AM Dumitru Ceclan via B4 Relay > > <devnull+dumitru.ceclan.analog.com@kernel.org> wrote: > >> > >> From: Dumitru Ceclan <dumitru.ceclan@analog.com> > >> > >> Add missing names from the device info struct for 3 models to ensure > >> consistency with the rest of the models. > >> > > > > This affects userspace, right? So probably needs a Fixes: to make sure > > this gets into the 6.10 release? > > > I don't think that it breaks userspace, just creates an additional file. > > This creates the file "name" in the iio:deviceX directory that reads the > string. I do not consider the Fixes: tag a necessity. I consider that it > resolves inconsistencies in the _device_info struct. Ah, OK. For some reason, I was thinking that it would default to the driver name if this was left out.
On Thu, 16 May 2024 11:43:17 -0500 David Lechner <dlechner@baylibre.com> wrote: > On Thu, May 16, 2024 at 11:09 AM Ceclan, Dumitru > <mitrutzceclan@gmail.com> wrote: > > > > On 16/05/2024 02:32, David Lechner wrote: > > > On Tue, May 14, 2024 at 2:23 AM Dumitru Ceclan via B4 Relay > > > <devnull+dumitru.ceclan.analog.com@kernel.org> wrote: > > >> > > >> From: Dumitru Ceclan <dumitru.ceclan@analog.com> > > >> > > >> Add missing names from the device info struct for 3 models to ensure > > >> consistency with the rest of the models. > > >> > > > > > > This affects userspace, right? So probably needs a Fixes: to make sure > > > this gets into the 6.10 release? > > > > > I don't think that it breaks userspace, just creates an additional file. > > > > This creates the file "name" in the iio:deviceX directory that reads the > > string. I do not consider the Fixes: tag a necessity. I consider that it > > resolves inconsistencies in the _device_info struct. > > Ah, OK. For some reason, I was thinking that it would default to the > driver name if this was left out. Hmm. I'd be tempted to take this a fix as some userspace code relies on that name being present and it is unusual to not see it. Jonathan
diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c index 1e9ba3070770..d965b66d4d5a 100644 --- a/drivers/iio/adc/ad7173.c +++ b/drivers/iio/adc/ad7173.c @@ -227,6 +227,7 @@ static const struct ad7173_device_info ad7173_device_info[] = { .num_sinc5_data_rates = ARRAY_SIZE(ad7173_sinc5_data_rates), }, [ID_AD7172_4] = { + .name = "ad7172-4", .id = AD7172_4_ID, .num_inputs = 9, .num_channels = 8, @@ -272,6 +273,7 @@ static const struct ad7173_device_info ad7173_device_info[] = { .num_sinc5_data_rates = ARRAY_SIZE(ad7175_sinc5_data_rates), }, [ID_AD7175_8] = { + .name = "ad7175-8", .id = AD7175_8_ID, .num_inputs = 17, .num_channels = 16, @@ -302,6 +304,7 @@ static const struct ad7173_device_info ad7173_device_info[] = { .num_sinc5_data_rates = ARRAY_SIZE(ad7175_sinc5_data_rates), }, [ID_AD7177_2] = { + .name = "ad7177-2", .id = AD7177_ID, .num_inputs = 5, .num_channels = 4,