Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3c3f067 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://opensource.wolfsonmicro.com/regulator

* 'for-linus' of git://opensource.wolfsonmicro.com/regulator: (22 commits)
  regulator: Constify constraints name
  regulator: Fix possible nullpointer dereference in regulator_enable()
  regulator: gpio-regulator add dependency on GENERIC_GPIO
  regulator: Add module.h include to gpio-regulator
  regulator: Add driver for gpio-controlled regulators
  regulator: remove duplicate REG_CTRL2 defines in tps65023
  regulator: Clarify documentation for regulator-regulator supplies
  regulator: Fix some bitrot in the machine driver documentation
  regulator: tps65023: Added support for the similiar TPS65020 chip
  regulator: tps65023: Setting correct core regulator for tps65021
  regulator: tps65023: Set missing bit for update core-voltage
  regulator: tps65023: Fixes i2c configuration issues
  regulator: Add debugfs file showing the supply map table
  regulator: tps6586x: add SMx slew rate setting
  regulator: tps65023: Fixes i2c configuration issues
  regulator: tps6507x: Remove num_voltages array
  regulator: max8952: removed unused mutex.
  regulator: fix regulator/consumer.h kernel-doc warning
  regulator: Ensure enough enable time for max8649
  regulator: 88pm8607: Fix off-by-one value range checking in the case of no id is matched
  ...
parents c18ae42a 0151546f
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ initialisation code by creating a struct regulator_consumer_supply for
each regulator.

struct regulator_consumer_supply {
	struct device *dev;	/* consumer */
	const char *dev_name;	/* consumer dev_name() */
	const char *supply;	/* consumer supply - e.g. "vcc" */
};

@@ -24,13 +24,13 @@ e.g. for the machine above

static struct regulator_consumer_supply regulator1_consumers[] = {
{
	.dev	= &platform_consumerB_device.dev,
	.dev_name	= "dev_name(consumer B)",
	.supply		= "Vcc",
},};

static struct regulator_consumer_supply regulator2_consumers[] = {
{
	.dev	= &platform_consumerA_device.dev,
	.dev	= "dev_name(consumer A"),
	.supply	= "Vcc",
},};

@@ -43,6 +43,7 @@ to their supply regulator :-

static struct regulator_init_data regulator1_data = {
	.constraints = {
		.name = "Regulator-1",
		.min_uV = 3300000,
		.max_uV = 3300000,
		.valid_modes_mask = REGULATOR_MODE_NORMAL,
@@ -51,13 +52,19 @@ static struct regulator_init_data regulator1_data = {
	.consumer_supplies = regulator1_consumers,
};

The name field should be set to something that is usefully descriptive
for the board for configuration of supplies for other regulators and
for use in logging and other diagnostic output.  Normally the name
used for the supply rail in the schematic is a good choice.  If no
name is provided then the subsystem will choose one.

Regulator-1 supplies power to Regulator-2. This relationship must be registered
with the core so that Regulator-1 is also enabled when Consumer A enables its
supply (Regulator-2). The supply regulator is set by the supply_regulator
field below:-
field below and co:-

static struct regulator_init_data regulator2_data = {
	.supply_regulator = "regulator_name",
	.supply_regulator = "Regulator-1",
	.constraints = {
		.min_uV = 1800000,
		.max_uV = 2000000,
+1 −1
Original line number Diff line number Diff line
@@ -412,7 +412,7 @@ static int __devinit pm8607_regulator_probe(struct platform_device *pdev)
		if (info->desc.id == res->start)
			break;
	}
	if ((i < 0) || (i > PM8607_ID_RG_MAX)) {
	if (i == ARRAY_SIZE(pm8607_regulator_info)) {
		dev_err(&pdev->dev, "Failed to find regulator %llu\n",
			(unsigned long long)res->start);
		return -EINVAL;
+10 −0
Original line number Diff line number Diff line
@@ -64,6 +64,16 @@ config REGULATOR_USERSPACE_CONSUMER

          If unsure, say no.

config REGULATOR_GPIO
	tristate "GPIO regulator support"
	depends on GENERIC_GPIO
	help
	  This driver provides support for regulators that can be
	  controlled via gpios.
	  It is capable of supporting current and voltage regulators
	  and the platform has to provide a mapping of GPIO-states
	  to target volts/amps.

config REGULATOR_BQ24022
	tristate "TI bq24022 Dual Input 1-Cell Li-Ion Charger IC"
	help
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o
obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o
obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o

obj-$(CONFIG_REGULATOR_GPIO) += gpio-regulator.o
obj-$(CONFIG_REGULATOR_AD5398) += ad5398.o
obj-$(CONFIG_REGULATOR_BQ24022) += bq24022.o
obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
Loading