Skip to content

Commit

Permalink
iio: adc: sc27xx: fix read big scale voltage not right
Browse files Browse the repository at this point in the history
[ Upstream commit ad930a7 ]

Fix wrong configuration value of SC27XX_ADC_SCALE_MASK and
SC27XX_ADC_SCALE_SHIFT by spec documetation.

Fixes: 5df362a (iio: adc: Add Spreadtrum SC27XX PMICs ADC support)
Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com>
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/20220419142458.884933-3-gengcixi@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Cixi Geng authored and gregkh committed Jun 14, 2022
1 parent 7c7bc8b commit 31f3f2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iio/adc/sc27xx_adc.c
Expand Up @@ -36,8 +36,8 @@

/* Bits and mask definition for SC27XX_ADC_CH_CFG register */
#define SC27XX_ADC_CHN_ID_MASK GENMASK(4, 0)
#define SC27XX_ADC_SCALE_MASK GENMASK(10, 8)
#define SC27XX_ADC_SCALE_SHIFT 8
#define SC27XX_ADC_SCALE_MASK GENMASK(10, 9)
#define SC27XX_ADC_SCALE_SHIFT 9

/* Bits definitions for SC27XX_ADC_INT_EN registers */
#define SC27XX_ADC_IRQ_EN BIT(0)
Expand Down

0 comments on commit 31f3f2a

Please sign in to comment.