- 22 5月, 2015 3 次提交
-
-
由 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>
-
- 28 4月, 2015 1 次提交
-
-
由 Laxman Dewangan 提交于
In MAX8973, BIAS enable control bit is used for changing the startup time for voltage output. The startup delay is 240us (typ) when the BIASEN bit is set to 0. The startup delay is reduced to 20us (typ) when the BIASEN bit is set to 1. Pass the enable_time through regulator descriptor based on this flag. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 11 4月, 2015 1 次提交
-
-
由 Markus Pargmann 提交于
It is not necessary to have regulator init data for a regulator. This patch removes the necessity of this data and handles a NULL pointer properly. Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 10 4月, 2015 2 次提交
-
-
由 Heiko Stübner 提交于
Voltage regulators can have (unregulated) current limits too, so we should probably output both voltage and current for all regulators. Holding the rdev->mutex actually conflicts with _regulator_get_current_limit but also is not really necessary, as the global regulator_list_mutex already protects us from the regulator vanishing while we go through the list. On the rk3288-firefly the summary now looks like: regulator use open bypass voltage current min max ------------------------------------------------------------------------------- vcc_sys 0 12 0 5000mV 0mA 5000mV 5000mV vcc_lan 1 1 0 3300mV 0mA 3300mV 3300mV ff290000.ethernet 0mV 0mV vcca_33 0 0 0 3300mV 0mA 3300mV 3300mV vcca_18 0 0 0 1800mV 0mA 1800mV 1800mV vdd10_lcd 0 0 0 1000mV 0mA 1000mV 1000mV [...] Suggested-by: NMark Brown <broonie@kernel.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiko Stübner 提交于
On modern systems the regulator hierarchy can get quite long and nested with regulators supplying other regulators. In some cases when debugging it might be nice to get a tree of these regulators, their consumers and the regulation constraints in one go. To achieve this add a regulator_summary sysfs node, similar to clk_summary in the common clock framework, that walks the regulator list and creates a tree out of the regulators, their consumers and core per-regulator settings. On a rk3288-firefly the regulator_summary would for example look something like: regulator use open bypass value min max ----------------------------------------------------------------------- vcc_sys 0 12 0 5000mV 5000mV 5000mV vcc_lan 1 1 0 3300mV 3300mV 3300mV ff290000.ethernet 0mV 0mV vcca_33 0 0 0 3300mV 3300mV 3300mV vcca_18 0 0 0 1800mV 1800mV 1800mV vdd10_lcd 0 0 0 1000mV 1000mV 1000mV vccio_sd 0 0 0 3300mV 3300mV 3300mV vcc_20 0 3 0 2000mV 2000mV 2000mV vcc18_lcd 0 0 0 1800mV 1800mV 1800mV vcc_18 0 2 0 1800mV 1800mV 1800mV ff100000.saradc 0mV 0mV ff0d0000.dwmmc 1650mV 1950mV vdd_10 0 0 0 1000mV 1000mV 1000mV vdd_log 0 0 0 1100mV 1100mV 1100mV vcc_io 0 3 0 3300mV 3300mV 3300mV ff0f0000.dwmmc 3300mV 3400mV vcc_flash 1 1 0 1800mV 1800mV 1800mV ff0f0000.dwmmc 1700mV 1950mV vcc_sd 1 1 0 3300mV 3300mV 3300mV ff0c0000.dwmmc 3300mV 3400mV vcc_ddr 0 0 0 1200mV 1200mV 1200mV vdd_gpu 0 0 0 1000mV 850mV 1350mV vdd_cpu 0 1 0 900mV 850mV 1350mV cpu0 900mV 900mV vcc_5v 0 2 0 5000mV 5000mV 5000mV vcc_otg_5v 0 0 0 5000mV 5000mV 5000mV vcc_host_5v 0 0 0 5000mV 5000mV 5000mV regulator-dummy 0 0 0 0mV 0mV 0mV Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 4月, 2015 5 次提交
-
-
由 Bjorn Andersson 提交于
Tidy up error reporting and move rpm reference retrieval out of the for loop for improved readability. Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Reviewed-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Bjorn Andersson 提交于
Modeling the individual RPM resources as platform devices consumes at least 12-15kb of RAM, just to hold the platform_device structs. Rework this to instead have one device per pmic exposed by the RPM. With this representation we can more accurately define the input pins on the pmic and have the supply description match the data sheet. Suggested-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Reviewed-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Bjorn Andersson 提交于
Refactor out all custom property parsing code from the probe function into a function suitable for regulator_desc->of_parse_cb usage. Reviewed-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Bjorn Andersson 提交于
The driver itself should not flag regulators as being DRMS compatible, this should come from board or dt files. Reviewed-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Colin Ian King 提交于
pdata is assigned to &pdata_of, however, pdata_of becomes dead (when it goes out of scope) so pdata effectively becomes a dead pointer to the out of scope object. This is detected by static analysis: [drivers/regulator/max8660.c:411]: (error) Dead pointer usage. Pointer 'pdata' is dead if it has been assigned '&pdata_of' at line 404. Move declaration of pdata_of so it is always in scope. Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 02 4月, 2015 1 次提交
-
-
由 Bjorn Andersson 提交于
Instead of resolving regulator supplies during registration move this to the time of a consumer retrieving a handle. The benefit is that it's possible for one driver to register regulators with internal dependencies out of order. Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 30 3月, 2015 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
Simplify the driver by removing board file support and letting regulator core to parse DT. The max77693 regulator driver is used only on Exynos based boards which are DT-only. Board files for Exynos are not supported. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 28 3月, 2015 1 次提交
-
-
由 Guenter Roeck 提交于
If multiple regulator devices of the same type exist in a system, the regulator driver assigns generic names for the regulators it provides, and debugfs is enabled, the regulator subsystem attempts to create multiple entries with the same name in the regulator debugfs directory. This fails for all but the first regulator, resulting in multiple "Failed to create debugfs directory" log entries. To avoid the problem, prepend the debugfs directory name for a regulator with its parent device name if available, but only if no explicit regulator name was provided. Cc: Alan Tull <atull@opensource.altera.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 3月, 2015 1 次提交
-
-
由 Axel Lin 提交于
The mutex lock is not used at all, remove it. The *vmmc_regulator is not necessary, use a local variable in stw481x_vmmc_regulator_probe() instead. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 3月, 2015 3 次提交
-
-
由 Keerthy 提交于
Palmas driver is used to cater to even TPS659038 but TPS659038 does not have REGEN3 resource. Adding another field in the driver data to check on that. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Keerthy 提交于
The register offset for REGEN2_CTRL in different for TPS659038 chip as when compared with other Palmas family PMICs. In the case of TPS659038 the wrong offset pointed to PLLEN_CTRL and was causing a hang. Correcting the same. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
由 Fabian Frederick 提交于
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: NFabian Frederick <fabf@skynet.be> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 3月, 2015 1 次提交
-
-
由 Geert Uytterhoeven 提交于
drivers/regulator/tps65910-regulator.c: In function ‘tps65910_parse_dt_reg_data’: drivers/regulator/tps65910-regulator.c:1018: error: implicit declaration of function ‘of_get_child_by_name’ drivers/regulator/tps65910-regulator.c:1018: warning: assignment makes pointer from integer without a cast drivers/regulator/tps65910-regulator.c:1034: error: implicit declaration of function ‘of_node_put’ drivers/regulator/tps65910-regulator.c:1056: error: implicit declaration of function ‘of_property_read_u32’ Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 10 3月, 2015 1 次提交
-
-
由 Bjorn Andersson 提交于
Rename the regulator_set_optimum_mode() function regulator_set_load() to better represent what's going on. Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 3月, 2015 2 次提交
-
-
由 Doug Anderson 提交于
Normally _regulator_do_enable() isn't called on an already-enabled rdev. That's because the main caller, _regulator_enable() always calls _regulator_is_enabled() and only calls _regulator_do_enable() if the rdev was not already enabled. However, there is one caller of _regulator_do_enable() that doesn't check: regulator_suspend_finish(). While we might want to make regulator_suspend_finish() behave more like _regulator_enable(), it's probably also a good idea to make _regulator_do_enable() robust if it is called on an already enabled rdev. At the moment, _regulator_do_enable() is _not_ robust for already enabled rdevs if we're using an ena_pin. Each time _regulator_do_enable() is called for an rdev using an ena_pin the reference count of the ena_pin is incremented even if the rdev was already enabled. This is not as intended because the ena_pin is for something else: for keeping track of how many active rdevs there are sharing the same ena_pin. Here's how the reference counting works here: * Each time _regulator_enable() is called we increment rdev->use_count, so _regulator_enable() calls need to be balanced with _regulator_disable() calls. * There is no explicit reference counting in _regulator_do_enable() which is normally just a warapper around rdev->desc->ops->enable() with code for supporting delays. It's not expected that the "ops->enable()" call do reference counting. * Since regulator_ena_gpio_ctrl() does have reference counting (handling the sharing of the pin amongst multiple rdevs), we shouldn't call it if the current rdev is already enabled. Note that as part of this we cleanup (remove) the initting of ena_gpio_state in regulator_register(). In _regulator_do_enable(), _regulator_do_disable() and _regulator_is_enabled() is is clear that ena_gpio_state should be the state of whether this particular rdev has requested the GPIO be enabled. regulator_register() was initting it as the actual state of the pin. Fixes: 967cfb18 ("regulator: core: manage enable GPIO list") Signed-off-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
由 Javier Martinez Canillas 提交于
The _regulator_do_enable() call ought to be a no-op when called on an already-enabled regulator. However, as an optimization _regulator_enable() doesn't call _regulator_do_enable() on an already enabled regulator. That means we never test the case of calling _regulator_do_enable() during normal usage and there may be hidden bugs or warnings. We have seen warnings issued by the tps65090 driver and bugs when using the GPIO enable pin. Let's match the same optimization that _regulator_enable() in regulator_suspend_finish(). That may speed up suspend/resume and also avoids exposing hidden bugs. [Use much clearer commit message from Doug Anderson] Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 08 3月, 2015 1 次提交
-
-
由 Heiko Stuebner 提交于
The act88600/act8846/act8865 regulators have a number of input supplies supplying the individual regulators. This may even be recursively like on most Rockchip boards using the act8846 where REG4 is most of the time connected to the inl1-supply. Therefore add the ability to specify the input supplies for the individual inputs. The input-names are taken from the datasheets of act8600, act8846 and act8865. On the act8600 some regulators do not have separate input supplies. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 3月, 2015 1 次提交
-
-
This patch adds act8600 support to the act8865 driver. VBUS and USB charger supported by this chip can be added later Tested on MIPS Creator CI20 Signed-off-by: NZubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 3月, 2015 2 次提交
-
-
由 Fabio Estevam 提交于
Commit 8f45acb5 ("regulator: wm8350: Pass NULL data with REGULATION_OUT and UNDER_VOLTAGE events") introduced the following build warning: drivers/regulator/wm8350-regulator.c: In function 'pmic_uv_handler': drivers/regulator/wm8350-regulator.c:1154:17: warning: unused variable 'wm8350' [-Wunused-variable] Remove 'wm8350' as it is unused now. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
Add devm_regulator_register_notifier, this adds the resource against the device for the consumer supply we are registering the notifier for. There seem to be few use-cases where this wouldn't be the users intention and this ensures the notifiers will always be removed at the correct time. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 04 3月, 2015 1 次提交
-
-
由 Takashi Iwai 提交于
The commit [39f802d6: 'regulator: Build sysfs entries with static attribute groups'] converted the sysfs entry creation to static attribute groups, but this resulted in a regression due to the NULL check of rdev->constraints. At the point where the device is registered, rdev->constraints isn't set, so the attributes depending on it are missing. We may fix it by shuffling the code order in regulator_register(), but a quicker fix is to just remove this NULL check. rdev->constraints is in anyway always set to non-NULL in set_machine_constraints(), thus the check there is basically superfluous. Fixes: 39f802d6 ('regulator: Build sysfs entries with static attribute groups') Signed-off-by: NTakashi Iwai <tiwai@suse.de> Reportded-by: NSteve Twiss <stwiss.opensource@diasemi.com> Tested-by: NSteve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 26 2月, 2015 1 次提交
-
-
由 Richard Fitzgerald 提交于
Signed-off-by: NRichard Fitzgerald <rf@opensource.wolfsonmicro.com> Reviewed-by: NMark Brown <broonie@kernel.org> Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 24 2月, 2015 4 次提交
-
-
由 Geert Uytterhoeven 提交于
According to the documentation, no data is passed with the OVER_CURRENT regulator notifier event. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NJames Ban <james.ban.opensource@diasemi.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Geert Uytterhoeven 提交于
We tried to read the CONFIG_E register, not the CONTROL_E register. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NJames Ban <james.ban.opensource@diasemi.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Joe Perches 提交于
The seq_puts/seq_printf return value, because it's frequently misused, will eventually be converted to void. See: commit 1f33c41c ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Miscellanea: o Remove unnecessary dev_err("seq_<foo> overflow\n") messages Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Geert Uytterhoeven 提交于
According to the documentation, no data is passed with the REGULATION_OUT and UNDER_VOLTAGE regulator notifier events. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 23 2月, 2015 2 次提交
-
-
由 Bjorn Andersson 提交于
Pass the requested load directly to the rpm. Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Bjorn Andersson 提交于
Expose the requested load directly to the regulator implementation for hardware that does not support the normal enum based set_mode(). Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 2月, 2015 3 次提交
-
-
由 Doug Anderson 提交于
The LDOs are documented in the rk808 datasheet to have a soft start time of 400us. Add that to the driver. If this time takes longer on a certain board the device tree should be able to override with "regulator-enable-ramp-delay". This fixes some dw_mmc probing problems (together with other patches posted to the mmc maiing lists) on rk3288. Signed-off-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
由 Charles Keepax 提交于
We were not calling of_node_put if the regulator failed to register this patch fixes this. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
We were not calling of_node_put if the regulator failed to register this patch fixes this. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 2月, 2015 1 次提交
-
-
由 Geert Uytterhoeven 提交于
After boot-up, some events may be set, and cause the da9210 interrupt line to be asserted. As the da9210 driver doesn't have interrupt support yet, this causes havoc on systems where the interrupt line is shared among multiple devices. This is the case on e.g. r8a7791/koelsch, where the interrupt line is shared with a da9063 regulator, and the following events are set: EVENT_A = 0x00000011 (GPI0 | GPI4) EVENT_B = 0x00000002 (NPWRGOOD) Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 2月, 2015 1 次提交
-
-
由 Jaewon Kim 提交于
This patch adds new regulator driver to support max77843 MFD(Multi Function Device) chip`s regulators. The Max77843 has two voltage regulators for USB safeout. Signed-off-by: NJaewon Kim <jaewon02.kim@samsung.com> Signed-off-by: NBeomho Seo <beomho.seo@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-