Move ad7780 sigma-delta adc out of staging to the main tree
Signed-off-by: Giuliano Belinassi
Signed-off-by: Renato Lui Geh
---
drivers/iio/adc/Kconfig | 13 ++
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/ad7780.c | 347 +++
drivers
Previously, the AD7780 driver only supported gpio for the 'powerdown'
pin. This commit adds suppport for the 'gain' and 'filter' pin.
Signed-off-by: Giuliano Belinassi
---
Changes in v2:
- Now this patch is part of the patchset that aims to remove ad7780
out of
This series of patches add user input to ad7780 'gain' & 'filter' gpio
pins. Also, it moves the ad7780 out of staging to the main tree.
Giuliano Belinassi (2):
staging: iio: ad7780: Add gain & filter gpio support
staging: iio: ad7780: Moving ad7780 out of stagi
Hi, thank you for the review
> On Thu, 22 Nov 2018 11:01:00 +
> "Popa, Stefan Serban" wrote:
> > I think that instead of setting the gain directly, we should use
> > the IIO_CHAN_INFO_SCALE attribute. At page 12 of the ad7780 datasheet there
> > is a formula from which the output code can be
Previously, the AD7780 driver only supported gpio for the 'powerdown'
pin. This commit adds suppport for the 'gain' and 'filter' pin.
Signed-off-by: Giuliano Belinassi
---
drivers/staging/iio/adc/ad7780.c | 61 --
include/linux/iio/ad
Previously, all pattern_masks and patterns in the chip_info table were
hardcoded. Now they are generated using the PAT macros, as described in
the datasheets.
Signed-off-by: Giuliano Belinassi
---
Changes in v2:
- Added the PATTERN and PATTERN_MASK macros
- Update BIT macros
Only the ad778x have the 'gain' status bit. Check it before updating
through a new variable is_ad778x in chip_info.
Signed-off-by: Giuliano Belinassi
---
Changes in v2:
- Squashed is_ad778x declaration commit with the ad778x checkage
- Changed is_ad778x type to bool
is_add778x
- Set pattern and pattern_mask as macros
- Aligned identation of macros
Giuliano Belinassi (2):
staging: iio: ad7780: check if ad778x before gain update
staging: iio: ad7780: generates pattern_mask from PAT bits
drivers/staging/iio/adc/ad7780.c | 55
Previously, all pattern_masks in the chip_info table were hardcoded. Now they
are generated using the PAT macros, as described in the datasheets.
Signed-off-by: Giuliano Belinassi
---
drivers/staging/iio/adc/ad7780.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a
Only the ad778x have the 'gain' status bit. Check it before updating.
Signed-off-by: Giuliano Belinassi
---
drivers/staging/iio/adc/ad7780.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad77
This series of patches fixes a bug in ad717x chips where the PAT2 bit
was wrongly read as a GAIN bit. It also refactors the pattern_mask
generation with the PAT bits.
Giuliano Belinassi (3):
staging: iio: ad7780: Add is_ad778x flag chip info
staging: iio: ad7780: check if ad778x before gain
This patch allows further checking of whatever the chip is (ad778x or
ad717x).
Signed-off-by: Giuliano Belinassi
---
drivers/staging/iio/adc/ad7780.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c
index 91e016d534ed
A number of macro calls cause a checkpatch issue:
"Lines should not end with a '('"
This was fixed by moving the first '(' token to the line of the first
argument.
Signed-off-by: Giuliano Belinassi
---
drivers/staging/iio/adc/ad7280a.c | 8
1 fi
13 matches
Mail list logo