- 23 7月, 2015 1 次提交
-
-
由 Daniel Kurtz 提交于
of_regulator_match.driver_data is (void *). tps6586x uses it to store an anonymous enum value (those TPS6586X_ID_ values). Later, it tries to extract the ID by casting directly to an int, which is a no-no ([-Wpointer-to-int-cast]): drivers/regulator/tps6586x-regulator.c: In function 'tps6586x_parse_regulator_dt': drivers/regulator/tps6586x-regulator.c:430:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] id = (int)tps6586x_matches[i].driver_data; ^ Instead of casting to int, uintptr_t is better suited for receiving and comparing integers extracted from void *. This is especially true on 64-bit systems where sizeof(void *) != sizeof(int). Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 19 6月, 2015 1 次提交
-
-
由 Axel Lin 提交于
n /= range->step_uV + 1; is equivalent to n /= (range->step_uV + 1); which is wrong. Fix it. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 6月, 2015 2 次提交
-
-
由 Stephen Boyd 提交于
drivers/regulator/qcom_spmi-regulator.c:751:3-50: code aligned with following code on line 753 drivers/regulator/qcom_spmi-regulator.c:584:3-41: code aligned with following code on line 587 These lines where missing braces causing the break to always be executed even when it shouldn't be. Fix it. Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Reviewed-by: NAndy Gross <agross@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Paul Gortmaker 提交于
This file is built off of a tristate Kconfig option and also contains modular function calls so it should explicitly include module.h to avoid compile breakage during header shuffles done in the future. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
- 16 6月, 2015 2 次提交
-
-
由 Julia Lawall 提交于
Simplify a trivial if-return sequence and combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Mark Brown <broonie@kernel.org> Signed-off-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stephen Boyd 提交于
Add an SPMI regulator driver for Qualcomm's PM8841, PM8941, and PM8916 PMICs. This driver is based largely on code from codeaurora.org[1]. [1] https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/drivers/regulator/qpnp-regulator.c?h=msm-3.10 Cc: David Collins <collinsd@codeaurora.org> Cc: <devicetree@vger.kernel.org> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 12 6月, 2015 4 次提交
-
-
由 Stephen Boyd 提交于
Some regulators can limit their input current (typically annotated as ilim). Add an op (set_input_current_limit) and a DT property + constraint to support this. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stephen Boyd 提交于
Some regulators support a "soft start" feature where the voltage ramps up slowly when the regulator is enabled. Add an op (set_soft_start) and a DT property + constraint to support this. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stephen Boyd 提交于
Some regulators need to be configured to pull down a resistor when the regulator is disabled. Add an op (set_pull_down) and a DT property + constraint to support this. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stephen Boyd 提交于
Some regulators have a fixed load that isn't captured by consumers that the kernel knows about. Add a constraint to support this. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 11 6月, 2015 1 次提交
-
-
由 Axel Lin 提交于
Fix trivial typo. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 10 6月, 2015 5 次提交
-
-
由 Stefan Wahren 提交于
In order to avoid potential overflows in print_constraints we better replace sprintf() with scnprintf(). Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stefan Wahren 提交于
The buffer for condtraints debug isn't big enough to hold the output in all cases. So fix this issue by increasing the buffer. Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
-
由 Mark Brown 提交于
We weren't taking into account the already used buffer when telling sprintf() where to print to. Reported-by: NStefan Wahren <stefan.wahren@i2se.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Laxman Dewangan 提交于
Maxim MAX77621 device is high-efficiency, three-phase, DC-DC step-down switching regulator delivers peak output currents up to 16A. This device is extension of MAX8973 and compatible with the register definition. The MAX77621 has the SHUTDOWN pin which is EN pin on the MAX8973. On MAX77621, the SHUTDOWN pin (active low) reset device register to its POR/OTP value. The voltage output is enabled when SHUTDONW pin is HIGH and EN bit on VOUT register is HIGH. For MAX8973, VOUT is enabled when EN bit or EN pin is high. Add support of the MAX77621 device on max8973 regulator driver with following changes: - Make sure SHUTDOWN pin is set HIGH through GPIO calls if GPIO from AP connected to SHUTDOWN pin provided. - Enable/disable the rail through register access only. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Laxman Dewangan 提交于
Regulator core framework support the configuration of ramp delay reading from platform specific regulator data via the regulator callback ops. Instead of reading regulator init data on driver and setting ramp delay, use the callback to achieve this. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 6月, 2015 3 次提交
-
-
由 Lee Jones 提交于
Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Lee Jones 提交于
The core framework already takes care of this. Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Lee Jones 提交于
The Regulator Device keeps a full copy of it's own, which can be easily accessed. Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 03 6月, 2015 2 次提交
-
-
由 Stephen Boyd 提交于
We don't consider a failure to add the sysfs node as a problem, so use sysfs_create_link_nowarn() so that we don't print a backtrace when duplicated files exist. Also, downgrade the printk message to a debug statement so that we're quiet here. This allows multiple drivers to request a CPU's regulator so that CPUfreq and AVSish drivers can coexist. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Richard Fitzgerald 提交于
Using the driver for the internal regulator to also enable/disable the codec internal clock frequency controller is an unexpected side-effect for a regulator, and also means that the core clocks won't be changed as expected if an external regulator is used to power the codec. The DVFS is now handled by the codec driver so can be removed from the LDO1 driver. Signed-off-by: NRichard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 02 6月, 2015 4 次提交
-
-
由 Axel Lin 提交于
Current code does not set regulators->irq_ldo_lim and regulators->irq_uvov, so it actually calls free_irq(0, regulators) twice in remove() but does not free the irq actually used. Convert to use devm_request_threaded_irq instead and then we don't need to take care the clean up irq so remove irq_ldo_lim and irq_uvov from struct da9063_regulators. Note, regulators->irq_uvov is not used at all in current code. There is a slightly change in this patch, it will return error in probe() if devm_request_threaded_irq fails. If the irq is optional, it should be fine to allow platform_get_irq_byname fails. But current code does not allow platform_get_irq_byname fails. So I think the reason to allow request irq failure is just because the irq leak. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 S Twiss 提交于
Remove the unused variable build warning for reg_matches that appears during the compilation of the DA9062 regulator driver. da9062-regulator.c: In function da9062_regulator_probe: da9062-regulator.c:727:29: warning: unused variable reg_matches Signed-off-by: NSteve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
Since commit 1c6c6952 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 27 5月, 2015 2 次提交
-
-
由 Johan Hovold 提交于
Fix broken probe of da9052 regulators, which since commit b3f6c73d ("mfd: da9052-core: Fix platform-device id collision") use a non-deterministic platform-device id to retrieve static regulator information. Fortunately, adequate error handling was in place so probe would simply fail with an error message. Update the mfd-cell ids to be zero-based and use those to identify the cells when probing the regulator devices. Fixes: b3f6c73d ("mfd: da9052-core: Fix platform-device id collision") Cc: stable <stable@vger.kernel.org> # v3.19 Signed-off-by: NJohan Hovold <johan@kernel.org> Acked-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: NMark Brown <broonie@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Heiko Stuebner 提交于
Setting the set_voltage_time_sel callback to the standard function regulator_set_voltage_time_sel enables the regulator to actually honor ramp-delays when during regulator_set_voltage calls. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 25 5月, 2015 1 次提交
-
-
由 Axel Lin 提交于
Remove extra space between platform prefix and driver name in MODULE_ALIAS. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 5月, 2015 4 次提交
-
-
由 Laxman Dewangan 提交于
MAX8973 supports the voltage output enable/disable through its EN pin. This EN pin can be connected through GPIO from host processor. Add support to provide GPIO number from platform/DT and if it is valid GPIO then enable external control default. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Laxman Dewangan 提交于
There are some platform specific parameter required to configure the device like enable external control, DVS gpio etc. Add DT parsing of such properties to make platform specific data. Update DT binding doc accordingly. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Laxman Dewangan 提交于
To find that dvs-gpio is valid or not, gpio API gpio_is_valid() can be directly used instead of intermediate variable. Removing the extra variable and using the gpio_is_valid(). Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Laxman Dewangan 提交于
If platform data has dvs-gpio value 0 as default/unset then make this as invalid gpio so that function gpio_is_valid() can return false on this case. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 5月, 2015 2 次提交
-
-
由 S Twiss 提交于
Add BUCK and LDO regulator driver support for DA9062 Signed-off-by: NSteve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Joe Perches 提交于
The code should handle more than 32 bits here because "id" can be a value up to MAX77686_REGULATORS (currently 34). Convert the gpio_enabled type to DECLARE_BITMAP and use test_bit/set_bit. Fixes: 3307e902 ("regulator: max77686: Add GPIO control") Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NJoe Perches <joe@perches.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 13 5月, 2015 3 次提交
-
-
由 Boris BREZILLON 提交于
Add AXP22X regulator definitions and variant id associations. This introduces a new "switch" type output for one of the regulators. It is a switchable secondary output of one regulator, with the same voltage level as the primary output. Signed-off-by: NBoris BREZILLON <boris.brezillon@free-electrons.com> [wens@csie.org: Moved variant choosing to multi family support patch] [wens@csie.org: Add dc-dc work frequency range] [wens@csie.org: Add "switch" type output regulator DC1SW] Signed-off-by: NChen-Yu Tsai <wens@csie.org> Reviewed-by: NMark Brown <broonie@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Boris BREZILLON 提交于
Rework the AXP20X_ macros and probe function to support the several chip families, so that each family can define it's own set of regulators. Signed-off-by: NBoris BREZILLON <boris.brezillon@free-electrons.com> [wens@csie.org: Support different DC-DC work frequency ranges] Signed-off-by: NChen-Yu Tsai <wens@csie.org> Reviewed-by: NMark Brown <broonie@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Stephen Boyd 提交于
If a regulator is listed in devicetree, but the node is marked as "disabled" we should skip parsing the regulator init data and deny consumers from interacting with the regulator. This simplifies devicetree maintenance where we can have one dtsi file with all regulators supported by a PMIC and then select what regulators are used depending on the board configuration. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 11 5月, 2015 1 次提交
-
-
由 Charles Keepax 提交于
This patch adds support for the 1.175V mode on the LDO1 regulator on the wm5110. This is need as part of the low power sleep mode operation. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 5月, 2015 1 次提交
-
-
由 Geert Uytterhoeven 提交于
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 04 5月, 2015 1 次提交
-
-
由 Axel Lin 提交于
Use regulator_is_enabled_regmap() to replace max77843_reg_is_enabled(). Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-