]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge branches 'regulator-core' and 'regulator-drivers' into regulator-next
Mark Brown [Mon, 20 Aug 2012 20:10:42 +0000 (21:10 +0100)]
Merge branches 'regulator-core' and 'regulator-drivers' into regulator-next

12 years agoregulator: fix kernel-doc warnings in drivers/regulator/core.c
Randy Dunlap [Sun, 19 Aug 2012 00:44:14 +0000 (17:44 -0700)]
regulator: fix kernel-doc warnings in drivers/regulator/core.c

Fix regulator kernel-doc warnings:

Warning(drivers/regulator/core.c:2308): No description found for parameter 'rdev'
Warning(drivers/regulator/core.c:2308): Excess function parameter 'regulator' description in 'regulator_set_voltage_time_sel'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: fix kernel-doc warnings in drivers/regulator/core.c
Randy Dunlap [Sun, 19 Aug 2012 00:44:14 +0000 (17:44 -0700)]
regulator: fix kernel-doc warnings in drivers/regulator/core.c

Fix regulator kernel-doc warnings:

Warning(drivers/regulator/core.c:2308): No description found for parameter 'rdev'
Warning(drivers/regulator/core.c:2308): Excess function parameter 'regulator' description in 'regulator_set_voltage_time_sel'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: ab8500: provide per-regulator shift
Linus Walleij [Mon, 20 Aug 2012 16:41:35 +0000 (18:41 +0200)]
regulator: ab8500: provide per-regulator shift

This encodes the voltage shifts (the number of bits to shift
the register to get to the selector) into the regulator info.
We have several new variants of the AB8500 so this varies a
lot.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: max8907: fix compile error when !CONFIG_OF
Stephen Warren [Mon, 20 Aug 2012 15:39:10 +0000 (09:39 -0600)]
regulator: max8907: fix compile error when !CONFIG_OF

Fix the following:

  CC [M]  drivers/regulator/max8907-regulator.o
drivers/regulator/max8907-regulator.c: In function 'max8907_regulator_probe':
drivers/regulator/max8907-regulator.c:297:12: error: 'max8907_matches' undeclared (first use in this function)

by removing direct references to max8907_matches[], which only exists when
CONFIG_OF is defined.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: max8907: Properly set pmic pointer in max8907_regulator_remove()
Axel Lin [Sat, 18 Aug 2012 06:33:05 +0000 (14:33 +0800)]
regulator: max8907: Properly set pmic pointer in max8907_regulator_remove()

Add missing platform_get_drvdata() call in max8907_regulator_remove(), this
fixes below build warning:

  CC [M]  drivers/regulator/max8907-regulator.o
drivers/regulator/max8907-regulator.c: In function 'max8907_regulator_remove':
drivers/regulator/max8907-regulator.c:353:23: warning: 'pmic' is used uninitialized in this function [-Wuninitialized]

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'regulator-drivers' into regulator-next
Mark Brown [Fri, 17 Aug 2012 22:20:46 +0000 (23:20 +0100)]
Merge branch 'regulator-drivers' into regulator-next

12 years agoregulator: max8907: Fix n_voltages for MAX8907B SD1
Axel Lin [Thu, 16 Aug 2012 04:26:02 +0000 (12:26 +0800)]
regulator: max8907: Fix n_voltages for MAX8907B SD1

For linear voltage mapping, the n_voltages is (max - min) / step + 1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'regulator-drivers' into regulator-next
Mark Brown [Thu, 16 Aug 2012 11:12:16 +0000 (12:12 +0100)]
Merge branch 'regulator-drivers' into regulator-next

12 years agoregulator: using kfree() requires including slab.h
Stephen Rothwell [Thu, 16 Aug 2012 05:16:05 +0000 (15:16 +1000)]
regulator: using kfree() requires including slab.h

Fixes this build error:

drivers/regulator/twl-regulator.c: In function 'twlreg_probe':
drivers/regulator/twl-regulator.c:1229:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

Also added string.h for kmemdup().

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branches 'regulator-drivers' and 'regulator-linus' into regulator-next
Mark Brown [Wed, 15 Aug 2012 16:54:52 +0000 (17:54 +0100)]
Merge branches 'regulator-drivers' and 'regulator-linus' into regulator-next

12 years agoregulator: add MAX8907 driver
Gyungoh Yoo [Thu, 9 Aug 2012 20:24:34 +0000 (14:24 -0600)]
regulator: add MAX8907 driver

The MAX8907 is an I2C-based power-management IC containing voltage
regulators, a reset controller, a real-time clock, and a touch-screen
controller.

The original driver was written by:
* Gyungoh Yoo <jack.yoo@maxim-ic.com>

Various fixes and enhancements by:
* Jin Park <jinyoungp@nvidia.com>
* Tom Cherry <tcherry@nvidia.com>
* Prashant Gaikwad <pgaikwad@nvidia.com>
* Dan Willemsen <dwillemsen@nvidia.com>
* Laxman Dewangan <ldewangan@nvidia.com>

During upstreaming, I (swarren):
* Converted to regmap.
* Allowed probing from device tree.
* Reworked the regulator driver to be represented as a single device that
  provides multiple regulators, rather than as a device per regulator.
* Replaced many regulator ops with standard functions.
* Added ability to specify supplies for each regulator.
* Removed the WLED regulator. If/when we expose this in the driver, it
  should be a backlight object not a regulator object.
* Renamed from max8907c->max8907, since the driver covers at least the
  C and B revisions.
* General cleanup.

Signed-off-by: Gyungoh Yoo <jack.yoo@maxim-ic.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: twl: make twl_info tables const
Arnd Bergmann [Tue, 14 Aug 2012 12:41:50 +0000 (12:41 +0000)]
regulator: twl: make twl_info tables const

I currently carry the series to make of_device_id->data const in the
arm-soc tree, which fixes a number of issues, but leaves one new
compiler warning about the twl-regulator driver:

drivers/regulator/twl-regulator.c: In function 'twlreg_probe':
drivers/regulator/twl-regulator.c:1130:8: warning: assignment discards 'const'
qualifier from pointer target type [enabled by default]
drivers/regulator/twl-regulator.c:1139:9: warning: assignment discards 'const'
qualifier from pointer target type [enabled by default]

The warning indicates that the driver takes a static table with
initialization data for each regulator, modifies the data in place
and passes a pointer to that structure to the regulator_register
function. This is probably ok because a system contains only one
instance of each regulator, but it's still bad style because any
driver should be written to support multiple instances of the same
hardware.

This patch changes the code to dynamically allocate the memory
we pass to the regulator core so the table can be constant.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: twl-regulator: fix up VINTANA1/VINTANA2
Aaro Koskinen [Tue, 14 Aug 2012 22:10:04 +0000 (01:10 +0300)]
regulator: twl-regulator: fix up VINTANA1/VINTANA2

It seems commit 2098e95ce9bb039ff2e7bf836df358d18a176139 (regulator: twl:
adapt twl-regulator driver to dt) accidentally deleted VINTANA1. Also
the same commit defines VINTANA2 twice with TWL4030_ADJUSTABLE_LDO and
TWL4030_FIXED_LDO. This patch changes the fixed one to be VINTANA1.

I noticed this when auditing my N900 boot logs. I could not notice any
change in device behaviour, though, except that the boot logs are now
like before:

...
[    0.282928] VDAC: 1800 mV normal standby
[    0.284027] VCSI: 1800 mV normal standby
[    0.285400] VINTANA1: 1500 mV normal standby
[    0.286865] VINTANA2: 2750 mV normal standby
[    0.288208] VINTDIG: 1500 mV normal standby
[    0.289978] VSDI_CSI: 1800 mV normal standby
...

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
12 years agoMerge branch 'regulator-drivers' into regulator-next
Mark Brown [Mon, 13 Aug 2012 12:38:13 +0000 (13:38 +0100)]
Merge branch 'regulator-drivers' into regulator-next

12 years agoregulator: twl: Remove get_voltage implementation for single voltage regulators
Axel Lin [Fri, 10 Aug 2012 01:37:09 +0000 (09:37 +0800)]
regulator: twl: Remove get_voltage implementation for single voltage regulators

This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: isl6271a: Remove get_voltage implementation for isl_fixed_ops
Axel Lin [Fri, 10 Aug 2012 01:35:59 +0000 (09:35 +0800)]
regulator: isl6271a: Remove get_voltage implementation for isl_fixed_ops

This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: ab8500: Remove get_voltage implementation for ab8500_regulator_fixed_ops
Axel Lin [Fri, 10 Aug 2012 01:34:53 +0000 (09:34 +0800)]
regulator: ab8500: Remove get_voltage implementation for ab8500_regulator_fixed_ops

This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: ab3100: Remove get_voltage implementation for regulator_ops_fixed
Axel Lin [Fri, 10 Aug 2012 01:33:44 +0000 (09:33 +0800)]
regulator: ab3100: Remove get_voltage implementation for regulator_ops_fixed

This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: mc13xxx: Remove get_voltage implementation for single voltage regulators
Axel Lin [Fri, 10 Aug 2012 01:38:39 +0000 (09:38 +0800)]
regulator: mc13xxx: Remove get_voltage implementation for single voltage regulators

This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'regulator-drivers' into regulator-next
Mark Brown [Thu, 9 Aug 2012 19:07:15 +0000 (20:07 +0100)]
Merge branch 'regulator-drivers' into regulator-next

Conflicts:
Documentation/devicetree/bindings/regulator/tps6586x.txt

12 years agoregulator: tps6586x: add support for SYS rail
Laxman Dewangan [Sun, 5 Aug 2012 07:41:58 +0000 (13:11 +0530)]
regulator: tps6586x: add support for SYS rail

Device have SYS rail which is always ON. It is system
power bus. LDO5 and LDO_RTC get powered through this rail
internally. Add support for this rail and make the
LDO5/LDO_RTC input supply to "sys".
Update document accordingly.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branches 'regulator-linus' and 'regulator-core' into regulator-next
Mark Brown [Thu, 9 Aug 2012 18:52:53 +0000 (19:52 +0100)]
Merge branches 'regulator-linus' and 'regulator-core' into regulator-next

12 years agoregulator: core: request only valid gpio pins for regulator enable
Marek Szyprowski [Thu, 9 Aug 2012 14:33:00 +0000 (16:33 +0200)]
regulator: core: request only valid gpio pins for regulator enable

Commit 65f735082de3 ("regulator: core: Add core support for GPIO controlled
enable lines") introduced enable gpio entry in regulator configuration
structure. Some drivers use '-1' as a placeholder for marking that such
gpio line is not available, because '0' is considered as a valid gpio
number. This patch fixes initialization of such drivers (like MAX8952
on UniversalC210 board), when '-1' is provided as enable gpio pin in the
regulator's platform data.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: core: Use list_voltage() to read single voltage regulators
Mark Brown [Thu, 9 Aug 2012 15:42:19 +0000 (16:42 +0100)]
regulator: core: Use list_voltage() to read single voltage regulators

If the regulator doesn't supply a way of reading back the voltage but does
provide a list_voltage() operation then use that with a selector of zero
to read the voltage.  Regulators doing this means that we have the list
operation there for consumers that want to configure themselves.

Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: twl: Remove references to the twl4030 regulator
Mark Brown [Wed, 8 Aug 2012 14:51:44 +0000 (15:51 +0100)]
regulator: twl: Remove references to the twl4030 regulator

It's not referenced anywhere any more and the compiler notices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: Update comment for set_current_limit callback of struct regulator_ops
Axel Lin [Wed, 8 Aug 2012 12:17:18 +0000 (20:17 +0800)]
regulator: Update comment for set_current_limit callback of struct regulator_ops

The regulators should be tending to the maximum in the available range and
consumers should specify the widest range possible.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: da9052: set_current_limit should select the maximum current in specific...
Axel Lin [Wed, 8 Aug 2012 12:23:54 +0000 (20:23 +0800)]
regulator: da9052: set_current_limit should select the maximum current in specific range

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: lp872x: set_current_limit should select the maximum current in specific...
Axel Lin [Wed, 8 Aug 2012 12:22:35 +0000 (20:22 +0800)]
regulator: lp872x: set_current_limit should select the maximum current in specific range

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: tps6524x: set_current_limit should select the maximum current in specific...
Axel Lin [Wed, 8 Aug 2012 12:21:30 +0000 (20:21 +0800)]
regulator: tps6524x: set_current_limit should select the maximum current in specific range

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: wm831x-dcdc: set_current_limit should select the maximum current in specif...
Axel Lin [Wed, 8 Aug 2012 12:20:29 +0000 (20:20 +0800)]
regulator: wm831x-dcdc: set_current_limit should select the maximum current in specific range

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'regulator-tol' into regulator-next
Mark Brown [Wed, 8 Aug 2012 13:35:50 +0000 (14:35 +0100)]
Merge branch 'regulator-tol' into regulator-next

12 years agoregulator: add a new API regulator_set_voltage_tol()
Shawn Guo [Sun, 5 Aug 2012 15:05:20 +0000 (23:05 +0800)]
regulator: add a new API regulator_set_voltage_tol()

There are some use cases where a voltage range could be reasonably
specified by a target voltage and tolerance.  Add a new API
regulator_set_voltage_tol() wrapping regulator_set_voltage() call
to ease the users.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'regulator-core' into regulator-next
Mark Brown [Wed, 8 Aug 2012 13:33:24 +0000 (14:33 +0100)]
Merge branch 'regulator-core' into regulator-next

12 years agoregulator: make the dummy regulator's print_constraint more helpful
Uwe Kleine-König [Tue, 7 Aug 2012 19:01:37 +0000 (21:01 +0200)]
regulator: make the dummy regulator's print_constraint more helpful

This prevents the output of just

dummy:

in the boot log. Now it says:

regulator-dummy: no parameters

which at least doesn't make it look like an accidental printk and also doesn't
only use "dummy" which could mean anything.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'regulator-linus' into regulator-next
Mark Brown [Wed, 8 Aug 2012 11:16:14 +0000 (12:16 +0100)]
Merge branch 'regulator-linus' into regulator-next

12 years agoregulator: gpio-regulator: Split setting of voltages and currents
Heiko Stübner [Tue, 7 Aug 2012 22:50:19 +0000 (00:50 +0200)]
regulator: gpio-regulator: Split setting of voltages and currents

Originally gpio-regulator used the first item of its state list
that matched the given voltage or current range.

Commit 4dbd8f63f0 (regulator: gpio-regulator: Set the smallest voltage/current
in the specified range) changed this, to make the selection independent of
the ordering of the state list.

But selecting the minimal value is only true for voltage regulators.
For current regulators the maximum in the given range should be
selected instead.

Therefore split the previous common selection function into specific
functions for voltage and current regulators.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: max77686: Use array to save pointer to rdev
Axel Lin [Sun, 5 Aug 2012 02:11:16 +0000 (10:11 +0800)]
regulator: max77686: Use array to save pointer to rdev

MAX77686_REGULATORS is known in compile time.
Use array to save pointer to rdev makes the code simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: max77686: initialize of_node param for regulator register
Axel Lin [Sun, 5 Aug 2012 02:09:57 +0000 (10:09 +0800)]
regulator: max77686: initialize of_node param for regulator register

Initialize config.of_node for regulator before registering.
This is needed for DT based regulator support.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branches 'regulator-linus', 'regulator-core' and 'regulator-drivers' into regul...
Mark Brown [Tue, 7 Aug 2012 17:11:05 +0000 (18:11 +0100)]
Merge branches 'regulator-linus', 'regulator-core' and 'regulator-drivers' into regulator-next

12 years agoregulator: ab3100: add missing voltage table
Linus Walleij [Mon, 6 Aug 2012 15:11:40 +0000 (17:11 +0200)]
regulator: ab3100: add missing voltage table

The conversion to voltage tables in

commit a3beb74261f26142019847128b2441b0301797ac
"regulator: ab3100: Use regulator_list_voltage_table()"

missed to add the voltage table to the buck. Fix this and
it works like a charm.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: anatop: Fix wrong mask used in anatop_get_voltage_sel
Axel Lin [Mon, 16 Jul 2012 16:10:42 +0000 (00:10 +0800)]
regulator: anatop: Fix wrong mask used in anatop_get_voltage_sel

The mask used in anatop_get_voltage_sel does not match the mask used in
anatop_set_voltage_sel.
We need to do left shift anatop_reg->vol_bit_shift bits for the correct mask.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: tps6586x: correct vin pin for sm0/sm1/sm2
Laxman Dewangan [Tue, 24 Jul 2012 08:18:00 +0000 (13:48 +0530)]
regulator: tps6586x: correct vin pin for sm0/sm1/sm2

As per datasheet, the vin pin for the regulator is named
as vin_sm0, vin_sm1, vin_sm2 for sm0, sm1 and sm2 respectively.

Correcting the names in driver and documentation to match with
datasheet.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reported-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: palmas: Fix palmas_probe error handling
Axel Lin [Wed, 18 Jul 2012 04:33:20 +0000 (12:33 +0800)]
regulator: palmas: Fix palmas_probe error handling

Fix below error handling cases:

1. If reading PALMAS_SMPS_CTRL fails, simply returns ret rather than goto
   err_unregister_regulator because we have not call regulator_register().
2. If palmas_ldo_init() fails, we need to call regulator_unregister() for the
   regulator we just successfully registered in this for loop iteration.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: palmas: Call palmas_ldo_[read|write] in palmas_ldo_init
Axel Lin [Wed, 18 Jul 2012 04:31:59 +0000 (12:31 +0800)]
regulator: palmas: Call palmas_ldo_[read|write] in palmas_ldo_init

Current code uses wrong calls palmas_smps_[read|write] in palmas_ldo_init(),
should be palmas_ldo_[read|write] instead.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: palmas: Fix regmap offsets for PALMAS_REG_SMPS10 vsel_reg
Axel Lin [Wed, 18 Jul 2012 04:31:03 +0000 (12:31 +0800)]
regulator: palmas: Fix regmap offsets for PALMAS_REG_SMPS10 vsel_reg

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: palmas: Fix calculating selector in palmas_map_voltage_ldo
Axel Lin [Wed, 18 Jul 2012 04:30:11 +0000 (12:30 +0800)]
regulator: palmas: Fix calculating selector in palmas_map_voltage_ldo

This patch fixes below issues when choosing selector:

1. Current code returns negative selector if min_uV < 900000 which is wrong.
   For example, it is possible to satisfy the request with selector = 1 if
   the requested min_uV is 850000.
2. Current code may select a voltage lower than requested min_uV.
   For example, if the requested min_uV is 945000, current code chooses
   selector = 1 which is lower than requested min_uV.
   DIV_ROUND_UP to avoid this case.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: core: Fix cast to pointer from integer of different size warning
Axel Lin [Mon, 6 Aug 2012 15:44:19 +0000 (23:44 +0800)]
regulator: core: Fix cast to pointer from integer of different size warning

This is to address the following warning during compilation time: (Compile on x86_64)

  CC      drivers/regulator/core.o
drivers/regulator/core.c: In function '_regulator_do_set_voltage':
drivers/regulator/core.c:2183:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

This patch adds a temporary variable to avoid double cast.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: ab8500: Set enable enable_time in regulator_desc
Axel Lin [Tue, 7 Aug 2012 14:21:23 +0000 (22:21 +0800)]
regulator: ab8500: Set enable enable_time in regulator_desc

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>
12 years agoMerge branches 'timers-urgent-for-linus' and 'perf-urgent-for-linus' of git://git...
Linus Torvalds [Sun, 5 Aug 2012 19:28:49 +0000 (22:28 +0300)]
Merge branches 'timers-urgent-for-linus' and 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timers and perf fixes from Ingo Molnar:
 "Timers:
 - Fix another timekeeping bug

 Pef:
   - Make clean brace expansion fix for some shells, from Palmer Cox

   - Warn user just once per guest kernel when not finding kernel info,
     from David Ahern

   - perf test fix from Jiri Olsa

   - Fix error handling on event creation in perf top, from David Ahern

   - Fix check on perf_target__strnerror, from Namhyung Kim

   - Save the whole cmdline, from David Ahern

  There's this infrastructure change:

   - Prep work for the DWARF CFI post unwinder, so that it doesn't use
     perf_session in lots of places, just evlist/evsel is enough.

  which is a late infrastructure change that prepare for future feature
  work - we wanted it upstream to simplify the fixes/development patch
  flows."

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  time: Fix adjustment cleanup bug in timekeeping_adjust()

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf tools: Remove brace expansion from clean target
  perf kvm top: Limit guest kernel info message to once
  perf tools: Introduce intlist
  perf tools: Change strlist to use the new rblist
  perf tools: Introducing rblist
  perf kvm: Use strtol for walking guestmount directory
  perf tool: Save cmdline from user in file header vs what is passed to record
  perf top: Error handling for counter creation should parallel perf-record
  perf session: Remove no longer used synthesize_sample method
  perf evsel: Adopt parse_sample method from perf_event
  perf evlist: Introduce perf_evlist__parse_sample
  perf session: Use perf_evlist__id_hdr_size more extensively
  perf session: Use perf_evlist__sample_id_all more extensively
  perf session: Use perf_evlist__sample_type more extensively
  perf evsel: Precalculate the sample size
  perf target: Fix check on buffer size
  perf symbols: Fix array sizes for binary types arrays
  perf test: Fix parse events automated tests

12 years agoMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Sun, 5 Aug 2012 10:39:12 +0000 (12:39 +0200)]
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/core fixes and some late updates from Arnaldo Carvalho de Melo:

 * Make clean brace expansion fix for some shells, from Palmer Cox

 * Warn user just once per guest kernel when not finding kernel info,
   from David Ahern

 * perf test fix from Jiri Olsa

 * Fix error handling on event creation in perf top, from David Ahern

 * Fix check on perf_target__strnerror, from Namhyung Kim

 * Save the whole cmdline, from David Ahern

 * Prep work for the DWARF CFI post unwinder, so that it doesn't
   uses perf_session in lots of places, just evlist/evsel is enough.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
12 years agotime: Fix adjustment cleanup bug in timekeeping_adjust()
Ingo Molnar [Sat, 4 Aug 2012 19:21:14 +0000 (21:21 +0200)]
time: Fix adjustment cleanup bug in timekeeping_adjust()

Tetsuo Handa reported that sporadically the system clock starts
counting up too quickly which is enough to confuse the hangcheck
timer to print a bogus stall warning.

Commit 2a8c0883 "time: Move xtime_nsec adjustment underflow handling
timekeeping_adjust" overlooked this exit path:

        } else
                return;

which should really be a proper exit sequence, fixing the bug as a
side effect.

Also make the flow more readable by properly balancing curly
braces.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
Tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: john.stultz@linaro.org
Cc: a.p.zijlstra@chello.nl
Cc: richardcochran@gmail.com
Cc: prarit@redhat.com
Link: http://lkml.kernel.org/r/20120804192114.GA28347@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
12 years agoMerge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sat, 4 Aug 2012 15:32:46 +0000 (08:32 -0700)]
Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull VFS fixes and cleanups from Al Viro.

Most of this is the series to remove sync_supers() and the
->write_supers VFS callback from Artem Bityutskiy.  One commit to do the
actual removal work, a whole series of commits to fix up stale comments
etc all over the tree.

There's also a regression fix for an incorrect use of mnt_drop_write()
in do_dentry_open().

* 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  missed mnt_drop_write() in do_dentry_open()
  UBIFS: nuke pdflush from comments
  gfs2: nuke pdflush from comments
  drbd: nuke pdflush from comments
  nilfs2: nuke write_super from comments
  hfs: nuke write_super from comments
  vfs: nuke pdflush from comments
  jbd/jbd2: nuke write_super from comments
  btrfs: nuke pdflush from comments
  btrfs: nuke write_super from comments
  ext4: nuke pdflush from comments
  ext4: nuke write_super from comments
  ext3: nuke write_super from comments
  Documentation: fix the VM knobs descritpion WRT pdflush
  Documentation: get rid of write_super
  vfs: kill write_super and sync_supers

12 years agoregulator: Fix space/tab confusion
Michael Jones [Thu, 26 Jul 2012 14:07:23 +0000 (16:07 +0200)]
regulator: Fix space/tab confusion

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: core: increment open_count when regulator supply is set
Laxman Dewangan [Mon, 23 Jul 2012 15:05:46 +0000 (20:35 +0530)]
regulator: core: increment open_count when regulator supply is set

When registering the regulator and setting supply for the regulator
then increment open_count to reflect correct number of users.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agomissed mnt_drop_write() in do_dentry_open()
Al Viro [Sat, 4 Aug 2012 04:39:23 +0000 (08:39 +0400)]
missed mnt_drop_write() in do_dentry_open()

This one ought to be __mnt_drop_write(), to match __mnt_want_write()
in the beginning...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoUBIFS: nuke pdflush from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:14 +0000 (18:12 +0300)]
UBIFS: nuke pdflush from comments

The pdflush thread is long gone, so this patch removes references to pdflush
from UBIFS comments.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agogfs2: nuke pdflush from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:13 +0000 (18:12 +0300)]
gfs2: nuke pdflush from comments

The pdflush thread is long gone, so this patch removes references to pdflush
from gfs comments.

Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agodrbd: nuke pdflush from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:12 +0000 (18:12 +0300)]
drbd: nuke pdflush from comments

The pdflush thread is long gone, so this patch removes references to pdflush
from drbd comments.

Cc: drbd-dev@lists.linbit.com
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agonilfs2: nuke write_super from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:11 +0000 (18:12 +0300)]
nilfs2: nuke write_super from comments

The '->write_super' superblock method is gone, and this patch removes all the
references to 'write_super' from ntfs.

Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agohfs: nuke write_super from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:09 +0000 (18:12 +0300)]
hfs: nuke write_super from comments

The '->write_super' superblock method is gone, and this patch removes all the
references to 'write_super' from hfs.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agovfs: nuke pdflush from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:08 +0000 (18:12 +0300)]
vfs: nuke pdflush from comments

The pdflush thread is long gone, so this patch removes references to pdflush
from vfs comments.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agojbd/jbd2: nuke write_super from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:07 +0000 (18:12 +0300)]
jbd/jbd2: nuke write_super from comments

The '->write_super' superblock method is gone, and this patch removes all the
references to 'write_super' from various jbd and jbd2.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agobtrfs: nuke pdflush from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:06 +0000 (18:12 +0300)]
btrfs: nuke pdflush from comments

The pdflush thread is long gone, so this patch removes references to pdflush
from btrfs comments.

Cc: Chris Mason <chris.mason@fusionio.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agobtrfs: nuke write_super from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:05 +0000 (18:12 +0300)]
btrfs: nuke write_super from comments

The '->write_super' superblock method is gone, and this patch removes all the
references to 'write_super' from btrfs.

Cc: Chris Mason <chris.mason@fusionio.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoext4: nuke pdflush from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:04 +0000 (18:12 +0300)]
ext4: nuke pdflush from comments

The pdflush thread is long gone, so this patch removes references to pdflush
from ext4 comments.

Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoext4: nuke write_super from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:03 +0000 (18:12 +0300)]
ext4: nuke write_super from comments

The '->write_super' superblock method is gone, and this patch removes all the
references to 'write_super' from ext3.

Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoext3: nuke write_super from comments
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:02 +0000 (18:12 +0300)]
ext3: nuke write_super from comments

The '->write_super' superblock method is gone, and this patch removes all the
references to 'write_super' from ext3.

Cc: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoDocumentation: fix the VM knobs descritpion WRT pdflush
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:01 +0000 (18:12 +0300)]
Documentation: fix the VM knobs descritpion WRT pdflush

The pdflush thread is long gone, however we still mention it incorrectly in the
kernel documentation. This patch fixes the situation.

Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoregulator: core: Clarify grammar for dummy help text
Mark Brown [Thu, 26 Jul 2012 14:50:49 +0000 (15:50 +0100)]
regulator: core: Clarify grammar for dummy help text

Too many thens in the if...then clause.

Reported-by: Michael Jones <michael.jones@matrix-vision.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: wm8400: Simplify set REGULATOR_MODE_IDLE mode in wm8400_dcdc_set_mode
Axel Lin [Wed, 1 Aug 2012 01:15:11 +0000 (09:15 +0800)]
regulator: wm8400: Simplify set REGULATOR_MODE_IDLE mode in wm8400_dcdc_set_mode

To set REGULATOR_MODE_IDLE mode, what we do is to clear DC1_ACTIVE and
DC1_SLEEP bits, this can be done in one wm8400_set_bits() call.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: wm831x-ldo: Check return value of wm831x_reg_read()
Axel Lin [Tue, 31 Jul 2012 13:28:26 +0000 (21:28 +0800)]
regulator: wm831x-ldo: Check return value of wm831x_reg_read()

wm831x_reg_read() returns negative error code on failure.
This prevents using the error code as the value read.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: tps6586x: Convert to regulator_[enable|disable|is_enabled|get_voltage_sel...
Axel Lin [Wed, 25 Jul 2012 00:51:44 +0000 (08:51 +0800)]
regulator: tps6586x: Convert to regulator_[enable|disable|is_enabled|get_voltage_sel]_regmap

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: Use BUCK_FPWM_[MASK|SHIFT] macros to replace buck_pmap table
Axel Lin [Fri, 20 Jul 2012 15:10:55 +0000 (23:10 +0800)]
regulator: Use BUCK_FPWM_[MASK|SHIFT] macros to replace buck_pmap table

Below is the buck_pmap mapping table:

BUCK1:  mask = 1 << 0,  shift = 0
BUCK2:  mask = 1 << 1,  shift = 1
BUCK3:  mask = 1 << 2,  shift = 2
BUCK4:  mask = 1 << 3,  shift = 3

The mask and shift can be easily calculated by:
        mask = 1 << BUCK_ID
        shift = BUCK_ID

This patch defines BUCK_FPWM_MASK and BUCK_FPWM_SHIFT macros to replace
buck_pmap mapping table.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: lp8788-buck: Remove lp8788_set_default_dvs_ctrl_mode function
Axel Lin [Fri, 20 Jul 2012 14:22:20 +0000 (22:22 +0800)]
regulator: lp8788-buck: Remove lp8788_set_default_dvs_ctrl_mode function

We already know the mask in lp8788_init_dvs() function, and we can update
the corresponding bit for default_dvs_mode in lp8788_init_dvs() function.
This function looks not necessary to me.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: lp8788-ldo: Set n_voltages to 1 for fixed voltage
Axel Lin [Fri, 20 Jul 2012 12:31:19 +0000 (20:31 +0800)]
regulator: lp8788-ldo: Set n_voltages to 1 for fixed voltage

For fixed voltage, the n_voltages should be 1 rather than 0.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: mc13892: Convert mc13892_sw_regulator_ops to get_voltage_sel
Axel Lin [Thu, 19 Jul 2012 07:11:39 +0000 (15:11 +0800)]
regulator: mc13892: Convert mc13892_sw_regulator_ops to get_voltage_sel

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: mc13892: Simplify implementation of mc13892_sw_regulator_set_voltage_sel()
Axel Lin [Thu, 19 Jul 2012 07:10:31 +0000 (15:10 +0800)]
regulator: mc13892: Simplify implementation of mc13892_sw_regulator_set_voltage_sel()

Use mc13xxx_reg_rmw rather than a mc13xxx_reg_read and a mc13xxx_reg_write calls.

This logic to set MC13892_SWITCHERS0_SWxHI bit is pretty simple:

if (volt > 1375000)
        set MC13892_SWITCHERS0_SWxHI bit
else if (volt < 1100000)
        clear MC13892_SWITCHERS0_SWxHI bit
else
        leave MC13892_SWITCHERS0_SWxHI bit untouched

We already know the selector, so we don't need to calculate the selector again.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: mc13892: Make mc13892_powermisc_rmw() lock protected
Axel Lin [Thu, 19 Jul 2012 03:17:15 +0000 (11:17 +0800)]
regulator: mc13892: Make mc13892_powermisc_rmw() lock protected

Then we can remove lock/unlock around the caller.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: mc13783: Make mc13783_powermisc_rmw() lock protected
Axel Lin [Thu, 19 Jul 2012 03:16:06 +0000 (11:16 +0800)]
regulator: mc13783: Make mc13783_powermisc_rmw() lock protected

Then we can remove lock/unlock around the caller.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: palmas: Convert palmas_ops_ldo to [get|set]_voltage_sel_regmap
Axel Lin [Wed, 18 Jul 2012 04:34:08 +0000 (12:34 +0800)]
regulator: palmas: Convert palmas_ops_ldo to [get|set]_voltage_sel_regmap

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: twl: Convert twlsmps_ops to get_voltage_sel and map_voltage
Axel Lin [Sat, 14 Jul 2012 05:41:23 +0000 (13:41 +0800)]
regulator: twl: Convert twlsmps_ops to get_voltage_sel and map_voltage

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: twl: Fix checking voltage range in twl6030smps_set_voltage()
Axel Lin [Sat, 14 Jul 2012 05:37:13 +0000 (13:37 +0800)]
regulator: twl: Fix checking voltage range in twl6030smps_set_voltage()

The voltage selection logic is supposed to find the samllest voltage falls
within specified range. When using equation to calculate vsel, we need to
ensure the requested min_uV meet the range of using the equation.
Otherwise we may select a voltage that is out of specified range.

For example, in the case vsel = 62 means select voltage of 2100000uV.
What we want is to ensure the requested min_uV <= 2100000 rather than checking
max_uV >= 2100000. And this also means in the case min_uV > 2100000, vsel = 62
does not meet the request.

Also calling twl6030smps_list_voltage() for all cases to ensure the selected
voltage still in bounds.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: mc13xxx: Populate selector from mc13xxx_fixed_regulator_set_voltage
Axel Lin [Fri, 13 Jul 2012 15:01:14 +0000 (23:01 +0800)]
regulator: mc13xxx: Populate selector from mc13xxx_fixed_regulator_set_voltage

This was missing until now and the underlying
_regulator_do_set_voltage is using this value when calling list_voltage.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: s2mps11: Use array to save pointer to rdev
Axel Lin [Fri, 13 Jul 2012 02:12:40 +0000 (10:12 +0800)]
regulator: s2mps11: Use array to save pointer to rdev

The number of regulator is known at compile time, use array to save pointer to
rdev makes the code simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoDocumentation: get rid of write_super
Artem Bityutskiy [Wed, 25 Jul 2012 15:12:00 +0000 (18:12 +0300)]
Documentation: get rid of write_super

The '->write_super' superblock method is gone, and this patch removes all the
references to 'write_super' from various pieces of the kernel documentation.

Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agovfs: kill write_super and sync_supers
Artem Bityutskiy [Wed, 25 Jul 2012 15:11:59 +0000 (18:11 +0300)]
vfs: kill write_super and sync_supers

Finally we can kill the 'sync_supers' kernel thread along with the
'->write_super()' superblock operation because all the users are gone.
Now every file-system is supposed to self-manage own superblock and
its dirty state.

The nice thing about killing this thread is that it improves power management.
Indeed, 'sync_supers' is a source of monotonic system wake-ups - it woke up
every 5 seconds no matter what - even if there were no dirty superblocks and
even if there were no file-systems using this service (e.g., btrfs and
journalled ext4 do not need it). So it was wasting power most of the time. And
because the thread was in the core of the kernel, all systems had to have it.
So I am quite happy to make it go away.

Interestingly, this thread is a left-over from the pdflush kernel thread which
was a self-forking kernel thread responsible for all the write-back in old
Linux kernels. It was turned into per-block device BDI threads, and
'sync_supers' was a left-over. Thus, R.I.P, pdflush as well.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Linus Torvalds [Fri, 3 Aug 2012 21:10:00 +0000 (14:10 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux

Pull ACPI and power management fixes from Len Brown:
 "A 3.3 sleep regression fixed, numa bugfix, plus some minor cleanups"

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  ACPI processor: Fix tick_broadcast_mask online/offline regression
  ACPI: Only count valid srat memory structures
  ACPI: Untangle a return statement for better readability
  ACPI / PCI: Do not try to acquire _OSC control if that is hopeless
  ACPI: delete _GTS/_BFS support
  ACPI/x86: revert 'x86, acpi: Call acpi_enter_sleep_state via an asmlinkage C function from assembler'
  ACPI: replace strlen("string") with sizeof("string") -1
  ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset

12 years agoMerge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
Linus Torvalds [Fri, 3 Aug 2012 20:24:07 +0000 (13:24 -0700)]
Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd

Pull exofs update from Boaz Harrosh:
 "They are all mostly fixes, except the most important patch by Artem
  Bityutskiy which removes the use of s_dirt.  After this patch s_dirt
  can be completely removed from the tree."

* 'for-linus' of git://git.open-osd.org/linux-open-osd:
  ore: Fix out-of-bounds access in _ios_obj()
  exofs: Use proper max_IO calculations from ore
  exofs: Fix __r4w_get_page when offset is beyond i_size
  exofs: stop using s_dirt
  exofs: readpage_strip: Add a BUG_ON to check for PageLocked(page)

12 years agoMerge git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Fri, 3 Aug 2012 18:21:29 +0000 (11:21 -0700)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM bug fixes from Marcelo Tosatti:
 - Fix DS/ES segment register corruption on x86_32.
 - Fix kvmclock wallclock migration offset.
 - Fix PIT interrupt ACK vs system reset logic bug.

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: VMX: Fix ds/es corruption on i386 with preemption
  KVM: x86: apply kvmclock offset to guest wall clock time
  KVM: PIC: call ack notifiers for irqs that are dropped form irr

12 years agoMerge tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 3 Aug 2012 18:20:19 +0000 (11:20 -0700)]
Merge tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A bunch of small fixes for ASoC, mainly against regressions due to the
  defaulting regmap i/o, in addition to a HD-audio fixup."

* tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: core: Fix check before defaulting to regmap
  ALSA: hda - Support dock on Lenovo Thinkpad T530 with ALC269VC
  ASoC: wm8962: Allow VMID time to fully ramp
  ASoC: AC97 doesn't use regmap by default
  ASoC: sgtl5000: enable VAG_POWER for LINE_IN
  ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements
  ASoC: omap: Add missing modules aliases to get sound working on omap devices
  sound: tegra_alc5632: Adjust to of_get_named_gpio() change
  sound: tegra_wm8903: Adjust to of_get_named_gpio() change
  ASoC: mc13783: Provide codec->control_data
  ASoC: ux500: Include the correct header files
  ASoC: wm8994: Hold runtime PM reference while handling mic and jack IRQs
  ASoC: sgtl5000: remove unneeded snd_soc_dapm_new_widgets in probe
  ASoC: mxs-saif: set a base clock rate for EXTMASTER mode work
  ASoC: mxs-saif: fix clock prepare and enable unbalance issue
  ASoC: wm8994: Ensure there are enough BCLKs for four channels

12 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 3 Aug 2012 18:00:26 +0000 (11:00 -0700)]
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull futex fixes from Ingo Molnar:
 "A couple of futex fixes from Darren Hart: two bugs reported by Dave
  Jones (found with his trinity test) and Dan Carpenter through static
  analysis.  The third found while debugging the first two."

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Forbid uaddr == uaddr2 in futex_wait_requeue_pi()
  futex: Fix bug in WARN_ON for NULL q.pi_state
  futex: Test for pi_mutex on fault in futex_wait_requeue_pi()

12 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 3 Aug 2012 17:59:36 +0000 (10:59 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Various fixes"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-64, kcmp: The kcmp system call can be common
  arch/x86/kernel/kdebugfs.c: Ensure a consistent return value in error case
  x86/mce: Add quirk for instruction recovery on Sandy Bridge processors
  x86/mce: Move MCACOD defines from mce-severity.c to <asm/mce.h>
  x86/ioapic: Fix NULL pointer dereference on CPU hotplug after disabling irqs
  x86, nops: Missing break resulting in incorrect selection on Intel
  x86: CONFIG_CC_STACKPROTECTOR=y is no longer experimental

12 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 3 Aug 2012 17:58:57 +0000 (10:58 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Ingo Molnar:
 "One regression fix, and a couple of cleanups that clean up the code
  flow in areas that had high-profile bugs recently."

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  time: Remove all direct references to timekeeper
  time: Clean up offs_real/wall_to_mono and offs_boot/total_sleep_time updates
  time: Clean up stray newlines
  time/jiffies: Rename ACTHZ to SHIFTED_HZ
  time/jiffies: Allow CLOCK_TICK_RATE to be undefined
  time: Fix casting issue in tk_set_xtime and tk_xtime_add

12 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 3 Aug 2012 17:58:13 +0000 (10:58 -0700)]
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Fixes and two late cleanups"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/cleanups: Add load balance cpumask pointer to 'struct lb_env'
  sched: Fix comment about PREEMPT_ACTIVE bit location
  sched: Fix minor code style issues
  sched: Use task_rq_unlock() in __sched_setscheduler()
  sched/numa: Add SD_PERFER_SIBLING to CPU domain

12 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 3 Aug 2012 17:57:20 +0000 (10:57 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Fix merge window fallout and fix sleep profiling (this was always
  broken, so it's not a fix for the merge window - we can skip this one
  from the head of the tree)."

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/trace: Add ability to set a target task for events
  perf/x86: Fix USER/KERNEL tagging of samples properly
  perf/x86/intel/uncore: Make UNCORE_PMU_HRTIMER_INTERVAL 64-bit

12 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 3 Aug 2012 17:56:44 +0000 (10:56 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fix from Ingo Molnar.

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Allow irq chips to mark themself oneshot safe

12 years agoMerge tag 'for_linux-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jwesse...
Linus Torvalds [Fri, 3 Aug 2012 17:53:47 +0000 (10:53 -0700)]
Merge tag 'for_linux-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb

Pull KGDB/KDB/usb-dbgp fixes and cleanups from Jason Wessel:
 "There are no new features, those will be delayed to the 3.7 window.
  There are only fixes/cleanup against the usual kernel churn and we are
  removing more lines than we add:

   - usb-dbgp - increase the controller wait time to come out of halt.
   - kdb - Remove unused KDB_FLAG_ONLY_DO_DUMP code and cpu in more prompt
   - debug core - pass NMI type on archs that provide NMI types"

* tag 'for_linux-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb:
  USB: echi-dbgp: increase the controller wait time to come out of halt.
  kernel/debug: Make use of KGDB_REASON_NMI
  kdb: Remove cpu from the more prompt
  kdb: Remove unused KDB_FLAG_ONLY_DO_DUMP

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Fri, 3 Aug 2012 17:52:41 +0000 (10:52 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull m68k updates from Geert Uytterhoeven.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Make sys_atomic_cmpxchg_32 work on classic m68k
  m68k/apollo: Rename "timer" to "apollo_timer"
  zorro: Remove unused zorro_bus.devices
  m68k: Remove never used asm/shm.h
  m68k/sun3: Remove unselectable code in prom_init()
  m68k: Use asm-generic version of <asm/sections.h>
  m68k: Replace m68k-specific _[se]bss by generic __bss_{start,stop}
  mtd/uclinux: Use generic __bss_stop instead of _ebss
  m68knommu: Allow ColdFire CPUs to use unaligned accesses
  m68k: Remove five unused headers
  m68k: CPU32 does not support unaligned accesses
  m68k: Introduce config option CPU_HAS_NO_UNALIGNED
  m68k: delay, muldi3 - Use CONFIG_CPU_HAS_NO_MULDIV64
  m68k: Move CPU_HAS_* config options
  m68k: Remove duplicate FPU config option
  m68knommu: Clean up printing of sections
  m68k: Use asm-generic version of <asm/types.h>
  m68k: Use Kbuild logic to import asm-generic headers

12 years agoperf tools: Remove brace expansion from clean target
Palmer Cox [Sun, 29 Jul 2012 21:54:43 +0000 (17:54 -0400)]
perf tools: Remove brace expansion from clean target

The clean target uses brace expansion to remove some generated files. However,
the default shells on many systems do not support this feature resulting in
some generated files not being removed by clean.

Signed-off-by: Palmer Cox <p@lmercox.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1343598883-17907-1-git-send-email-p@lmercox.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>