regulator: Fixes for v3.16

A few small fixes:
 
  - Fixes for bugs in Palmas and as3722 exposed by recent changes in the
    core - the drivers weren't allowing the current configuration to be
    read sometimes.
  - Provide a stub for regulator_can_change_voltage() for !REGULATOR.
  - Make sure ltc3589 only looks at its child nodes in the device tree
    rather than searching the whole tree.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJToCg6AAoJELSic+t+oim9bw0P/3RX+9x7yQe9Mm0MWvBE+Wdw
 5DpHxIeJQUmMIQNYIpA1Z1VvtIC1Tz55LEvXvkZtDiGxMPBFFDjwqU5J3Xi/P0wl
 l3Ts8WXCvE1muiUmvZIEVNiNbEIaK5vwIRhlwRjRPSEI/BRdiSnnIvpWb4lPI2Pr
 KYeet+bh+AzF5hAYfIHG43b347CnFQPdDf40YDAcBdipIHqOHFmkT1WiOG3hAa1c
 TyFOycdmgEMB3p3J4vAi1X8bKRcSANJcZiFeAHV0Z+3iyn2zzUIoaf44fkhHX0F0
 XuRklvpUtZzYpkmuOUcYltJwS4zIZsRlyk6oFUMn/Nf//h+pxtaIDDohYmJ/l5YV
 wpYHXNQrejxzBuHmrVRMiZsqrW/RFzLYDoyQ3ioytGKPzMCw5uuDSzHavI9/XHRt
 oe7E3FI5ggGdDd04HuoymB9MQEdagg8WfeTFrSOVp+wcdnJy1a0nU8zAzJ5e4s6u
 qG77WDDToxDtiQ62iGsihzmezRF5FEs6pmR0KqCilzjXa56xy1MCSeeCiA8/W14g
 nRES0jKJOyrOEE+f+20YUA8vVgpElazzPyD8XuIwRjW3+D8WL5156d5dMm/SfgoA
 mM5WNIu9v5fmnqyxcxL+irImjpTrUjZG8c0MVHOrtGj2hFoCJImotNcQS+aSR2P/
 V+p2cIgc3ZM86qFOxWWo
 =ntCQ
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A few small fixes:

   - Fixes for bugs in Palmas and as3722 exposed by recent changes in
     the core - the drivers weren't allowing the current configuration
     to be read sometimes.
   - Provide a stub for regulator_can_change_voltage() for !REGULATOR.
   - Make sure ltc3589 only looks at its child nodes in the device tree
     rather than searching the whole tree"

* tag 'regulator-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: ltc3589: Use of_get_child_by_name
  regulator: palmas: Fix SMPS list for 0V
  regulator: add regulator_can_change_voltage stub
  regulator: as3722: Make 0 a valid selector
This commit is contained in:
Linus Torvalds 2014-06-17 14:21:07 -10:00
commit 5cfb277d66
4 changed files with 10 additions and 1 deletions

View File

@ -433,6 +433,7 @@ static struct regulator_ops as3722_ldo3_extcntrl_ops = {
};
static const struct regulator_linear_range as3722_ldo_ranges[] = {
REGULATOR_LINEAR_RANGE(0, 0x00, 0x00, 0),
REGULATOR_LINEAR_RANGE(825000, 0x01, 0x24, 25000),
REGULATOR_LINEAR_RANGE(1725000, 0x40, 0x7F, 25000),
};
@ -609,6 +610,7 @@ static bool as3722_sd0_is_low_voltage(struct as3722_regulators *as3722_regs)
}
static const struct regulator_linear_range as3722_sd2345_ranges[] = {
REGULATOR_LINEAR_RANGE(0, 0x00, 0x00, 0),
REGULATOR_LINEAR_RANGE(612500, 0x01, 0x40, 12500),
REGULATOR_LINEAR_RANGE(1425000, 0x41, 0x70, 25000),
REGULATOR_LINEAR_RANGE(2650000, 0x71, 0x7F, 50000),

View File

@ -255,7 +255,7 @@ static int ltc3589_parse_regulators_dt(struct ltc3589 *ltc3589)
struct device_node *node;
int i, ret;
node = of_find_node_by_name(dev->of_node, "regulators");
node = of_get_child_by_name(dev->of_node, "regulators");
if (!node) {
dev_err(dev, "regulators node not found\n");
return -EINVAL;

View File

@ -37,12 +37,14 @@ struct regs_info {
};
static const struct regulator_linear_range smps_low_ranges[] = {
REGULATOR_LINEAR_RANGE(0, 0x0, 0x0, 0),
REGULATOR_LINEAR_RANGE(500000, 0x1, 0x6, 0),
REGULATOR_LINEAR_RANGE(510000, 0x7, 0x79, 10000),
REGULATOR_LINEAR_RANGE(1650000, 0x7A, 0x7f, 0),
};
static const struct regulator_linear_range smps_high_ranges[] = {
REGULATOR_LINEAR_RANGE(0, 0x0, 0x0, 0),
REGULATOR_LINEAR_RANGE(1000000, 0x1, 0x6, 0),
REGULATOR_LINEAR_RANGE(1020000, 0x7, 0x79, 20000),
REGULATOR_LINEAR_RANGE(3300000, 0x7A, 0x7f, 0),

View File

@ -395,6 +395,11 @@ static inline void regulator_bulk_free(int num_consumers,
{
}
static inline int regulator_can_change_voltage(struct regulator *regulator)
{
return 0;
}
static inline int regulator_set_voltage(struct regulator *regulator,
int min_uV, int max_uV)
{