summaryrefslogtreecommitdiff
path: root/drivers/regulator/ltc3676.c
AgeCommit message (Collapse)Author
2020-09-07regulator: remove locking around regulator_notifier_call_chain()Michał Mirosław
regulator_notifier_call_chain() doesn't need rdev lock and rdev's existence is assumed in the code anyway. Remove the locks from drivers. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/42393f66dcc4d80dcd9797be45216b4035aa96cb.1597032945.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-21regulator: ltc3676: Fix W=1 build warning when CONFIG_OF=nJisheng Zhang
Fix below warning when CONFIG_OF=n: drivers/regulator/ltc3676.c:371:34: warning: ‘ltc3676_of_match’ defined but not used [-Wunused-const-variable=] 371 | static const struct of_device_id ltc3676_of_match[] = { | ^~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200821111517.59d7b8c8@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-18regulator: ltc3676: Constify ltc3676_regulatorsRikard Falkeborn
ltc3676_regulators is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 4361 2064 8 6433 1921 drivers/regulator/ltc3676.o After: text data bss dec hex filename 6121 304 8 6433 1921 drivers/regulator/ltc3676.o Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200617223247.25566-4-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13regulator: Convert i2c drivers to use .probe_newAxel Lin
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-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174Thomas Gleixner
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 655 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13regulator: ltc3676: Fix notifier mutex lock warningSteve Twiss
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function. Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API. Fixes: 37b918a034fe ("regulator: Add LTC3676 support") Suggested-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-15regulator: ltc3676: Fix module descriptionAxel Lin
This driver is for LTC3676 rather than LTC1376. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-15regulator: ltc3676: Simplify .readable_reg and .writable_reg callbacksAxel Lin
Use case range for continuous range to make the code shorter. The .readable_reg and .writable_reg implementation are exactly the same, so use a common ltc3676_readable_writeable_reg function instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-07regmap: split up regmap_config.use_single_rwDavid Frey
Split regmap_config.use_single_rw into use_single_read and use_single_write. This change enables drivers of devices which only support bulk operations in one direction to use the regmap_bulk_*() functions for both directions and have their bulk operation split into single operations only when necessary. Update all struct regmap_config instances where use_single_rw==true to instead set both use_single_read and use_single_write. No attempt was made to evaluate whether it is possible to set only one of use_single_read or use_single_write. Signed-off-by: David Frey <dpfrey@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-02regulator: ltc3676: Assure PGOOD mask is set before changing voltageMarek Vasut
Make sure the DVBxB bit 5, PGOOD mask, is set before changing voltage on the buck converters. If the PGOOD mask bit is not set, the PMIC may deassert the PGOOD signal during the voltage transition. On systems that use the PGOOD signal as a power OK indication for the board or SoC, which should be the case on correct designs, deasserting the PGOOD signal will lead to system reset or shutdown, which is not the expected behavior when changing PMIC buck converter voltage. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-21regulator: ltc3676: Add OF device ID tableJavier Martinez Canillas
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: ltc3676: constify regulator_ops structureBhumika Goyal
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/ltc3676.o text data bss dec hex filename 2369 2808 288 5465 1559 drivers/regulator/ltc3676.o File size after: drivers/regulator/ltc3676.o text data bss dec hex filename 3145 2296 8 5449 1549 drivers/regulator/ltc3676.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-16regulator: Add LTC3676 supportTim Harvey
This patch adds support for the Linear Technology LTC3676 8-output I2C voltage regulator IC. Cc: Jaffer Kapasi <jkapasi@linear.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Mark Brown <broonie@kernel.org>