summaryrefslogtreecommitdiff
path: root/drivers/regulator/pfuze100-regulator.c
AgeCommit message (Collapse)Author
2015-12-26colibri-imx6: use stopmode for poweroffMax Krummenacher
After the system has been shutdown with PMIC_ON_REQ and VCC_BATT is supplied from a battery it will never restart either by RESET or power cycle. So use the PMIC_STBY_REQ after shutdown to switch of power rails. Conflicts: arch/arm/mach-imx/pm-imx6.c drivers/regulator/pfuze100-regulator.c
2015-12-26regulator: allow GPIO 0 to be used for an enable signalMax Krummenacher
GPIO number 0 *is* legal and must be accepted. Set .ena_gpio to -ENODEV on regulators having no GPIO in preparation of a code change to accept GPIO 0 in the config. (cherry picked from commit c87ddbb1325a448d56a920513206592f03bca117) Conflicts: arch/arm/mach-imx/gpc.c drivers/regulator/88pm8607.c drivers/regulator/ab8500-ext.c drivers/regulator/ab8500.c drivers/regulator/ad5398.c drivers/regulator/arizona-micsupp.c drivers/regulator/isl6271a-regulator.c drivers/regulator/lp3972.c drivers/regulator/max1586.c drivers/regulator/max8660.c drivers/regulator/max8925-regulator.c drivers/regulator/max8952.c drivers/regulator/max8998.c drivers/regulator/mc13783-regulator.c drivers/regulator/s2mps11.c drivers/regulator/tps65217-regulator.c drivers/regulator/tps6524x-regulator.c drivers/regulator/wm831x-dcdc.c drivers/regulator/wm831x-ldo.c
2015-09-28MLK-11621 regulator: pfuze100: add pfuze3001 supportRobin Gong
add pfuze3001 support. Signed-off-by: Robin Gong <b38343@freescale.com>
2015-09-17MLK-11550-1: regulator: pfuze100: restore some registers after LPSR for ↵Robin Gong
pfuze3000 Some registers on pfuze3000 will lost after exit from LPSR, need restore them, otherwise system may reboot with below command after system enter LPSR one time: root@imx7d_all:~# echo enabled > /sys/class/tty/ttymxc0/power/wakeup root@imx7d_all:~# echo mem > /sys/power/state because LDOGCTL not recover as 1. Add 'fsl,lpsr-mode' property to this case, please add this property if your board support LPSR mode as imx7d-12x12-lpddr3-arm2 board. Signed-off-by: Robin Gong <b38343@freescale.com>
2015-09-17MLK-11465-1: regulator: pfuze100: update voltage setting for SW1A of PF3000Robin Gong
Regards to the pfuze3000 doc update, regulator driver need to be updated too. Otherwise the voltage information show wrongly. Signed-off-by: Robin Gong <b38343@freescale.com>
2015-09-17MLK-10244-6 regulator: pfuze100-regulator: add pfuze3000 supportRobin Gong
Add pfuze3000 chip support. Signed-off-by: Robin Gong <b38343@freescale.com> (cherry picked from commit e874ae660887ea364d332b84eda45eb7c73da323)
2015-09-17regulator: pfuze100: Add PFUZE200 support to Kconfig and module descriptionAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 2cee2121db44cfeee206d0854bedd52344eea444)
2015-09-17regulator: pfuze100: Add terminate entry for [i2c|of]_device_id tablesAxel Lin
Also remove PFUZE_NUM to avoid below build warnings: CC [M] drivers/regulator/pfuze100-regulator.o drivers/regulator/pfuze100-regulator.c:86:2: warning: excess elements in array initializer [enabled by default] drivers/regulator/pfuze100-regulator.c:86:2: warning: (near initialization for 'pfuze_device_id') [enabled by default] drivers/regulator/pfuze100-regulator.c:93:2: warning: excess elements in array initializer [enabled by default] drivers/regulator/pfuze100-regulator.c:93:2: warning: (near initialization for 'pfuze_dt_ids') [enabled by default] Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit e6c4c3378d82c5eeb136ed06b1a23651bcdaf739)
2015-09-17regulator: pfuze100: add pfuze200 supportRobin Gong
support pfuze200 chip which remove SW1C and SW4 based on pfuze100. Signed-off-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit f2518480c7b744296a5587990a54e3a284d932b8)
2015-09-17pfuze100-regulator: Return error on of_node_get() failureFabio Estevam
If of_node_get() fails, we should return an error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 6428789e11f056d58ed59c0c0aa7d381d0bf50f8)
2015-09-17pfuze100-regulator: Fix of_node_get() parameterFabio Estevam
Since commit d7857c42 (regulator: pfuze100: Use of_get_child_by_name) we get the following probe failure: pfuze100-regulator 1-0008: Full layer: 1, Metal layer: 0 pfuze100-regulator 1-0008: FAB: 0, FIN: 0 pfuze100-regulator 1-0008: regulators node not found pfuze100-regulator: probe of 1-0008 failed with error -22 Now that of_get_child_by_name() is used we should adjust the device_node pointer 'np' to not get the parent node anymore. Suggested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 3e01c75a45740ef4a0ec657d7ca25ad0aa2f50e0)
2015-09-17regulator: pfuze100: Use of_get_child_by_nameSachin Kamat
of_find_node_by_name walks the allnodes list, and can thus walk outside of the parent node. Use of_get_child_by_name instead. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit d7857c429475677a6a42d0dce7f870d6241edd41)
2015-09-17regulator: Make use of rdev_get_id() function where possible.Thiago Farina
Signed-off-by: Thiago Farina <tfarina@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit d55efa4d9bff20c98ca05e0bf458691e6869b5a1)
2014-01-23Merge remote-tracking branches 'regulator/topic/db8500', ↵Mark Brown
'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
2014-01-23regulator: pfuze100-regulator: Improve dev_info() messageFabio Estevam
'lay' is not very meaningful, so use it 'layer' instead to let the dev_info() clearer. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-15regulator: pfuze100-regulator: Fix some checkpatch complaintsFabio Estevam
Fix the following checkpatch error and warning: ERROR: switch and case should be at the same indent #311: FILE: drivers/regulator/pfuze100-regulator.c:311: + switch (value & 0x0f) { [...] + case 0x8: [...] + case 0x0: [...] + default: WARNING: line over 80 characters #312: FILE: drivers/regulator/pfuze100-regulator.c:312: + /* Freescale misprogrammed 1-3% of parts prior to week 8 of 2013 as ID=8 */ Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-15Merge tag 'v3.13-rc4' into regulator-pfuze100Mark Brown
Linux 3.13-rc4
2013-12-09regulator: pfuze100: use devm_regulator_register()Jingoo Han
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-09regulator: pfuze100: allow misprogrammed IDTim Harvey
prior to week 08 of 2013 Freescale misprogrammed between 1 and 3% of PFUZE1000 parts with a ID=0x8 instead of the expected ID=0x0 Signed-off-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2013-12-09regulator: pfuze100: Fix address of FABIDAxel Lin
According to the datasheet, the address of FABID is 0x4. Fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2013-08-02regulator: pfuze100: Fix off-by-one for max_register settingAxel Lin
max_register should be register count - 1. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-31regulator: pfuze100: Simplify pfuze100_set_ramp_delay implementationAxel Lin
Simplify the equation to calculate ramp_delay. Below equations are equivalent: ramp_delay = 25000 / (2 * ramp_delay); ramp_delay = 50000 / (4 * ramp_delay); ramp_delay = 25000 / (2 * ramp_delay); ramp_delay = 12500 / ramp_delay; So we don't need to read BIT6 of rdev->desc->vsel_reg for applying different equations. Also use rdev->desc->vsel_reg instead of run-time calculate register address. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-30regulator: pfuze100: Fix n_voltages setting for SW2~SW4 with high bit setAxel Lin
Current code adjust min_uV and uV_step but missed adjusting the n_voltages setting. When BIT6 is clear: n_voltages = (1975000 - 400000) / 25000 + 1 = 64 When BIT6 is set: n_voltages = (3300000 - 800000) / 50000 + 1 = 51 The n_voltages needs update because when BIT6 is set 0x73 ~ 0x7f are reserved. When using regulator_list_voltage_linear, the n_voltages does matter here because wrong n_voltages setting make the equation return wrong result. e.g. if selector is 63, regulator_list_voltage_linear returns 800000 + (50000 * 63) = 4000000 It should return -EINVAL if the selector is in the range of 51 ~ 63. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29regulator: pfuze100: Use regulator_map_voltage_ascendAxel Lin
All table based voltage list have ascendant order. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29regulator: pfuze100: Fix module alias prefixAxel Lin
i2c drivers use "i2c:" prefix for module alias. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29regulator: pfuze100: Use i2c_[set|get]_clientdataAxel Lin
Since this is a i2c driver, use i2c_[set|get]_clientdata instead of dev_[set|get]_drvdata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29regulator: pfuze100: add MODULE_LICENSE() in pfuze100 driverRobin Gong
Fix building error on x86_64 and i386: WARNING: modpost: missing MODULE_LICENSE() in drivers/regulator/pfuze100-regulator.o Signed-off-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-26regulator:pfuze100: fix build warning and correct the binding docRobin Gong
fix building warning and correct the binding doc Signed-off-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-25regulator: pfuze100: add pfuze100 regulator driverRobin Gong
Add pfuze100 regulator driver. Signed-off-by: Robin Gong <b38343@freescale.com> Tested-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>