diff mbox series

[v2,1/3] iio: add adddac subdirectory

Message ID 20211028135608.3666940-1-demonsingur@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series [v2,1/3] iio: add adddac subdirectory | expand

Commit Message

Cosmin Tanislav Oct. 28, 2021, 1:56 p.m. UTC
From: Cosmin Tanislav <cosmin.tanislav@analog.com>

For IIO devices that expose both ADC and DAC functionality.

Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
---
 drivers/iio/Kconfig        | 1 +
 drivers/iio/Makefile       | 1 +
 drivers/iio/addac/Kconfig  | 8 ++++++++
 drivers/iio/addac/Makefile | 6 ++++++
 4 files changed, 16 insertions(+)
 create mode 100644 drivers/iio/addac/Kconfig
 create mode 100644 drivers/iio/addac/Makefile

Comments

Jonathan Cameron Oct. 28, 2021, 4:02 p.m. UTC | #1
On Thu, 28 Oct 2021 16:56:03 +0300
Cosmin Tanislav <demonsingur@gmail.com> wrote:

> From: Cosmin Tanislav <cosmin.tanislav@analog.com>
> 
> For IIO devices that expose both ADC and DAC functionality.
> 
> Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Why v2?

Should be a change log (+ I would suggest a cover letter).
Also, reply to previous version if there haven't been comments that
you are replying to..

I'll assume most v1 comments apply to v2 and hence wait for v3.

Please leave some time for others to review these versions before
sending a v3.  

Jonathan

> ---
>  drivers/iio/Kconfig        | 1 +
>  drivers/iio/Makefile       | 1 +
>  drivers/iio/addac/Kconfig  | 8 ++++++++
>  drivers/iio/addac/Makefile | 6 ++++++
>  4 files changed, 16 insertions(+)
>  create mode 100644 drivers/iio/addac/Kconfig
>  create mode 100644 drivers/iio/addac/Makefile
> 
> diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
> index 2334ad249b46..4fb4321a72cb 100644
> --- a/drivers/iio/Kconfig
> +++ b/drivers/iio/Kconfig
> @@ -70,6 +70,7 @@ config IIO_TRIGGERED_EVENT
>  
>  source "drivers/iio/accel/Kconfig"
>  source "drivers/iio/adc/Kconfig"
> +source "drivers/iio/addac/Kconfig"
>  source "drivers/iio/afe/Kconfig"
>  source "drivers/iio/amplifiers/Kconfig"
>  source "drivers/iio/cdc/Kconfig"
> diff --git a/drivers/iio/Makefile b/drivers/iio/Makefile
> index 65e39bd4f934..8d48c70fee4d 100644
> --- a/drivers/iio/Makefile
> +++ b/drivers/iio/Makefile
> @@ -15,6 +15,7 @@ obj-$(CONFIG_IIO_TRIGGERED_EVENT) += industrialio-triggered-event.o
>  
>  obj-y += accel/
>  obj-y += adc/
> +obj-y += addac/
>  obj-y += afe/
>  obj-y += amplifiers/
>  obj-y += buffer/
> diff --git a/drivers/iio/addac/Kconfig b/drivers/iio/addac/Kconfig
> new file mode 100644
> index 000000000000..2e64d7755d5e
> --- /dev/null
> +++ b/drivers/iio/addac/Kconfig
> @@ -0,0 +1,8 @@
> +#
> +# ADC DAC drivers
> +#
> +# When adding new entries keep the list in alphabetical order
> +
> +menu "Analog to digital and digital to analog converters"
> +
> +endmenu
> diff --git a/drivers/iio/addac/Makefile b/drivers/iio/addac/Makefile
> new file mode 100644
> index 000000000000..b888b9ee12da
> --- /dev/null
> +++ b/drivers/iio/addac/Makefile
> @@ -0,0 +1,6 @@
> +# SPDX-License-Identifier: GPL-2.0
> +#
> +# Makefile for industrial I/O ADDAC drivers
> +#
> +
> +# When adding new entries keep the list in alphabetical order
Nuno Sá Oct. 29, 2021, 8 a.m. UTC | #2
Hi,

> -----Original Message-----
> From: Cosmin Tanislav <demonsingur@gmail.com>
> Sent: Thursday, October 28, 2021 3:56 PM
> Cc: demonsingur@gmail.com; Tanislav, Cosmin
> <Cosmin.Tanislav@analog.com>; Lars-Peter Clausen
> <lars@metafoo.de>; Hennerich, Michael
> <Michael.Hennerich@analog.com>; Jonathan Cameron
> <jic23@kernel.org>; Rob Herring <robh+dt@kernel.org>; linux-
> iio@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH v2 1/3] iio: add adddac subdirectory
> 
> [External]
> 
> From: Cosmin Tanislav <cosmin.tanislav@analog.com>
> 
> For IIO devices that expose both ADC and DAC functionality.
> 
> Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
> ---

One thing here that I'm not too sure is the naming of the directory.
I'm starting to see in ADI more and more of this highly integrated devices... For
example this one [1], is something we have someone already working one
and it has ADCs, DAC, amplifiers. So, I'm just wondering if now
it's not the time where we just have a generic enough place for these kind
of "combo" devices? Being that said, I have no idea about what name we could
give :)

[1]: https://www.analog.com/media/en/technical-documentation/data-sheets/AD7293.pdf
- Nuno Sá
Jonathan Cameron Oct. 30, 2021, 3:59 p.m. UTC | #3
On Fri, 29 Oct 2021 08:00:05 +0000
"Sa, Nuno" <Nuno.Sa@analog.com> wrote:

> Hi,
> 
> > -----Original Message-----
> > From: Cosmin Tanislav <demonsingur@gmail.com>
> > Sent: Thursday, October 28, 2021 3:56 PM
> > Cc: demonsingur@gmail.com; Tanislav, Cosmin
> > <Cosmin.Tanislav@analog.com>; Lars-Peter Clausen
> > <lars@metafoo.de>; Hennerich, Michael
> > <Michael.Hennerich@analog.com>; Jonathan Cameron
> > <jic23@kernel.org>; Rob Herring <robh+dt@kernel.org>; linux-
> > iio@vger.kernel.org; devicetree@vger.kernel.org; linux-
> > kernel@vger.kernel.org
> > Subject: [PATCH v2 1/3] iio: add adddac subdirectory
> > 
> > [External]
> > 
> > From: Cosmin Tanislav <cosmin.tanislav@analog.com>
> > 
> > For IIO devices that expose both ADC and DAC functionality.
> > 
> > Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
> > ---  
> 
> One thing here that I'm not too sure is the naming of the directory.
> I'm starting to see in ADI more and more of this highly integrated devices... For
> example this one [1], is something we have someone already working one
> and it has ADCs, DAC, amplifiers. So, I'm just wondering if now
> it's not the time where we just have a generic enough place for these kind
> of "combo" devices? Being that said, I have no idea about what name we could
> give :)
> 
> [1]: https://www.analog.com/media/en/technical-documentation/data-sheets/AD7293.pdf
> - Nuno Sá

Naming is always fun. I don't want to have combo start picking up IMUs so
we need to be a bit careful.

We could take the approach we have done with proximity and light sensors of effectively
declaring one type to the dominant one.  There it's a bit clearer though - you don't
buy a proximity sensor if you want to just measure light levels.

Here there isn't always a dominant type.  The example here is titled input / output
device so no preference of one over the other.  The GPIO stuff is kind of a feature
bolted on, so ADDAC is generic enough.

For the ad7293 it does call it a Power Amplifiers 'with' the other stuff so maybe
just sticking to amplifier as the type is the way to go. 

Meh, to a certain extent it doesn't matter - we can safely move these around
once we have more of them in the tree.  The adt7316 is still in staging and
is an ADDAC as well so I think we should put that category in for now.

Jonathan

> 
>
diff mbox series

Patch

diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
index 2334ad249b46..4fb4321a72cb 100644
--- a/drivers/iio/Kconfig
+++ b/drivers/iio/Kconfig
@@ -70,6 +70,7 @@  config IIO_TRIGGERED_EVENT
 
 source "drivers/iio/accel/Kconfig"
 source "drivers/iio/adc/Kconfig"
+source "drivers/iio/addac/Kconfig"
 source "drivers/iio/afe/Kconfig"
 source "drivers/iio/amplifiers/Kconfig"
 source "drivers/iio/cdc/Kconfig"
diff --git a/drivers/iio/Makefile b/drivers/iio/Makefile
index 65e39bd4f934..8d48c70fee4d 100644
--- a/drivers/iio/Makefile
+++ b/drivers/iio/Makefile
@@ -15,6 +15,7 @@  obj-$(CONFIG_IIO_TRIGGERED_EVENT) += industrialio-triggered-event.o
 
 obj-y += accel/
 obj-y += adc/
+obj-y += addac/
 obj-y += afe/
 obj-y += amplifiers/
 obj-y += buffer/
diff --git a/drivers/iio/addac/Kconfig b/drivers/iio/addac/Kconfig
new file mode 100644
index 000000000000..2e64d7755d5e
--- /dev/null
+++ b/drivers/iio/addac/Kconfig
@@ -0,0 +1,8 @@ 
+#
+# ADC DAC drivers
+#
+# When adding new entries keep the list in alphabetical order
+
+menu "Analog to digital and digital to analog converters"
+
+endmenu
diff --git a/drivers/iio/addac/Makefile b/drivers/iio/addac/Makefile
new file mode 100644
index 000000000000..b888b9ee12da
--- /dev/null
+++ b/drivers/iio/addac/Makefile
@@ -0,0 +1,6 @@ 
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for industrial I/O ADDAC drivers
+#
+
+# When adding new entries keep the list in alphabetical order