Commit Graph

19 Commits

Author SHA1 Message Date
Rikard Falkeborn 55c81934e7
regulator: tps6105x: Constify tps6105x_regulator_ops
The only usage of tps6105x_regulator_ops is to assign its address to the
ops field in the regulator_desc struct, which is a const pointer. Make it
const to allow the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200829221104.20870-3-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-01 15:48:52 +01:00
Sven Van Asbroeck f0a19fa823
regulator: tps6105x: add optional devicetree support
Tell the regulator framework to retrieve regulator init
data from the 'regulator' subnode, or from the parent mfd
device's platform data.

Example:

i2c0 {
	tps61052@33 {
		compatible = "ti,tps61052";
		reg = <0x33>;

		regulator {
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			regulator-always-on;
		};
	};
};

Tree: next-20191118
Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
Link: https://lore.kernel.org/r/20191119154611.29625-3-TheSven73@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-11-20 17:10:47 +00:00
Thomas Gleixner af873fcece treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194
Based on 1 normalized pattern(s):

  license terms gnu general public license gpl version 2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 161 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Steve Winslow <swinslow@gmail.com>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528170027.447718015@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:29:22 -07:00
Axel Lin fad2ba681c regulator: tps6105x: Convert to use regmap helper functions
Since commit 7e50711993 ("mfd: tps6105x: Use i2c regmap to access
registers"), we can use regmap helper functions instead of open coded.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Denis Grigoryev <grigoryev@fastwel.ru>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 13:19:47 +00:00
Grigoryev Denis 7e50711993 mfd: tps6105x: Use i2c regmap to access registers
This patch modifies tps6105x and associated function driver to use regmap
instead of operating directly on i2c.

Signed-off-by: Denis Grigoryev <grigoryev@fastwel.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-05 10:38:22 +01:00
Wolfram Sang 6c794b2654 regulator: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:21:29 +02:00
Mark Brown 6c7bdf8e63 Merge remote-tracking branch 'regulator/topic/tps6105x' into regulator-next 2013-10-24 11:11:41 +01:00
Jingoo Han 4932e89d75 regulator: tps6105x: Fix checkpatch issue
Fix the following checkpatch warning.

  WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:26:57 +01:00
Jingoo Han 6a2b5a931f regulator: tps6105x: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:11:00 +01:00
Bill Pemberton 8dc995f56e regulator: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20 10:53:38 +09:00
Bill Pemberton a5023574d1 regulator: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20 10:31:26 +09:00
Bill Pemberton 5eb9f2b963 regulator: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20 10:31:19 +09:00
Axel Lin c55979b7bd regulator: tps6105x: Use regulator_list_voltage_table()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03 13:25:01 +01:00
Mark Brown c172708d38 regulator: core: Use a struct to pass in regulator runtime configuration
Rather than adding new arguments to regulator_register() every time we
want to add a new bit of dynamic information at runtime change the function
to take these via a struct. By doing this we avoid needing to do further
changes like the recent addition of device tree support which required each
regulator driver to be updated to take an additional parameter.

The regulator_desc which should (mostly) be static data is still passed
separately as most drivers are able to configure this statically at build
time.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-09 12:37:09 +01:00
Axel Lin d882d73eb7 regulator: tps6105x: Constify regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06 10:06:44 +01:00
Rajendra Nayak 2c043bcbf2 regulator: pass additional of_node to regulator_register()
With device tree support for regulators, its needed that the
regulator_dev->dev device has the right of_node attached.
To be able to do this add an additional parameter to the
regulator_register() api, wherein the dt-adapted driver can
then pass this additional info onto the regulator core.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 18:47:04 +00:00
Axel Lin f0f060bdd5 regulator: Add missing platform_set_drvdata in tps6105x_regulator_probe
Otherwise, calling platform_get_drvdata in tps6105x_regulator_remove
returns NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-05-27 10:34:36 +01:00
Samuel Ortiz a7c98ce25c mfd: Use mfd cell platform_data for tps6105x cells platform bits
With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform data back to their sub drivers.
This allows for an mfd_cell->mfd_data removal and thus keep the
sub drivers MFD agnostic. This is mostly needed for non MFD aware
sub drivers.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26 19:45:11 +02:00
Linus Walleij 2edd3b6924 regulator: Add a subdriver for TI TPS6105x regulator portions v2
This adds a subdriver for the regulator found inside the TPS61050
and TPS61052 chips.

Cc: Samuel Ortiz <samuel.ortiz@intel.com>
Cc: Ola Lilja <ola.o.lilja@stericsson.com>
Cc: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:42:09 +01:00