summaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)AuthorFilesLines
2020-03-06Merge tag 'regulator-fix-v5.6-rc4' of ↵Linus Torvalds1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A couple of small fixes, one for a minor issue in the stm32-vrefbuf driver and a documentation fix in the Qualcomm code" * tag 'regulator-fix-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: stm32-vrefbuf: fix a possible overshoot when re-enabling regulator: qcom_spmi: Fix docs for PM8004
2020-03-04regulator: Use driver_deferred_probe_timeout for regulator_init_complete_workJohn Stultz1-11/+14
The regulator_init_complete_work logic defers the cleanup for an arbitrary 30 seconds of time to allow modules loaded by userland to start. This arbitrary timeout is similar to the driver_deferred_probe_timeout value, and its been suggested we align these so users have a method to extend the timeouts as needed. So this patch changes the logic to use the driver_deferred_probe_timeout value for the delay value if it is set (using a delay of 0 if it is not). Cc: linux-pm@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Thierry Reding <treding@nvidia.com> Cc: Mark Brown <broonie@kernel.org> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Saravana Kannan <saravanak@google.com> Cc: Todd Kjos <tkjos@google.com> Cc: Len Brown <len.brown@intel.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Kevin Hilman <khilman@kernel.org> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Rob Herring <robh@kernel.org> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Link: https://lore.kernel.org/r/20200225050828.56458-7-john.stultz@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04regulator: stm32-vrefbuf: fix a possible overshoot when re-enablingFabrice Gasnier1-1/+2
There maybe an overshoot, when disabling, then re-enabling vrefbuf too quickly. VREFBUF is used by ADC/DAC on some boards. When re-enabling too quickly, an overshoot on the reference voltage make the conversions inaccurate for a short period of time. - Don't put the VREFBUF in HiZ when disabling, to force an active discharge. - Enforce a 1ms OFF/ON delay Fixes: 0cdbf481e927 ("regulator: Add support for stm32-vrefbuf") Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Message-Id: <1583312132-20932-1-git-send-email-fabrice.gasnier@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-03regulator: anatop: Lower error message level for -EPROBE_DEFERAnson Huang1-3/+7
devm_regulator_register() could return -EPROBE_DEFER when trying to get init data and NOT all resources are available at that time, for this case, error message is better to be present for debug level ONLY. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Link: https://lore.kernel.org/r/1583243052-1930-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02regulator: pwm: Don't warn on probe deferralJon Hunter1-1/+5
Deferred probe is an expected return value for devm_pwm_get(). Given that the driver deals with it properly, rather than warn on probe deferral, only output a message on probe deferral if debug level prints are enabled. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Link: https://lore.kernel.org/r/20200302141428.14119-1-jonathanh@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02regulator: anatop: Improve Kconfig dependencyAnson Huang1-0/+1
ANATOP regulator should depend on ARCH_MXC or COMPILE_TEST. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Link: https://lore.kernel.org/r/1583150118-8014-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-26regulator: add smb208 supportAnsuel Smith1-0/+9
Smb208 regulators are used on some ipq806x soc. Add support for it to make it avaiable on some routers that use it. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> Signed-off-by: Adrian Panella <ianchi74@outlook.com> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200219163711.479-1-ansuelsmth@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-24regulator: axp20x: Fix misleading use of negationOndrej Jirman1-4/+2
It works incidentally, because AXP20X_DCDC2_LDO3_V_RAMP_DCDC2_EN is non-zero, but the false branch value really should be just 0. Signed-off-by: Ondrej Jirman <megous@megous.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20200222235634.243805-1-megous@megous.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-17regulator: mp5416: Fix output discharge enable bit for LDOsAxel Lin1-7/+7
The .active_discharge_on/.active_discharge_mask settings does not match the datasheet, fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200212150223.20042-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-13regulator: da9062: Replace zero-length array with flexible-array memberGustavo A. R. Silva1-1/+1
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertenly introduced[3] to the codebase from now on. This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Link: https://lore.kernel.org/r/20200211234612.GA28682@embeddedor Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-13regulator: da9063: Replace zero-length array with flexible-array memberGustavo A. R. Silva1-1/+1
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertenly introduced[3] to the codebase from now on. This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Link: https://lore.kernel.org/r/20200211234710.GA29532@embeddedor Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-11regulator: mp5416: add mp5416 regulator driverSaravanan Sekar3-0/+256
Adding regulator driver for the device mp5416. The MP5416 PMIC device contains four DC-DC buck converters and five regulators, accessed over I2C. Signed-off-by: Saravanan Sekar <sravanhome@gmail.com> Link: https://lore.kernel.org/r/20200204110419.25933-3-sravanhome@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-11regulator: da9063: remove redundant return statementRishi Gupta1-4/+2
The devm_request_threaded_irq() already returns 0 on success and negative error code on failure. So return from this itself can be used while preserving error log in case of failure. Signed-off-by: Rishi Gupta <gupt21@gmail.com> Link: https://lore.kernel.org/r/1580996996-28798-1-git-send-email-gupt21@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-11regulator: da9063: fix code formatting warnings and errorsRishi Gupta1-24/+34
This commit fixes following errors & warnings in this driver as reported by checkpatch.pl: - WARNING: Prefer 'unsigned int' to bare use of 'unsigned' - WARNING: line over 80 characters - ERROR: space prohibited before that ',' (ctx:WxW) - ERROR: code indent should use tabs where possible - WARNING: Block comments use * on subsequent lines Signed-off-by: Rishi Gupta <gupt21@gmail.com> Link: https://lore.kernel.org/r/1580996917-28494-1-git-send-email-gupt21@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-11regulator: mp8859: add supply entryMarkus Reichl1-0/+1
Add vin_supply to the regulator description to support a nice regulator tree. Signed-off-by: Markus Reichl <m.reichl@fivetechno.de> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20200203110034.1448-1-m.reichl@fivetechno.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-03Merge tag 'mfd-next-5.6' of ↵Linus Torvalds4-129/+165
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Add support for ROHM BD71828 PMICs and GPIOs - Add support for Qualcomm Aqstic Audio Codecs WCD9340 and WCD9341 New Device Support: - Add support for BD71828 to BD70528 RTC driver - Add support for Intel's Jasper Lake to LPSS PCI New Functionality: - Add support for Power Key to ROHM BD71828 - Add support for Clocks to ROHM BD71828 - Add support for GPIOs to Dialog DA9062 - Add support for USB PD Notify to ChromiumOS EC - Allow callers to specify args when requesting regmap lookup; syscon Fix-ups: - Improve error handling and sanity checking; atmel-hlcdc, dln2 - Device Tree support/documentation; bd71828, da9062, xylon,logicvc, ab8500, max14577, atmel-usart - Match devices using platform IDs; bd7xxxx - Refactor BD718x7 regulator component; bd718x7-regulator - Use standard interfaces/helpers; syscon, sm501 - Trivial (whitespace, spelling, etc); ab8500-core, Kconfig - Remove unused code; db8500-prcmu, tqmx86 - Wait until boot has finished before accessing registers; madera-core - Provide missing register value defaults; cs47l15-tables - Allow more time for hardware to reset; madera-core Bug Fixes: - Fix erroneous register values; rohm-bd70528 - Fix register volatility; axp20x, rn5t618 - Fix Kconfig dependencies; MFD_MAX77650 - Fix incorrect compatible string; da9062-core - Fix syscon_regmap_lookup_by_phandle_args() stub; syscon" * tag 'mfd-next-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (41 commits) mfd: syscon: Fix syscon_regmap_lookup_by_phandle_args() dummy mfd: wcd934x: Add support to wcd9340/wcd9341 codec mfd: syscon: Add arguments support for syscon reference mfd: rn5t618: Mark ADC control register volatile dt-bindings: atmel-usart: Add microchip,sam9x60-{usart, dbgu} dt-bindings: atmel-usart: Remove wildcard mfd: cros_ec: Add cros-usbpd-notify subdevice mfd: da9062: Fix watchdog compatible string mfd: madera: Allow more time for hardware reset mfd: cs47l15: Add missing register default mfd: madera: Wait for boot done before accessing any other registers mfd: Kconfig: Rename Samsung to lowercase mfd: tqmx86: remove set but not used variable 'i2c_ien' mfd: dbx500-prcmu: Drop DSI pll clock functions mfd: dbx500-prcmu: Drop set_display_clocks() mfd: max77650: Select REGMAP_IRQ in Kconfig mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile mfd: ab8500: Fix ab8500-clk typo mfd: intel-lpss: Add Intel Jasper Lake PCI IDs dt-bindings: mfd: max14577: Add reference to max14040_battery.txt descriptions ...
2020-01-28Merge tag 'ioremap-5.6' of git://git.infradead.org/users/hch/ioremapLinus Torvalds1-2/+2
Pull ioremap updates from Christoph Hellwig: "Remove the ioremap_nocache API (plus wrappers) that are always identical to ioremap" * tag 'ioremap-5.6' of git://git.infradead.org/users/hch/ioremap: remove ioremap_nocache and devm_ioremap_nocache MIPS: define ioremap_nocache to ioremap
2020-01-24regulator: bd718x7: Split driver to common and bd718x7 specific partsMatti Vaittinen4-128/+155
Few ROHM PMICs allow setting the voltage states for different system states like RUN, IDLE, SUSPEND and LPSR. States are then changed via SoC specific mechanisms. bd718x7 driver implemented device-tree parsing functions for these state specific voltages. The parsing functions can be re-used by other ROHM chip drivers like bd71828. Split the generic functions from bd718x7-regulator.c to rohm-regulator.c and export them for other modules to use. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-01-24mfd: Rohm PMICs: Use platform_device_id to match MFD sub-devicesMatti Vaittinen1-4/+13
Thanks to Stephen Boyd I today learned we can use platform_device_id to do device and module matching for MFD sub-devices! Do device matching using the platform_device_id instead of using explicit module_aliases to load modules and custom parent-data field to do module loading and sub-device matching. Cc: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-01-23Merge remote-tracking branch 'regulator/topic/equal' into regulator-nextMark Brown1-0/+14
2020-01-23Merge branch 'regulator-5.6' into regulator-nextMark Brown24-60/+1549
2020-01-23Merge branch 'regulator-5.5' into regulator-linusMark Brown2-15/+25
2020-01-20regulator: core: Fix exported symbols to the exported GPL versionEnric Balletbo i Serra1-2/+2
Change the exported symbols introduced by commit e9153311491da ("regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage") from EXPORT_SYMBOL() to EXPORT_SYMBOL_GPL(), like is used for all the core parts. Fixes: e9153311491da ("regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage") Reported-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20200120123921.1204339-1-enric.balletbo@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-17regulator: mpq7920: Fix incorrect definesAxel Lin1-3/+2
Fix defines for MPQ7920_MASK_BUCK_ILIM and MPQ7920_DISCHARGE_ON Remove unused MPQ7920_REG_REGULATOR_EN1. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200115002953.14731-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-17regulator: vqmmc-ipq4019: Fix platform_no_drv_owner.cocci warningsYueHaibing1-1/+0
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20200116023344.163592-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-17regulator: vctrl-regulator: Avoid deadlock getting and setting the voltageEnric Balletbo i Serra2-15/+25
`cat /sys/kernel/debug/regulator/regulator_summary` ends on a deadlock when you have a voltage controlled regulator (vctrl). The problem is that the vctrl_get_voltage() and vctrl_set_voltage() calls the regulator_get_voltage() and regulator_set_voltage() and that will try to lock again the dependent regulators (the regulator supplying the control voltage). Fix the issue by exporting the unlocked version of the regulator_get_voltage() and regulator_set_voltage() API so drivers that need it, like the voltage controlled regulator driver can use it. Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Reported-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20200116094543.2847321-1-enric.balletbo@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14regulator: core: Add regulator_is_equal() helperMarek Vasut1-0/+14
Add regulator_is_equal() helper to compare whether two regulators are the same. This is useful for checking whether two separate regulators in a driver are actually the same supply. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Igor Opaniuk <igor.opaniuk@toradex.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com> Cc: Mark Brown <broonie@kernel.org> Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Link: https://lore.kernel.org/r/20191220164450.1395038-1-marex@denx.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14regulator: mpq7920: Convert to use .probe_newAxel Lin1-3/+2
Use the new .probe_new instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200114124449.28408-2-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14regulator: mpq7920: Remove unneeded fields from struct mpq7920_regulator_infoAxel Lin1-28/+13
Both *dev and *rdev are only used in .probe, so use local variable instead. Also remove mpq7920_regulator_register() because it is so trivial and there is only one caller. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200114124449.28408-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14regulator: vqmmc-ipq4019: Trivial clean upAxel Lin1-3/+4
A few trivial clean up: * Make ipq4019_regulator_voltage_ops and vmmc_regulator const * Make ipq4019_vmmcq_regmap_config static * Use regulator_map_voltage_ascend Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200114065847.31667-2-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14regulator: vqmmc-ipq4019: Remove ipq4019_regulator_removeAxel Lin1-10/+0
This driver is using devm_regulator_register() so no need to call regulator_unregister() in ipq4019_regulator_remove(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200114065847.31667-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13regulator: bd718x7: Simplify the code by removing struct bd718xx_pmic_initsAxel Lin1-20/+14
Nowdays ROHM_CHIP_TYPE_AMOUNT includes not only BD71837/BD71847 but also BD70528/BD71828 which are not supported by this driver. So it seems not necessay to have pmic_regulators[ROHM_CHIP_TYPE_AMOUNT] as mapping table. Simplify the code by removing struct bd718xx_pmic_inits and pmic_regulators[ROHM_CHIP_TYPE_AMOUNT]. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200108014256.11282-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13regulator: add IPQ4019 SDHCI VQMMC LDO driverRobert Marko3-0/+119
This introduces the IPQ4019 VQMMC LDO driver needed for the SD/EMMC driver I/O level operation. This will enable introducing SD/EMMC support for the built-in controller. Signed-off-by: Mantas Pucka <mantas@8devices.com> Signed-off-by: Robert Marko <robert.marko@sartura.hr> Link: https://lore.kernel.org/r/20200112113003.11110-1-robert.marko@sartura.hr Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13regulator: Convert i2c drivers to use .probe_newAxel Lin12-36/+24
Use the new .probe_new for i2c drivers. These drivers do not use const struct i2c_device_id * argument, so convert them to utilise the simplified i2c driver registration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200109155808.22003-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13regulator: mpq7920: Check the correct variable in mpq7920_regulator_register()Dan Carpenter1-2/+2
There is a typo in the error checking. We should be checking "->rdev[i]" instead of just "->rdev". Fixes: 6501c1f54a17 ("regulator: mpq7920: add mpq7920 regulator driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20200113125805.xri6jqoxy2ldzqyg@kili.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-10regulator: mpq7920: Fix Woverflow warning on conversionSaravanan Sekar2-1/+3
Fix warning Woverflow on type conversion reported on x86. Fixes: 6501c1f54a17 (regulator: mpq7920: add mpq7920 regulator driver) Signed-off-by: Saravanan Sekar <sravanhome@gmail.com> Link: https://lore.kernel.org/r/20200110102220.7163-1-sravanhome@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-10regulator: mp8859: tidy up white space in probeDan Carpenter1-2/+2
These two lines are indented an extra tab. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20200110055252.rvelu4ysvoxsbmlg@kili.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-10regulator: mpq7920: add mpq7920 regulator driverSaravanan Sekar4-0/+425
Adding regulator driver for the device mpq7920. The MPQ7920 PMIC device contains four DC-DC buck converters and five regulators, is designed for automotive and accessed over I2C. Fixed sparse warning reported on this patch Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Saravanan Sekar <sravanhome@gmail.com> Link: https://lore.kernel.org/r/20200109195346.30270-1-sravanhome@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-08regulator: mp8859: add config option and build entryMarkus Reichl2-0/+12
Add entries for the mp8859 regulator driver to the build system. Signed-off-by: Markus Reichl <m.reichl@fivetechno.de> Link: https://lore.kernel.org/r/20200106211633.2882-3-m.reichl@fivetechno.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-08regulator: mp8859: add driverMarkus Reichl1-0/+156
The MP8859 from Monolithic Power Systems is a single output DC/DC converter. The voltage can be controlled via I2C. Signed-off-by: Markus Reichl <m.reichl@fivetechno.de> Link: https://lore.kernel.org/r/20200106211633.2882-2-m.reichl@fivetechno.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-06regulator: samsung: Rename Samsung to lowercaseKrzysztof Kozlowski3-3/+3
Fix up inconsistent usage of upper and lowercase letters in "Samsung" name. "SAMSUNG" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200103171131.9900-20-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-06Merge tag 'regulator-fix-v5.5-rc5' of ↵Linus Torvalds2-5/+7
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "Three small fixes here, two the result of Axel Lin's amazing work tracking down inconsistencies in drivers" * tag 'regulator-fix-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: bd70528: Remove .set_ramp_delay for bd70528_ldo_ops regulator: axp20x: Fix axp20x_set_ramp_delay regulator: axp20x: Fix AXP22x ELDO2 regulator enable bitmask
2020-01-06remove ioremap_nocache and devm_ioremap_nocacheChristoph Hellwig1-2/+2
ioremap has provided non-cached semantics by default since the Linux 2.6 days, so remove the additional ioremap_nocache interface. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
2020-01-03regulator: bd70528: Remove .set_ramp_delay for bd70528_ldo_opsAxel Lin1-1/+0
The .set_ramp_delay should be for bd70528_buck_ops only. Setting .set_ramp_delay for for bd70528_ldo_ops causes problem because BD70528_MASK_BUCK_RAMP (0x10) overlaps with BD70528_MASK_LDO_VOLT (0x1f). So setting ramp_delay for LDOs may change the voltage output, fix it. Fixes: 99ea37bd1e7d ("regulator: bd70528: Support ROHM BD70528 regulator block") Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/20200101022406.15176-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-25regulator: axp20x: Fix axp20x_set_ramp_delayAxel Lin1-3/+6
Current code set incorrect bits when set ramp_delay for AXP20X_DCDC2, fix it. Fixes: d29f54df8b16 ("regulator: axp20x: add support for set_ramp_delay for AXP209") Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20191221081049.32490-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-20regulator: bd71828: remove get_voltage operationMatti Vaittinen1-6/+1
Simplify LDO6 voltage getting on BD71828 by removing the get_voltage call-back and providing the fixed voltage in regulator_desc instead Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Suggested-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20191219113444.GA28299@localhost.localdomain Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-18regulator: axp20x: Fix AXP22x ELDO2 regulator enable bitmaskChen-Yu Tsai1-1/+1
A copy-paste error was introduced when bitmasks were converted to macros, incorrectly setting the enable bitmask for ELDO2 to the one for ELDO1 for the AXP22x units. Fix it by using the correct macro. On affected boards, ELDO1 and/or ELDO2 are used to power the camera, which is currently unsupported. Fixes: db4a555f7c4c ("regulator: axp20x: use defines for masks") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20191218044720.21990-1-wens@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-18Merge tag 'regulator-fix-v5.5-rc2' of ↵Linus Torvalds4-5/+21
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A small set of fixes for mostly minor issues here, the only real code ones are Wen Yang's fixes for error handling in the core and Christian Marussi's list_voltage() change which is a fix for disruptively bad performance for regulators with continuous voltage control (which are rare)" * tag 'regulator-fix-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: rn5t618: fix module aliases regulator: max77650: add of_match table regulator: core: avoid unneeded .list_voltage calls regulator: s5m8767: Fix a warning message regulator: core: fix regulator_register() error paths to properly release rdev regulator: fix use after free issue
2019-12-17regulator: bd71828: Basic support for ROHM bd71828 PMIC regulatorsMatti Vaittinen3-0/+825
ROHM BD71828 is a power management IC containing 7 bucks and 7 LDOs. Bucks 1,2,6 and 7 can be assigned to a regulator group controlled by run-levels. Eg. Voltages and enable/disable statuses for specific run-levels (run0 to run3) can be set via register interface and run level changes can then be done either via I2C or GPIO. This initial commit does not support assigning bucks to be controlled via run-levels but only allows them to be individually controlled. LDO5 voltage can also be controlled by GPIO2 pin and register interfaces but this driver only supports the control via register. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/5b1c4a22c7945e97ff2a7924abfeb3239043f8eb.1576054779.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-16regulator: rn5t618: fix module aliasesAndreas Kemnade1-0/+1
platform device aliases were missing, preventing autoloading of module. Fixes: 811b700630ff ("regulator: rn5t618: add driver for Ricoh RN5T618 regulators") Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://lore.kernel.org/r/20191211221600.29438-1-andreas@kemnade.info Signed-off-by: Mark Brown <broonie@kernel.org>