[PATCH 2/2] staging: iio: ad7780: Moving ad7780 out of staging

2018-11-28 Thread Giuliano Belinassi
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

[PATCH 2/2] staging: iio: ad7780: Moving ad7780 out of staging

2018-11-28 Thread Giuliano Belinassi
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

[PATCH 1/2] staging: iio: ad7780: Add gain & filter gpio support

2018-11-28 Thread Giuliano Belinassi
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 staging. https://marc.info/?l

[PATCH 1/2] staging: iio: ad7780: Add gain & filter gpio support

2018-11-28 Thread Giuliano Belinassi
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 staging. https://marc.info/?l

[PATCH 0/2] staging: iio: ad7780: move out of staging

2018-11-28 Thread Giuliano Belinassi
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 staging drivers/iio/adc

[PATCH 0/2] staging: iio: ad7780: move out of staging

2018-11-28 Thread Giuliano Belinassi
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 staging drivers/iio/adc

Re: [PATCH] staging: iio: ad7780: Add gain & filter gpio support

2018-11-26 Thread Giuliano Belinassi
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

Re: [PATCH] staging: iio: ad7780: Add gain & filter gpio support

2018-11-26 Thread Giuliano Belinassi
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

[PATCH] staging: iio: ad7780: Add gain & filter gpio support

2018-11-21 Thread Giuliano Belinassi
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/adc/ad_sigma_delta.h | 5 +++ 2

[PATCH] staging: iio: ad7780: Add gain & filter gpio support

2018-11-21 Thread Giuliano Belinassi
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/adc/ad_sigma_delta.h | 5 +++ 2

[PATCH v2 2/2] staging: iio: ad7780: generates pattern_mask from PAT bits

2018-11-08 Thread Giuliano Belinassi
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

[PATCH v2 2/2] staging: iio: ad7780: generates pattern_mask from PAT bits

2018-11-08 Thread Giuliano Belinassi
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

[PATCH v2 1/2] staging: iio: ad7780: check if ad778x before gain update

2018-11-08 Thread Giuliano Belinassi
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 drivers

[PATCH v2 1/2] staging: iio: ad7780: check if ad778x before gain update

2018-11-08 Thread Giuliano Belinassi
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 drivers

[PATCH v2 0/2] pattern generation and gain update

2018-11-08 Thread Giuliano Belinassi
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

[PATCH v2 0/2] pattern generation and gain update

2018-11-08 Thread Giuliano Belinassi
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

[PATCH 3/3] staging: iio: ad7780: generates pattern_mask from PAT bits

2018-11-07 Thread Giuliano Belinassi
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

[PATCH 3/3] staging: iio: ad7780: generates pattern_mask from PAT bits

2018-11-07 Thread Giuliano Belinassi
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

[PATCH 2/3] staging: iio: ad7780: check if ad778x before gain update

2018-11-07 Thread Giuliano Belinassi
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/ad7780.c index

[PATCH 2/3] staging: iio: ad7780: check if ad778x before gain update

2018-11-07 Thread Giuliano Belinassi
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/ad7780.c index

[PATCH 0/3] staging: iio: ad7780: pattern generation and gain update

2018-11-07 Thread Giuliano Belinassi
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

[PATCH 1/3] staging: iio: ad7780: Add is_ad778x flag chip info

2018-11-07 Thread Giuliano Belinassi
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

[PATCH 0/3] staging: iio: ad7780: pattern generation and gain update

2018-11-07 Thread Giuliano Belinassi
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

[PATCH 1/3] staging: iio: ad7780: Add is_ad778x flag chip info

2018-11-07 Thread Giuliano Belinassi
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

[PATCH] staging: iio: ad7280a: Lines should not end with a '(' - style

2018-10-16 Thread Giuliano Belinassi
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 file changed, 4 insert

[PATCH] staging: iio: ad7280a: Lines should not end with a '(' - style

2018-10-16 Thread Giuliano Belinassi
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 file changed, 4 insert