Skip to content

Commit

Permalink
Merge tag 'regulator-v3.10-rc4' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A few small fixes for v3.10, documentation things in the core and a
  few driver bugs."

* tag 'regulator-v3.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: palmas: Fix "enable_reg" to point to the correct reg for SMPS10
  regulator: palmas: Fix incorrect condition
  regulator: core: Correct spelling mistake in comment
  regulator: dbx500: Make local symbol static
  regulator: Fix kernel-doc generation warnings.
  • Loading branch information
Linus Torvalds committed Jun 3, 2013
2 parents 0ab6087 + dcbd8ee commit 042dd60
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
7 changes: 5 additions & 2 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,10 @@ static void regulator_ena_gpio_free(struct regulator_dev *rdev)
}

/**
* Balance enable_count of each GPIO and actual GPIO pin control.
* regulator_ena_gpio_ctrl - balance enable_count of each GPIO and actual GPIO pin control
* @rdev: regulator_dev structure
* @enable: enable GPIO at initial use?
*
* GPIO is enabled in case of initial use. (enable_count is 0)
* GPIO is disabled when it is not shared any more. (enable_count <= 1)
*/
Expand Down Expand Up @@ -2702,7 +2705,7 @@ EXPORT_SYMBOL_GPL(regulator_get_voltage);
/**
* regulator_set_current_limit - set regulator output current limit
* @regulator: regulator source
* @min_uA: Minimuum supported current in uA
* @min_uA: Minimum supported current in uA
* @max_uA: Maximum supported current in uA
*
* Sets current sink to the desired output current. This can be set during
Expand Down
24 changes: 12 additions & 12 deletions drivers/regulator/dbx500-prcmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@
static int power_state_active_cnt; /* will initialize to zero */
static DEFINE_SPINLOCK(power_state_active_lock);

int power_state_active_get(void)
{
unsigned long flags;
int cnt;

spin_lock_irqsave(&power_state_active_lock, flags);
cnt = power_state_active_cnt;
spin_unlock_irqrestore(&power_state_active_lock, flags);

return cnt;
}

void power_state_active_enable(void)
{
unsigned long flags;
Expand Down Expand Up @@ -65,6 +53,18 @@ int power_state_active_disable(void)

#ifdef CONFIG_REGULATOR_DEBUG

static int power_state_active_get(void)
{
unsigned long flags;
int cnt;

spin_lock_irqsave(&power_state_active_lock, flags);
cnt = power_state_active_cnt;
spin_unlock_irqrestore(&power_state_active_lock, flags);

return cnt;
}

static struct ux500_regulator_debug {
struct dentry *dir;
struct dentry *status_file;
Expand Down
4 changes: 2 additions & 2 deletions drivers/regulator/palmas-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ static int palmas_regulators_probe(struct platform_device *pdev)
break;
}

if ((id == PALMAS_REG_SMPS6) && (id == PALMAS_REG_SMPS8))
if ((id == PALMAS_REG_SMPS6) || (id == PALMAS_REG_SMPS8))
ramp_delay_support = true;

if (ramp_delay_support) {
Expand Down Expand Up @@ -878,7 +878,7 @@ static int palmas_regulators_probe(struct platform_device *pdev)
pmic->desc[id].vsel_mask = SMPS10_VSEL;
pmic->desc[id].enable_reg =
PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE,
PALMAS_SMPS10_STATUS);
PALMAS_SMPS10_CTRL);
pmic->desc[id].enable_mask = SMPS10_BOOST_EN;
pmic->desc[id].min_uV = 3750000;
pmic->desc[id].uV_step = 1250000;
Expand Down

0 comments on commit 042dd60

Please sign in to comment.