summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/mp886x.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: Drop obsolete dependencies on COMPILE_TESTJean Delvare2022-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it is possible to test-build any driver which depends on OF on any architecture by explicitly selecting OF. Therefore depending on COMPILE_TEST as an alternative is no longer needed. It is actually better to always build such drivers with OF enabled, so that the test builds are closer to how each driver will actually be built on its intended target. Building them without OF may not test much as the compiler will optimize out potentially large parts of the code. In the worst case, this could even pop false positive warnings. Dropping COMPILE_TEST here improves the quality of our testing and avoids wasting time on non-existent issues. As a minor optimization, this also lets us drop several occurrences of of_match_ptr(), __maybe_unused and some ifdef guarding, as we now know what all of this will resolve to, we might as well save cpp some work. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Icenowy Zheng <icenowy@aosc.io> Link: https://lore.kernel.org/r/20221124144708.64371b98@endymion.delvare Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mp886x: Convert to use regulator_set_ramp_delay_regmapAxel Lin2021-05-251-25/+7
| | | | | | | | Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Message-Id: <20210525102708.2519323-1-axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
* regulator: mp886x: use "mps,switch-frequency-hz"Jisheng Zhang2020-08-241-1/+1
| | | | | | | | | | | As Rob suggested, use the "mps,switch-frequency-hz" instead of the "mps,switch-frequency" for switch frequency. Fortunately, the switch frequency support isn't released, so we can modify it now without any concern. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200824102402.4047fa5f@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mp886x: support setting switch freqJisheng Zhang2020-07-311-0/+42
| | | | | | | | Both MP8867 and MP8869 support different switch frequency. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200729131023.77cc1dd2@xhacker Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mp886x: implement set_ramp_delayJisheng Zhang2020-07-311-3/+64
| | | | | | | | | | Implement the .set_ramp_delay for MP8867 and MP8869. MP8867 and MP8869 could share the implementation, the only difference is the slew_rates array. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200729130913.3ac38b32@xhacker Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mp886x: use .probe_newJisheng Zhang2020-07-021-3/+2
| | | | | | | | | | Use the new .probe_new for mp886x. It does not use the const struct i2c_device_id * argument, so convert it to utilise the simplified i2c driver registration. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200702100200.1a4c65d1@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mp886x: add MP8867 supportJisheng Zhang2020-03-161-1/+61
| | | | | | | | | | | | | | MP8867 is an I2C-controlled adjustable voltage regulator made by Monolithic Power Systems. The difference between MP8867 and MP8869 are: 1.If V_BOOT, the vref of MP8869 is fixed at 600mv while vref of MP8867 is determined by the I2C control. 2.For MP8867, when setting voltage, if the step is within 5, we need to manually set the GO BIT to 0. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200316223127.4b1ecc92@xhacker Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: add support for MP8869 regulatorJisheng Zhang2020-03-161-0/+230
The MP8869 from Monolithic Power Systems is a single output DC/DC converter. The voltage can be controlled via I2C. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200316223020.1a6d92ae@xhacker Signed-off-by: Mark Brown <broonie@kernel.org>