Commit 56816b700c8c773270f3aaf4c92be53e359a03fd

Authored by Tomas Novotny
Committed by Lee Jones
1 parent 2d5d366a08

mfd: twl-core: Fix accessibility of some twl4030 audio registers

There are some unused registers in twl4030 at I2C address 0x49 and function
twl4030_49_nop_reg() is used to check accessibility of that registers. These
registers are written in decimal format but the values are correct in
hexadecimal format. (It can be checked few lines above the patched code -
these registers are marked as unused there.)

As a consequence three registers of audio submodule are treated as
inaccessible (preamplifier carkit right and both handsfree registers).

Cc: stable@vger.kernel.org
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff

drivers/mfd/twl-core.c
... ... @@ -282,11 +282,11 @@
282 282 static bool twl4030_49_nop_reg(struct device *dev, unsigned int reg)
283 283 {
284 284 switch (reg) {
285   - case 0:
286   - case 3:
287   - case 40:
288   - case 41:
289   - case 42:
  285 + case 0x00:
  286 + case 0x03:
  287 + case 0x40:
  288 + case 0x41:
  289 + case 0x42:
290 290 return false;
291 291 default:
292 292 return true;