From: Jonathan Cameron <jic23@kernel.org>
To: Denis Carikli <denis@eukrea.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>
Cc: "Eric Bénard" <eric@eukrea.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 2/4] iio: adc: ti-adc128s052: Add adc108s022 ID
Date: Sun, 2 Aug 2015 18:01:21 +0100 [thread overview]
Message-ID: <55BE4CE1.6060100@kernel.org> (raw)
In-Reply-To: <1437581064-9733-2-git-send-email-denis@eukrea.com>
On 22/07/15 17:04, Denis Carikli wrote:
> Signed-off-by: Denis Carikli <denis@eukrea.com>
Given this is a 10 bit convertor and the one you are effectively
claiming it is compatible with is a 12 bit convertor, you have
more to do in the driver than this (slightly!).
The issue is in adc128_read_raw which is assuming 12 bits for
IIO_CHAN_INFO_SCALE.
> ---
> drivers/iio/adc/Kconfig | 6 +++---
> drivers/iio/adc/ti-adc128s052.c | 2 ++
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index 233d47b..ae92f23 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -313,11 +313,11 @@ config TI_ADC081C
> called ti-adc081c.
>
> config TI_ADC128S052
> - tristate "Texas Instruments ADC128S052/ADC122S021"
> + tristate "Texas Instruments ADC128S052, ADC122S021 and ADC108S022"
> depends on SPI
> help
> - If you say yes here you get support for Texas Instruments ADC128S052
> - and ADC122S021 chips.
> + If you say yes here you get support for Texas Instruments ADC128S052,
> + ADC122S021 and ADC108S022 chips.
>
> This driver can also be built as a module. If so, the module will be
> called ti-adc128s052.
> diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
> index 915be6b..8aca0ff 100644
> --- a/drivers/iio/adc/ti-adc128s052.c
> +++ b/drivers/iio/adc/ti-adc128s052.c
> @@ -5,6 +5,7 @@
> * Datasheets can be found here:
> * http://www.ti.com/lit/ds/symlink/adc128s052.pdf
> * http://www.ti.com/lit/ds/symlink/adc122s021.pdf
> + * http://www.ti.com/lit/ds/symlink/adc108s022.pdf
> *
> * This program is free software; you can redistribute it and/or modify
> * it under the terms of the GNU General Public License version 2 as
> @@ -177,6 +178,7 @@ static int adc128_remove(struct spi_device *spi)
> static const struct spi_device_id adc128_id[] = {
> { "adc128s052", 0}, /* index into adc128_config */
> { "adc122s021", 1},
> + { "adc108s022", 1},
> { }
> };
> MODULE_DEVICE_TABLE(spi, adc128_id);
>
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Denis Carikli <denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>,
Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "Eric Bénard" <eric-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/4] iio: adc: ti-adc128s052: Add adc108s022 ID
Date: Sun, 2 Aug 2015 18:01:21 +0100 [thread overview]
Message-ID: <55BE4CE1.6060100@kernel.org> (raw)
In-Reply-To: <1437581064-9733-2-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
On 22/07/15 17:04, Denis Carikli wrote:
> Signed-off-by: Denis Carikli <denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
Given this is a 10 bit convertor and the one you are effectively
claiming it is compatible with is a 12 bit convertor, you have
more to do in the driver than this (slightly!).
The issue is in adc128_read_raw which is assuming 12 bits for
IIO_CHAN_INFO_SCALE.
> ---
> drivers/iio/adc/Kconfig | 6 +++---
> drivers/iio/adc/ti-adc128s052.c | 2 ++
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index 233d47b..ae92f23 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -313,11 +313,11 @@ config TI_ADC081C
> called ti-adc081c.
>
> config TI_ADC128S052
> - tristate "Texas Instruments ADC128S052/ADC122S021"
> + tristate "Texas Instruments ADC128S052, ADC122S021 and ADC108S022"
> depends on SPI
> help
> - If you say yes here you get support for Texas Instruments ADC128S052
> - and ADC122S021 chips.
> + If you say yes here you get support for Texas Instruments ADC128S052,
> + ADC122S021 and ADC108S022 chips.
>
> This driver can also be built as a module. If so, the module will be
> called ti-adc128s052.
> diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
> index 915be6b..8aca0ff 100644
> --- a/drivers/iio/adc/ti-adc128s052.c
> +++ b/drivers/iio/adc/ti-adc128s052.c
> @@ -5,6 +5,7 @@
> * Datasheets can be found here:
> * http://www.ti.com/lit/ds/symlink/adc128s052.pdf
> * http://www.ti.com/lit/ds/symlink/adc122s021.pdf
> + * http://www.ti.com/lit/ds/symlink/adc108s022.pdf
> *
> * This program is free software; you can redistribute it and/or modify
> * it under the terms of the GNU General Public License version 2 as
> @@ -177,6 +178,7 @@ static int adc128_remove(struct spi_device *spi)
> static const struct spi_device_id adc128_id[] = {
> { "adc128s052", 0}, /* index into adc128_config */
> { "adc122s021", 1},
> + { "adc108s022", 1},
> { }
> };
> MODULE_DEVICE_TABLE(spi, adc128_id);
>
next prev parent reply other threads:[~2015-08-02 17:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 16:04 [PATCH 1/4] iio: adc: mcp320x: Fix NULL pointer Denis Carikli
2015-07-22 16:04 ` Denis Carikli
2015-07-22 16:04 ` [PATCH 2/4] iio: adc: ti-adc128s052: Add adc108s022 ID Denis Carikli
2015-07-22 16:04 ` Denis Carikli
2015-07-22 17:24 ` Michael Welling
2015-07-22 17:24 ` Michael Welling
2015-08-02 17:01 ` Jonathan Cameron [this message]
2015-08-02 17:01 ` Jonathan Cameron
2015-07-22 16:04 ` [PATCH 3/4] iio: ti-adc128s052: Documentation: " Denis Carikli
2015-07-22 16:04 ` Denis Carikli
2015-08-02 17:01 ` Jonathan Cameron
2015-08-02 17:01 ` Jonathan Cameron
2015-07-22 16:04 ` [PATCH 4/4] iio: adc: ti-adc128s052: Add devicetree support Denis Carikli
2015-07-22 16:04 ` Denis Carikli
2015-08-02 17:01 ` Jonathan Cameron
2015-08-02 17:01 ` Jonathan Cameron
2015-07-22 17:18 ` [PATCH 1/4] iio: adc: mcp320x: Fix NULL pointer Michael Welling
2015-07-22 17:18 ` Michael Welling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55BE4CE1.6060100@kernel.org \
--to=jic23@kernel.org \
--cc=denis@eukrea.com \
--cc=devicetree@vger.kernel.org \
--cc=eric@eukrea.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.