summaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)AuthorFilesLines
2024-05-23Merge tag 'regulator-fix-v6.10-merge-window' of ↵Linus Torvalds5-77/+45
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A bunch of fixes that came in during the merge window. Matti found several issues with some of the more complexly configured Rohm regulators and the helpers they use and there were some errors in the specification of tps6594 when regulators are grouped together" * tag 'regulator-fix-v6.10-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: tps6594-regulator: Correct multi-phase configuration regulator: tps6287x: Force writing VSEL bit regulator: pickable ranges: don't always cache vsel regulator: rohm-regulator: warn if unsupported voltage is set regulator: bd71828: Don't overwrite runtime voltages
2024-05-22Merge tag 'mfd-next-6.10' of ↵Linus Torvalds3-74/+482
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Device Support: - Add support for X-Powers AXP717 PMIC to AXP22X - Add support for Rockchip RK816 PMIC to RK8XX - Add support for TI TPS65224 PMIC to TPS6594 New Functionality: - Add Power Off functionality to Rohm BD71828 - Allow I2C SMBus access in Renesas RSMU Fix-ups: - Device Tree binding adaptions/conversions/creation - Shift Intel support over to MSI interrupts - Generify adding platform data away from being ACPI specific - Use device core supplied attribute to register sysfs entries - Replace hand-rolled functionality with generic APIs - Utilise centrally provided helpers and macros - Clean-up error handling - Remove superfluous/duplicated/unused sections - Trivial; spelling, whitespace, coding-style adaptions - More Maple Tree conversions" * tag 'mfd-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (44 commits) dt-bindings: mfd: Use full path to other schemas mfd: rsmu: support I2C SMBus access dt-bindings: mfd: Convert lp873x.txt to json-schema dt-bindings: mfd: aspeed: Drop 'oneOf' for pinctrl node dt-bindings: mfd: allwinner,sun6i-a31-prcm: Use hyphens in node names mfd: ssbi: Remove unused field 'slave' from 'struct ssbi' mfd: kempld: Remove custom DMI matching code mfd: cs42l43: Update patching revision check dt-bindings: mfd: qcom: pm8xxx: Add pm8901 compatible mfd: timberdale: Remove redundant assignment to variable err dt-bindings: mfd: qcom,spmi-pmic: Add pbs to SPMI device types dt-bindings: mfd: syscon: Add ti,am62p-cpsw-mac-efuse compatible dt-bindings: mfd: qcom,tcsr: Add compatible for SDX75 mfd: axp20x: Convert to use Maple Tree register cache mfd: bd71828: Remove commented code lines mfd: intel-m10-bmc: Change staging size to a variable dt-bindings: mfd: Add ROHM BD71879 mfd: Tidy Kconfig dependency's parentheses mfd: ocelot-spi: Use spi_sync_transfer() dt-bindings: mfd: syscon: Add missing simple syscon compatibles ...
2024-05-21regulator: tps6594-regulator: Correct multi-phase configurationNeha Malcom Francis1-8/+8
According to the TPS6594 PMIC Manual (linked) 8.3.2.1.4 Multi-Phase BUCK Regulator Configurations section, the PMIC ignores all the other bucks' except the primary buck's regulator registers. This is BUCK1 for configurations BUCK12, BUCK123 and BUCK1234 while it is BUCK3 for BUCK34. Correct the registers mapped for these configurations accordingly. Fixes: f17ccc5deb4d ("regulator: tps6594-regulator: Add driver for TI TPS6594 regulators") Link: https://www.ti.com/lit/gpn/tps6594-q1 Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Link: https://msgid.link/r/20240521094758.2190331-1-n-francis@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-20regulator: tps6287x: Force writing VSEL bitMatti Vaittinen1-0/+1
The data-sheet for TPS6287x-Q1 https://www.ti.com/lit/ds/symlink/tps62873-q1.pdf states at chapter 9.3.6.1 Output Voltage Range: "Note that every change to the VRANGE[1:0] bits must be followed by a write to the VSET register, even if the value of the VSET[7:0] bits does not change." The current implementation of the driver uses the regulator_set_voltage_sel_pickable_regmap() helper which further uses regmap_update_bits() to write the VSET-register. The regmap_update_bits() will not access the hardware if the new register value is same as old. It is worth noting that this is true also when the register is marked volatile, which I can't say is wrong because 'read-mnodify-write'-cycle with a volatile register is in any case something user should carefully consider. The 'range_applied_by_vsel'-flag in regulator desc was added to force the vsel register upodates by using regmap_write_bits(). This variant will always unconditionally write the bits to the hardware. It is worth noting that the vsel is now forced to be written to the hardware, whether the range was changed or not. This may cause a performance drop if users are wrtiting same voltage value repeteadly. It would be possible to read the range register to determine if it was changed, but this would be a performance issue for users who don't use reg cache for vsel. Always write the VSET register to the hardware regardless the cache. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Fixes: 7b0518fbf2be ("regulator: Add support for TI TPS6287x regulators") Link: https://msgid.link/r/ZktD50C5twF1EuKu@fedora Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-20regulator: pickable ranges: don't always cache vselMatti Vaittinen1-13/+30
Some PMICs treat the vsel_reg same as apply-bit. Eg, when voltage range is changed, the new voltage setting is not taking effect until the vsel register is written. Add a flag 'range_applied_by_vsel' to the regulator desc to indicate this behaviour and to force the vsel value to be written to hardware if range was changed, even if the old selector was same as the new one. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://msgid.link/r/ZktCpcGZdgHWuN_L@fedora Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-16regulator: rohm-regulator: warn if unsupported voltage is setMatti Vaittinen1-0/+4
A few of the ROHM PMICs allow setting low-power state specific voltages for regulators. These voltages are then taken in use (by the hardware) when the PMIC state is changed. The voltages for these states can be given via device-tree. If unsupported voltage has been given, the users have only seen print: "driver callback failed to parse DT for regulator <name>". This does help to pinpoint the problem to some extent, but there may be several properties in device-tree so it should help if we can be a bit more specific. Print the voltage value and the run-state property if voltage can not be supported. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://msgid.link/r/0937411855967cbefd9ff2d6045a52ca26712c4a.1715848512.git.mazziesaccount@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-16regulator: bd71828: Don't overwrite runtime voltagesMatti Vaittinen1-56/+2
Some of the regulators on the BD71828 have common voltage setting for RUN/SUSPEND/IDLE/LPSR states. The enable control can be set for each state though. The driver allows setting the voltage values for these states via device-tree. As a side effect, setting the voltages for SUSPEND/IDLE/LPSR will also change the RUN level voltage which is not desired and can break the system. The comment in code reflects this behaviour, but it is likely to not make people any happier. The right thing to do is to allow setting the enable/disable state at SUSPEND/IDLE/LPSR via device-tree, but to disallow setting state specific voltages for those regulators. BUCK1 is a bit different. It only shares the SUSPEND and LPSR state voltages. The former behaviour of allowing to silently overwrite the SUSPEND state voltage by LPSR state voltage is also changed here so that the SUSPEND voltage is prioritized over LPSR voltage. Prevent setting PMIC state specific voltages for regulators which do not support it. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Fixes: 522498f8cb8c ("regulator: bd71828: Basic support for ROHM bd71828 PMIC regulators") Link: https://msgid.link/r/e1883ae1e3ae5668f1030455d4750923561f3d68.1715848512.git.mazziesaccount@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-15Merge tag 'regulator-v6.10' of ↵Linus Torvalds20-62/+583
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "There's one API update here, a new API factoring out a common pattern for reference voltage supplies. These are supplies used as a reference by analogue circuits where the consumer requests and enables the supply, reads the voltage to calibrate the user and then never touches it again. This is factored out into a single operation which just returns the voltage and uses devm_ to manage the request and enable portion. Otherwise this has been a very quiet release, we've got some new device support, some small fixes, housekeeping and cleanup work but nothing substantial. There's also some non-regulator changes in here, a number of users for the new reference voltage API were merged along with it and some MFD changes were pulled in as dependencies for new driver work. Highlights: - Add a new API for single operation handling of reference voltages - Support for Allwinner AXP717 and D1, and NXP PCA9561A" * tag 'regulator-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (33 commits) regulator: sun20i: Add Allwinner D1 LDOs driver regulator: dt-bindings: Add Allwinner D1 system LDOs regulator: Mention regulator id in error message about dummy supplies staging: iio: impedance-analyzer: ad5933: Use devm_regulator_get_enable_read_voltage() iio: frequency: admv1013: Use devm_regulator_get_enable_read_voltage() iio: addac: ad74115: Use devm_regulator_get_enable_read_voltage() hwmon: (adc128d818) simplify final return in probe regulator: devres: fix devm_regulator_get_enable_read_voltage() return hwmon: (da9052) Use devm_regulator_get_enable_read_voltage() hwmon: (adc128d818) Use devm_regulator_get_enable_read_voltage() regulator: devres: add API for reference voltage supplies regulator: rtq2208: Fix LDO discharge register and add vsel setting regulator: dt-bindings: fixed-regulator: Add a preferred node name regulator: axp20x: add support for the AXP717 mfd: axp20x: Add support for AXP717 PMIC dt-bindings: mfd: x-powers,axp152: Document AXP717 regulator: axp20x: fix typo-ed identifier dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible regulator: pca9450: add pca9451a support regulator: dt-bindings: pca9450: add pca9451a support ...
2024-05-10Merge branches 'ib-mfd-misc-pinctrl-regulator-6.10', ↵Lee Jones2-9/+303
'ib-mfd-pinctrl-regulator-6.10' and 'ib-mfd-regulator-6.10' into ibs-for-mfd-merged
2024-05-09regulator: sun20i: Add Allwinner D1 LDOs driverSamuel Holland3-0/+166
D1 contains two pairs of LDOs, "analog" LDOs and "system" LDOs. They are similar and can share a driver, but only the system LDOs have a DT binding defined so far. The system LDOs have a single linear range. The voltage step is not an integer, so a custom .list_voltage is needed to get the rounding right. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20240509153107.438220-3-wens@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-09regulator: core: fix debugfs creation regressionJohan Hovold1-11/+16
regulator_get() may sometimes be called more than once for the same consumer device, something which before commit dbe954d8f163 ("regulator: core: Avoid debugfs: Directory ... already present! error") resulted in errors being logged. A couple of recent commits broke the handling of such cases so that attributes are now erroneously created in the debugfs root directory the second time a regulator is requested and the log is filled with errors like: debugfs: File 'uA_load' in directory '/' already present! debugfs: File 'min_uV' in directory '/' already present! debugfs: File 'max_uV' in directory '/' already present! debugfs: File 'constraint_flags' in directory '/' already present! on any further calls. Fixes: 2715bb11cfff ("regulator: core: Fix more error checking for debugfs_create_dir()") Fixes: 08880713ceec ("regulator: core: Streamline debugfs operations") Cc: stable@vger.kernel.org Cc: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20240509133304.8883-1-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07regulator: Mention regulator id in error message about dummy suppliesUwe Kleine-König1-2/+2
With the name that is currently looked up it is considerably easier to understand the issue and fix the warning. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20240507104703.2070117-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07regulator: devres: fix devm_regulator_get_enable_read_voltage() returnDavid Lechner1-1/+1
The devm_regulator_get_enable_read_voltage() function is supposed to return the voltage that the regulator is currently set to. However, it currently returns 0. Fixes: b250c20b6429 ("regulator: devres: add API for reference voltage supplies") Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://lore.kernel.org/r/20240506-regulator-devm_regulator_get_enable_read_voltage-fixes-v1-1-356cdd152067@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06regulator: new API for voltage reference suppliesMark Brown2-0/+66
Merge series from David Lechner <dlechner@baylibre.com>: In the IIO subsystem, we noticed a pattern in many drivers where we need to get, enable and get the voltage of a supply that provides a reference voltage. In these cases, we only need the voltage and not a handle to the regulator. Another common pattern is for chips to have an internal reference voltage that is used when an external reference is not available. There are also a few drivers outside of IIO that do the same. So we would like to propose a new regulator consumer API to handle these specific cases to avoid repeating the same boilerplate code in multiple drivers. As an example of how these functions are used, I have included a few patches to consumer drivers. But to avoid a giant patch bomb, I have omitted the iio/adc and iio/dac patches I have prepared from this series. I will send those separately but these will add 36 more users of devm_regulator_get_enable_read_voltage() in addition to the 6 here. In total, this will eliminate nearly 1000 lines of similar code and will simplify writing and reviewing new drivers in the future.
2024-05-03regulator: tps6594-regulator: Add TI TPS65224 PMIC regulatorsNirmala Devi Mal Nadar2-70/+268
Add support for TPS65224 regulators (bucks and LDOs) to TPS6594 driver as they have significant functional overlap. TPS65224 PMIC has 4 buck regulators and 3 LDOs. BUCK12 can operate in dual phase. The output voltages are configurable and are meant to supply power to the main processor and other components. Signed-off-by: Nirmala Devi Mal Nadar <m.nirmaladevi@ltts.com> Signed-off-by: Bhargav Raviprakash <bhargav.r@ltts.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/0109018f2fdcc305-3b817569-21b6-42a7-942c-8edbff3848f2-000000@ap-south-1.amazonses.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-03regulator: rk808: Add RK816 supportAlex Bee1-1/+201
Add support for rk816 to the existing rk808 regulator driver. The infrastructure of the driver can be re-used as is. A peculiarity for this version is, that BUCK1/BUCK2 have a (common) bit which needs to toggled after a voltage change to confirm the change. Regulator regmap takes care of that by defining a apply_bit and apply_reg for those regulators. Signed-off-by: Alex Bee <knaerzche@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20240416161237.2500037-6-knaerzche@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-03regulator: rk808: Support apply_bit for rk808_set_suspend_voltage_rangeAlex Bee1-3/+13
rk808_set_suspend_voltage_range currently does not account the existence of apply_bit/apply_reg. This adds support for those in same way it is done in regulator_set_voltage_sel_regmap and is required for the upcoming RK816 support Signed-off-by: Alex Bee <knaerzche@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20240416161237.2500037-5-knaerzche@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-03regulator: devres: add API for reference voltage suppliesDavid Lechner1-0/+59
A common use case for regulators is to supply a reference voltage to an analog input or output device. This adds a new devres API to get, enable, and get the voltage in a single call. This allows eliminating boilerplate code in drivers that use reference supplies in this way. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://lore.kernel.org/r/20240429-regulator-get-enable-get-votlage-v2-1-b1f11ab766c1@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-01regulator: rtq2208: Fix LDO discharge register and add vsel settingAlina Yu1-39/+61
The LDO's Vout is adjustable if the hardware setting allows it, and it can be set either 1800mv or 3300mv. Additionally, the discharge register has been moved to another position. Signed-off-by: Alina Yu <alina_yu@richtek.com> Link: https://lore.kernel.org/r/5d56b79c94de63fc86b5a70b7e374da4240fee8b.1714467553.git.alina_yu@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-01regulator: rtq2208: Fix the BUCK ramp_delay range to maximum of 16mVstep/usAlina Yu1-4/+3
The maximum ramp up and down range of BUCK are shorten from 64mVstep/us to 16mVstep/us. Therefore, the RTQ2208_RAMP_VALUE_MAX_uV is modified to 16000uV in this version. Signed-off-by: Alina Yu <alina_yu@richtek.com> Link: https://lore.kernel.org/r/1777b18c0faa1f6b7196630e679a03362686c301.1714467553.git.alina_yu@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-10regulator: vqmmc-ipq4019: fix module autoloadingKrzysztof Kozlowski1-0/+1
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://msgid.link/r/20240410172615.255424-2-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-10regulator: qcom-refgen: fix module autoloadingKrzysztof Kozlowski1-0/+1
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://msgid.link/r/20240410172615.255424-1-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09regulator: mt6360: De-capitalize devicetree regulator subnodesAngeloGioacchino Del Regno1-12/+20
The MT6360 regulator binding, the example in the MT6360 mfd binding, and the devicetree users of those bindings are rightfully declaring MT6360 regulator subnodes with non-capital names, and luckily without using the deprecated regulator-compatible property. With this driver declaring capitalized BUCKx/LDOx as of_match string for the node names, obviously no regulator gets probed: fix that by changing the MT6360_REGULATOR_DESC macro to add a "match" parameter which gets assigned to the of_match. Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator") Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://msgid.link/r/20240409144438.410060-1-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-08regulator: irq_helpers: duplicate IRQ nameMatti Vaittinen1-0/+3
The regulator IRQ helper requires caller to provide pointer to IRQ name which is kept in memory by caller. All other data passed to the helper in the regulator_irq_desc structure is copied. This can cause some confusion and unnecessary complexity. Make the regulator_irq_helper() to copy also the provided IRQ name information so caller can discard the name after the call to regulator_irq_helper() completes. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://msgid.link/r/ZhJMuUYwaZbBXFGP@drtxq0yyyyyyyyyyyyydy-3.rev.dnainternet.fi Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-28regulator: Merge axp20x changesMark Brown1-5/+89
There will be at least one incremental change on top of some MFD overlapping device additions for this driver so merge now. Merge tag 'ib-mfd-regulator-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into regulator-6.10
2024-03-28regulator: axp20x: add support for the AXP717Andre Przywara1-0/+84
The X-Powers AXP717 is a typical PMIC from X-Powers, featuring four DC/DC converters and 15 LDOs, on the regulator side. Describe the chip's voltage settings and switch registers, how the voltages are encoded, and connect this to the MFD device via its regulator ID. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Mark Brown <broonie@kernel.org> Tested-by: Ryan Walklin <ryan@testtoast.com> Link: https://lore.kernel.org/r/20240310010211.28653-5-andre.przywara@arm.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-03-28regulator: axp20x: fix typo-ed identifierAndre Przywara1-5/+5
The registers to set the X-Powers AXP313 regulators are of course "CONTROL" registers, not "CONRTOL" ones. Fix the typo in the header file and in its users. No functional change. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Tested-by: Ryan Walklin <ryan@testtoast.com> Link: https://lore.kernel.org/r/20240310010211.28653-2-andre.przywara@arm.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-03-26regulator: convert to use maple tree registerMark Brown13-14/+14
Merge series from Bo Liu <liubo03@inspur.com>: The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Bo Liu (13): regulator: da9121: convert to use maple tree register cache regulator: da9211: convert to use maple tree register cache regulator: isl9305: convert to use maple tree register cache regulator: max8973: convert to use maple tree register cache regulator: mt6311: convert to use maple tree register cache regulator: pca9450: convert to use maple tree register cache regulator: pf8x00: convert to use maple tree register cache regulator: pfuze100: convert to use maple tree register cache regulator: rtmv20: convert to use maple tree register cache regulator: rtq6752: convert to use maple tree register cache regulator: tps51632: convert to use maple tree register cache regulator: tps62360: convert to use maple tree register cache regulator: rpi-panel-attiny: convert to use maple tree register cache drivers/regulator/da9121-regulator.c | 4 ++-- drivers/regulator/da9211-regulator.c | 2 +- drivers/regulator/isl9305.c | 2 +- drivers/regulator/max8973-regulator.c | 2 +- drivers/regulator/mt6311-regulator.c | 2 +- drivers/regulator/pca9450-regulator.c | 2 +- drivers/regulator/pf8x00-regulator.c | 2 +- drivers/regulator/pfuze100-regulator.c | 2 +- drivers/regulator/rpi-panel-attiny-regulator.c | 2 +- drivers/regulator/rtmv20-regulator.c | 2 +- drivers/regulator/rtq6752-regulator.c | 2 +- drivers/regulator/tps51632-regulator.c | 2 +- drivers/regulator/tps62360-regulator.c | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) -- 2.18.2
2024-03-25regulator: tps65132: Add of_match tableAndré Apitzsch1-0/+7
Add of_match table for "ti,tps65132" compatible string. This fixes automatic driver loading when using device-tree, and if built as a module like major linux distributions do. Signed-off-by: André Apitzsch <git@apitzsch.eu> Link: https://msgid.link/r/20240325-of_tps65132-v1-1-86a5f7ef4ede@apitzsch.eu Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: pca9450: add pca9451a supportJoy Zou1-2/+192
Adding support for new pmic pca9451a. Signed-off-by: Joy Zou <joy.zou@nxp.com> Link: https://msgid.link/r/20240318095633.4079027-3-joy.zou@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: rpi-panel-attiny: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-14-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: tps62360: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-13-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: tps51632: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-12-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: rtq6752: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-11-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: rtmv20: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-10-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: pfuze100: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-9-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: pf8x00: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-8-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: pca9450: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-7-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: mt6311: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-6-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: max8973: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-5-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: isl9305: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-4-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: da9211: convert to use maple tree register cacheBo Liu1-1/+1
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-3-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25regulator: da9121: convert to use maple tree register cacheBo Liu1-2/+2
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu <liubo03@inspur.com> Link: https://msgid.link/r/20240320085740.4604-2-liubo03@inspur.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-22Merge tag 'regulator-fix-v6.9-merge-window' of ↵Linus Torvalds1-0/+11
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "One fix that came in during the merge window, fixing a problem with bootstrapping the state of exclusive regulators which have a parent regulator" * tag 'regulator-fix-v6.9-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: Propagate the regulator state in case of exclusive get
2024-03-15Merge tag 'mm-nonmm-stable-2024-03-14-09-36' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min heap optimizations". - Kuan-Wei Chiu has also sped up the library sorting code in the series "lib/sort: Optimize the number of swaps and comparisons". - Alexey Gladkov has added the ability for code running within an IPC namespace to alter its IPC and MQ limits. The series is "Allow to change ipc/mq sysctls inside ipc namespace". - Geert Uytterhoeven has contributed some dhrystone maintenance work in the series "lib: dhry: miscellaneous cleanups". - Ryusuke Konishi continues nilfs2 maintenance work in the series "nilfs2: eliminate kmap and kmap_atomic calls" "nilfs2: fix kernel bug at submit_bh_wbc()" - Nathan Chancellor has updated our build tools requirements in the series "Bump the minimum supported version of LLVM to 13.0.1". - Muhammad Usama Anjum continues with the selftests maintenance work in the series "selftests/mm: Improve run_vmtests.sh". - Oleg Nesterov has done some maintenance work against the signal code in the series "get_signal: minor cleanups and fix". Plus the usual shower of singleton patches in various parts of the tree. Please see the individual changelogs for details. * tag 'mm-nonmm-stable-2024-03-14-09-36' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (77 commits) nilfs2: prevent kernel bug at submit_bh_wbc() nilfs2: fix failure to detect DAT corruption in btree and direct mappings ocfs2: enable ocfs2_listxattr for special files ocfs2: remove SLAB_MEM_SPREAD flag usage assoc_array: fix the return value in assoc_array_insert_mid_shortcut() buildid: use kmap_local_page() watchdog/core: remove sysctl handlers from public header nilfs2: use div64_ul() instead of do_div() mul_u64_u64_div_u64: increase precision by conditionally swapping a and b kexec: copy only happens before uchunk goes to zero get_signal: don't initialize ksig->info if SIGNAL_GROUP_EXIT/group_exec_task get_signal: hide_si_addr_tag_bits: fix the usage of uninitialized ksig get_signal: don't abuse ksig->info.si_signo and ksig->sig const_structs.checkpatch: add device_type Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" dyndbg: replace kstrdup() + strchr() with kstrdup_and_replace() list: leverage list_is_head() for list_entry_is_head() nilfs2: MAINTAINERS: drop unreachable project mirror site smp: make __smp_processor_id() 0-argument macro fat: fix uninitialized field in nostale filehandles ...
2024-03-13Merge tag 'regulator-v6.9' of ↵Linus Torvalds15-283/+428
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This has been a very quiet release, mostly cleanups, API updates and simple device additions. I messed up slightly and there are a couple of duplicated commits resulting from me leaving things in my inbox which didn't seem worth removing by the time I noticed them. - Conversion of several drivers to GPIO descriptors - Build out the features of of the MP8859 driver - Support for Qualcomm PM4125 and PM6150" * tag 'regulator-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (31 commits) regulator: lp8788-buck: fix copy and paste bug in lp8788_dvs_gpio_request() regulator: core: make regulator_class constant regulator: da9121: Remove unused of_gpio.h regulator: userspace-consumer: add module device table regulator: dt-bindings: gpio-regulator: Fix "gpios-states" and "states" array bounds regulator: mp8859: Implement set_current_limit() regulator: mp8859: Report slew rate regulator: mp8859: Support status and error readback regulator: mp8859: Support active discharge control regulator: mp8859: Support mode operations regulator: mp8859: Support enable control regulator: mp8859: Validate and log device identifier information regulator: mp8859: Specify register accessibility and enable caching regulator: max8998: Convert to GPIO descriptors regulator: max8997: Convert to GPIO descriptors regulator: lp8788-buck: Fully convert to GPIO descriptors regulator: da9055: Fully convert to GPIO descriptors regulator: max8973: Finalize switch to GPIO descriptors regulator: dt-bindings: qcom,usb-vbus-regulator: add support for PM4125 regulator: dt-bindings: qcom,usb-vbus-regulator: add support for PM4125 ...
2024-03-12regulator: core: Propagate the regulator state in case of exclusive getKory Maincent1-0/+11
Previously, performing an exclusive get on an already-enabled regulator resulted in inconsistent state initialization between child and parent regulators. While the child's counts were updated, its parent's counters remained unaffected. Consequently, attempting to disable an already-enabled exclusive regulator triggered unbalanced disables warnings from its parent regulator. This commit addresses the issue by propagating the enable state to the parent regulator using a regulator_enable call. This ensures consistent state management across the regulator hierarchy, preventing warnings! Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Link: https://msgid.link/r/20240312091638.1266167-1-kory.maincent@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-06regulator: lp8788-buck: fix copy and paste bug in lp8788_dvs_gpio_request()Dan Carpenter1-3/+3
"gpio2" as intended here, not "gpio1". Fixes: 95daa868f22b ("regulator: lp8788-buck: Fully convert to GPIO descriptors") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://msgid.link/r/19f62cc2-bdcf-46f7-a5c5-971ef05e1ea7@moroto.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-05regulator: core: make regulator_class constantRicardo B. Marliere2-2/+2
Since commit 43a7206b0963 ("driver core: class: make class_register() take a const *"), the driver core allows for struct class to be in read-only memory, so move the regulator_class structure to be declared at build time placing it into read-only memory, instead of having to be dynamically allocated at boot time. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Link: https://msgid.link/r/20240305-class_cleanup-regulator-v1-1-4950345d6d8f@marliere.net Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-04regulator: rk808: fix LDO range on RK806Quentin Schulz1-2/+2
The linear ranges aren't really matching what they should be. Indeed, the range is inclusive of the min value, so it makes sense the previous range does NOT include the max step value representing the min value of the range in question. Since 3.4V is represented by the decimal value 232, the previous range max step value should be 231 and not 232. No expected change in behavior since 3.4V was mapped with step 232 from the first range but is now mapped with step 232 from the second range. While at it, remove the incorrect comment from the second range. Fixes: f991a220a447 ("regulator: rk808: add rk806 support") Cc: Quentin Schulz <foss+kernel@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Link: https://msgid.link/r/20240223-rk806-regulator-ranges-v1-2-3904ab70d250@theobroma-systems.com Signed-off-by: Mark Brown <broonie@kernel.org>