From: Mark Brown Date: Thu, 23 Jan 2014 12:01:27 +0000 (+0000) Subject: Merge remote-tracking branches 'regulator/topic/db8500', 'regulator/topic/gpio',... X-Git-Tag: firefly_0821_release~176^2~4568^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a2a2be6309285857bfbc66f83e164331828e93c2;p=firefly-linux-kernel-4.4.55.git Merge remote-tracking branches 'regulator/topic/db8500', 'regulator/topic/gpio', 'regulator/topic/lp3971', 'regulator/topic/lp3972', 'regulator/topic/max14577', 'regulator/topic/max77693', 'regulator/topic/mc13892', 'regulator/topic/pcf50633' and 'regulator/topic/pfuze100' into regulator-linus --- a2a2be6309285857bfbc66f83e164331828e93c2 diff --cc drivers/regulator/gpio-regulator.c index 234960dc9607,04406a918c04,49fe20f58d2a,04406a918c04,04406a918c04,04406a918c04,04406a918c04,98a98ffa7fe0,04406a918c04,234960dc9607..c0a1d00b78c9 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@@@@@@@@@@ -203,17 -202,13 -203,18 -202,13 -202,13 -202,13 -202,13 -202,13 -202,13 -203,17 +203,18 @@@@@@@@@@@ of_get_gpio_regulator_config(struct dev } config->nr_states = i; - ------ of_property_read_string(np, "regulator-type", ®type); - ------ - ------ if (!strncmp("voltage", regtype, 7)) - ------ config->type = REGULATOR_VOLTAGE; - ------ else if (!strncmp("current", regtype, 7)) - ------ config->type = REGULATOR_CURRENT; ++ +++++++ config->type = REGULATOR_VOLTAGE; + ++++++ ret = of_property_read_string(np, "regulator-type", ®type); - - if (ret < 0) { - - dev_err(dev, "Missing 'regulator-type' property\n"); - - return ERR_PTR(-EINVAL); ++ +++++++ if (ret >= 0) { ++ +++++++ if (!strncmp("voltage", regtype, 7)) ++ +++++++ config->type = REGULATOR_VOLTAGE; ++ +++++++ else if (!strncmp("current", regtype, 7)) ++ +++++++ config->type = REGULATOR_CURRENT; ++ +++++++ else ++ +++++++ dev_warn(dev, "Unknown regulator-type '%s'\n", ++ +++++++ regtype); + ++++++ } - - if (!strncmp("voltage", regtype, 7)) - - config->type = REGULATOR_VOLTAGE; - - else if (!strncmp("current", regtype, 7)) - - config->type = REGULATOR_CURRENT; - - return config; } diff --cc drivers/regulator/pfuze100-regulator.c index c31e0485de25,ba67b2c4e2e7,ba67b2c4e2e7,ba67b2c4e2e7,ba67b2c4e2e7,ba67b2c4e2e7,ba67b2c4e2e7,ba67b2c4e2e7,ba67b2c4e2e7,f68e5d5a011e..ab174f20ca11 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@@@@@@@@@@ -308,15 -308,9 -308,9 -308,9 -308,9 -308,9 -308,9 -308,9 -308,9 -308,18 +308,18 @@@@@@@@@@@ static int pfuze_identify(struct pfuze_ if (ret) return ret; -------- if (value & 0x0f) { ++++++++ switch (value & 0x0f) { - /* Freescale misprogrammed 1-3% of parts prior to week 8 of 2013 as ID=8 */ - case 0x8: - dev_info(pfuze_chip->dev, "Assuming misprogrammed ID=0x8"); - case 0x0: - break; - default: - dev_warn(pfuze_chip->dev, "Illegal ID: %x\n", value); - return -ENODEV; +++++++++ /* +++++++++ * Freescale misprogrammed 1-3% of parts prior to week 8 of 2013 +++++++++ * as ID=8 +++++++++ */ +++++++++ case 0x8: +++++++++ dev_info(pfuze_chip->dev, "Assuming misprogrammed ID=0x8"); +++++++++ case 0x0: +++++++++ break; +++++++++ default: + dev_warn(pfuze_chip->dev, "Illegal ID: %x\n", value); + return -ENODEV; } ret = regmap_read(pfuze_chip->regmap, PFUZE100_REVID, &value);