]> Pileus Git - ~andy/linux/commit
mfd: Add ab8500 version detection and enforcing
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 20 Feb 2012 20:42:10 +0000 (21:42 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 6 Mar 2012 17:46:42 +0000 (18:46 +0100)
commit0f620837595145cd42be1c9dc6b619146fbeaf88
treec8baef44fa4b407ef897ccd234b91f8d83ac85e3
parent6d95b7fdd0bd2e28ef651da6863d75edca4c2aca
mfd: Add ab8500 version detection and enforcing

There are currently four different versions of the AB8500
around: AB8500, AB8505, AB9540 and AB8540. Unfortunately:

- Some of the chips (AB8500, AB8505, AB9540) cannot read
  the AB8500_REV_REG register but return errors

- Some of them have the same ID value in the hardware
  register AB8500_REV_REV, for example the first versions
  of AB8505 and AB9540 have 0xFF in this register -
  just like the AB8500.

So we need to be able to enforce a certain version from
the platform. We do this by using the id of the platform
device that provides the read/write functions.

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@stericsson.com>
Signed-off-by: Alex Macro <alex.macro@stericsson.com>
Signed-off-by: Michel Jaouen <michel.jaouen@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/ab8500-core.c
drivers/mfd/ab8500-i2c.c
include/linux/mfd/abx500.h
include/linux/mfd/abx500/ab8500.h