aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/ltc3589.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-08-21regulator: ltc3589: constify i2c_device_idArvind Yadav1-1/+1
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by <linux/i2c.h> work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-21regulator: ltc3589: Add OF device ID tableJavier Martinez Canillas1-1/+24
The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:<device>. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31regulator: ltc3589: constify regulator_ops structureBhumika Goyal1-4/+4
Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/ltc3589.o text data bss dec hex filename 2564 3312 288 6164 1814 drivers/regulator/ltc3589.o File size after: drivers/regulator/ltc3589.o text data bss dec hex filename 3604 2544 8 6156 180c drivers/regulator/ltc3589.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-12regulator: ltc3589: Make IRQ optionalBernhard Walle1-6/+9
It's perfectly valid to use the LTC3589 without an interrupt pin connected to it. Currently, the driver probing fails when client->irq is 0 (which means "no interrupt"). Don't register the interrupt handler in that case but successfully finish the device probing instead. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-30Merge remote-tracking branches 'regulator/topic/mt6311', 'regulator/topic/ocp', 'regulator/topic/owner', 'regulator/topic/pfuze100' and 'regulator/topic/pwm' into regulator-nextMark Brown1-1/+0
2015-08-30regulator: ltc3589: Remove unnecessary MODULE_ALIAS()Javier Martinez Canillas1-1/+0
The driver has a I2C device id table that is used to create the modaliases and already contains a "ltc3589" device id. So the modalias is unnecessary. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-14regulator: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski1-1/+0
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07regulator: ltc3589: Constify ltc3589_reg_defaultsAxel Lin1-1/+1
ltc3589_reg_defaults[] is not modified after initialized, so make it const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-26regulator: ltc3589: fix broken voltage transitionsSteffen Trumtrar1-0/+1
VCCR is used as a trigger to start voltage transitions, so we need to mark it volatile in order to make sure it gets written to hardware every time we set a new voltage. Fixes regulator voltage being stuck at the first voltage set after driver load. [lst: reworded commit message] Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2014-08-05Merge remote-tracking branches 'regulator/topic/lp8755', 'regulator/topic/ltc3589', 'regulator/topic/max8952', 'regulator/topic/mc13xxx' and 'regulator/topic/palmas' into regulator-nextMark Brown1-1/+1
2014-06-21regulator: ltc3589: Staticize ltc3589_reg_defaultsSachin Kamat1-1/+1
'ltc3589_reg_defaults' is local to this file. Make it static. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-16regulator: ltc3589: Use of_get_child_by_nameAxel Lin1-1/+1
of_find_node_by_name() walks the allnodes list, and can thus walk outside of the parent node. Use of_get_child_by_name() instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-27regulator: ltc3589: Remove ltc3589_list_voltage_fixed functionAxel Lin1-13/+2
When fixed_uV is set and n_voltage is 1, regulator core will return rdev->desc->fixed_uV in regulator_get_voltage() and regulator_list_voltage(). Rename ltc3589_standby_regulator_ops to ltc3589_fixed_standby_regulator_ops, this makes the code clear that the ops is for fixed voltage regulator. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26regulator: Add LTC3589 supportPhilipp Zabel1-0/+565
This patch adds support for the Linear Technology LTC3589, LTC3589-1, and LTC3589-2 8-output I2C voltage regulator ICs. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>