platform/kernel/linux-rpi.git
5 years agoregulator: mt63xx: Switch to SPDX identifier
Axel Lin [Sun, 21 Apr 2019 02:26:56 +0000 (10:26 +0800)]
regulator: mt63xx: Switch to SPDX identifier

Convert MediaTek mt63xx PMIC drivers to SPDX identifier.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: fan53555: Switch to SPDX identifier
Axel Lin [Fri, 19 Apr 2019 00:58:24 +0000 (08:58 +0800)]
regulator: fan53555: Switch to SPDX identifier

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: fan53555: Clean up unneeded fields from struct fan53555_device_info
Axel Lin [Fri, 19 Apr 2019 00:58:23 +0000 (08:58 +0800)]
regulator: fan53555: Clean up unneeded fields from struct fan53555_device_info

The *regmap and *rdev can be replaced by local variables.
The slew_rate is no longer used since commit dd7e71fbeefe
("regulator: fan53555: use set_ramp_delay to set the ramp up slew rate").

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: ltc3589: Switch to SPDX identifier
Axel Lin [Thu, 18 Apr 2019 11:45:00 +0000 (19:45 +0800)]
regulator: ltc3589: Switch to SPDX identifier

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: ltc3589: Get rid of struct ltc3589_regulator
Axel Lin [Thu, 18 Apr 2019 11:44:59 +0000 (19:44 +0800)]
regulator: ltc3589: Get rid of struct ltc3589_regulator

After converting to use simplified DT parsing, the struct ltc3589_regulator
only has a desc member. So let's remove struct ltc3589_regulator and use
struct regulator_desc instead.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: ltc3589: Convert to use simplified DT parsing
Axel Lin [Thu, 18 Apr 2019 11:44:58 +0000 (19:44 +0800)]
regulator: ltc3589: Convert to use simplified DT parsing

Use regulator core's simplified DT parsing code to simplify the driver
implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: wm8400: Switch to SPDX identifier
Axel Lin [Wed, 17 Apr 2019 14:16:32 +0000 (22:16 +0800)]
regulator: wm8400: Switch to SPDX identifier

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: wm8350: Switch to SPDX identifier
Axel Lin [Wed, 17 Apr 2019 14:16:31 +0000 (22:16 +0800)]
regulator: wm8350: Switch to SPDX identifier

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: wm831x: Switch to SPDX identifier
Axel Lin [Wed, 17 Apr 2019 14:16:30 +0000 (22:16 +0800)]
regulator: wm831x: Switch to SPDX identifier

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: arizona: Switch to SPDX identifier
Axel Lin [Wed, 17 Apr 2019 14:16:29 +0000 (22:16 +0800)]
regulator: arizona: Switch to SPDX identifier

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: wm8994: Switch to SPDX identifier
Axel Lin [Wed, 17 Apr 2019 14:16:33 +0000 (22:16 +0800)]
regulator: wm8994: Switch to SPDX identifier

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: stm32-pwr: Fix return value check in stm32_pwr_regulator_probe()
Wei Yongjun [Wed, 17 Apr 2019 02:30:59 +0000 (02:30 +0000)]
regulator: stm32-pwr: Fix return value check in stm32_pwr_regulator_probe()

In case of error, the function of_iomap() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Fixes: 6cdae8173f67 ("regulator: Add support for stm32 power regulators")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: ready_mask_table[] can be static
kbuild test robot [Mon, 15 Apr 2019 16:52:38 +0000 (00:52 +0800)]
regulator: ready_mask_table[] can be static

Fixes: 6cdae8173f67 ("regulator: Add support for stm32 power regulators")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps80031: Switch to SPDX identifier
Axel Lin [Tue, 16 Apr 2019 10:17:29 +0000 (18:17 +0800)]
regulator: tps80031: Switch to SPDX identifier

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps80031: Constify regulator_ops and tps80031_dcdc_voltages array
Axel Lin [Tue, 16 Apr 2019 10:17:28 +0000 (18:17 +0800)]
regulator: tps80031: Constify regulator_ops and tps80031_dcdc_voltages array

These regulator_ops variables and tps80031_dcdc_voltages array never need
to be modified, make them const so compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps80031: Remove unused *rdev from struct tps80031_regulator
Axel Lin [Tue, 16 Apr 2019 10:17:27 +0000 (18:17 +0800)]
regulator: tps80031: Remove unused *rdev from struct tps80031_regulator

The ri-rdev is assigend but not used, so remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: Add support for stm32 power regulators
Pascal PAILLET-LME [Mon, 15 Apr 2019 09:17:38 +0000 (09:17 +0000)]
regulator: Add support for stm32 power regulators

Add support for 1V1 1V8 USB3V3 power regulators.

Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agodt-bindings: regulator: Add stm32mp1 pwr regulators
Pascal PAILLET-LME [Mon, 15 Apr 2019 09:17:37 +0000 (09:17 +0000)]
dt-bindings: regulator: Add stm32mp1 pwr regulators

Document devicetree bindings for stm32mp1 pwr regulators.

Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: max8998: Factor out struct voltage_map_desc
Axel Lin [Sun, 14 Apr 2019 12:48:18 +0000 (20:48 +0800)]
regulator: max8998: Factor out struct voltage_map_desc

The struct voltage_map_desc is used for storing min/max/step fileds, and
then setup the min_uV, uV_step and n_voltages fields for regulator_desc.
Introduce MAX8998_LINEAR_REG/MAX8998_OTHERS_REG macro to setup these filds
directly in regulator_desc to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: max8998: Constify regulator_ops
Axel Lin [Sun, 14 Apr 2019 12:48:17 +0000 (20:48 +0800)]
regulator: max8998: Constify regulator_ops

These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps6524x: Remove *rdev[N_REGULATORS] from struct tps6524x
Axel Lin [Sat, 13 Apr 2019 07:30:02 +0000 (15:30 +0800)]
regulator: tps6524x: Remove *rdev[N_REGULATORS] from struct tps6524x

Current code is using devm_regulator_register() so we don't need to store
*rdev for clean up, use a local variable instead.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps6524x: Constify regulator_ops
Axel Lin [Sat, 13 Apr 2019 07:30:01 +0000 (15:30 +0800)]
regulator: tps6524x: Constify regulator_ops

The regulator_ops is never changed, make it const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps65218: Convert to use regulator_get_current_limit_regmap
Axel Lin [Sat, 13 Apr 2019 02:29:07 +0000 (10:29 +0800)]
regulator: tps65218: Convert to use regulator_get_current_limit_regmap

Use regulator_get_current_limit_regmap helper to save some code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: ab8500: Remove *regulator from struct ab8500_regulator_info
Axel Lin [Fri, 12 Apr 2019 14:11:58 +0000 (22:11 +0800)]
regulator: ab8500: Remove *regulator from struct ab8500_regulator_info

Current code is using devm_regulator_register() so we don't need to save
*regulator for clean up, use a local variable instead.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: ab8500: Constify regulator_ops
Axel Lin [Fri, 12 Apr 2019 14:11:57 +0000 (22:11 +0800)]
regulator: ab8500: Constify regulator_ops

These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: ab8500-ext: Constify ab8500_ext_regulator_ops
Axel Lin [Fri, 12 Apr 2019 14:06:56 +0000 (22:06 +0800)]
regulator: ab8500-ext: Constify ab8500_ext_regulator_ops

ab8500_ext_regulator_ops never need to be modified, make it const so
compiler can put it to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: ab8500-ext: Convert to use simplified DT parsing
Axel Lin [Fri, 12 Apr 2019 14:06:58 +0000 (22:06 +0800)]
regulator: ab8500-ext: Convert to use simplified DT parsing

Use regulator core's simplified DT parsing code to simplify the driver
implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: ab8500-ext: Remove *rdev from struct ab8500_ext_regulator_info
Axel Lin [Fri, 12 Apr 2019 14:06:57 +0000 (22:06 +0800)]
regulator: ab8500-ext: Remove *rdev from struct ab8500_ext_regulator_info

Current code is using devm_regulator_register() so we don't need to save
*rdev for clean up, use a local variable instead.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: dbx500-prcmu: Remove unused fields from struct dbx500_regulator_info
Axel Lin [Fri, 12 Apr 2019 01:54:21 +0000 (09:54 +0800)]
regulator: dbx500-prcmu: Remove unused fields from struct dbx500_regulator_info

The *dev is assigned but not used, remove it.
Current driver is using devm_regulator_register(), so no neeed to save
*rdev for clean up. Use a local variable instead.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: db8500-prcmu: Convert to use simplified DT parsing
Axel Lin [Fri, 12 Apr 2019 01:54:20 +0000 (09:54 +0800)]
regulator: db8500-prcmu: Convert to use simplified DT parsing

Use regulator core's simplified DT parsing code to simplify the driver
implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: db8500-prcmu: Constify regulator_ops
Axel Lin [Fri, 12 Apr 2019 01:54:19 +0000 (09:54 +0800)]
regulator: db8500-prcmu: Constify regulator_ops

These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: mcp16502: Remove setup_regulators function
Axel Lin [Thu, 11 Apr 2019 01:59:23 +0000 (09:59 +0800)]
regulator: mcp16502: Remove setup_regulators function

It seems a little bit odd current code pass struct regulator_config rather
than a pointer to setup_regulators. The setup_regulators is so simple and
only has one caller, so remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: mcp16502: Remove unneeded fields from struct mcp16502
Axel Lin [Thu, 11 Apr 2019 01:59:22 +0000 (09:59 +0800)]
regulator: mcp16502: Remove unneeded fields from struct mcp16502

At the context with rdev, we can use rdev->regmap instead of mcp->rmap.
The *rdev[NUM_REGULATORS] is not required because current code uses
devm_regulator_register() so we don't need to store *rdev for clean up
paths.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: vexpress: Constify regulator_ops
Axel Lin [Wed, 10 Apr 2019 16:19:37 +0000 (00:19 +0800)]
regulator: vexpress: Constify regulator_ops

vexpress_regulator_ops_ro and vexpress_regulator_ops are never changed,
make them const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: hi6421: Convert to use simplified DT parsing
Axel Lin [Wed, 10 Apr 2019 16:14:27 +0000 (00:14 +0800)]
regulator: hi6421: Convert to use simplified DT parsing

Use regulator core's simplified DT parsing code to simply the driver
implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: anatop: Remove unneeded fields from struct anatop_regulator
Axel Lin [Tue, 9 Apr 2019 16:10:39 +0000 (00:10 +0800)]
regulator: anatop: Remove unneeded fields from struct anatop_regulator

These fields are only used in anatop_regulator_probe() so use local
variables instead. The *initdata is not used so can be removed.
The *anatop is renamed to *regmap for better readability.
Use u32 instead of int for the variables used as third argument of
of_property_read_u32().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: s2mpa01: Remove unused define for S2MPA01_REGULATOR_CNT
Axel Lin [Tue, 9 Apr 2019 13:00:42 +0000 (21:00 +0800)]
regulator: s2mpa01: Remove unused define for S2MPA01_REGULATOR_CNT

The S2MPA01_REGULATOR_CNT is no longer used after converted to use
simplified DT parsing.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: hi655x: Remove ctrl_mask field from struct hi655x_regulator
Axel Lin [Mon, 8 Apr 2019 12:09:33 +0000 (20:09 +0800)]
regulator: hi655x: Remove ctrl_mask field from struct hi655x_regulator

The rdev->desc->enable_mask setting is always the same as
BIT(regulator->ctrl_mask), so just use rdev->desc->enable_mask instead.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: hi655x: Constify regulators array
Axel Lin [Mon, 8 Apr 2019 12:09:32 +0000 (20:09 +0800)]
regulator: hi655x: Constify regulators array

The regulators array should never need to be modified, make it const so
compiler can put it to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: s2mpa01: Convert to use simplified DT parsing
Axel Lin [Thu, 4 Apr 2019 15:07:09 +0000 (23:07 +0800)]
regulator: s2mpa01: Convert to use simplified DT parsing

Use regulator core's simplified DT parsing code to simply the driver
implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: bd718x7: Use rdev_get_id() to get regulator id
Axel Lin [Sun, 7 Apr 2019 09:03:02 +0000 (17:03 +0800)]
regulator: bd718x7: Use rdev_get_id() to get regulator id

Use rdev_get_id() instead of directly access rdev->desc->id.
While at it also remove unneeded init for ramp_value variable.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: ab8500: add range to usleep_range
Nicholas Mc Guire [Sun, 7 Apr 2019 02:59:34 +0000 (04:59 +0200)]
ASoC: ab8500: add range to usleep_range

Providing a range for usleep_range() allows the hrtimer subsystem to
coalesce timers - as this delay has no upper limit anyway (interrupts
or context switch is possible) it should not hurt to extend this
from 2 to 2-4 milliseconds.

Signed-off-by: Nicholas Mc Guire <hofrat@opentech.at>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: twl: Constify regulator_ops
Axel Lin [Tue, 2 Apr 2019 23:41:54 +0000 (07:41 +0800)]
regulator: twl: Constify regulator_ops

These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: lm363x: Constify regulator_ops
Axel Lin [Tue, 2 Apr 2019 12:13:48 +0000 (20:13 +0800)]
regulator: lm363x: Constify regulator_ops

The lm363x_boost_voltage_table_ops and lm363x_regulator_voltage_table_ops
never need to be modified, make them const so compiler can put them to
.rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: lm363x: Use proper data type for regmap_read arguments
Axel Lin [Tue, 2 Apr 2019 12:13:47 +0000 (20:13 +0800)]
regulator: lm363x: Use proper data type for regmap_read arguments

regmap_read() takes unsigned int reg and unsigned int *val arguments,
use proper data type for these arguments.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: bcm590xx: Convert to use simplified DT parsing
Axel Lin [Mon, 1 Apr 2019 14:42:36 +0000 (22:42 +0800)]
regulator: bcm590xx: Convert to use simplified DT parsing

Use regulator core's simplified DT parsing code to simply the driver
implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: as3722: Slightly improve readability
Axel Lin [Wed, 27 Mar 2019 01:29:47 +0000 (09:29 +0800)]
regulator: as3722: Slightly improve readability

Add a local variable *desc to avoid too many change lines due to over 80
characters.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: as3722: Convert to use regulator_set/get_current_limit_regmap
Axel Lin [Wed, 27 Mar 2019 01:29:46 +0000 (09:29 +0800)]
regulator: as3722: Convert to use regulator_set/get_current_limit_regmap

Use regulator_set/get_current_limit_regmap helpers to save some code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps6507x: Convert to regulator core's simplified DT parsing code
Axel Lin [Thu, 28 Mar 2019 12:02:25 +0000 (20:02 +0800)]
regulator: tps6507x: Convert to regulator core's simplified DT parsing code

Use regulator core's simplified DT parsing code to simply the driver
implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps6507x: Remove unused *rdev[] from struct tps6507x_pmic
Axel Lin [Thu, 28 Mar 2019 12:02:24 +0000 (20:02 +0800)]
regulator: tps6507x: Remove unused *rdev[] from struct tps6507x_pmic

This driver is using devm_regulator_register so no need to save *rdev for
clean up.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps6507x: Constify tps6507x_pmic_ops
Axel Lin [Thu, 28 Mar 2019 12:02:23 +0000 (20:02 +0800)]
regulator: tps6507x: Constify tps6507x_pmic_ops

The tps6507x_pmic_ops never need to be modified, make it const so compiler
can put it to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: vctrl: Remove unneeded continue statement
Axel Lin [Fri, 29 Mar 2019 01:46:31 +0000 (09:46 +0800)]
regulator: vctrl: Remove unneeded continue statement

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: rc5t583: Get rid of struct rc5t583_regulator
Axel Lin [Wed, 27 Mar 2019 11:54:13 +0000 (19:54 +0800)]
regulator: rc5t583: Get rid of struct rc5t583_regulator

The struct rc5t583_regulator only has 2 members, the *rdev is no longer
used because this driver is using devm_regulator_register now. After remove
*rdev, only *reg_info left. We can use struct rc5t583_regulator_info
directly, so remove struct rc5t583_regulator.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: act8865: Constify regulator_ops
Axel Lin [Fri, 22 Mar 2019 06:38:20 +0000 (14:38 +0800)]
regulator: act8865: Constify regulator_ops

The act8865_ops and act8865_ldo_ops never need to be modified,
make them const so compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: act8865: Convert to regulator core's simplified DT parsing code
Axel Lin [Fri, 22 Mar 2019 06:38:19 +0000 (14:38 +0800)]
regulator: act8865: Convert to regulator core's simplified DT parsing code

Use regulator core's simplified DT parsing code to simply the driver
implementation. With this conversion, also move the NULL test against pdata
in act8865_get_regulator_data() to the caller. This makes it clear the
code path to explicitly set init_data is for non-DT case only.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: sc2731: Constify regulators
Axel Lin [Mon, 25 Mar 2019 23:57:39 +0000 (07:57 +0800)]
regulator: sc2731: Constify regulators

The regulators array should never need to be modified, make it const so
compiler can put it to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: da9063: convert header to SPDX
Wolfram Sang [Mon, 25 Mar 2019 20:31:55 +0000 (21:31 +0100)]
regulator: da9063: convert header to SPDX

Covnert the header of the source file to SPDX.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps65217: Constify regulator_ops
Axel Lin [Sun, 24 Mar 2019 06:00:05 +0000 (14:00 +0800)]
regulator: tps65217: Constify regulator_ops

These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps65218: Constify regulator_ops
Axel Lin [Sun, 24 Mar 2019 02:05:42 +0000 (10:05 +0800)]
regulator: tps65218: Constify regulator_ops

These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: uniphier: Fix build dependency
Axel Lin [Mon, 25 Mar 2019 10:59:19 +0000 (18:59 +0800)]
regulator: uniphier: Fix build dependency

This driver does not use any syscon APIs, so remove MFD_SYSCON dependency.
Select REGMAP_MMIO since this driver uses devm_regmap_init_mmio().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB
Axel Lin [Mon, 4 Mar 2019 08:57:52 +0000 (16:57 +0800)]
regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB

selector 0xB (1011) should be 2.6V rather than 2.7V, fit ix.

Table 5-4. LDOA1 Output Voltage Options
VID Bits VOUT VID Bits VOUT VID Bits VOUT VID Bits VOUT
0000     1.35 0100     1.8  1000     2.3  1100     2.85
0001     1.5  0101     1.9  1001     2.4  1101     3.0
0010     1.6  0110     2.0  1010     2.5  1110     3.3
0011     1.7  0111     2.1  1011     2.6  1111     Not Used

Fixes: d2a2e729a666 ("regulator: tps65086: Add regulator driver for the TPS65086 PMIC")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: add regulator_get_linear_step() stub helper
Arnd Bergmann [Mon, 4 Mar 2019 19:38:29 +0000 (20:38 +0100)]
regulator: add regulator_get_linear_step() stub helper

The regulator header has empty inline functions for most interfaces,
but not regulator_get_linear_step(), which has just grown a user
that does not depend on regulators otherwise:

drivers/clk/tegra/clk-tegra124-dfll-fcpu.c: In function 'get_alignment_from_regulator':
drivers/clk/tegra/clk-tegra124-dfll-fcpu.c:555:19: error: implicit declaration of function 'regulator_get_linear_step'; did you mean 'regulator_get_drvdata'? [-Werror=implicit-function-declaration]
  align->step_uv = regulator_get_linear_step(reg);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
                   regulator_get_drvdata
cc1: all warnings being treated as errors
scripts/Makefile.build:278: recipe for target 'drivers/clk/tegra/clk-tegra124-dfll-fcpu.o' failed

Add the missing stub along the others.

Fixes: b3cf8d069505 ("clk: tegra: dfll: CVB calculation alignment with the regulator")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps65217: Simplify linear range for selector 25-52
Axel Lin [Mon, 4 Mar 2019 04:41:33 +0000 (12:41 +0800)]
regulator: tps65217: Simplify linear range for selector 25-52

The original code separates the selector 25-52 into 2 ranges on purpose
because DCDC1/DCDC3 only support up to 1.8V/1.5V in the old code.
Both DCDC1 and DCDC3 support up to 3.3V since commit b4c2e158a1e1
("regulator: tps65217: Allow DCDC1 and DCDC3 up to 3.3V"), so merge
25-30 and 31-52 ranges to one range.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps65132: Constify tps65132_regulator_ops and tps_regs_desc
Axel Lin [Thu, 21 Mar 2019 12:00:38 +0000 (20:00 +0800)]
regulator: tps65132: Constify tps65132_regulator_ops and tps_regs_desc

The tps65132_regulator_ops and tps_regs_desc never need to be modified,
make them const so compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: tps65132: Remove unneeded fields from struct tps65132_regulator
Axel Lin [Thu, 21 Mar 2019 12:00:37 +0000 (20:00 +0800)]
regulator: tps65132: Remove unneeded fields from struct tps65132_regulator

These fields are not really need, remove them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: axp20x: Mark expected switch fall-throughs
Gustavo A. R. Silva [Wed, 20 Mar 2019 16:56:43 +0000 (11:56 -0500)]
regulator: axp20x: Mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warnings:

drivers/regulator/axp20x-regulator.c: In function ‘axp20x_set_dcdc_freq’:
drivers/regulator/axp20x-regulator.c:1023:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
   reg = AXP803_DCDC_FREQ_CTRL;
drivers/regulator/axp20x-regulator.c:1025:2: note: here
  case AXP806_ID:
  ^~~~
drivers/regulator/axp20x-regulator.c: In function ‘axp20x_set_dcdc_workmode’:
drivers/regulator/axp20x-regulator.c:1115:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
   reg = AXP806_DCDC_MODE_CTRL2;
drivers/regulator/axp20x-regulator.c:1121:2: note: here
  case AXP221_ID:
  ^~~~

Notice that in this particular case, I moved the whole comment
"Fall through to the check below.", which contains the "Fall through"
comment, at the bottom of the case, which is what GCC is expecting
to find.

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: gpio: Reword the binding document
Marek Vasut [Sat, 16 Mar 2019 20:25:51 +0000 (21:25 +0100)]
regulator: gpio: Reword the binding document

Reword the binding document to make it clear how the propeties work
and which properties affect which other properties.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Harald Geyer <harald@ccbib.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: linux-renesas-soc@vger.kernel.org
To: devicetree@vger.kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: rn5t618: Constify regulator_desc
Axel Lin [Wed, 20 Mar 2019 12:10:57 +0000 (20:10 +0800)]
regulator: rn5t618: Constify regulator_desc

The regulator_desc never need to be modified, so define them as const as a
hint to the compiler that they can go into .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: max8925: Convert to regulator core's simplified DT parsing code
Axel Lin [Wed, 20 Mar 2019 11:40:23 +0000 (19:40 +0800)]
regulator: max8925: Convert to regulator core's simplified DT parsing code

Use regulator core's simplified DT parsing code to simply the driver
implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: of: Make regulator_of_get_init_node static
YueHaibing [Tue, 19 Mar 2019 15:23:19 +0000 (23:23 +0800)]
regulator: of: Make regulator_of_get_init_node static

Fix sparse warning:

drivers/regulator/of_regulator.c:374:20:
 warning: symbol 'regulator_of_get_init_node' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoMerge tag 'v5.1-rc1' into regulator-5.2
Mark Brown [Tue, 19 Mar 2019 13:12:18 +0000 (13:12 +0000)]
Merge tag 'v5.1-rc1' into regulator-5.2

Linux 5.1-rc1

5 years agoregulator: axp20x: Use rdev_get_id at appropriate places
Axel Lin [Tue, 19 Mar 2019 03:36:08 +0000 (11:36 +0800)]
regulator: axp20x: Use rdev_get_id at appropriate places

Use rdev_get_id() to simplify the code a bit.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: axp20x: Remove unneeded NULL test against rdev
Axel Lin [Tue, 19 Mar 2019 03:36:07 +0000 (11:36 +0800)]
regulator: axp20x: Remove unneeded NULL test against rdev

rdev won't be NULL in .enable callback.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: 88pm8607: Convert to regulator core's simplified DT parsing code
Axel Lin [Tue, 19 Mar 2019 07:39:27 +0000 (15:39 +0800)]
regulator: 88pm8607: Convert to regulator core's simplified DT parsing code

Use regulator core's simplified DT parsing code to simply the driver
implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: core: Fix application of "drop lockdep annotation in drms_uA_update()"
Mark Brown [Mon, 18 Feb 2019 19:29:14 +0000 (20:29 +0100)]
regulator: core: Fix application of "drop lockdep annotation in drms_uA_update()"

[The original commit was sent against -next but needed to be sent as a
bugfix, however -next had some additional changes which needed to be
reverted.  Now everything is all in one branch applying the rest of the
changes to fix up the merge issue -- broonie]

commit e5e21f70bfd3 ("regulator: core: Take lock before applying system
load") took the regulator lock before calling drms_uA_update() in order
to silence a lockdep warning during regulator_register().

However, we are not supposed to need locks at this point as the regulator
is in the process of being registered, so there should be no possibility
of concurrent access.

Instead, remove the unnecessary locking and simply drop the lockdep
annotation, since it is no longer valid.

Fixes: e5e21f70bfd3 ("regulator: core: Take lock before applying system load")
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: da9063: Convert to use regulator_set/get_current_limit_regmap
Axel Lin [Mon, 4 Mar 2019 13:16:03 +0000 (21:16 +0800)]
regulator: da9063: Convert to use regulator_set/get_current_limit_regmap

Use regulator_set/get_current_limit_regmap helpers to save some code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Steve Twiss <stwiss@opensource.diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: da9062: Convert to use regulator_set/get_current_limit_regmap
Axel Lin [Mon, 4 Mar 2019 13:16:02 +0000 (21:16 +0800)]
regulator: da9062: Convert to use regulator_set/get_current_limit_regmap

Use regulator_set/get_current_limit_regmap helpers to save some code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Steve Twiss <stwiss@opensource.diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: lp87565: Convert to use regulator_set/get_current_limit_regmap
Axel Lin [Fri, 1 Mar 2019 06:24:32 +0000 (14:24 +0800)]
regulator: lp87565: Convert to use regulator_set/get_current_limit_regmap

Use regulator_set/get_current_limit_regmap helpers to save some code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: lp87565: Fix missing register for LP87565_BUCK_0
Axel Lin [Fri, 1 Mar 2019 06:16:40 +0000 (14:16 +0800)]
regulator: lp87565: Fix missing register for LP87565_BUCK_0

LP87565_BUCK_0 is missed, fix it.

Fixes: f0168a9bf ("regulator: lp87565: Add support for lp87565 PMIC regulators")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: mt6397: Use unsigned int for volt_tables
Axel Lin [Wed, 6 Mar 2019 01:43:32 +0000 (09:43 +0800)]
regulator: mt6397: Use unsigned int for volt_tables

Make it consistent as .volt_table should be const unsigned int *.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: mt6380: Use unsigned int for volt_tables
Axel Lin [Wed, 6 Mar 2019 01:43:31 +0000 (09:43 +0800)]
regulator: mt6380: Use unsigned int for volt_tables

Make it consistent as .volt_table should be const unsigned int *.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: mt6323: Use unsigned int for volt_tables
Axel Lin [Wed, 6 Mar 2019 01:43:30 +0000 (09:43 +0800)]
regulator: mt6323: Use unsigned int for volt_tables

Make it consistent as .volt_table should be const unsigned int *.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: max77650: Use unsigned int for max77651_sbb1_regulator_volt_table
Axel Lin [Wed, 6 Mar 2019 01:42:01 +0000 (09:42 +0800)]
regulator: max77650: Use unsigned int for max77651_sbb1_regulator_volt_table

Make it consistent as .volt_table should be const unsigned int *.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: as3711: Remove struct as3711_regulator_info and as3711_regulator
Axel Lin [Wed, 6 Mar 2019 01:01:02 +0000 (09:01 +0800)]
regulator: as3711: Remove struct as3711_regulator_info and as3711_regulator

This driver does not really need struct as3711_regulator_info and
struct as3711_regulator, remove them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: cpcap: Convert to use of_device_get_match_data
Axel Lin [Sat, 16 Mar 2019 14:35:58 +0000 (22:35 +0800)]
regulator: cpcap: Convert to use of_device_get_match_data

Use of_device_get_match_data to simplify the code a bit.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: cpcap: Remove unneeded init_data setting
Axel Lin [Sat, 16 Mar 2019 14:35:57 +0000 (22:35 +0800)]
regulator: cpcap: Remove unneeded init_data setting

This driver is using regulator core's simplified DT parsing code,
so regulator will call regulator_of_get_init_data() to get init_data.
No need to set config.init_data. In additional, current code does not
properly set the init_data setting, so just remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: as3722: Remove *rdevs[] from struct as3722_regulators
Axel Lin [Sat, 16 Mar 2019 03:52:57 +0000 (11:52 +0800)]
regulator: as3722: Remove *rdevs[] from struct as3722_regulators

Current code is using devm_regulator_register() so it is not necessary
to save as3722_regs->rdevs[id] for clean up.
The *rdevs[] is not used now, remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoregulator: da9052: Include linux/of.h to fix build warning for of_match_ptr
Axel Lin [Sat, 16 Mar 2019 01:50:30 +0000 (09:50 +0800)]
regulator: da9052: Include linux/of.h to fix build warning for of_match_ptr

Remove #ifdef CONFIG_OF guard so linux/of.h will be included when
!CONFIG_OF. This fixes build warnings when !CONFIG_OF.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoLinux 5.1-rc1
Linus Torvalds [Sun, 17 Mar 2019 21:22:26 +0000 (14:22 -0700)]
Linux 5.1-rc1

5 years agoMerge tag 'kbuild-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
Linus Torvalds [Sun, 17 Mar 2019 20:25:26 +0000 (13:25 -0700)]
Merge tag 'kbuild-v5.1-2' of git://git./linux/kernel/git/masahiroy/linux-kbuild

Pull more Kbuild updates from Masahiro Yamada:

 - add more Build-Depends to Debian source package

 - prefix header search paths with $(srctree)/

 - make modpost show verbose section mismatch warnings

 - avoid hard-coded CROSS_COMPILE for h8300

 - fix regression for Debian make-kpkg command

 - add semantic patch to detect missing put_device()

 - fix some warnings of 'make deb-pkg'

 - optimize NOSTDINC_FLAGS evaluation

 - add warnings about redundant generic-y

 - clean up Makefiles and scripts

* tag 'kbuild-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kconfig: remove stale lxdialog/.gitignore
  kbuild: force all architectures except um to include mandatory-y
  kbuild: warn redundant generic-y
  Revert "modsign: Abort modules_install when signing fails"
  kbuild: Make NOSTDINC_FLAGS a simply expanded variable
  kbuild: deb-pkg: avoid implicit effects
  coccinelle: semantic code search for missing put_device()
  kbuild: pkg: grep include/config/auto.conf instead of $KCONFIG_CONFIG
  kbuild: deb-pkg: introduce is_enabled and if_enabled_echo to builddeb
  kbuild: deb-pkg: add CONFIG_ prefix to kernel config options
  kbuild: add workaround for Debian make-kpkg
  kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG}
  unicore32: simplify linker script generation for decompressor
  h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
  kbuild: move archive command to scripts/Makefile.lib
  modpost: always show verbose warning for section mismatch
  ia64: prefix header search path with $(srctree)/
  libfdt: prefix header search paths with $(srctree)/
  deb-pkg: generate correct build dependencies

5 years agoMerge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 17 Mar 2019 16:21:48 +0000 (09:21 -0700)]
Merge branch 'x86-asm-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 asm updates from Thomas Gleixner:
 "Two cleanup patches removing dead conditionals and unused code"

* 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/asm: Remove unused __constant_c_x_memset() macro and inlines
  x86/asm: Remove dead __GNUC__ conditionals

5 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 17 Mar 2019 16:19:22 +0000 (09:19 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Thomas Gleixner:
 "Three fixes for the fallout from the TSX errata workaround:

   - Prevent memory corruption caused by a unchecked out of bound array
     index.

   - Two trivial fixes to address compiler warnings"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel: Make dev_attr_allow_tsx_force_abort static
  perf/x86: Fixup typo in stub functions
  perf/x86/intel: Fix memory corruption

5 years agoMerge tag 'for-linus-5.1b-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 17 Mar 2019 16:16:22 +0000 (09:16 -0700)]
Merge tag 'for-linus-5.1b-rc1b-tag' of git://git./linux/kernel/git/xen/tip

Pull xen fix from Juergen Gross:
 "A fix for a Xen bug introduced by David's series for excluding
  ballooned pages in vmcores"

* tag 'for-linus-5.1b-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen/balloon: Fix mapping PG_offline pages to user space

5 years agoMerge tag '9p-for-5.1' of git://github.com/martinetd/linux
Linus Torvalds [Sun, 17 Mar 2019 16:10:56 +0000 (09:10 -0700)]
Merge tag '9p-for-5.1' of git://github.com/martinetd/linux

Pull 9p updates from Dominique Martinet:
 "Here is a 9p update for 5.1; there honestly hasn't been much.

  Two fixes (leak on invalid mount argument and possible deadlock on
  i_size update on 32bit smp) and a fall-through warning cleanup"

* tag '9p-for-5.1' of git://github.com/martinetd/linux:
  9p/net: fix memory leak in p9_client_create
  9p: use inode->i_lock to protect i_size_write() under 32-bit
  9p: mark expected switch fall-through

5 years agoperf/x86/intel: Make dev_attr_allow_tsx_force_abort static
kbuild test robot [Wed, 13 Mar 2019 18:42:43 +0000 (02:42 +0800)]
perf/x86/intel: Make dev_attr_allow_tsx_force_abort static

Fixes: 400816f60c54 ("perf/x86/intel: Implement support for TSX Force Abort")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: kbuild-all@01.org
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20190313184243.GA10820@lkp-sb-ep06
5 years agokconfig: remove stale lxdialog/.gitignore
Masahiro Yamada [Sun, 17 Mar 2019 06:05:03 +0000 (15:05 +0900)]
kconfig: remove stale lxdialog/.gitignore

When this .gitignore was added, lxdialog was an independent hostprogs-y.

Now that all objects in lxdialog/ are directly linked to mconf, the
lxdialog is no longer generated.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agokbuild: force all architectures except um to include mandatory-y
Masahiro Yamada [Sun, 17 Mar 2019 02:01:09 +0000 (11:01 +0900)]
kbuild: force all architectures except um to include mandatory-y

Currently, every arch/*/include/uapi/asm/Kbuild explicitly includes
the common Kbuild.asm file. Factor out the duplicated include directives
to scripts/Makefile.asm-generic so that no architecture would opt out
of the mandatory-y mechanism.

um is not forced to include mandatory-y since it is a very exceptional
case which does not support UAPI.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agokbuild: warn redundant generic-y
Masahiro Yamada [Sun, 17 Mar 2019 02:01:08 +0000 (11:01 +0900)]
kbuild: warn redundant generic-y

The generic-y is redundant under the following condition:

 - arch has its own implementation

 - the same header is added to generated-y

 - the same header is added to mandatory-y

If a redundant generic-y is found, the warning like follows is displayed:

  scripts/Makefile.asm-generic:20: redundant generic-y found in arch/arm/include/asm/Kbuild: timex.h

I fixed up arch Kbuild files found by this.

Suggested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoRevert "modsign: Abort modules_install when signing fails"
Douglas Anderson [Fri, 15 Mar 2019 16:25:03 +0000 (09:25 -0700)]
Revert "modsign: Abort modules_install when signing fails"

This reverts commit caf6fe91ddf62a96401e21e9b7a07227440f4185.

The commit was fine but is no longer needed as of commit 3a2429e1faf4
("kbuild: change if_changed_rule for multi-line recipe").  Let's go
back to using ";" to be consistent.

For some discussion, see:

https://lkml.kernel.org/r/CAK7LNASde0Q9S5GKeQiWhArfER4S4wL1=R_FW8q0++_X3T5=hQ@mail.gmail.com

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agokbuild: Make NOSTDINC_FLAGS a simply expanded variable
Douglas Anderson [Thu, 14 Mar 2019 23:41:59 +0000 (16:41 -0700)]
kbuild: Make NOSTDINC_FLAGS a simply expanded variable

During a simple no-op (nothing changed) build I saw 39 invocations of
the C compiler with the argument "-print-file-name=include".  We don't
need to call the C compiler 39 times for this--one time will suffice.

Let's change NOSTDINC_FLAGS to a simply expanded variable to avoid
this since there doesn't appear to be any reason it should be
recursively expanded.

On my build this shaved ~400 ms off my "no-op" build.

Note that the recursive expansion seems to date back to the (really
old) commit e8f5bdb02ce0 ("[PATCH] Makefile include path ordering").
It's a little unclear to me if the point of that patch was to switch
the variable to be recursively expanded (which it did) or to avoid
directly assigning to NOSTDINC_FLAGS (AKA to switch to +=) because
someone else (out of tree?) was setting it.  I presume later since if
the only goal was to switch to recursive expansion the patch would
have just removed the ":".

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>