- 28 8月, 2019 2 次提交
-
-
由 Jisheng Zhang 提交于
The only difference between SY8824E and SY8824C/D is the vsel_min. Signed-off-by: NJisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20190827163537.52023c4e@xhacker.debianSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Jisheng Zhang 提交于
SY8824C is an I2C attached single output regulator made by Silergy Corp, which is used on several Synaptics berlin platforms to control the power supply of the ARM cores. Add a driver for it. Signed-off-by: NJisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20190827163418.1a32fc48@xhacker.debianSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 16 8月, 2019 2 次提交
-
-
由 Raag Jadav 提交于
Implement ->set_mode(), ->get_mode() and ->set_suspend_xx() hooks for act8865 with unlocked expert registers. Based on work done by Borris Brezillon on [1]. [1] https://www.spinics.net/lists/kernel/msg2942960.htmlSigned-off-by: NRaag Jadav <raagjadav@gmail.com> Link: https://lore.kernel.org/r/1565721176-8955-2-git-send-email-raagjadav@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Nishka Dasgupta 提交于
In function of_get_child_regulator(), the loop for_each_child_of_node() contains two mid-loop return statements, each preceded by a statement putting child. In order to reduce this repetition, create a new label, err_node_put, that puts child and then returns the required value; edit the mid-loop return blocks to instead go to this new label. Signed-off-by: NNishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190815053704.32156-1-nishkadg.linux@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 15 8月, 2019 1 次提交
-
-
由 Colin Ian King 提交于
Variable ret is initialized to a value that is never read before a return statement and hence can be removed. Remove it. Addresses-Coverity: ("Unused value") Signed-off-by: NColin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190813133114.14931-1-colin.king@canonical.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 10 8月, 2019 2 次提交
-
-
由 Gregory CLEMENT 提交于
During reset the VMMC regulator doesn't reach 0V and only drops to 1.8V, furthermore the pulse width is under 200us whereas the SD specification expect 1ms. The WR_S bit allows the TWL6030 to no reset at all the VMMC during warm reset and keep the current voltage. Thanks to this workaround the SD card doesn't reach a undefined reset stage. Actually this behavior is available for all the LDO regulator, so the driver will also allow to use it with any of these regulator. Signed-off-by: NGregory CLEMENT <gregory.clement@bootlin.com> Link: https://lore.kernel.org/r/20190725094542.16547-4-gregory.clement@bootlin.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Gregory CLEMENT 提交于
Instead of refering the full pdev->dev.of_node use a local variable. Signed-off-by: NGregory CLEMENT <gregory.clement@bootlin.com> Link: https://lore.kernel.org/r/20190725094542.16547-3-gregory.clement@bootlin.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 09 8月, 2019 5 次提交
-
-
由 Vinod Koul 提交于
Add the PMIC5 modes and use them pmic5 ldo and smps Signed-off-by: NVinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20190809073616.1235-4-vkoul@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Vinod Koul 提交于
pmic5_bob voltages count is 136 [0,135] so update it Signed-off-by: NVinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20190809073616.1235-3-vkoul@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Vinod Koul 提交于
It helps to keep sorted order for compatibles, so sort them Suggested-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20190809073616.1235-2-vkoul@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 YueHaibing 提交于
Building without CONFIG_POWER_SUPPLY will fail: drivers/regulator/act8865-regulator.o: In function `act8865_pmic_probe': act8865-regulator.c:(.text+0x357): undefined reference to `devm_power_supply_register' drivers/regulator/act8865-regulator.o: In function `act8600_charger_get_property': act8865-regulator.c:(.text+0x3f1): undefined reference to `power_supply_get_drvdata' Add POWER_SUPPLY dependency to Kconfig. Reported-by: NHulk Robot <hulkci@huawei.com> Fixes: 2d09a79b ("regulator: act8865: Add support for act8600 charger") Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190807133822.67124-1-yuehaibing@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Vinod Koul 提交于
Add support from RPMH regulators found in SM8150 platform Signed-off-by: NVinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20190808093343.5600-2-vkoul@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 05 8月, 2019 1 次提交
-
-
由 Nishka Dasgupta 提交于
Each iteration of for_each_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return in two places. Issue found with Coccinelle. Signed-off-by: NNishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190804162023.5673-1-nishkadg.linux@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 02 8月, 2019 1 次提交
-
-
由 Stephen Boyd 提交于
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NStephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20190730181557.90391-38-swboyd@chromium.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 26 7月, 2019 1 次提交
-
-
由 kbuild test robot 提交于
drivers/regulator/act8865-regulator.c:447:8-14: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 2d09a79b ("regulator: act8865: Add support for act8600 charger") CC: Maarten ter Huurne <maarten@treewalker.org> Signed-off-by: Nkbuild test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20190724092236.witxtfmubun25l2t@1905cc33b6ddSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 24 7月, 2019 2 次提交
-
-
由 Michał Mirosław 提交于
AC8865 has internal 1.5k pull-down resistor that can be enabled when LDO is shut down. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lore.kernel.org/r/d7338f0dfcac63eb958a6b5e42e2d540b3d3f54a.1563898936.git.mirq-linux@rere.qmqm.plSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Michał Mirosław 提交于
Rename act8865_ldo_ops to act8865_fixed_ldo_ops to make room for variable-output LDO ops change. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lore.kernel.org/r/12b1fe419e93dfe663990009bf1b2fbf630e9934.1563898936.git.mirq-linux@rere.qmqm.plSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 23 7月, 2019 2 次提交
-
-
由 Axel Lin 提交于
Setting .n_voltages = 1 and .fixed_uV is enough for fixed regulator, remove the redundant .min_uV and .list_voltage settings. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NFabrice Gasnier <fabrice.gasnier@st.com> Link: https://lore.kernel.org/r/20190723014102.25103-1-axel.lin@ingics.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Maarten ter Huurne 提交于
This provides a way to monitor battery charge status via the power supply subsystem. Signed-off-by: NMaarten ter Huurne <maarten@treewalker.org> Signed-off-by: NPaul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20190723011418.29143-1-paul@crapouillou.netSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 22 7月, 2019 3 次提交
-
-
由 Axel Lin 提交于
-EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20190711122138.5221-1-axel.lin@ingics.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Axel Lin 提交于
According to the datasheet http://www.ti.com/lit/ds/symlink/lm36274.pdf: Table 23. VPOS Bias Register Field Descriptions VPOS[5:0]: VPOS voltage (50-mV steps): VPOS = 4 V + (Code × 50 mV), 6.5 V max 000000 = 4 V 000001 = 4.05 V : 011110 = 5.5 V (Default) : 110010 = 6.5 V 110011 to 111111 map to 6.5 V So the LM36274_LDO_VSEL_MAX should be 0b110010 (0x32). The valid selectors are 0 ... LM36274_LDO_VSEL_MAX, n_voltages should be LM36274_LDO_VSEL_MAX + 1. Similarly, the n_voltages should be LM36274_BOOST_VSEL_MAX + 1 for LM36274_BOOST. Fixes: bff5e807 ("regulator: lm363x: Add support for LM36274") Signed-off-by: NAxel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20190626132632.32629-2-axel.lin@ingics.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Axel Lin 提交于
According to the datasheet https://www.ti.com/lit/ds/symlink/lm3632a.pdf Table 20. VPOS Bias Register Field Descriptions VPOS[5:0] Sets the Positive Display Bias (LDO) Voltage (50 mV per step) 000000: 4 V 000001: 4.05 V 000010: 4.1 V .................... 011101: 5.45 V 011110: 5.5 V (Default) 011111: 5.55 V .................... 100111: 5.95 V 101000: 6 V Note: Codes 101001 to 111111 map to 6 V The LM3632_LDO_VSEL_MAX should be 0b101000 (0x28), so the maximum voltage can match the datasheet. Fixes: 3a8d1a73 ("regulator: add LM363X driver") Signed-off-by: NAxel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20190626132632.32629-1-axel.lin@ingics.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 05 7月, 2019 2 次提交
-
-
由 Bartosz Golaszewski 提交于
Use the new vsel_step field in the regulator description to instruct the regulator API on the required voltage ramping. Switch to using the generic regmap helpers for voltage setting and remove the old set_voltage callback that handcoded the selector stepping. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20190703161035.31808-3-brgl@bgdev.plSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Bartosz Golaszewski 提交于
Some regulators require that the requested voltage be reached gradually by setting all or some of the intermediate values. Implement a new field in the regulator description struct that allows users to specify the number of selectors by which the regulator API should step when ramping the voltage up/down. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20190703161035.31808-2-brgl@bgdev.plSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 03 7月, 2019 2 次提交
-
-
由 Bartosz Golaszewski 提交于
Define a MODULE_ALIAS() in the regulator sub-driver for max77650 so that the appropriate module gets loaded together with the core mfd driver. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20190703084849.9668-1-brgl@bgdev.plSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Colin Ian King 提交于
The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: NColin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190703082009.18779-1-colin.king@canonical.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 02 7月, 2019 4 次提交
-
-
由 Fabrice Gasnier 提交于
Add support for the 3.3V booster regulator embedded in stm32h7 and stm32mp1 devices, that can be used to supply ADC analog input switches. This regulator is supplied by vdda. It's controlled by using SYSCFG: - STM32H7 has a unique register to set/clear the booster enable bit - STM32MP1 has separate set and clear registers to configure it. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
The driver was registering buck regulators with unsupported range of voltages for S2MPS11 devices. Basically it assumed that all 256 values are possible for a single 8-bit I2C register controlling buck's voltage. This is not true, as datasheet describes subset of these which can be used. For example for buck[12346] the minimum voltage is 650 mV which corresponds to register value of 0x8. The driver was however registering regulator starting at 600 mV, so for a step of 6.25 mV this gave the same result. However this allowed to try to configure regulators to unsupported values. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
On S2MPS11 device, the buck7 and buck8 regulator voltages start at 750 mV, not 600 mV. Using wrong minimal value caused shifting of these regulator values by 150 mV (e.g. buck7 usually configured to v1.35 V was reported as 1.2 V). On most of the boards these regulators are left in default state so this was only affecting reported voltage. However if any driver wanted to change them, then effectively it would set voltage 150 mV higher than intended. Cc: <stable@vger.kernel.org> Fixes: cb74685e ("regulator: s2mps11: Add samsung s2mps11 regulator driver") Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Colin Ian King 提交于
Currently the LP87565_DEVICE_TYPE_LP87561_Q1 case does not have a break statement, causing it to fall through to a dev_err message. Fix this by adding in the missing break statement. Addresses-Coverity: ("Missing break in switch") Fixes: 7ee63bd7 ("regulator: lp87565: Add 4-phase lp87561 regulator support") Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 27 6月, 2019 2 次提交
-
-
由 Heiko Stuebner 提交于
Add support for the rk809 and rk817 regulator driver. Their specifications are as follows: 1. The RK809 and RK809 consist of 5 DCDCs, 9 LDOs and have the same registers for these components except dcdc5. 2. The dcdc5 is a boost dcdc for RK817 and is a buck for RK809. 3. The RK817 has one switch but The Rk809 has two. The output voltages are configurable and are meant to supply power to the main processor and other components. Signed-off-by: NTony Xie <tony.xie@rock-chips.com> Acked-by: NMark Brown <broonie@kernel.org> [rebased on top of 5.2-rc1] Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Matti Vaittinen 提交于
Split the bd718x7.h to ROHM common and bd718x7 specific parts so that we do not need to add same things in every new ROHM PMIC header. Please note that this change requires changes also in bd718x7 sub-device drivers for regulators and clk. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: NMark Brown <broonie@kernel.org> Acked-by: NStephen Boyd <sboyd@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 25 6月, 2019 6 次提交
-
-
由 Waibel Georg 提交于
In case the requested gpio property is not found in the device tree, some callers of gpiod_get_from_of_node() expect a return value of NULL, others expect -ENOENT. In particular devm_fwnode_get_index_gpiod_from_child() expects -ENOENT. Currently it gets a NULL, which breaks the loop that tries all gpio_suffixes. The result is that a gpio property is not found, even though it is there. This patch changes gpiod_get_from_of_node() to return -ENOENT instead of NULL when the requested gpio property is not found in the device tree. Additionally it modifies all calling functions to properly evaluate the return value. Another approach would be to leave the return value of gpiod_get_from_of_node() as is and fix the bug in devm_fwnode_get_index_gpiod_from_child(). Other callers would still need to be reworked. The effort would be the same as with the chosen solution. Signed-off-by: NGeorg Waibel <georg.waibel@sensor-technik.de> Reviewed-by: NKrzysztof Kozlowski <krzk@kernel.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Dmitry Osipenko 提交于
Expose some of internal functions that are required for implementation of customized regulator couplers. Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Dmitry Osipenko 提交于
Right now regulator core supports only one type of regulators coupling, the "voltage max-spread" which keeps voltages of coupled regulators in a given range from each other. A more sophisticated coupling may be required in practice, one example is the NVIDIA Tegra SoCs which besides the max-spreading have other restrictions that must be adhered. Introduce API that allow platforms to provide their own customized coupling algorithms. Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
The driver supported turning off regulators in suspend only for S2MPS14 device. However this makes also sense for S2MPS11 and can reduce the power consumption during suspend to RAM. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Store the regulator ID instead of calling rdev_get_id() every time. This makes code slightly easier to read as shorter 'rdev_id' variable is used instead of full call. This can also speed things up by reducing number of calls, although effect was not measured. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jeffrey Hugo 提交于
Low-voltage switches (lvs) don't have set_points since the voltage ranges of the output are really controlled by the inputs. This is a problem for the newly added linear range support in the probe(), as that will cause a null pointer dereference error on older platforms like msm8974 which happen to need to control some of the implemented lvs. Fix this by adding the appropriate null check. Fixes: 86f4ff7a ("regulator: qcom_spmi: enable linear range info") Reported-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NJeffrey Hugo <jeffrey.l.hugo@gmail.com> Tested-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 20 6月, 2019 2 次提交
-
-
由 Jeffrey Hugo 提交于
spmi_regulator_set_voltage_time_sel() calculates the amount of delay needed as the result of setting a new voltage. Essentially this is the absolute difference of the old and new voltages, divided by the slew rate. The implementation of spmi_regulator_set_voltage_time_sel() is wrong. It attempts to calculate the difference in voltages by using the difference in selectors and multiplying by the voltage step between selectors. This ignores the possibility that the old and new selectors might be from different ranges, which have different step values. Also, the difference between the selectors may encapsulate N ranges inbetween, so a summation of each selector change from old to new would be needed. Lets avoid all of that complexity, and just get the actual voltage represented by both the old and new selector, and use those to directly compute the voltage delta. This is more straight forward, and has the side benifit of avoiding issues with regulator implementations that don't have hardware register support to get the current configured range. Fixes: e92a4047 ("regulator: Add QCOM SPMI regulator driver") Reported-by: NBjorn Andersson <bjorn.andersson@linaro.org> Reported-by: NJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Reported-by: NMark Brown <broonie@kernel.org> Signed-off-by: NJeffrey Hugo <jeffrey.l.hugo@gmail.com> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Tested-by: NJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Felix Riemann 提交于
According to the DA9061 and DA9062 datasheets the LDO voltage selection registers have a lower value of 0x02. This applies to voltage registers VLDO1_A, VLDO2_A, VLDO3_A and VLDO4_A. This linear offset of 0x02 was previously not observed by the driver, causing the LDO output voltage to be systematically lower by two steps (= 0.1V). This patch fixes the minimum linear selector offset by setting it to a value of 2 and increases the n_voltages by the same amount allowing voltages in the range 0x02 -> 0.9V to 0x38 -> 3.6V to be correctly selected. Also fixes an incorrect calculaton for the n_voltages value in the regulator LDO2. These fixes effect all LDO regulators for DA9061 and DA9062. Acked-by: NSteve Twiss <stwiss.opensource@diasemi.com> Tested-by: NSteve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: NFelix Riemann <felix.riemann@sma.de> Signed-off-by: NSteve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-