- 30 7月, 2014 2 次提交
-
-
由 Javier Martinez Canillas 提交于
Load switches are modeled as regulators but they just provide the voltage of their parent input supply. So, the drivers for these switches usually neither provide a .list_voltage handler not set a .n_voltages count. But there is code in the kernel that assumes that all regulators should be able to provide this information (e.g: cpufreq and mmc subsystems). If the voltage count and list are not available for a regulator and it has a parent input supply, then use the parent values. Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Javier Martinez Canillas 提交于
Load switches are modeled as regulators but they just provide the voltage of their parent input supply. So the drivers for these switches usually don't provide a .get_voltage function handler but there is code in the kernel that assumes that all regulators should be able to provide its current voltage rail. So, if the output voltage for a regulator is not available and it has a parent supply, then pass the voltage of its parent. Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 05 6月, 2014 1 次提交
-
-
由 Nishanth Menon 提交于
With commit 064d5cd1 (regulator: core: Fix the init of DT defined fixed regulators) We ensure that regulator must be capable of providing it's current voltage when constraints are used, however adding the return value in the print is a little more informative to explain the nature of the failure involved. So, instead of providing message such as: smps9: failed to get the current voltage having error value added to the message such as: smps9: failed to get the current voltage(-22) is a little more informative for debugging the error. Signed-off-by: NNishanth Menon <nm@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 02 6月, 2014 3 次提交
-
-
由 Alban Bedel 提交于
When a regulator is defined using DT and it has a single voltage the regulator init always tries to apply this voltage. However it fails if the regulator isn't settable because it is using an internal low level function. To overcome this we now first query the regulator and only set it if needed. Signed-off-by: NAlban Bedel <alban.bedel@avionic-design.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Saravana Kannan 提交于
regulator_init_complete does a scan of regulators which dont have always-on or consumers are automatically disabled as being unused. However, with deferred probing, late_initcall() is too soon to declare a regulator as unused as the regulator itself might not have registered due to defferal - Example: A regulator deffered due to i2bus not available which in turn is deffered due to pinctrl availability. Since deferred probing is done in late_initcall(), do the cleanup of unused regulators by regulator_init_complete in late_initcall_sync instead of late_initcall. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: NSaravana Kannan <skannan@codeaurora.org> [nm@ti.com: minor rewording] Signed-off-by: NNishanth Menon <nm@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Mark Brown 提交于
In the spirit of conservatism that governs our general approach to permissions it is better if we don't touch regulators we weren't explicitly given permissions to control. This avoids the need to explicitly specify unknown regulators in DT as always on, if a regulator is not otherwise involved in software control it can be omitted from the DT. Regulators explicitly given constraints in DT still need to have an always on constraint specified as before. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 29 5月, 2014 1 次提交
-
-
由 Stephen Boyd 提交于
regulator_get_optional() doesn't hold an exclusive reference to the regulator. Fix the documentation and reword the exclusive documentation to fix the grammatical error "this reference is held". Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 26 5月, 2014 1 次提交
-
-
由 Axel Lin 提交于
Use map_voltage_linear_range() if list_voltage_linear_range() is in use and nothing is set. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 24 5月, 2014 1 次提交
-
-
由 Lee Jones 提交于
Toughen-up checks for read-only regulator names. Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 15 4月, 2014 1 次提交
-
-
由 Charles Keepax 提交于
Currently the regulator core does not take an additional reference to the of_node it is passed. This means that the caller must ensure that the of_node is valid for the duration of the regulator's existance. It is reasonable for the framework to assume it is passed a valid of_node but seems onerous for it to assume the caller will keep the node valid for the life-time of the regulator, especially when devm_regulator_register is used and there will likely be no code in the driver called at the point it would be safe to put the of_node. This patch adds an additional of_node_get when the regulator is registered and an of_node_put when it is unregistered in the core. This means individual drivers are free to put their of_node references at the end of probe letting the regulator core handling it from there. This simplifies code on the driver side. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 25 2月, 2014 2 次提交
-
-
由 Markus Pargmann 提交于
There are many places where ops->disable is called directly. Instead we should use _regulator_do_disable() which also handles gpio regulators. To be able to use the wrapper function from _regulator_force_disable(), I moved the _notifier_call_chain() call from _regulator_do_disable() to _regulator_disable(). This way, _regulator_force_disable() can use different flags for _notifier_call_chain() without calling it twice. Cc: <stable@vger.kernel.org> # 3.10+ Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Markus Pargmann 提交于
There are some direct ops->enable in the regulator core driver. This is a potential issue as the function _regulator_do_enable() handles gpio regulators and the normal ops->enable calls. These gpio regulators are simply ignored when ops->enable is called directly. One possible bug is that boot-on and always-on gpio regulators are not enabled on registration. This patch replaces all ops->enable calls by _regulator_do_enable. [Handle missing enable operations -- broonie] Cc: <stable@vger.kernel.org> # 3.10+ Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Signed-off-by: NMark Brown <broonie@linaro.org> regulator: Handle invalid enable operation for always/boot on regulators Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 21 2月, 2014 1 次提交
-
-
由 Shuah Khan 提交于
Change "dummy supplies not allowed" error message to warning instead, as this is a just warning message with no change to the behavior. [Added a CC to stable since some other bug fixes cause this to come up more frequently on PCs which is how it was noticed -- broonie] Signed-off-by: NShuah Khan <shuah.kh@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
-
- 19 2月, 2014 1 次提交
-
-
由 Masanari Iida 提交于
This patch fix spelling typo in Documentation/DocBook. It is because .html and .xml files are generated by make htmldocs, I have to fix a typo within the source files. Signed-off-by: NMasanari Iida <standby24x7@gmail.com> Acked-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 07 2月, 2014 1 次提交
-
-
由 Bjorn Andersson 提交于
Make it okay to call regulator_set_voltage on regulators with fixed voltage if the requested range overlaps the current/configured voltage. Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 28 1月, 2014 1 次提交
-
-
由 Mark Brown 提交于
Once we have full constraints then all supply mappings should be known to the regulator API. This means that we should treat failed lookups as fatal rather than deferring in the hope of further registrations but this was broken by commit 9b92da1f "regulator: core: Fix default return value for _get()" which was targeted at DT systems but unintentionally broke non-DT systems by changing the default return value. Fix this by explicitly returning -EPROBE_DEFER from the DT lookup if we find a property but no corresponding regulator and by having the non-DT case default to -ENODEV when we have full constraints. Fixes: 9b92da1f "regulator: core: Fix default return value for _get()" Signed-off-by: NMark Brown <broonie@linaro.org> Tested-by: NGuenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org
-
- 09 1月, 2014 1 次提交
-
-
由 Jingoo Han 提交于
Fix the following checkpatch errors and warnings. ERROR: trailing whitespace ERROR: return is not a function, parentheses are not required WARNING: braces {} are not necessary for single statement blocks Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 18 12月, 2013 1 次提交
-
-
由 Hans de Goede 提交于
Only print an error when _regulator_get() is expected to return a valid regulator, that is when _regulator_get() is called from regulator_get() and we're not using the dummy because we don't have full-constraints, or when _regulator_get() is called from regulator_get_exclusive() in which case returning a dummy is not allowed. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 28 11月, 2013 2 次提交
-
-
由 Mark Brown 提交于
Eliminate the gap between DT becoming available and this being used to say we have full constraints by checking directly for DT every time we check for full constraints. This improves interoperaton with optional regulator support. Signed-off-by: NMark Brown <broonie@linaro.org> Tested-by: NFabio Estevam <fabio.estevam@freescale.com>
-
由 Mark Brown 提交于
Simple code reorganisation so we can change the logic for deciding what full constraints are more easily. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 13 11月, 2013 1 次提交
-
-
由 Guennadi Liakhovetski 提交于
Commit c368e5fc "regulator: fixed: get rid of {get|list}_voltage()" broke regulator_list_voltage() for the fixed regulator, because an earlier commit 5a523605 "regulator: core: provide fixed voltage in desc for single voltage rail" missed to add support for the fixed-voltage special case to that function. This patch fixes that regression. Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 18 10月, 2013 1 次提交
-
-
由 Charles Keepax 提交于
These patches add the ability to create an alternative device on which a lookup for a certain supply should be conducted. A common use-case for this would be devices that are logically represented as a collection of drivers within Linux but are are presented as a single device from device tree. It this case it is necessary for each sub device to locate their supply data on the main device. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 04 10月, 2013 1 次提交
-
-
由 Mark Brown 提交于
This helps people spot if they have missed a supply from a device tree or equivalent data structure. Suggested-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 9月, 2013 1 次提交
-
-
由 Thierry Reding 提交于
Keep busy-wait looping to a minimum while waiting for a regulator to ramp-up to the target voltage. This follows the guidelines set forth in Documentation/timers/timers-howto.txt and assumes that regulators are never enabled in atomic context. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 24 9月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Ensure that the return value is always set when we return now that the logic has changed for regulator_get_optional() so we don't get missing codes leaking out. Reported-by: NThierry Reding <treding@nvidia.com> Tested-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 23 9月, 2013 1 次提交
-
-
由 Mark Brown 提交于
We should be returning an error, a repeated call will never succeed. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 21 9月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Now that we are defaulting to providing dummy regulators fix the logic for substituting a dummy by making the default return code -EPROBE_DEFER. Reported-by: NThierry Reding <treding@nvidia.com> Tested-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 20 9月, 2013 1 次提交
-
-
由 Laxman Dewangan 提交于
Machine constraints is configured during regulator register. If current constraints are provided through machine constraints then it is observed that sometime the current configured on rail is out of range what machine constraint has. Set the current constraints when setting machine constraints to make sure that rail's current is within the range of given machine constraints. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 19 9月, 2013 1 次提交
-
-
由 Laxman Dewangan 提交于
The turn-on time of the regulator depends on the regulator device's electrical characteristics. Sometimes regulator turn-on time also depends on the capacitive load on the given platform and it can be more than the datasheet value. The driver provides the enable-time as per datasheet. Add support for configure the enable ramp time through regulator constraints so that regulator core can take this value for enable time for that regulator. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Acked-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 9月, 2013 6 次提交
-
-
由 Mark Brown 提交于
No boards have used this functionality and the new default of providing dummy regulators by default provides a better solution to the problem it was trying to solve. Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Mark Brown 提交于
When a system has said that it has fully specified constraints for its regulators it is still possible that some supplies may be missing, especially if regulator support has been added to a driver after the board was integrated. We can handle such situations more gracefully by providing a dummy regulator. Unless the caller has specifically indicated that the system design may not include a given regulator by using regulator_get_optional() or that it needs its interactions to have an effect using regulator_get_exclusive() provide a dummy regulator if we can't locate a real one. The kconfig option REGULATOR_DUMMY that provided similar behaviour for all regulators has been removed, systems that need it should flag that they have full constraints instead. Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Mark Brown 提交于
Cut down on the size of core.c a bit more and ensure that the devres versions of things don't do too much peering inside the internals of the APIs they wrap. Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
The implementation of devm_regulator_get, devm_regulator_get_exclusive and devm_regulator_get_optional are almost the same. Introduce _devm_regulator_get helper function and refactor the code. Also move devm_regulator_get_exclusive to proper place, put it after regulator_get_exclusive() function. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Sachin Kamat 提交于
Changed automaticall -> automatically. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Mark Brown 提交于
Many regulator drivers have a remove function that consists solely of calling regulator_unregister() so provide a devm_regulator_register() in order to allow this repeated code to be removed and help eliminate error handling code. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 11 9月, 2013 1 次提交
-
-
由 Laxman Dewangan 提交于
If given rail has the single voltage (n_voltages = 1) then provide the rail voltage through regulator descriptor so that core can use this value for finding voltage. This will avoid the implementation of the callback for get_voltage() or list_voltage() callback on regulator driver. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 8月, 2013 1 次提交
-
-
由 Matthias Kaehlcke 提交于
Add a resource managed regulator_get_exclusive() Signed-off-by: NMatthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 19 8月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Just for neatness. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 09 8月, 2013 1 次提交
-
-
由 Axel Lin 提交于
Move regulator_list_voltage_{linear,linear_range,table} helper functions to helpers.c. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 07 8月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Reduce the size of core.c a bit. Signed-off-by: NMark Brown <broonie@linaro.org>
-