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 --- Changes since v3: - Fix commit, use RESERVED instead of RSVD. Changes since v2: - no changes
Changes since v1: - new patch.
drivers/iio/proximity/sx9324.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/proximity/sx9324.c b/drivers/iio/proximity/sx9324.c index 0d9bbbb50cb45..378c2a17bae6e 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
@@ -781,7 +782,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, SX9324_REG_PROX_CTRL0_GAIN_1 |
Quoting Gwendal Grignou (2022-04-06 09:50:04)
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
On Wed, 6 Apr 2022 10:14:01 -0700 Stephen Boyd swboyd@chromium.org wrote:
Quoting Gwendal Grignou (2022-04-06 09:50:04)
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
Applied to the fixes-togreg branch of iio.git.
I'm crossing my fingers that I'll be able to simultaneously queue this fix and the rest of the series on different branches without any significant merge problems...
Jonathan
On Sun, 10 Apr 2022 17:49:52 +0100 Jonathan Cameron jic23@kernel.org wrote:
On Wed, 6 Apr 2022 10:14:01 -0700 Stephen Boyd swboyd@chromium.org wrote:
Quoting Gwendal Grignou (2022-04-06 09:50:04)
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
Applied to the fixes-togreg branch of iio.git.
I'm crossing my fingers that I'll be able to simultaneously queue this fix and the rest of the series on different branches without any significant merge problems...
I can't :( So I'll have to wait for this one to work it's way around to being upstream for my togreg branch. Hence holding the rest for now.
Jonathan
Jonathan
linux-stable-mirror@lists.linaro.org