summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/sy8824x.c
AgeCommit message (Collapse)AuthorFilesLines
2022-11-24regulator: Drop obsolete dependencies on COMPILE_TESTJean Delvare1-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>
2021-08-03regulator: sy8824x: Enable REGCACHE_FLATJisheng Zhang1-1/+15
Enable regmap cache to reduce i2c transactions and corresponding interrupts if regulator is accessed frequently. Since the register map is small -- there's only one register in sy8824c and sy8824e, there are only two registers in sy20276 and sy20278, so we use a FLAT regmap cache. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20210803165043.042ec24d@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13regulator: Convert i2c drivers to use .probe_newAxel Lin1-3/+2
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>
2019-08-30regulator: sy8824x: add prefixes to BUCK_EN and MODE macrosJisheng Zhang1-6/+8
Add prefixes to BUCK_EN and MODE macros to namespace them. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20190829143927.395d0385@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-30regulator: sy8824x: use c++style for the comment block near SPDXJisheng Zhang1-7/+6
Update the entire comment block to be C++ style so it looks consistent. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20190829143749.4b42bc65@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-27regulator: sy8824x: add SY20278 supportJisheng Zhang1-0/+13
The differences between SY8824C and SY20278 are different regs for mode/enable. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20190827163830.2c94f29b@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-27regulator: sy8824x: add SY20276 supportJisheng Zhang1-0/+13
The differences between SY8824C and SY20276 are different vsel_min, vsel_step, vsel_count and regs for mode/enable. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20190827163721.1947f7a0@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-27regulator: sy8824x: add SY8824E supportJisheng Zhang1-2/+15
The only difference between SY8824E and SY8824C/D is the vsel_min. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20190827163537.52023c4e@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-27regulator: add support for SY8824C regulatorJisheng Zhang1-0/+192
SY8824C is an I2C attached single output regulator made by Silergy Corp, which is used on several Synaptics berlin platforms to control the power supply of the ARM cores. Add a driver for it. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20190827163418.1a32fc48@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>