* [PATCH v2] staging: iio: addac: fix CamelCase naming in adt7316
@ 2026-06-02 19:03 Jad Keskes
2026-06-03 6:32 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Jad Keskes @ 2026-06-02 19:03 UTC (permalink / raw)
To: linux-staging; +Cc: linux-iio, Jonathan Cameron, Dan Carpenter, Jad Keskes
checkpatch flagged a few CamelCase names in this driver.
AIN and DAC prefixes are lowercased as standard kernel style.
Vref is kept capitalized since V stands for Voltage and is a
proper technical abbreviation.
DA_AB and DA_CD are renamed to dac_ab and dac_cd to match the
register constants ADT7316_VREF_BYPASS_DAC_AB and
ADT7316_VREF_BYPASS_DAC_CD that they reference.
Signed-off-by: Jad Keskes <inasj268@gmail.com>
---
drivers/staging/iio/addac/adt7316.c | 64 ++++++++++++++---------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 8a9a8262c..b5d62f1d3 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -663,7 +663,7 @@ static IIO_DEVICE_ATTR(da_high_resolution, 0644,
adt7316_store_da_high_resolution,
0);
-static ssize_t adt7316_show_AIN_internal_Vref(struct device *dev,
+static ssize_t adt7316_show_ain_internal_Vref(struct device *dev,
struct device_attribute *attr,
char *buf)
{
@@ -677,7 +677,7 @@ static ssize_t adt7316_show_AIN_internal_Vref(struct device *dev,
!!(chip->config3 & ADT7516_AIN_IN_VREF));
}
-static ssize_t adt7316_store_AIN_internal_Vref(struct device *dev,
+static ssize_t adt7316_store_ain_internal_Vref(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
@@ -704,9 +704,9 @@ static ssize_t adt7316_store_AIN_internal_Vref(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(AIN_internal_Vref, 0644,
- adt7316_show_AIN_internal_Vref,
- adt7316_store_AIN_internal_Vref,
+static IIO_DEVICE_ATTR(ain_internal_Vref, 0644,
+ adt7316_show_ain_internal_Vref,
+ adt7316_store_ain_internal_Vref,
0);
static ssize_t adt7316_show_enable_prop_DACA(struct device *dev,
@@ -787,7 +787,7 @@ static IIO_DEVICE_ATTR(enable_proportion_DACB, 0644,
adt7316_store_enable_prop_DACB,
0);
-static ssize_t adt7316_show_DAC_2Vref_ch_mask(struct device *dev,
+static ssize_t adt7316_show_dac_2Vref_ch_mask(struct device *dev,
struct device_attribute *attr,
char *buf)
{
@@ -798,7 +798,7 @@ static ssize_t adt7316_show_DAC_2Vref_ch_mask(struct device *dev,
chip->dac_config & ADT7316_DA_2VREF_CH_MASK);
}
-static ssize_t adt7316_store_DAC_2Vref_ch_mask(struct device *dev,
+static ssize_t adt7316_store_dac_2Vref_ch_mask(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
@@ -825,9 +825,9 @@ static ssize_t adt7316_store_DAC_2Vref_ch_mask(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(DAC_2Vref_channels_mask, 0644,
- adt7316_show_DAC_2Vref_ch_mask,
- adt7316_store_DAC_2Vref_ch_mask,
+static IIO_DEVICE_ATTR(dac_2Vref_channels_mask, 0644,
+ adt7316_show_dac_2Vref_ch_mask,
+ adt7316_store_dac_2Vref_ch_mask,
0);
static ssize_t adt7316_show_DAC_update_mode(struct device *dev,
@@ -948,7 +948,7 @@ static IIO_DEVICE_ATTR(update_DAC, 0644,
adt7316_store_update_DAC,
0);
-static ssize_t adt7316_show_DA_AB_Vref_bypass(struct device *dev,
+static ssize_t adt7316_show_dac_ab_Vref_bypass(struct device *dev,
struct device_attribute *attr,
char *buf)
{
@@ -959,7 +959,7 @@ static ssize_t adt7316_show_DA_AB_Vref_bypass(struct device *dev,
!!(chip->dac_config & ADT7316_VREF_BYPASS_DAC_AB));
}
-static ssize_t adt7316_store_DA_AB_Vref_bypass(struct device *dev,
+static ssize_t adt7316_store_dac_ab_Vref_bypass(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
@@ -982,12 +982,12 @@ static ssize_t adt7316_store_DA_AB_Vref_bypass(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(DA_AB_Vref_bypass, 0644,
- adt7316_show_DA_AB_Vref_bypass,
- adt7316_store_DA_AB_Vref_bypass,
+static IIO_DEVICE_ATTR(dac_ab_Vref_bypass, 0644,
+ adt7316_show_dac_ab_Vref_bypass,
+ adt7316_store_dac_ab_Vref_bypass,
0);
-static ssize_t adt7316_show_DA_CD_Vref_bypass(struct device *dev,
+static ssize_t adt7316_show_dac_cd_Vref_bypass(struct device *dev,
struct device_attribute *attr,
char *buf)
{
@@ -998,7 +998,7 @@ static ssize_t adt7316_show_DA_CD_Vref_bypass(struct device *dev,
!!(chip->dac_config & ADT7316_VREF_BYPASS_DAC_CD));
}
-static ssize_t adt7316_store_DA_CD_Vref_bypass(struct device *dev,
+static ssize_t adt7316_store_dac_cd_Vref_bypass(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
@@ -1021,12 +1021,12 @@ static ssize_t adt7316_store_DA_CD_Vref_bypass(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(DA_CD_Vref_bypass, 0644,
- adt7316_show_DA_CD_Vref_bypass,
- adt7316_store_DA_CD_Vref_bypass,
+static IIO_DEVICE_ATTR(dac_cd_Vref_bypass, 0644,
+ adt7316_show_dac_cd_Vref_bypass,
+ adt7316_store_dac_cd_Vref_bypass,
0);
-static ssize_t adt7316_show_DAC_internal_Vref(struct device *dev,
+static ssize_t adt7316_show_dac_internal_Vref(struct device *dev,
struct device_attribute *attr,
char *buf)
{
@@ -1041,7 +1041,7 @@ static ssize_t adt7316_show_DAC_internal_Vref(struct device *dev,
!!(chip->ldac_config & ADT7316_DAC_IN_VREF));
}
-static ssize_t adt7316_store_DAC_internal_Vref(struct device *dev,
+static ssize_t adt7316_store_dac_internal_Vref(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
@@ -1082,9 +1082,9 @@ static ssize_t adt7316_store_DAC_internal_Vref(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(DAC_internal_Vref, 0644,
- adt7316_show_DAC_internal_Vref,
- adt7316_store_DAC_internal_Vref,
+static IIO_DEVICE_ATTR(dac_internal_Vref, 0644,
+ adt7316_show_dac_internal_Vref,
+ adt7316_store_dac_internal_Vref,
0);
static ssize_t adt7316_show_ad(struct adt7316_chip_info *chip,
@@ -1644,13 +1644,13 @@ static struct attribute *adt7316_attributes[] = {
&iio_dev_attr_da_high_resolution.dev_attr.attr,
&iio_dev_attr_enable_proportion_DACA.dev_attr.attr,
&iio_dev_attr_enable_proportion_DACB.dev_attr.attr,
- &iio_dev_attr_DAC_2Vref_channels_mask.dev_attr.attr,
+ &iio_dev_attr_dac_2Vref_channels_mask.dev_attr.attr,
&iio_dev_attr_DAC_update_mode.dev_attr.attr,
&iio_dev_attr_all_DAC_update_modes.dev_attr.attr,
&iio_dev_attr_update_DAC.dev_attr.attr,
- &iio_dev_attr_DA_AB_Vref_bypass.dev_attr.attr,
- &iio_dev_attr_DA_CD_Vref_bypass.dev_attr.attr,
- &iio_dev_attr_DAC_internal_Vref.dev_attr.attr,
+ &iio_dev_attr_dac_ab_Vref_bypass.dev_attr.attr,
+ &iio_dev_attr_dac_cd_Vref_bypass.dev_attr.attr,
+ &iio_dev_attr_dac_internal_Vref.dev_attr.attr,
&iio_dev_attr_VDD.dev_attr.attr,
&iio_dev_attr_in_temp.dev_attr.attr,
&iio_dev_attr_ex_temp.dev_attr.attr,
@@ -1684,15 +1684,15 @@ static struct attribute *adt7516_attributes[] = {
&iio_dev_attr_enable_smbus_timeout.dev_attr.attr,
&iio_dev_attr_powerdown.dev_attr.attr,
&iio_dev_attr_fast_ad_clock.dev_attr.attr,
- &iio_dev_attr_AIN_internal_Vref.dev_attr.attr,
+ &iio_dev_attr_ain_internal_Vref.dev_attr.attr,
&iio_dev_attr_da_high_resolution.dev_attr.attr,
&iio_dev_attr_enable_proportion_DACA.dev_attr.attr,
&iio_dev_attr_enable_proportion_DACB.dev_attr.attr,
- &iio_dev_attr_DAC_2Vref_channels_mask.dev_attr.attr,
+ &iio_dev_attr_dac_2Vref_channels_mask.dev_attr.attr,
&iio_dev_attr_DAC_update_mode.dev_attr.attr,
&iio_dev_attr_all_DAC_update_modes.dev_attr.attr,
&iio_dev_attr_update_DAC.dev_attr.attr,
- &iio_dev_attr_DAC_internal_Vref.dev_attr.attr,
+ &iio_dev_attr_dac_internal_Vref.dev_attr.attr,
&iio_dev_attr_VDD.dev_attr.attr,
&iio_dev_attr_in_temp.dev_attr.attr,
&iio_dev_attr_ex_temp_AIN1.dev_attr.attr,
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] staging: iio: addac: fix CamelCase naming in adt7316
2026-06-02 19:03 [PATCH v2] staging: iio: addac: fix CamelCase naming in adt7316 Jad Keskes
@ 2026-06-03 6:32 ` Dan Carpenter
2026-06-03 11:00 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2026-06-03 6:32 UTC (permalink / raw)
To: Jad Keskes; +Cc: linux-staging, linux-iio, Jonathan Cameron
On Tue, Jun 02, 2026 at 08:03:08PM +0100, Jad Keskes wrote:
> checkpatch flagged a few CamelCase names in this driver.
> AIN and DAC prefixes are lowercased as standard kernel style.
The AIN things aren't an issue and checkpatch doesn't complain
about them.
> Vref is kept capitalized since V stands for Voltage and is a
> proper technical abbreviation.
>
> DA_AB and DA_CD are renamed to dac_ab and dac_cd to match the
> register constants ADT7316_VREF_BYPASS_DAC_AB and
> ADT7316_VREF_BYPASS_DAC_CD that they reference.
This sort of change would need to be in its own commit. (We're
dropping the rest of the commit anyway). The difference
between DA and DAC is not totally clear to me... The
adt7316_show_DAC_2Vref_ch_mask() function only seems to deal
with DA but the adt7316_store_DAC_2Vref_ch_mask() does stuff
with both. So I'm not sure I understand the naming. (I have
not investigated and this is my first time to look at this
code).
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] staging: iio: addac: fix CamelCase naming in adt7316
2026-06-03 6:32 ` Dan Carpenter
@ 2026-06-03 11:00 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2026-06-03 11:00 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Jad Keskes, linux-staging, linux-iio
On Wed, 3 Jun 2026 09:32:13 +0300
Dan Carpenter <error27@gmail.com> wrote:
> On Tue, Jun 02, 2026 at 08:03:08PM +0100, Jad Keskes wrote:
> > checkpatch flagged a few CamelCase names in this driver.
> > AIN and DAC prefixes are lowercased as standard kernel style.
>
> The AIN things aren't an issue and checkpatch doesn't complain
> about them.
Also they are userspace ABI. Admittedly this is in staging and that
ABI is completely none compliant with IIO standards, but none the less
you should be very very careful when making that sort of change.
This driver needs a mass of work to drag it into the modern age.
IIRC there have been a few partial attempts at that in the past.
One key part of that is most of what you are touching in this
patch is in code that will not exist after this is modernized.
I'd be surprised if there is low hanging fruit like this that actually
makes sense to do in the remaining staging/iio drivers.
Mostly much more radical surgery is required.
Anyhow, with that all in mind I'm not planning to take this sort
of change to this driver
Jonathan
>
> > Vref is kept capitalized since V stands for Voltage and is a
> > proper technical abbreviation.
> >
> > DA_AB and DA_CD are renamed to dac_ab and dac_cd to match the
> > register constants ADT7316_VREF_BYPASS_DAC_AB and
> > ADT7316_VREF_BYPASS_DAC_CD that they reference.
>
> This sort of change would need to be in its own commit. (We're
> dropping the rest of the commit anyway). The difference
> between DA and DAC is not totally clear to me... The
> adt7316_show_DAC_2Vref_ch_mask() function only seems to deal
> with DA but the adt7316_store_DAC_2Vref_ch_mask() does stuff
> with both. So I'm not sure I understand the naming. (I have
> not investigated and this is my first time to look at this
> code).
>
> regards,
> dan carpenter
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-03 11:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 19:03 [PATCH v2] staging: iio: addac: fix CamelCase naming in adt7316 Jad Keskes
2026-06-03 6:32 ` Dan Carpenter
2026-06-03 11:00 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox