summaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)Author
2019-03-28Merge tag 'v4.9.166' into 4.9-2.3.x-imxMarcel Ziswiler
This is the 4.9.166 stable release
2019-03-23regulator: s2mpa01: Fix step values for some LDOsStuart Menefy
commit 28c4f730d2a44f2591cb104091da29a38dac49fe upstream. The step values for some of the LDOs appears to be incorrect, resulting in incorrect voltages (or at least, ones which are different from the Samsung 3.4 vendor kernel). Signed-off-by: Stuart Menefy <stuart.menefy@mathembedded.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23regulator: s2mps11: Fix steps for buck7, buck8 and LDO35Krzysztof Kozlowski
commit 56b5d4ea778c1b0989c5cdb5406d4a488144c416 upstream. LDO35 uses 25 mV step, not 50 mV. Bucks 7 and 8 use 12.5 mV step instead of 6.25 mV. Wrong step caused over-voltage (LDO35) or under-voltage (buck7 and 8) if regulators were used (e.g. on Exynos5420 Arndale Octa board). Cc: <stable@vger.kernel.org> Fixes: cb74685ecb39 ("regulator: s2mps11: Add samsung s2mps11 regulator driver") Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12Merge tag 'v4.9.144' into 4.9-2.3.x-imxMarcel Ziswiler
This is the 4.9.144 stable release
2018-10-03regulator: fix crash caused by null driver dataYu Zhao
commit fb6de923ca3358a91525552b4907d4cb38730bdd upstream. dev_set_drvdata() needs to be called before device_register() exposes device to userspace. Otherwise kernel crashes after it gets null pointer from dev_get_drvdata() when userspace tries to access sysfs entries. [Removed backtrace for length -- broonie] Signed-off-by: Yu Zhao <yuzhao@google.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-24MLK-18653-1: regulator: bd71837: correct ldo setting for BD71840Robin Gong
For customed BD71840 on i.mx8mm-evk board, LDO1/LDO2 setting is different as BD71837, and no LDOx_SEL for LDO3/4. Correct LDO1_VOLT_SEL/ LDO1_VOLT_SEL and remove unused LDO enable code in probe, since those can be done by 'regulator-boot-on'/'regulator-always-on' in dts. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-18334: regulator: bd71837: fix reboot failure on i.mx845s evkRobin Gong
Fix reboot failure on i.mx845s evk board. For BD71837, BUCKx_SEL and BUCKx_EN of all bucks can't be set to 1 as explicity enabled or disabled, otherwise, it may mess up with the default state machine if pmic reset triggered. Remove enable/disable interfaces in driver to avoid touch such bits. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-18205-9 Support BD71837 PMIC chip on i.MX platformsHaoran.Wang
Signed-off-by: Haoran.Wang <elven.wang@nxp.com> Signed-off-by: Robin Gong <yibin.gong@nxp.com> Signed-off-by: Anson Huang <Anson.Huang@nxp.com> (cherry picked from commit 37f67d291e74a3428310cb5c98f556411042f810)
2018-08-24MLK-16283 regulator: pfuze100: add 500us wait time for switch enableRobin Gong
add 500us enable_time for switch to be stable while turned on. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-16202-01 driver: regulator: add enable/disable for switch for pfuze100Robin Gong
Add enable/disable support for switch regulator on pfuze100. Signed-off-by: Robin Gong <yibin.gong@nxp.com> Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-08-24MLK-14275: regulator: pf1550-regulator-rpmsg: clear 'u32 val' before read ↵Robin Gong
value by rpmsg Actually, m4 only fill the least 1byte, so we'd better clear 'val' before reading by rpmsg, thus the gabage data will not bother us. Signed-off-by: Robin Gong <yibin.gong@nxp.com> (cherry picked from commit df3428c6588a00fa153a3b6996cc33b21b69efb6)
2018-08-24MLK-14638-1 regulator: fixed: add off_on_delay supportHaibo Chen
Add off_on_delay for fixed regulator. This can assign the delay time between the regulator disable and regulator enable. User can define the delay value by using 'off-on-delay' in dts file. Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2018-08-24MLK-13982: 4.9 rebase: EPDC does not workCristina Ciocan
The Linux kernel regulator core implementation does not accept negative voltage values; all negative values are treated as errors. The problem with the EPDC is that the panel uses a negative voltage regulator which fails to be enabled by the regulator core. This issue has slipped up until the 4.9 rebase because the voltage range [min, max] was checked against only when min = max. This has been fixed in 4.9, resulting in errors in the VCOM regulator driver. The fix is to use the negative values when communicating with the hardware, but send only positive values to the regulator core. This patch sends the absolute value to the regulator core and transforms the received value (from the regulator core) to negative one before sending it to hardware. Fix device tree to deal with negative voltage regulator values by setting min_value = -real_max_value and vice versa. Boards affected: - imx6dl-sabresd - imx6ull-14x14-ddr3-arm2 - imx7d-12x12-lpddr3-arm2 - imx7d-sdb - imx6sll-evk - imx6sl-evk - imx6sll-lpddr3-arm2 Signed-off-by: Cristina Ciocan <cristina-mihaela.ciocan@nxp.com>
2018-08-24MLK-14241-1 regulator: pf1550-regulator-rpmsg: add mutex for ↵Robin Gong
pm_qos_add_request reentry Multi drivers(mmc, cpufreq..) may access pf1550 regulator rpmsg driver at the same time, so we have to add mutex for this multi-entry case. Otherwise the below kernel warning maybe triggered: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 19 at kernel/power/qos.c:453 pf1550_send_message+0x4c/0xf8() pm_qos_add_request() called for already added request Modules linked in: CPU: 0 PID: 19 Comm: kworker/0:1 Not tainted 4.1.33-02293-g80b8c19 #636 Hardware name: Freescale i.MX7ULP (Device Tree) Workqueue: events od_dbs_timer [<80015d78>] (unwind_backtrace) from [<8001271c>] (show_stack+0x10/0x14) [<8001271c>] (show_stack) from [<8082ba50>] (dump_stack+0x88/0x9c) [<8082ba50>] (dump_stack) from [<800387c8>] (warn_slowpath_common+0x80/0xb0) [<800387c8>] (warn_slowpath_common) from [<80038828>] (warn_slowpath_fmt+0x30/0x40) [<80038828>] (warn_slowpath_fmt) from [<80341180>] (pf1550_send_message+0x4c/0xf8) [<80341180>] (pf1550_send_message) from [<80341504>] (pf1550_get_voltage+0x48/0x5c) [<80341504>] (pf1550_get_voltage) from [<803370a0>] (_regulator_get_voltage+0x68/0xb4) [<803370a0>] (_regulator_get_voltage) from [<8033936c>] (_regulator_do_set_voltage+0x5c/0x3e4) [<8033936c>] (_regulator_do_set_voltage) from [<803397a4>] (regulator_set_voltage+0xb0/0x14c) [<803397a4>] (regulator_set_voltage) from [<8058dae8>] (imx7ulp_set_target+0x178/0x238) [<8058dae8>] (imx7ulp_set_target) from [<80584d14>] (__cpufreq_driver_target+0x164/0x294) [<80584d14>] (__cpufreq_driver_target) from [<8058bb08>] (dbs_check_cpu+0x1a0/0x1e0) [<8058bb08>] (dbs_check_cpu) from [<805888e8>] (od_dbs_timer+0x80/0x138) [<805888e8>] (od_dbs_timer) from [<8004bbbc>] (process_one_work+0x118/0x3e4) [<8004bbbc>] (process_one_work) from [<8004bed4>] (worker_thread+0x4c/0x4f4) [<8004bed4>] (worker_thread) from [<80050e4c>] (kthread+0xdc/0xf4) [<80050e4c>] (kthread) from [<8000f528>] (ret_from_fork+0x14/0x2c) ---[ end trace f8281ecde7a0b4ce ]--- ------------[ cut here ]------------ Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-13733-3 regulator: pf1550-regulator-rpmsg: update pf1550-rpmsg interfaceRobin Gong
update driver since m4 side refine the header structure. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-13638-4 regulator: fixed: add system pm routines for pinctrlPeter Chen
At some systems, the pinctrl setting will be lost or needs to set as "sleep" state to save power consumption. So, we need to configure pinctrl as "sleep" state when system enters suspend, and as "default" state after system resumes. In this way, the pinctrl value can be recovered as "default" state after resuming. Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-08-24MLK-13793-6 regulator: anatop: fix min dropout for bypass modeIrina Tirdea
In bypass mode, the anatop digital regulators do not have any minimum dropout value (the input voltage is equal to the output voltage according to documentation). Having a min dropout value of 125mV will lead to an increased voltage for PMIC supplies. Only set minimum dropout value for ldo enabled mode. Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
2018-08-24MLK-13793-3 regulator: anatop: Fix enable for vddpu with LDO bypassIrina Tirdea
Enabling the vddpu regulator at boot has no efect, since the enable call in anatop will set it to power gated off. This leads to a hang in the VPU driver if cpufreq does not get initialized before. The anatop on i.MX6 requires that vddpu uses the same voltage level as vddsoc. When it is initialized, vddsoc will have a default selector of 0 (Power gated off), but will use LDO_FET_FULL_ON since it is in bypass mode. However, the local value saved for the vddsoc selector will remain 0. When vddpu is enabled, it will use the local selector 0 from vddsoc and will remain disabled. Take into consideration the bypass mode when using the vddsoc selector for vddpu. Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
2018-08-24MLK-13793-2 regulator: anatop: Do not print error message for EPROBE_DEFERIrina Tirdea
An anatop regulator will return -EPROBE_DEFER when trying to register, if it has a supply from PMIC and this supply is not yet registered. This does not represent an error since the driver will call probe again later, so skip the error message in this case. Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
2018-08-24MLK-13720-4: regulator: pf1550-regulator-rpmsg: fix "rpmsg_send timeout"Robin Gong
Sometimes rpmsg callback triggered quickly before reinit_completion, then cause "rpmsg_send timeout!". Move reinit_completion to the place before rpmsg_send to make sure the completion is ready before callback triggered. Signed-off-by: Robin Gong <yibin.gong@nxp.com> (cherry picked from commit 8e44277d3f27e5f46232bd705ee9ef594db42575)
2018-08-24MLK-13720-3: regulator: pf1550-regulator-rpmsg: use the specific pf1550 ↵Robin Gong
rpmsg channel name Since multi rpmsg instances supported now, we can use the specific rpmsg channel name "rpmsg-regulator-channel" instead of "rpmsg-openamp-demo-channel" Signed-off-by: Robin Gong <yibin.gong@nxp.com> (cherry picked from commit 8a9d73fe43da2833951b428f389aac01aef7cb2a)
2018-08-24MLK-13636-2 regulator: pf1550-regulator-rmpsg: enable pm_qos to prevent low ↵Robin Gong
power idle CLKE bit of MU_CR may bring VLS state mess in M4 side, so use pm_qos instead to prevent i.mx7ulp A7 core enter STOP mode during pf1550 send command by rpmsg Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-13615-1 regulator: pf1550-regulator-rpmsg: should set voltage closest to ↵Dong Aisheng
min_uV According to API definition, Set the voltage for the regulator within the range specified, the driver should select the voltage closest to min_uV. Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2018-08-24MLK-13577-3 regulator: pf1550-regulator-rpmsg: add pf1550 regulator rpmsg driverRobin Gong
add pf1550 regulator rpmsg driver to control pf1550 on the m4 side by rpmsg. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-13387-3 regulator: consumer: add new event macroRichard Zhu
Add one new regulator events macro 'REGULATOR_EVENT_AFT_DO_ENABLE'. 1.8v of imx7d pcie phy, should be turned on after the 1p0d(1.0v) of pcie phy is turned on. Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2018-08-24MLK-12928-16 regulator: pf1550: check device node checkRobin Gong
Do not probe if the device node is not correct in dts. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-12928-15 mfd/regulator: pf1550: check OTP_SW2_DVS_ENB bit for different ↵Robin Gong
voltages check OTP_SW2_DVS_ENB bit for the different voltage list while SW2 regulator registered. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-12928-7 regulator: pf1550: correct ldo ops settingRobin Gong
The voltage of LDO1 and LDO3 are not linear, use voltage_table instead,so add new ops for them. Meanwhile, correct 12500uV for one step of SW1/SW2 rather than 125000uV. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-12928-2 regulator: pf1550: add pf1550 regulator driverRobin Gong
Add basic pf1550 regulator driver. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-08-24MLK-11909-2 regulator: anatop-regulator: Dereference null return value ↵Robin Gong
(NULL_RETURNS) Dereference null return value (NULL_RETURNS). Signed-off-by: Robin Gong <b38343@freescale.com> (cherry picked from commit e5d41f4bbded2f2b948a13d4dc04596cd896b072)
2018-08-24MLK-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> (cherry picked from commit ac1992e3eab0d31195781bb7d1c4ff7ccea1c86a)
2018-08-24MLK-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>
2018-08-24MLK-11556-1 pmic: max17135: add hwmon, mfd and regulator drivers for this pmicRobby Cai
Add PMIC 'MAX17135' module drivers to 4.1.y kernel. These are necessary to supply power for E-ink panel display functions. Signed-off-by: Robby Cai <r63905@freescale.com>
2018-08-24MLK-11561-2 regulator: anatop: set default voltage selector for pcieRichard Zhu
The code reads the default voltage selector from its register. If the default voltage selector is 0 which results in faulty behaviour of this regulator driver. This patch sets a default voltage selector for vddpcie-phy if it is not set in the register. Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
2018-08-24MLK-11407-3: regulator: anatop: force vddpu to use same voltage level as vddsocShawn Guo
This patch cherry-pick from below: "ENGR00317981: regulator: anatop: force vddpu to use same voltage level as vddsoc" The anatop on i.MX6 requires that vddpu use the same voltage level as vddsoc. It's a quick hacking to force the check whenever vddpu is about to be enabled. Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Robin Gong <b38343@freescale.com> (cherry picked from commit ab0c52e019cacc89aec3dbb104360b4715d49796) Conflicts: drivers/regulator/anatop-regulator.c
2018-08-23MLK-11395-3 regulator: consumer: add new event macrosFancy Fang
Add two new regulator events macro 'REGULATOR_EVENT_PRE_DO_ENABLE' and 'REGULATOR_EVENT_PRE_DO_DISABLE', since some gpc operations should be required when MIPI PHY is powered on/off. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2018-08-23MLK-10196-3 regulator: anatop: Add non core enable/disablePeter Chen
Add non core enable/disable API. Signed-off-by: Peter Chen <peter.chen@freescale.com> (cherry picked from commit 38681ee653cb75fa1839547414c7780c4f3a7c00)
2018-08-03regulator: pfuze100: add .is_enable() for pfuze100_swb_regulator_opsAnson Huang
[ Upstream commit 0b01fd3d40fe6402e5fa3b491ef23109feb1aaa5 ] If is_enabled() is not defined, regulator core will assume this regulator is already enabled, then it can NOT be really enabled after disabled. Based on Li Jun's patch from the NXP kernel tree. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30regulator: of: Add a missing 'of_node_put()' in an error handling path of ↵Christophe JAILLET
'of_regulator_match()' [ Upstream commit 30966861a7a2051457be8c49466887d78cc47e97 ] If an unlikely failure in 'of_get_regulator_init_data()' occurs, we must release the reference on the current 'child' node before returning. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30regulator: gpio: Fix some error handling paths in 'gpio_regulator_probe()'Christophe Jaillet
[ Upstream commit ed8cffda27dea6fd3dafb3ee881c5a786edac9ca ] Re-order error handling code and gotos to avoid leaks in error handling paths. Fixes: 9f946099fe19 ("regulator: gpio: fix parsing of gpio list") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24regulator: anatop: set default voltage selector for pcieDong Aisheng
[ Upstream commit 9bf944548169f6153c3d3778cf983cb5db251a0e ] Set the initial voltage selector for vddpcie in case it's disabled by default. This fixes the below warning: 20c8000.anatop:regulator-vddpcie: Failed to read a valid default voltage selector. anatop_regulator: probe of 20c8000.anatop:regulator-vddpcie failed with error -22 Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Robin Gong <yibin.gong@nxp.com> Cc: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22regulator: core: Limit propagation of parent voltage count and listMatthias Kaehlcke
[ Upstream commit fd086045559d90cd7854818b4c60a7119eda6231 ] Commit 26988efe11b1 ("regulator: core: Allow to get voltage count and list from parent") introduces the propagation of the parent voltage count and list for regulators that don't provide this information themselves. The goal is to support simple switch regulators, however as a side effect normal continuous regulators can leak details of their supplies and provide consumers with inconsistent information. Limit the propagation of the voltage count and list to switch regulators. Fixes: 26988efe11b1 ("regulator: core: Allow to get voltage count and list from parent") Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02regulator: fan53555: fix I2C device idsGuillaume Tucker
commit fc1111b885437f374ed54aadda44d8b241ebd2a3 upstream. The device tree nodes all correctly describe the regulators as syr827 or syr828, but the I2C device id is currently set to the wildcard value of syr82x in the driver. This causes udev to fail to match the driver module with the modalias data from sysfs. Fix this by replacing the I2C device ids with ones that match the device tree descriptions, with syr827 and syr828. Tested on Firefly rk3288 board. The syr82x id was not used anywhere. Fixes: e80c47bd738b (regulator: fan53555: Export I2C module alias information) Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-21regulator: core: Resolve supplies before disabling unused regulatorsJavier Martinez Canillas
[ Upstream commit 3827b64dba27ebadb4faf51f2c91143e01ba1f6d ] After commit 66d228a2bf03 ("regulator: core: Don't use regulators as supplies until the parent is bound"), input supplies aren't resolved if the input supplies parent device has not been bound. This prevent regulators to hold an invalid reference if its supply parent device driver probe is deferred. But this causes issues on some boards where a PMIC's regulator use as input supply a regulator from another PMIC whose driver is registered after the driver for the former. In this case the regulators for the first PMIC will fail to resolve input supplies on regulators registration (since the other PMIC wasn't probed yet). And when the core attempts to resolve again latter when the other PMIC registers its own regulators, it will fail again since the parent device isn't bound yet. This will cause some parent supplies to never be resolved and wrongly be disabled on boot due taking them as unused. To solve this problem, also attempt to resolve the pending regulators input supplies before disabling the unused regulators. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-05regulator: tps65086: Fix DT node referencing in of_parse_cbAndrew F. Davis
commit 6308f1787fb85bc98b7241a08a9f7f33b47f8b61 upstream. When we check for additional DT properties in the current node we use the device_node passed in with the configuration data, this will not point to the correct DT node, use the one passed in for this purpose. Fixes: d2a2e729a666 ("regulator: tps65086: Add regulator driver for the TPS65086 PMIC") Reported-by: Steven Kipisz <s-kipisz2@ti.com> Signed-off-by: Andrew F. Davis <afd@ti.com> Tested-by: Steven Kipisz <s-kipisz2@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-05regulator: tps65086: Fix expected switch DT node namesAndrew F. Davis
commit 1c47f7c316de38c30b481e1886cc6352c9efdcc1 upstream. The three load switches are called SWA1, SWB1, and SWB2. The node names describing properties for these are expected to be the same, but due to a typo they are not. Fix this here. Fixes: d2a2e729a666 ("regulator: tps65086: Add regulator driver for the TPS65086 PMIC") Reported-by: Steven Kipisz <s-kipisz2@ti.com> Signed-off-by: Andrew F. Davis <afd@ti.com> Tested-by: Steven Kipisz <s-kipisz2@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25regulator: tps65023: Fix inverted core enable logic.Richard Cochran
commit c90722b54a4f5e21ac59301ed9a6dbaa439bdb16 upstream. Commit 43530b69d758328d3ffe6ab98fd640463e8e3667 ("regulator: Use regmap_read/write(), regmap_update_bits functions directly") intended to replace working inline helper functions with standard regmap calls. However, it also inverted the set/clear logic of the "CORE ADJ Allowed" bit. That patch was clearly never tested, since without that bit cleared, the core VDCDC1 voltage output does not react to I2C configuration changes. This patch fixes the issue by clearing the bit as in the original, correct implementation. Note for stable back porting that, due to subsequent driver churn, this patch will not apply on every kernel version. Fixes: 43530b69d758 ("regulator: Use regmap_read/write(), regmap_update_bits functions directly") Signed-off-by: Richard Cochran <rcochran@linutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25regulator: rk808: Fix RK818 LDO2Wadim Egorov
commit 75f88115391156b3f0fecbbae76bf870c89bcab8 upstream. Set the correct voltage select register for LDO2. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12regulator: Fix regulator_summary for deviceless consumersLeonard Crestez
commit e42a46b6f52473661ad192f76a128a68fe301df4 upstream. It is allowed to call regulator_get with a NULL dev argument (_regulator_get explicitly checks for it) but this causes an error later when printing /sys/kernel/debug/regulator_summary. Fix this by explicitly handling "deviceless" consumers in the debugfs code. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09regulator: axp20x: AXP806: Fix dcdcb being set instead of dcdceRask Ingemann Lambertsen
commit d0e287a401d9acf67b75180b26e2d62b7d482652 upstream. A typo or copy-paste bug means that the register access intended for regulator dcdce goes to dcdcb instead. This patch corrects it. Fixes: 2ca342d391e3 (regulator: axp20x: Support AXP806 variant) Signed-off-by: Rask Ingemann Lambertsen <rask@formelder.dk> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>