Skip to content

Commit

Permalink
Merge remote-tracking branches 'regulator/topic/da9211', 'regulator/t…
Browse files Browse the repository at this point in the history
…opic/pfuze100' and 'regulator/topic/tps65218' into regulator-next
  • Loading branch information
broonie committed Nov 10, 2017
4 parents 9b272e6 + 707ce9e + 26284ca + 125b119 commit 50b7bae
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 37 deletions.
82 changes: 75 additions & 7 deletions Documentation/devicetree/bindings/regulator/da9211.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
* Dialog Semiconductor DA9211/DA9212/DA9213/DA9214/DA9215 Voltage Regulator
* Dialog Semiconductor DA9211/DA9212/DA9213/DA9223/DA9214/DA9224/DA9215/DA9225
Voltage Regulator

Required properties:
- compatible: "dlg,da9211" or "dlg,da9212" or "dlg,da9213"
or "dlg,da9214" or "dlg,da9215"
- compatible: "dlg,da9211" or "dlg,da9212" or "dlg,da9213" or "dlg,da9223"
or "dlg,da9214" or "dlg,da9224" or "dlg,da9215" or "dlg,da9225"
- reg: I2C slave address, usually 0x68.
- interrupts: the interrupt outputs of the controller
- regulators: A node that houses a sub-node for each regulator within the
Expand All @@ -16,7 +17,6 @@ Optional properties:
- Any optional property defined in regulator.txt

Example 1) DA9211

pmic: da9211@68 {
compatible = "dlg,da9211";
reg = <0x68>;
Expand All @@ -35,7 +35,6 @@ Example 1) DA9211
};

Example 2) DA9212

pmic: da9212@68 {
compatible = "dlg,da9212";
reg = <0x68>;
Expand Down Expand Up @@ -79,7 +78,25 @@ Example 3) DA9213
};
};

Example 4) DA9214
Example 4) DA9223
pmic: da9223@68 {
compatible = "dlg,da9223";
reg = <0x68>;
interrupts = <3 27>;

regulators {
BUCKA {
regulator-name = "VBUCKA";
regulator-min-microvolt = < 300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <3000000>;
regulator-max-microamp = <6000000>;
enable-gpios = <&gpio 27 0>;
};
};
};

Example 5) DA9214
pmic: da9214@68 {
compatible = "dlg,da9214";
reg = <0x68>;
Expand All @@ -105,7 +122,33 @@ Example 4) DA9214
};
};

Example 5) DA9215
Example 6) DA9224
pmic: da9224@68 {
compatible = "dlg,da9224";
reg = <0x68>;
interrupts = <3 27>;

regulators {
BUCKA {
regulator-name = "VBUCKA";
regulator-min-microvolt = < 300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <3000000>;
regulator-max-microamp = <6000000>;
enable-gpios = <&gpio 27 0>;
};
BUCKB {
regulator-name = "VBUCKB";
regulator-min-microvolt = < 300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <3000000>;
regulator-max-microamp = <6000000>;
enable-gpios = <&gpio 17 0>;
};
};
};

Example 7) DA9215
pmic: da9215@68 {
compatible = "dlg,da9215";
reg = <0x68>;
Expand All @@ -131,3 +174,28 @@ Example 5) DA9215
};
};

Example 8) DA9225
pmic: da9225@68 {
compatible = "dlg,da9225";
reg = <0x68>;
interrupts = <3 27>;

regulators {
BUCKA {
regulator-name = "VBUCKA";
regulator-min-microvolt = < 300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <4000000>;
regulator-max-microamp = <7000000>;
enable-gpios = <&gpio 27 0>;
};
BUCKB {
regulator-name = "VBUCKB";
regulator-min-microvolt = < 300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <4000000>;
regulator-max-microamp = <7000000>;
enable-gpios = <&gpio 17 0>;
};
};
};
6 changes: 3 additions & 3 deletions Documentation/devicetree/bindings/regulator/pfuze100.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Each regulator is defined using the standard binding for regulators.

Example 1: PFUZE100

pmic: pfuze100@08 {
pmic: pfuze100@8 {
compatible = "fsl,pfuze100";
reg = <0x08>;

Expand Down Expand Up @@ -122,7 +122,7 @@ Example 1: PFUZE100

Example 2: PFUZE200

pmic: pfuze200@08 {
pmic: pfuze200@8 {
compatible = "fsl,pfuze200";
reg = <0x08>;

Expand Down Expand Up @@ -216,7 +216,7 @@ Example 2: PFUZE200

Example 3: PFUZE3000

pmic: pfuze3000@08 {
pmic: pfuze3000@8 {
compatible = "fsl,pfuze3000";
reg = <0x08>;

Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ config REGULATOR_DA9210
interface.

config REGULATOR_DA9211
tristate "Dialog Semiconductor DA9211/DA9212/DA9213/DA9214/DA9215 regulator"
tristate "Dialog Semiconductor DA9211/DA9212/DA9213/DA9223/DA9214/DA9224/DA9215/DA9225 regulator"
depends on I2C
select REGMAP_I2C
help
Expand Down
14 changes: 10 additions & 4 deletions drivers/regulator/da9211-regulator.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* da9211-regulator.c - Regulator device driver for DA9211/DA9212
* /DA9213/DA9214/DA9215
* /DA9213/DA9223/DA9214/DA9224/DA9215/DA9225
* Copyright (C) 2015 Dialog Semiconductor Ltd.
*
* This library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -496,8 +496,11 @@ static const struct i2c_device_id da9211_i2c_id[] = {
{"da9211", DA9211},
{"da9212", DA9212},
{"da9213", DA9213},
{"da9223", DA9223},
{"da9214", DA9214},
{"da9224", DA9224},
{"da9215", DA9215},
{"da9225", DA9225},
{},
};
MODULE_DEVICE_TABLE(i2c, da9211_i2c_id);
Expand All @@ -507,8 +510,11 @@ static const struct of_device_id da9211_dt_ids[] = {
{ .compatible = "dlg,da9211", .data = &da9211_i2c_id[0] },
{ .compatible = "dlg,da9212", .data = &da9211_i2c_id[1] },
{ .compatible = "dlg,da9213", .data = &da9211_i2c_id[2] },
{ .compatible = "dlg,da9214", .data = &da9211_i2c_id[3] },
{ .compatible = "dlg,da9215", .data = &da9211_i2c_id[4] },
{ .compatible = "dlg,da9223", .data = &da9211_i2c_id[3] },
{ .compatible = "dlg,da9214", .data = &da9211_i2c_id[4] },
{ .compatible = "dlg,da9224", .data = &da9211_i2c_id[5] },
{ .compatible = "dlg,da9215", .data = &da9211_i2c_id[6] },
{ .compatible = "dlg,da9225", .data = &da9211_i2c_id[7] },
{},
};
MODULE_DEVICE_TABLE(of, da9211_dt_ids);
Expand All @@ -526,5 +532,5 @@ static struct i2c_driver da9211_regulator_driver = {
module_i2c_driver(da9211_regulator_driver);

MODULE_AUTHOR("James Ban <[email protected]>");
MODULE_DESCRIPTION("DA9211/DA9212/DA9213/DA9214/DA9215 regulator driver");
MODULE_DESCRIPTION("DA9211/DA9212/DA9213/DA9223/DA9214/DA9224/DA9215/DA9225 regulator driver");
MODULE_LICENSE("GPL");
2 changes: 1 addition & 1 deletion drivers/regulator/da9211-regulator.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* da9211-regulator.h - Regulator definitions for DA9211/DA9212
* /DA9213/DA9214/DA9215
* /DA9213/DA9223/DA9214/DA9224/DA9215/DA9225
* Copyright (C) 2015 Dialog Semiconductor Ltd.
*
* This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/tps65218-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static int tps65218_pmic_set_suspend_disable(struct regulator_dev *dev)

if (!tps->strobes[rid]) {
if (rid == TPS65218_DCDC_3)
tps->info[rid]->strobe = 3;
tps->strobes[rid] = 3;
else
return -EINVAL;
}
Expand Down
19 changes: 0 additions & 19 deletions include/linux/mfd/tps65218.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,24 +245,6 @@ enum tps65218_irqs {
TPS65218_INVALID4_IRQ,
};

/**
* struct tps_info - packages regulator constraints
* @id: Id of the regulator
* @name: Voltage regulator name
* @min_uV: minimum micro volts
* @max_uV: minimum micro volts
* @strobe: sequencing strobe value for the regulator
*
* This data is used to check the regualtor voltage limits while setting.
*/
struct tps_info {
int id;
const char *name;
int min_uV;
int max_uV;
int strobe;
};

/**
* struct tps65218 - tps65218 sub-driver chip access routines
*
Expand All @@ -280,7 +262,6 @@ struct tps65218 {
u32 irq_mask;
struct regmap_irq_chip_data *irq_data;
struct regulator_desc desc[TPS65218_NUM_REGULATOR];
struct tps_info *info[TPS65218_NUM_REGULATOR];
struct regmap *regmap;
u8 *strobes;
};
Expand Down
5 changes: 4 additions & 1 deletion include/linux/regulator/da9211.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* da9211.h - Regulator device driver for DA9211/DA9212
* /DA9213/DA9214/DA9215
* /DA9213/DA9223/DA9214/DA9224/DA9215/DA9225
* Copyright (C) 2015 Dialog Semiconductor Ltd.
*
* This program is free software; you can redistribute it and/or
Expand All @@ -25,8 +25,11 @@ enum da9211_chip_id {
DA9211,
DA9212,
DA9213,
DA9223,
DA9214,
DA9224,
DA9215,
DA9225,
};

struct da9211_pdata {
Expand Down

0 comments on commit 50b7bae

Please sign in to comment.