mfd: Add support for WM8351 revision B
Subsystems (2)
PATCH 1/2 mfd: Add support for WM8351 revision B
No software visible difference from revision A.
Signed-off-by Mark Brown <[email protected]>
--- drivers/mfd/wm8350-core.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/mfd/wm8350-core.c +5 -0
@@ -1386,6 +1386,11 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq, wm8350->power.rev_g_coeff =1 ;break ; +case 1 : +dev_info (wm8350->dev,"WM8351 Rev B\n" ); + wm8350->power.rev_g_coeff =1 ; +break ; +default :dev_err (wm8350->dev,"Unknown WM8351 CHIP_REV\n" ); ret = -ENODEV ;
Signature · 1 line
1.6.1.3
PATCH 2/2 mfd: Use the value of the final spin when reading the AUXADC
Reverse the order of the tests for loop exit so we use a valid value before we time out. Vanishingly unlikely to happen since we retry for several times the expected conversion time.
Signed-off-by Mark Brown <[email protected]>
--- drivers/mfd/wm8350-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/wm8350-core.c +1 -1
@@ -1111,7 +1111,7 @@ int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref)do {schedule_timeout_interruptible (1 ); reg =wm8350_reg_read (wm8350,WM8350_DIGITISER_CONTROL_1 ); - }while (--tries && (reg &WM8350_AUXADC_POLL )); + }while ((reg &WM8350_AUXADC_POLL ) && --tries);if (!tries)dev_err (wm8350->dev,"adc chn %d read timeout\n" , channel);
Signature · 1 line
1.6.1.3