- 21 6月, 2021 3 次提交
-
-
由 Matti Vaittinen 提交于
Add DT property parsing code and setting callback for regulator over/under voltage, over-current and temperature error limits. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/e7b8007ba9eae7076178bf3363fb942ccb1cc9a5.1622628334.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Matti Vaittinen 提交于
Provide helper function for IC's implementing regulator notifications when an IRQ fires. The helper also works for IRQs which can not be acked. Helper can be set to disable the IRQ at handler and then re-enabling it on delayed work later. The helper also adds regulator_get_error_flags() errors in cache for the duration of IRQ disabling. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/ebdf86d8c22b924667ec2385330e30fcbfac0119.1622628334.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Matti Vaittinen 提交于
The rdev print helpers are a nice way to print messages related to a specific regulator device. Move them from core.c to internal.h As the rdev print helpers use rdev_get_name() export it from core.c. Also move the declaration from coupler.h to driver.h because the rdev name is not just a coupled regulator property. I guess the main audience for rdev_get_name() will be the regulator core and drivers. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/dc7fd70dc31de4d0e820b7646bb78eeb04f80735.1622628333.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 23 4月, 2021 2 次提交
-
-
由 Joseph Chen 提交于
TCS4525 main features: - 2.7V to 5.5V Input Voltage Range; - 3MHz Constant Switching Frequency; - 5A Available Load Current; - Programmable Output Voltage: 0.6V to 1.4V in 6.25mV Steps; - PFM/PWM Operation for Optimum Increased Efficiency; Signed-off-by: NJoseph Chen <chenjh@rock-chips.com> [Ezequiel: Forward port] Signed-off-by: NEzequiel Garcia <ezequiel@collabora.com> Link: https://lore.kernel.org/r/20210421210338.43819-3-ezequiel@collabora.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Vincent Whitchurch 提交于
The jiffies-based off_on_delay implementation has a couple of problems that cause it to sometimes not actually delay for the required time: (1) If, for example, the off_on_delay time is equivalent to one jiffy, and the ->last_off_jiffy is set just before a new jiffy starts, then _regulator_do_enable() does not wait at all since it checks using time_before(). (2) When jiffies overflows, the value of "remaining" becomes higher than "max_delay" and the code simply proceeds without waiting. Fix these problems by changing it to use ktime_t instead. [Note that since jiffies doesn't start at zero but at INITIAL_JIFFIES ("-5 minutes"), (2) above also led to the code not delaying if the first regulator_enable() is called when the ->last_off_jiffy is not initialised, such as for regulators with ->constraints->boot_on set. It's not clear to me if this was intended or not, but I've preserved this behaviour explicitly with the check for a non-zero ->last_off.] Signed-off-by: NVincent Whitchurch <vincent.whitchurch@axis.com> Link: https://lore.kernel.org/r/20210423114524.26414-1-vincent.whitchurch@axis.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 22 4月, 2021 1 次提交
-
-
由 Vincent Whitchurch 提交于
We currently do not respect off_on_delay the first time we turn on a regulator. This is problematic since the regulator could have been turned off by the bootloader, or it could it have been turned off during the probe of the regulator driver (such as when regulator-fixed requests the enable GPIO), either of which could potentially have happened less than off_on_delay microseconds ago before the first time a client requests for the regulator to be turned on. We can't know exactly when the regulator was turned off, but initialise off_on_delay to the current time when registering the regulator, so that we guarantee that we respect the off_on_delay in all cases. Signed-off-by: NVincent Whitchurch <vincent.whitchurch@axis.com> Link: https://lore.kernel.org/r/20210422083044.11479-1-vincent.whitchurch@axis.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 21 4月, 2021 6 次提交
-
-
由 Sebastian Fricke 提交于
s/regulator may on/regulator may already be enabled/ s/or left on/or was left on/ The aim of this patch is to make the comment more readable and to make it clear, that this is about a regulator, that is already enabled instead of a regulator that may be switched on. Signed-off-by: NSebastian Fricke <sebastian.fricke@posteo.net> Link: https://lore.kernel.org/r/20210421055236.13148-1-sebastian.fricke@posteo.netSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Christophe JAILLET 提交于
'for_each_available_child_of_node()' already performs an 'of_node_get()' on child, so there is no need to perform another one before returning. Otherwise, a double 'get' is performed and a resource may never be released. Fixes: 925c85e2 ("regulator: Factor out location of init data OF node") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/a79f0068812b89ff412d572a1171f22109c24132.1618947049.git.christophe.jaillet@wanadoo.frSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Shubhankar Kuranagatti 提交于
Shifted the closing */ of multiline comment to a new line This is done to maintain code uniformity Signed-off-by: NShubhankar Kuranagatti <shubhankarvk@gmail.com> Link: https://lore.kernel.org/r/20210420034718.t7wudu6xcfpahflv@kewl-virtual-machineSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
None of the platforms with S2MPS11 use board files, so any initialization via platform data can be safely removed. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210420170244.13467-5-krzysztof.kozlowski@canonical.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
None of the platforms with S2MPA01 use board files, so any initialization via platform data can be safely removed. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210420170244.13467-4-krzysztof.kozlowski@canonical.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Adam Ward 提交于
This patch fixes identification of DA913x parts by the DA9121 driver, where a lack of clarity lead to implementation on the basis that variant IDs were to be identical to the equivalent rated non-automotive parts. There is a new emphasis on the DT identity to cope with overlap in these ID's - this is not considered to be problematic, because projects would be exclusively using automotive or consumer grade parts. Signed-off-by: NAdam Ward <Adam.Ward.opensource@diasemi.com> Link: https://lore.kernel.org/r/20210421120306.DB5B880007F@slsrvapps-01.diasemi.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 14 4月, 2021 4 次提交
-
-
由 Matti Vaittinen 提交于
Support voltage control for regulators on ROHM BD71815 PMIC. ROHM BD71815 contains 5 bucks, 7 LDOs and a boost (intended for LED). Bucks 1 and 2 support HW state based voltage level and enable states. Other regulators support HW state based enable states. All bucks and LDOs 1-5 allow voltage changes for RUN state and LDO4 can be enabled/disabled via GPIO. LDO3 does support changing between two predetermined voltages by using a GPIO but this functionality is not included in this commit. This work is derived from driver originally written by Tony Luo <luofc@embedinfo.com> - although not much of original work is left. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Matti Vaittinen 提交于
Use generic regamp ramp-delay helper function instead of implementing own. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Matti Vaittinen 提交于
The ROHM BD71815 supports setting voltage levels/regulator status for HW-states "RUN", "SUSPEND", "LPSR" and "SNVS". Add DT parsing helper also for SNVS state. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Matti Vaittinen 提交于
The helper for obtaining HW-state based DVS voltage levels currently only works for regulators using linear-ranges. Extend support to regulators with simple linear mappings and add also proper error path if pickable-ranges regulators call this. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 03 4月, 2021 2 次提交
-
-
由 Matti Vaittinen 提交于
Quite a few regulator ICs do support setting ramp-delay by writing a value matching the delay to a ramp-delay register. Provide a simple helper for table-based delay setting. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/f101f1db564cf32cb58719c77af0b00d7236bb89.1617020713.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Matti Vaittinen 提交于
Some drivers need to translate voltage values to selectors prior regulator registration. Currently a regulator_desc based list_voltages helper is only exported for regulators using the linear_ranges. Export similar helper also for regulators using simple linear mapping. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/1200ef7a50c84327ada019b85f6527b4fc9b5ce1.1617020713.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 02 4月, 2021 3 次提交
-
-
由 Mauro Carvalho Chehab 提交于
This driver is ready for mainstream. Move it out of staging. Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org> Acked-by: NMark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/815b79a4e93f133478d9a5b2dd429526dcfe1dde.1616695231.git.mchehab+huawei@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 satya priya 提交于
Add support for PM7325/PMR735A regulators. This ensures that consumers are able to modify the physical state of PMIC regulators. Signed-off-by: Nsatya priya <skakit@codeaurora.org> Reviewed-by: NMatthias Kaehlcke <mka@chromium.org> Link: https://lore.kernel.org/r/1617192339-3760-3-git-send-email-skakit@codeaurora.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 satya priya 提交于
Add pmic5_ftsmps520 buck as this is required for PM7325 and PMR735A PMICs. Signed-off-by: Nsatya priya <skakit@codeaurora.org> Reviewed-by: NMatthias Kaehlcke <mka@chromium.org> Link: https://lore.kernel.org/r/1617192339-3760-2-git-send-email-skakit@codeaurora.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 30 3月, 2021 1 次提交
-
-
由 Cristian Marussi 提交于
Port the scmi regulator driver to the new SCMI voltage interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/20210316124903.35011-30-cristian.marussi@arm.com Cc: Mark Brown <broonie@kernel.org> Tested-by: NFlorian Fainelli <f.fainelli@gmail.com> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 25 3月, 2021 1 次提交
-
-
由 Jian Dong 提交于
fixes coccicheck warning: drivers/regulator/mt6360-regulator.c:384:3-10: line 384 is redundant because platform_get_irq() already prints an error in fact it is not platform_get_irq but platform_get_irq_byname print error Signed-off-by: NJian Dong <dongjian@yulong.com> Link: https://lore.kernel.org/r/1616555474-158789-1-git-send-email-dj0227@163.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 23 3月, 2021 1 次提交
-
-
由 Matti Vaittinen 提交于
Few drivers implement remove call-back only for ensuring a delayed work gets cancelled prior driver removal. Clean-up these by switching to use devm_delayed_work_autocancel() instead. Additionally, this helps avoiding mixing devm and manual resource management and cleans up a (theoretical?) bug where devm managed over-current IRQ might schedule a new work item after wq was cleaned at remove(). This change is compile-tested only. All testing is appreciated. Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/3bd35bb43257f4bf5b99f75d207ed5e1e08d1d38.1616506559.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 15 3月, 2021 4 次提交
-
-
由 Dan Carpenter 提交于
The probe() function returns an uninitialized variable in the success path. There is no need for the "err" variable at all, just delete it. Fixes: b014e9fa ("regulator: Support ROHM BD9576MUF and BD9573MUF") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/YEsbfLJfEWtnRpoU@mwandaSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Geert Uytterhoeven 提交于
Convert the "backup_mode" device attribute from sprintf() to sysfs_emit(), as the latter is aware of the PAGE_SIZE buffer. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20210312130242.3390038-4-geert+renesas@glider.beSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Geert Uytterhoeven 提交于
If a regulator fails to register, the driver prints an error message like: bd9571mwv-regulator bd9571mwv-regulator.6.auto: failed to register bd9571mwv-regulator regulator However, the platform device's name is already printed as part of dev_err(), and does not allow the user to distinguish among the various regulators that are part of the PMIC. Fix this by printing regulator_desc.name instead, to change the message like: bd9571mwv-regulator bd9571mwv-regulator.6.auto: failed to register DVFS regulator Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/20210312130242.3390038-3-geert+renesas@glider.beSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Geert Uytterhoeven 提交于
According to Table 30 ("DVFS_MoniVDAC [6:0] Setting Table") in the BD9571MWV-M Datasheet Rev. 002, the valid voltage range is 600..1100 mV (settings 0x3c..0x6e). While the lower limit is taken into account (by setting regulator_desc.linear_min_sel to 0x3c), the upper limit is not. Fix this by reducing regulator_desc.n_voltages from 0x80 to 0x6f. Fixes: e85c5a15 ("regulator: Add ROHM BD9571MWV-M PMIC regulator driver") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20210312130242.3390038-2-geert+renesas@glider.beSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 11 3月, 2021 1 次提交
-
-
由 Axel Lin 提交于
The valid selector is 0 ~ 0xbf, so the .n_voltages should be 0xc0. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210311020558.579597-1-axel.lin@ingics.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 10 3月, 2021 9 次提交
-
-
由 Yang Li 提交于
In one of the error paths of the for_each_child_of_node() loop, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/regulator/scmi-regulator.c:343:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 347. Reported-by: NAbaci Robot <abaci@linux.alibaba.com> Signed-off-by: NYang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/1614303575-27436-1-git-send-email-yang.lee@linux.alibaba.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Axel Lin 提交于
The voltages in pf8x00_sw7_voltages are in ascendant order, so use regulator_map_voltage_ascend. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NJagan Teki <jagan@amarulasolutions.com> Reviewed-by: NAdrien Grassein <adrien.grassein@gmail.com> Link: https://lore.kernel.org/r/20210216060128.126938-1-axel.lin@ingics.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
The ULT LV_P50 shares the same configuration as the other ULT LV_Pxxx and the ULT P300 shares the same as the other ULT Pxxx. These two regulator types are found on PM8950 and its variants. Signed-off-by: NAngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> Signed-off-by: NKonrad Dybcio <konrad.dybcio@somainline.org> Link: https://lore.kernel.org/r/20210225213514.117031-1-konrad.dybcio@somainline.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Wei Yongjun 提交于
In case of error, the function dev_get_regmap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 9351ab8b ("regulator: rt4831: Adds support for Richtek RT4831 DSV regulator") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20210305034930.3236099-1-weiyongjun1@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Frieder Schrempf 提交于
The driver uses the DVS registers PCA9450_REG_BUCKxOUT_DVS0 to set the voltage for the buck regulators 1, 2 and 3. This has no effect as the PRESET_EN bit is set by default and therefore the preset values are used instead, which are set to 850 mV. To fix this we clear the PRESET_EN bit at time of initialization. Fixes: 0935ff5f ("regulator: pca9450: add pca9450 pmic driver") Cc: <stable@vger.kernel.org> Signed-off-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Link: https://lore.kernel.org/r/20210222115229.166620-1-frieder.schrempf@kontron.deSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 satya priya 提交于
Use correct buck, that is, pmic5_hfsmps515 for S1C regulator of PM8350C PMIC. Signed-off-by: Nsatya priya <skakit@codeaurora.org> Link: https://lore.kernel.org/r/1614155592-14060-7-git-send-email-skakit@codeaurora.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 satya priya 提交于
Correct the REGULATOR_LINEAR_RANGE and n_voltges for pmic5_hfsmps515 buck. Signed-off-by: Nsatya priya <skakit@codeaurora.org> Link: https://lore.kernel.org/r/1614155592-14060-4-git-send-email-skakit@codeaurora.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Frieder Schrempf 提交于
This fixes the return value of pca9450_i2c_probe() to use the correct error code when getting the sd-vsel GPIO fails. Signed-off-by: NFrieder Schrempf <frieder.schrempf@kontron.de> Link: https://lore.kernel.org/r/20210222150809.208942-1-frieder.schrempf@kontron.deSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 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/20210215034813.45510-1-axel.lin@ingics.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 25 2月, 2021 2 次提交
-
-
由 satya priya 提交于
Use correct buck, that is, pmic5_hfsmps515 for S1C regulator of PM8350C PMIC. Signed-off-by: Nsatya priya <skakit@codeaurora.org> Link: https://lore.kernel.org/r/1614155592-14060-7-git-send-email-skakit@codeaurora.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 satya priya 提交于
Correct the REGULATOR_LINEAR_RANGE and n_voltges for pmic5_hfsmps515 buck. Signed-off-by: Nsatya priya <skakit@codeaurora.org> Link: https://lore.kernel.org/r/1614155592-14060-4-git-send-email-skakit@codeaurora.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-