Commit Graph

8 Commits

Author SHA1 Message Date
Axel Lin 77e29598ca
regulator: Convert i2c drivers to use .probe_new
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-13 15:03:06 +00:00
Axel Lin fe669cb95e
regulator: mt63xx: Switch to SPDX identifier
Convert MediaTek mt63xx PMIC drivers to SPDX identifier.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-26 10:38:23 +01:00
Axel Lin a661b1d993
regulator: mt6311: Use linear instead of linear range for mt6311_buck_ops
Current code already set .min_uV and .uV_step fields and it actually can
use regulator_list_voltage_linear.
So remove buck_volt_range and use regulator_list_voltage_linear instead.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-22 15:16:42 +00:00
Daniel Kurtz 47769cbc09 regulator: mt6311: Use REGCACHE_RBTREE
This regulator is on a slow i2c bus.  Register accesses are very simple,
they all either enable/disable a regulator channel, or select a new
voltage level.  Thus, reading registers from the device will always
return what was last written.

Therefore we can save a lot of time when reading registers by using a
regmap_cache.  Since the register map is relatively large, but we only
ever access a few of them, we use an RBTREE cache.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Henry Chen <henryc.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-18 12:14:27 +00:00
kbuild test robot 6d73aef117 regulator: mt6311: fix platform_no_drv_owner.cocci warnings
drivers/regulator/mt6311-regulator.c:169:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-30 14:34:50 +01:00
Axel Lin 08b472f7b6 regulator: mt6311: Trivial clean up
Make mt6311_buck_ops, mt6311_ldo_ops and mt6311_regulators const and remove
unneeded error variable in mt6311_i2c_probe().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-03 17:22:37 +01:00
Henry Chen 53e381627d regulator: mt6311: Modify the maximum voltage of buck.
The maximum voltage of buck should be 1.39375V.
1.39375V = 0.6V + 0.00625V * 127, 127 is the max_sel of linear range.

Reported-by: Axel Lin <axel.lin@ingics.com>
signed-off-by: Henry Chen <henryc.chen@mediatek.com>

Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-03 17:03:20 +01:00
Henry Chen 8766018b6e regulator: mt6311: Add support for mt6311 regulator
Add regulator support for mt6311.
It has 2 regulaotrs - Buck and LDO, provide the related buck/ldo voltage
data to the driver, and creates the regulator_desc table. Supported
operations for Buck are enabled/disabled and voltage change, only
enabled/disabled for LDO.

Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 12:30:49 +01:00