diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2022-04-06 09:50:04 -0700 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-04-10 17:49:01 +0100 |
commit | d79478a79cfa393cde46bccb05d52fc7d875d2e2 (patch) | |
tree | 897f1fd1b4cb4f20fb533969f7ca4b84b8c2b0d1 | |
parent | 89a01cd688d3c0ac983ef0b0e5f40018ab768317 (diff) | |
download | linux-stable-d79478a79cfa393cde46bccb05d52fc7d875d2e2.tar.gz linux-stable-d79478a79cfa393cde46bccb05d52fc7d875d2e2.tar.bz2 linux-stable-d79478a79cfa393cde46bccb05d52fc7d875d2e2.zip |
iio: sx9324: Fix default precharge internal resistance register
Fix the default value for the register that set the resistance:
it has to be 0x10 per datasheet.
Fixes: 4c18a890dff8d ("iio:proximity:sx9324: Add SX9324 support")
Cc: stable@vger.kernel.org
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20220406165011.10202-2-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/proximity/sx9324.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iio/proximity/sx9324.c b/drivers/iio/proximity/sx9324.c index 6e90917e3e36..70c37f664f6d 100644 --- a/drivers/iio/proximity/sx9324.c +++ b/drivers/iio/proximity/sx9324.c @@ -70,7 +70,8 @@ #define SX9324_REG_AFE_PH2 0x2a #define SX9324_REG_AFE_PH3 0x2b #define SX9324_REG_AFE_CTRL8 0x2c -#define SX9324_REG_AFE_CTRL8_RESFILTN_4KOHM 0x02 +#define SX9324_REG_AFE_CTRL8_RESERVED 0x10 +#define SX9324_REG_AFE_CTRL8_RESFILTIN_4KOHM 0x02 #define SX9324_REG_AFE_CTRL9 0x2d #define SX9324_REG_AFE_CTRL9_AGAIN_1 0x08 @@ -795,7 +796,8 @@ static const struct sx_common_reg_default sx9324_default_regs[] = { { SX9324_REG_AFE_PH2, 0x1a }, { SX9324_REG_AFE_PH3, 0x16 }, - { SX9324_REG_AFE_CTRL8, SX9324_REG_AFE_CTRL8_RESFILTN_4KOHM }, + { SX9324_REG_AFE_CTRL8, SX9324_REG_AFE_CTRL8_RESERVED | + SX9324_REG_AFE_CTRL8_RESFILTIN_4KOHM }, { SX9324_REG_AFE_CTRL9, SX9324_REG_AFE_CTRL9_AGAIN_1 }, { SX9324_REG_PROX_CTRL0, |