openwrtv3/target/linux/imx6/patches-3.10/0021-pfuze100-allow-misprogrammed-id.patch
Luka Perkov adb70acecb imx6: add pfuze100 regulator support
- backport driver
- apply patch to allow misprogrammed parts
- enable driver in kernel

Signed-off-by: Tim Harvey <tharvey@gateworks.com>

SVN-Revision: 38422
2013-10-16 03:25:52 +00:00

20 lines
580 B
Diff

--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -308,9 +308,14 @@ static int pfuze_identify(struct pfuze_c
if (ret)
return ret;
- if (value & 0x0f) {
- dev_warn(pfuze_chip->dev, "Illegal ID: %x\n", value);
- return -ENODEV;
+ switch (value & 0xf) {
+ case 0x0:
+ /* Freescale misprogrammed 1-3% of parts prior to week 8 of 2013 as ID=8 */
+ case 0x8:
+ break;
+ default:
+ dev_warn(pfuze_chip->dev, "Illegal ID: %x\n", value);
+ return -ENODEV;
}
ret = regmap_read(pfuze_chip->regmap, PFUZE100_REVID, &value);