]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agomfd: wm5102: Remove registers for output 3R from readable list
Charles Keepax [Fri, 3 Apr 2015 17:25:59 +0000 (18:25 +0100)]
mfd: wm5102: Remove registers for output 3R from readable list

The earpiece on 5102 is mono, thus there is no output 3R. Remove the
registers associated with the unused right channel from the readable
registers list.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: tps65010: Remove incorrect __exit markups
Dmitry Torokhov [Mon, 9 Mar 2015 17:47:15 +0000 (10:47 -0700)]
mfd: tps65010: Remove incorrect __exit markups

Even if bus is not hot-pluggable, the devices can be unbound from the
driver via sysfs, so we should not be using __exit annotations on
remove() methods. The only exception is drivers registered with
platform_driver_probe() which specifically disables sysfs bind/unbind
attributes.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: devicetree: bindings: Add Qualcomm RPM regulator subnodes
Bjorn Andersson [Mon, 6 Apr 2015 23:33:56 +0000 (16:33 -0700)]
mfd: devicetree: bindings: Add Qualcomm RPM regulator subnodes

Add the regulator subnodes to the Qualcomm RPM MFD device tree bindings.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: axp20x: Add support for extcon cell
Ramakrishna Pallala [Thu, 2 Apr 2015 19:19:47 +0000 (00:49 +0530)]
mfd: axp20x: Add support for extcon cell

This patch adds the mfd cell info for axp288 extcon device.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: lpc_ich: Sort IDs
Andy Shevchenko [Tue, 31 Mar 2015 11:47:29 +0000 (14:47 +0300)]
mfd: lpc_ich: Sort IDs

The patch sorts IDs in the table for easier maintenance. There is no
functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: twl6040: Remove wrong and unneeded "platform:twl6040" modalias
Axel Lin [Mon, 30 Mar 2015 08:12:55 +0000 (16:12 +0800)]
mfd: twl6040: Remove wrong and unneeded "platform:twl6040" modalias

This is a I2C driver, so it's wrong to use platform prefix for the
modalias. We have all needed i2c aliases coming form MODULE_DEVICE_TABLE,
so let's remove the wrong and unneeded "platform:twl6040" modalias.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: qcom-spmi-pmic: Add specific compatible strings for Qualcomm's SPMI PMIC's
Ivan T. Ivanov [Tue, 17 Mar 2015 10:47:24 +0000 (12:47 +0200)]
mfd: qcom-spmi-pmic: Add specific compatible strings for Qualcomm's SPMI PMIC's

Some of the PMIC's could have specific regmap configuration
tables in future, so add specific compatible strings for known
PMIC's. Also print runtime detected chip revision information.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: axp20x: Fix duplicate const for model names
Krzysztof Kozlowski [Tue, 24 Mar 2015 10:21:17 +0000 (11:21 +0100)]
mfd: axp20x: Fix duplicate const for model names

Replace duplicated const keyword for 'axp20x_model_names' with proper
array of const pointers to const strings.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: menelaus: Use macro for magic number
Aaro Koskinen [Sat, 28 Mar 2015 20:45:37 +0000 (22:45 +0200)]
mfd: menelaus: Use macro for magic number

Use macro to check a register bit.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: menelaus: Drop support for SW controller VCORE
Aaro Koskinen [Sat, 28 Mar 2015 20:45:36 +0000 (22:45 +0200)]
mfd: menelaus: Drop support for SW controller VCORE

Drop support for SW controlled VCORE, nobody uses it.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: menelaus: Delete omap_has_menelaus
Aaro Koskinen [Sat, 28 Mar 2015 20:45:35 +0000 (22:45 +0200)]
mfd: menelaus: Delete omap_has_menelaus

Delete unused macro.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: arizona: Correct type of gpio_defaults
Charles Keepax [Sun, 29 Mar 2015 11:45:42 +0000 (12:45 +0100)]
mfd: arizona: Correct type of gpio_defaults

gpio_defaults needs to be specified as an unsigned int rather than an
int, because the intention of the DT binding is that all out of range
values for a 16-bit register will cause the defaults to be used,
however, if gpio_defaults is an int then values that are larger than
INT_MAX will become negative numbers and be written out directly to the
hardware. As no where in the code replies on gpio_defaults being an int,
the simplest fix is to just change it to unsigned.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: lpc_ich: Sort IDs
Andy Shevchenko [Fri, 27 Mar 2015 18:06:01 +0000 (20:06 +0200)]
mfd: lpc_ich: Sort IDs

This patch just sorts IDs in the table for better maintenance. There is no
functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: Fix a typo in Kconfig
Łukasz Stelmach [Fri, 27 Mar 2015 20:39:59 +0000 (21:39 +0100)]
mfd: Fix a typo in Kconfig

Signed-off-by: Łukasz Stelmach <stlman@poczta.fm>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: qcom_rpm: Add support for IPQ8064
Josh Cartwright [Thu, 26 Mar 2015 18:29:26 +0000 (11:29 -0700)]
mfd: qcom_rpm: Add support for IPQ8064

The IPQ8064 also includes an RPM following the same message structure as
other chips.  In addition, it supports a few new resource types to
support the NSS fabric clocks and the SMB208/SMB209 regulators found on
the reference boards.

Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: devicetree: qcom_rpm: Document IPQ8064 resources
Josh Cartwright [Thu, 26 Mar 2015 18:29:25 +0000 (11:29 -0700)]
mfd: devicetree: qcom_rpm: Document IPQ8064 resources

The IPQ8064 SoC has several RPM-controlled resources, an NSS fabrick
clock and four regulator resources.  Provide definitions for them.

Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
[sboyd@codeaurora.org: Drop regulator part of binding]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: core: Fix platform-device name collisions
Johan Hovold [Wed, 25 Mar 2015 11:07:05 +0000 (12:07 +0100)]
mfd: core: Fix platform-device name collisions

Since commit 6e3f62f0793e ("mfd: core: Fix platform-device id
generation") we honour PLATFORM_DEVID_AUTO and PLATFORM_DEVID_NONE when
registering mfd-devices.

Unfortunately, some mfd-drivers rely on the old behaviour of generating
platform-device ids by adding the cell id also to the special value of
PLATFORM_DEVID_NONE. The resulting platform ids are not only used to
generate device-unique names, but are also used instead of the cell id
to identify cells when probing subdevices.

These drivers should be updated to use PLATFORM_DEVID_AUTO, which would
also allow more than one device to be registered without resorting to
hacks (see for example wm831x), but lets fix the regression first by
partially reverting the above mentioned commit with respect to
PLATFORM_DEVID_NONE.

Fixes: 6e3f62f0793e ("mfd: core: Fix platform-device id generation")
Cc: stable <stable@vger.kernel.org> # v3.19
Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: intel_quark_i2c_gpio: Don't crash if !DMI
Andy Shevchenko [Wed, 25 Mar 2015 18:03:55 +0000 (20:03 +0200)]
mfd: intel_quark_i2c_gpio: Don't crash if !DMI

dmi_get_system_info() may return NULL either when CONFIG_DMI is not set or when
board has an old firmware. The patch prevents a crash and changes the default
frequency to be in align with older board.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Lee: Removed overt "sentinel" comment and extra lines]
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agodt-bindings: Add vendor-prefix for X-Powers
Carlo Caione [Fri, 20 Feb 2015 11:19:28 +0000 (19:19 +0800)]
dt-bindings: Add vendor-prefix for X-Powers

Signed-off-by: Carlo Caione <carlo@caione.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: AXP20x: Add bindings documentation
Carlo Caione [Fri, 20 Feb 2015 11:19:27 +0000 (19:19 +0800)]
mfd: AXP20x: Add bindings documentation

Bindings documentation for the AXP20x driver. In this file also
sub-nodes are documented.

Signed-off-by: Carlo Caione <carlo@caione.org>
[wens@csie.org: clarify interrupt source for the axp PMIC]
[wens@csie.org: explain dcdc-workmode in detail and trim lines to 80 chars]
[wens@csie.org: make regulator supplies optional if using unregulated input]
[wens@csie.org: use cubieboard2 regulator nodes as example]
[wens@csie.org: x-powers,dcdc-workmode default changed to 'current hardware setting']
[wens@csie.org: reorganized regulator related properties into separate section.]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: sec-core: Enable RTC on S2MPS11 PMIC
Krzysztof Kozlowski [Tue, 17 Mar 2015 12:36:17 +0000 (13:36 +0100)]
mfd: sec-core: Enable RTC on S2MPS11 PMIC

The S2MPS11 PMIC (present on Arndale Octa board) has the same RTC module
as S2MPS14 device. Add respective mfd cell to enable it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: Constify of_device_id array
Fabian Frederick [Mon, 16 Mar 2015 19:21:36 +0000 (20:21 +0100)]
mfd: Constify of_device_id array

of_device_id is always used as const.

(See driver.of_match_table and open firmware functions)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: dln2: Use msecs_to_jiffies for time conversion
Nicholas Mc Guire [Mon, 16 Mar 2015 15:20:49 +0000 (11:20 -0400)]
mfd: dln2: Use msecs_to_jiffies for time conversion

Converting milliseconds to jiffies by "val * HZ / 1000" is technically
OK but msecs_to_jiffies(val) is the cleaner solution and handles all
corner cases correctly. This is a minor API consolidation only and
should make things more readable.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: tc3589x: Enforce device-tree only mode
Linus Walleij [Thu, 19 Mar 2015 14:52:45 +0000 (15:52 +0100)]
mfd: tc3589x: Enforce device-tree only mode

All systems using the TC3589x multifunction expander uses
devicetree, so don't clutter the place with a lot of
and assume it is there.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: mc13xxx-core: %pF is only for function pointers
Scott Wood [Thu, 12 Mar 2015 03:13:51 +0000 (22:13 -0500)]
mfd: mc13xxx-core: %pF is only for function pointers

Use %pS for actual addresses, otherwise you'll get bad output
on arches like ppc64 where %pF expects a function descriptor.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: menelaus: Remove incorrect __exit markups
Dmitry Torokhov [Mon, 9 Mar 2015 17:49:36 +0000 (10:49 -0700)]
mfd: menelaus: Remove incorrect __exit markups

Even if bus is not hot-pluggable, the devices can be unbound from the
driver via sysfs, so we should not be using __exit annotations on
remove() methods. The only exception is drivers registered with
platform_driver_probe() which specifically disables sysfs bind/unbind
attributes.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agodevicetree: Add SKY81452 to the Trivial Devices list
Gyungoh Yoo [Fri, 27 Feb 2015 06:42:26 +0000 (15:42 +0900)]
devicetree: Add SKY81452 to the Trivial Devices list

Signed-off-by: Gyungoh Yoo <jack.yoo@skyworksinc.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agodevicetree: Add vendor prefix for Skyworks Solutions, Inc.
Gyungoh Yoo [Fri, 27 Feb 2015 06:42:25 +0000 (15:42 +0900)]
devicetree: Add vendor prefix for Skyworks Solutions, Inc.

Signed-off-by: Gyungoh Yoo <jack.yoo@skyworksinc.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agodevicetree: Add new SKY81452 backlight binding
Gyungoh Yoo [Fri, 27 Feb 2015 06:42:24 +0000 (15:42 +0900)]
devicetree: Add new SKY81452 backlight binding

Signed-off-by: Gyungoh Yoo <jack.yoo@skyworksinc.com>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agodevicetree: Add new SKY81452 mfd binding
Gyungoh Yoo [Fri, 27 Feb 2015 06:42:23 +0000 (15:42 +0900)]
devicetree: Add new SKY81452 mfd binding

Signed-off-by: Gyungoh Yoo <jack.yoo@skyworksinc.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agobacklight: Add support Skyworks SKY81452 backlight driver
Gyungoh Yoo [Fri, 27 Feb 2015 06:42:22 +0000 (15:42 +0900)]
backlight: Add support Skyworks SKY81452 backlight driver

Signed-off-by: Gyungoh Yoo <jack.yoo@skyworksinc.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: Add support for Skyworks SKY81452 driver
Gyungoh Yoo [Fri, 27 Feb 2015 06:42:21 +0000 (15:42 +0900)]
mfd: Add support for Skyworks SKY81452 driver

Signed-off-by: Gyungoh Yoo <jack.yoo@skyworksinc.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: arizona: Add DT binding documentation for DMIC reference voltages
Charles Keepax [Tue, 3 Mar 2015 15:04:54 +0000 (15:04 +0000)]
mfd: arizona: Add DT binding documentation for DMIC reference voltages

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: arizona: Add DT binding for the DMIC reference voltages
Charles Keepax [Tue, 3 Mar 2015 15:04:53 +0000 (15:04 +0000)]
mfd: arizona: Add DT binding for the DMIC reference voltages

Add a DT binding that lets the DMIC reference voltage source be
specified for each input.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77693: Modify flash cell name identifiers
Jacek Anaszewski [Wed, 4 Mar 2015 16:14:26 +0000 (17:14 +0100)]
mfd: max77693: Modify flash cell name identifiers

Change flash cell identifiers from max77693-flash to max77693-led
to avoid confusion with NOR/NAND Flash.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77693: Add TORCH_IOUT_MASK macro
Jacek Anaszewski [Wed, 4 Mar 2015 16:14:28 +0000 (17:14 +0100)]
mfd: max77693: Add TORCH_IOUT_MASK macro

Add a macro for obtaining the mask of ITORCH register bit fields
related either to FLED1 or FLED2 current output. The expected
arguments are TORCH_IOUT1_SHIFT or TORCH_IOUT2_SHIFT.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77693: Remove struct max77693_led_platform_data
Jacek Anaszewski [Wed, 4 Mar 2015 16:14:27 +0000 (17:14 +0100)]
mfd: max77693: Remove struct max77693_led_platform_data

The flash part of the max77693 device will depend only on OF, and thus
will not use board files. Since there are no other users of the
struct max77693_led_platform_data its existence is unjustified.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77693: Adjust FLASH_EN_SHIFT and TORCH_EN_SHIFT macros
Jacek Anaszewski [Wed, 4 Mar 2015 16:14:29 +0000 (17:14 +0100)]
mfd: max77693: Adjust FLASH_EN_SHIFT and TORCH_EN_SHIFT macros

Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly
when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2)
from leds-max77693 driver. Previous definitions were compatible with
one of the previous RFC versions of leds-max77693.c driver, which was
not merged.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: intel_quark_i2c_gpio: Add Intel Quark X1000 I2C-GPIO MFD Driver
Raymond Tan [Mon, 2 Feb 2015 02:52:51 +0000 (10:52 +0800)]
mfd: intel_quark_i2c_gpio: Add Intel Quark X1000 I2C-GPIO MFD Driver

In Quark X1000, there's a single PCI device that provides both
an I2C controller and a GPIO controller. This MFD driver will
split the 2 devices for their respective drivers.

This patch is based on Josef Ahmad's initial work for Quark enabling.

Acked-by: Michael Turquette <mturquette@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Weike Chen <alvin.chen@intel.com>
Signed-off-by: Raymond Tan <raymond.tan@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rk808: Disable the under voltage detect
Chris Zhong [Sat, 28 Feb 2015 10:09:06 +0000 (18:09 +0800)]
mfd: rk808: Disable the under voltage detect

Rk808 has a under voltage detect function, when the voltage of buck is
under 85% the target voltage, the buck output will reset. But if the
power load is too heavy, this function maybe err, when current over
4.2A, although the voltage is normal, but RK808 mistakenly think it is
under 85%, and reset the buck. So let's disable this function.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: ab8500-debugfs: Remove use of seq_printf return value
Joe Perches [Sun, 22 Feb 2015 02:53:43 +0000 (18:53 -0800)]
mfd: ab8500-debugfs: Remove use of seq_printf return value

The seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rt5033: MFD_RT5033 needs to select REGMAP_IRQ
Artem Savkov [Thu, 5 Mar 2015 11:42:27 +0000 (12:42 +0100)]
mfd: rt5033: MFD_RT5033 needs to select REGMAP_IRQ

Since commit 0b2712585(linux-next.git) this driver uses regmap_irq and so needs
to select REGMAP_IRQ.

This fixes the following compilation errors:
ERROR: "regmap_irq_get_domain" [drivers/mfd/rt5033.ko] undefined!
ERROR: "regmap_add_irq_chip" [drivers/mfd/rt5033.ko] undefined!

Signed-off-by: Artem Savkov <asavkov@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: da9052: Register ability of device to cause a wake-up interrupt
Adam Ward [Wed, 4 Mar 2015 16:13:12 +0000 (16:13 +0000)]
mfd: da9052: Register ability of device to cause a wake-up interrupt

Signed-off-by: Adam Ward <adam.ward.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: da9052: Fix register access via SPI
Adam Ward [Wed, 4 Mar 2015 16:13:12 +0000 (16:13 +0000)]
mfd: da9052: Fix register access via SPI

The range of registers used by this driver exceeds that available
via SPI with no paging (127), so we have to override the values
from the default config which is set-up for I2C access.
Also change SPI settings to match device's recommended OTP values.

Signed-off-by: Adam Ward <adam.ward.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77843: Add max77843 MFD driver core driver
Jaewon Kim [Mon, 2 Mar 2015 10:10:34 +0000 (19:10 +0900)]
mfd: max77843: Add max77843 MFD driver core driver

This patch adds MAX77843 core/irq driver to support PMIC,
MUIC(Micro USB Interface Controller), Charger, Fuel Gauge,
LED and Haptic device.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: dt-bindings: Add bindings for the MediaTek MT6397 PMIC
Sascha Hauer [Sun, 22 Feb 2015 12:15:30 +0000 (13:15 +0100)]
mfd: dt-bindings: Add bindings for the MediaTek MT6397 PMIC

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: Add support for the MediaTek MT6397 PMIC
Flora Fu [Sun, 22 Feb 2015 12:15:29 +0000 (13:15 +0100)]
mfd: Add support for the MediaTek MT6397 PMIC

This adds support for the MediaTek MT6397 PMIC. This is a
multifunction device with the following sub modules:

- Regulator
- RTC
- Audio codec
- GPIO
- Clock

It is interfaced to the host controller using SPI interface by a proprietary
hardware called PMIC wrapper or pwrap. MT6397 MFD is a child device of the
pwrap.

Signed-off-by: Flora Fu, MediaTek
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: sec: Remove unnecessary out of memory message
Krzysztof Kozlowski [Thu, 26 Feb 2015 09:13:51 +0000 (10:13 +0100)]
mfd: sec: Remove unnecessary out of memory message

There is no need to print additional ENOMEM message for
sec_platform_data allocation failure.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPL
Krzysztof Kozlowski [Thu, 26 Feb 2015 09:13:50 +0000 (10:13 +0100)]
mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPL

The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
Power Loss) were removed from rtc-s5m driver because they were not used.
Remove them (and on/off interrupt) from main MFD driver and header.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: da9150: Add DT binding documentation for core
Adam Thomson [Wed, 18 Feb 2015 14:08:26 +0000 (14:08 +0000)]
mfd: da9150: Add DT binding documentation for core

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: arizona: Move useful defines into a dt-binding include
Charles Keepax [Wed, 25 Feb 2015 15:37:13 +0000 (15:37 +0000)]
mfd: arizona: Move useful defines into a dt-binding include

Move parts of linux/mfd/arizona/pdata.h and gpio.h into a new file in
the dt-binding directory for use by device tree bindings. This also
makes gpio.h redundant so remove it in the process.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: da9150: Constify struct regmap_config
Krzysztof Kozlowski [Tue, 24 Feb 2015 09:39:33 +0000 (10:39 +0100)]
mfd: da9150: Constify struct regmap_config

The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agortc: s5m: Remove unused watchdog and sudden momentary power loss
Krzysztof Kozlowski [Fri, 6 Feb 2015 11:24:47 +0000 (12:24 +0100)]
rtc: s5m: Remove unused watchdog and sudden momentary power loss

The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
Power Loss) are never enabled. These are left-overs from board files.
After removing them the driver's shutdown callback is empty so get rid
of it as well.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rtsx: Using pcr_dbg replace dev_dbg
Micky Ching [Wed, 25 Feb 2015 05:50:16 +0000 (13:50 +0800)]
mfd: rtsx: Using pcr_dbg replace dev_dbg

pcr_dbg is a wrapper of dev_dbg, which can save some code,
and help to enable/disable debug message static.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rtsx: Add support for rts525A
Micky Ching [Wed, 25 Feb 2015 05:50:15 +0000 (13:50 +0800)]
mfd: rtsx: Add support for rts525A

Add support for new chip rts525A.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rtsx: Add support for rts524A
Micky Ching [Wed, 25 Feb 2015 05:50:14 +0000 (13:50 +0800)]
mfd: rtsx: Add support for rts524A

add support for new chip rts524A.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rtsx: Remove LCTLR defination
Micky Ching [Wed, 25 Feb 2015 05:50:13 +0000 (13:50 +0800)]
mfd: rtsx: Remove LCTLR defination

To enable/disable ASPM we should find LINK CONTROL register
in PCI config space. All old chip use 0x80 address, but new
chip may use another address, so we using pci_find_capability()
to get LINK CONTROL address.

rtsx_gops.c was removed, we consider to put some common operations
to this file, but the actual thing is, only a group of chips
are in common ops1, and another group of chips in common ops2,
it is hard to decide put which ops into generic ops file.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rtsx: Update phy register
Micky Ching [Wed, 25 Feb 2015 05:50:12 +0000 (13:50 +0800)]
mfd: rtsx: Update phy register

Update some phy register name and value for rts5249,
the updated value makes chip more stable on some platform.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rtsx: Update driving settings
Micky Ching [Wed, 25 Feb 2015 05:50:11 +0000 (13:50 +0800)]
mfd: rtsx: Update driving settings

update card drive settings, This setting can be used for rts5249
rts524A and rts525A.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rtsx: Update PETXCFG address
Micky Ching [Wed, 25 Feb 2015 05:50:10 +0000 (13:50 +0800)]
mfd: rtsx: Update PETXCFG address

PETXCFG is defined at 0xFF03, the old 0xFE49 not used any more.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rtsx: Place register address and values togather
Micky Ching [Wed, 25 Feb 2015 05:50:09 +0000 (13:50 +0800)]
mfd: rtsx: Place register address and values togather

It is more readable to place register address and values define
togather. The values define add two leading space indicate belong
to the register address defined above.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: rtsx: Replace TAB by SPC after #define
Micky Ching [Wed, 25 Feb 2015 05:50:08 +0000 (13:50 +0800)]
mfd: rtsx: Replace TAB by SPC after #define

Re-format coding-style, using uniform SPC after "#define" keyword
instead of mixing using TAB and SPC.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: ti_am335x_tscadc: Remove unwanted reg_se_cache save
Vignesh R [Wed, 7 Jan 2015 05:49:36 +0000 (11:19 +0530)]
mfd: ti_am335x_tscadc: Remove unwanted reg_se_cache save

In one shot mode, sequencer automatically disables all enabled steps at
the end of each cycle. (both ADC steps and TSC steps) Hence these steps
need not be saved in reg_se_cache for clearing these steps at a later
stage.
Also, when ADC wakes up Sequencer should not be busy executing any of the
config steps except for the charge step. Previously charge step was 1 ADC
clock cycle and hence it was ignored.
TSC steps are always disabled at the end of each conversion cycle, hence
there is no need to explicitly disable TSC steps by writing 0 to REG_SE.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: vexpress: Remove non-DT code
Pawel Moll [Tue, 20 Jan 2015 17:25:15 +0000 (17:25 +0000)]
mfd: vexpress: Remove non-DT code

Now, as all VE platforms have to be booted with DT,
the code handling non-DT case can be removed.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: Add support for COMe-cBL6 to Kontron PLD driver
Michael Brunner [Tue, 27 Jan 2015 10:05:49 +0000 (11:05 +0100)]
mfd: Add support for COMe-cBL6 to Kontron PLD driver

This patch adds the DMI system ID of the Kontron COMe-cBL6 board to
the Kontron PLD driver. The list of supported products in the module
description is also updated.

Signed-off-by: Michael Brunner <michael.brunner@kontron.com>
Acked-by: Christian Rauch <christian.rauch@kontron.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: axp20x: Change battery cell name to fuel gauge
Todd Brandt [Mon, 2 Feb 2015 23:41:41 +0000 (15:41 -0800)]
mfd: axp20x: Change battery cell name to fuel gauge

Name changes to the battery cell structure to a
more generic cell type: fuel gauge.

Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com>
Acked-By: Sebastian Reichel <sre@kernel.org>
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: intel_soc_pmic: Ensure GPIO irq is set to input pin
Jarkko Nikula [Fri, 13 Feb 2015 13:01:15 +0000 (15:01 +0200)]
mfd: intel_soc_pmic: Ensure GPIO irq is set to input pin

Surely GPIO irq will be used as an input pin so make sure its direction is
set after requesting.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: intel_soc_pmic: Do not mangle error code from devm_gpiod_get_index()
Jarkko Nikula [Fri, 13 Feb 2015 13:01:14 +0000 (15:01 +0200)]
mfd: intel_soc_pmic: Do not mangle error code from devm_gpiod_get_index()

It is usually better to pass actual error code from a function call than
mangling it to another.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: intel_soc_pmic: Move PMIC interrupt comment to probe function
Jarkko Nikula [Fri, 13 Feb 2015 13:01:13 +0000 (15:01 +0200)]
mfd: intel_soc_pmic: Move PMIC interrupt comment to probe function

intel_soc_pmic_find_gpio_irq() tries to find a GPIO interrupt but doesn't
select between it or I2C interrupt so it makes more sense to move this
comment to intel_soc_pmic_i2c_probe() with minor edits.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agoASoC: arizona: Add support for WM8280/WM8281
Richard Fitzgerald [Sat, 17 Jan 2015 15:21:27 +0000 (15:21 +0000)]
ASoC: arizona: Add support for WM8280/WM8281

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agoextcon: arizona: Add support for WM8280/WM8281
Richard Fitzgerald [Sat, 17 Jan 2015 15:21:26 +0000 (15:21 +0000)]
extcon: arizona: Add support for WM8280/WM8281

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agogpio: arizona: Add support for WM8280/WM8281
Richard Fitzgerald [Sat, 17 Jan 2015 15:21:25 +0000 (15:21 +0000)]
gpio: arizona: Add support for WM8280/WM8281

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agoregulator: arizona-micsupp: Add support for WM8280/WM8281
Richard Fitzgerald [Sat, 17 Jan 2015 15:21:24 +0000 (15:21 +0000)]
regulator: arizona-micsupp: Add support for WM8280/WM8281

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agoDocumentation: devicetree: arizona: Add bindings for WM8280
Richard Fitzgerald [Sat, 17 Jan 2015 15:21:23 +0000 (15:21 +0000)]
Documentation: devicetree: arizona: Add bindings for WM8280

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: arizona: Add support for WM8280/WM8281
Richard Fitzgerald [Sat, 17 Jan 2015 15:21:22 +0000 (15:21 +0000)]
mfd: arizona: Add support for WM8280/WM8281

This adds support for the Wolfson Microelectronics WM8280 and WM8281
codecs.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
[Lee: Minor fixup to remove potentially uninitialised variable. ]
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agoLinux 4.0-rc1 v4.0-rc1
Linus Torvalds [Mon, 23 Feb 2015 02:21:14 +0000 (18:21 -0800)]
Linux 4.0-rc1

.. after extensive statistical analysis of my G+ polling, I've come to
the inescapable conclusion that internet polls are bad.

Big surprise.

But "Hurr durr I'ma sheep" trounced "I like online polls" by a 62-to-38%
margin, in a poll that people weren't even supposed to participate in.
Who can argue with solid numbers like that? 5,796 votes from people who
can't even follow the most basic directions?

In contrast, "v4.0" beat out "v3.20" by a slimmer margin of 56-to-44%,
but with a total of 29,110 votes right now.

Now, arguably, that vote spread is only about 3,200 votes, which is less
than the almost six thousand votes that the "please ignore" poll got, so
it could be considered noise.

But hey, I asked, so I'll honor the votes.

9 years agoMerge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
Linus Torvalds [Mon, 23 Feb 2015 02:05:13 +0000 (18:05 -0800)]
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:
 "Ext4 bug fixes.

  We also reserved code points for encryption and read-only images (for
  which the implementation is mostly just the reserved code point for a
  read-only feature :-)"

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix indirect punch hole corruption
  ext4: ignore journal checksum on remount; don't fail
  ext4: remove duplicate remount check for JOURNAL_CHECKSUM change
  ext4: fix mmap data corruption in nodelalloc mode when blocksize < pagesize
  ext4: support read-only images
  ext4: change to use setup_timer() instead of init_timer()
  ext4: reserve codepoints used by the ext4 encryption feature
  jbd2: complain about descriptor block checksum errors

9 years agoMerge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Mon, 23 Feb 2015 01:42:14 +0000 (17:42 -0800)]
Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull more vfs updates from Al Viro:
 "Assorted stuff from this cycle.  The big ones here are multilayer
  overlayfs from Miklos and beginning of sorting ->d_inode accesses out
  from David"

* 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (51 commits)
  autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
  procfs: fix race between symlink removals and traversals
  debugfs: leave freeing a symlink body until inode eviction
  Documentation/filesystems/Locking: ->get_sb() is long gone
  trylock_super(): replacement for grab_super_passive()
  fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
  Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
  VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
  SELinux: Use d_is_positive() rather than testing dentry->d_inode
  Smack: Use d_is_positive() rather than testing dentry->d_inode
  TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()
  Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode
  Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb
  VFS: Split DCACHE_FILE_TYPE into regular and special types
  VFS: Add a fallthrough flag for marking virtual dentries
  VFS: Add a whiteout dentry type
  VFS: Introduce inode-getting helpers for layered/unioned fs environments
  Infiniband: Fix potential NULL d_inode dereference
  posix_acl: fix reference leaks in posix_acl_create
  autofs4: Wrong format for printing dentry
  ...

9 years agoMerge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Linus Torvalds [Sun, 22 Feb 2015 17:57:16 +0000 (09:57 -0800)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM fix from Russell King:
 "Just one fix this time around.  __iommu_alloc_buffer() can cause a
  BUG() if dma_alloc_coherent() is called with either __GFP_DMA32 or
  __GFP_HIGHMEM set.  The patch from Alexandre addresses this"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8305/1: DMA: Fix kzalloc flags in __iommu_alloc_buffer()

9 years agoautofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
Al Viro [Sun, 22 Feb 2015 03:19:57 +0000 (22:19 -0500)]
autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation

X-Coverup: just ask spender
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoprocfs: fix race between symlink removals and traversals
Al Viro [Sun, 22 Feb 2015 03:16:11 +0000 (22:16 -0500)]
procfs: fix race between symlink removals and traversals

use_pde()/unuse_pde() in ->follow_link()/->put_link() resp.

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agodebugfs: leave freeing a symlink body until inode eviction
Al Viro [Sun, 22 Feb 2015 03:05:11 +0000 (22:05 -0500)]
debugfs: leave freeing a symlink body until inode eviction

As it is, we have debugfs_remove() racing with symlink traversals.
Supply ->evict_inode() and do freeing there - inode will remain
pinned until we are done with the symlink body.

And rip the idiocy with checking if dentry is positive right after
we'd verified debugfs_positive(), which is a stronger check...

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoDocumentation/filesystems/Locking: ->get_sb() is long gone
Al Viro [Sat, 21 Feb 2015 09:59:02 +0000 (04:59 -0500)]
Documentation/filesystems/Locking: ->get_sb() is long gone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agotrylock_super(): replacement for grab_super_passive()
Konstantin Khlebnikov [Thu, 19 Feb 2015 17:19:35 +0000 (20:19 +0300)]
trylock_super(): replacement for grab_super_passive()

I've noticed significant locking contention in memory reclaimer around
sb_lock inside grab_super_passive(). Grab_super_passive() is called from
two places: in icache/dcache shrinkers (function super_cache_scan) and
from writeback (function __writeback_inodes_wb). Both are required for
progress in memory allocator.

Grab_super_passive() acquires sb_lock to increment sb->s_count and check
sb->s_instances. It seems sb->s_umount locked for read is enough here:
super-block deactivation always runs under sb->s_umount locked for write.
Protecting super-block itself isn't a problem: in super_cache_scan() sb
is protected by shrinker_rwsem: it cannot be freed if its slab shrinkers
are still active. Inside writeback super-block comes from inode from bdi
writeback list under wb->list_lock.

This patch removes locking sb_lock and checks s_instances under s_umount:
generic_shutdown_super() unlinks it under sb->s_umount locked for write.
New variant is called trylock_super() and since it only locks semaphore,
callers must call up_read(&sb->s_umount) instead of drop_super(sb) when
they're done.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agofanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
David Howells [Thu, 29 Jan 2015 12:02:36 +0000 (12:02 +0000)]
fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions

Fanotify probably doesn't want to watch autodirs so make it use d_can_lookup()
rather than d_is_dir() when checking a dir watch and give an error on fake
directories.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoCachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
David Howells [Thu, 29 Jan 2015 12:02:36 +0000 (12:02 +0000)]
Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions

Fix up the following scripted S_ISDIR/S_ISREG/S_ISLNK conversions (or lack
thereof) in cachefiles:

 (1) Cachefiles mostly wants to use d_can_lookup() rather than d_is_dir() as
     it doesn't want to deal with automounts in its cache.

 (2) Coccinelle didn't find S_IS* expressions in ASSERT() statements in
     cachefiles.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
David Howells [Thu, 29 Jan 2015 12:02:35 +0000 (12:02 +0000)]
VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)

Convert the following where appropriate:

 (1) S_ISLNK(dentry->d_inode) to d_is_symlink(dentry).

 (2) S_ISREG(dentry->d_inode) to d_is_reg(dentry).

 (3) S_ISDIR(dentry->d_inode) to d_is_dir(dentry).  This is actually more
     complicated than it appears as some calls should be converted to
     d_can_lookup() instead.  The difference is whether the directory in
     question is a real dir with a ->lookup op or whether it's a fake dir with
     a ->d_automount op.

In some circumstances, we can subsume checks for dentry->d_inode not being
NULL into this, provided we the code isn't in a filesystem that expects
d_inode to be NULL if the dirent really *is* negative (ie. if we're going to
use d_inode() rather than d_backing_inode() to get the inode pointer).

Note that the dentry type field may be set to something other than
DCACHE_MISS_TYPE when d_inode is NULL in the case of unionmount, where the VFS
manages the fall-through from a negative dentry to a lower layer.  In such a
case, the dentry type of the negative union dentry is set to the same as the
type of the lower dentry.

However, if you know d_inode is not NULL at the call site, then you can use
the d_is_xxx() functions even in a filesystem.

There is one further complication: a 0,0 chardev dentry may be labelled
DCACHE_WHITEOUT_TYPE rather than DCACHE_SPECIAL_TYPE.  Strictly, this was
intended for special directory entry types that don't have attached inodes.

The following perl+coccinelle script was used:

use strict;

my @callers;
open($fd, 'git grep -l \'S_IS[A-Z].*->d_inode\' |') ||
    die "Can't grep for S_ISDIR and co. callers";
@callers = <$fd>;
close($fd);
unless (@callers) {
    print "No matches\n";
    exit(0);
}

my @cocci = (
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISLNK(E->d_inode->i_mode)',
    '+ d_is_symlink(E)',
    '',
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISDIR(E->d_inode->i_mode)',
    '+ d_is_dir(E)',
    '',
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISREG(E->d_inode->i_mode)',
    '+ d_is_reg(E)' );

my $coccifile = "tmp.sp.cocci";
open($fd, ">$coccifile") || die $coccifile;
print($fd "$_\n") || die $coccifile foreach (@cocci);
close($fd);

foreach my $file (@callers) {
    chomp $file;
    print "Processing ", $file, "\n";
    system("spatch", "--sp-file", $coccifile, $file, "--in-place", "--no-show-diff") == 0 ||
die "spatch failed";
}

[AV: overlayfs parts skipped]

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoSELinux: Use d_is_positive() rather than testing dentry->d_inode
David Howells [Thu, 29 Jan 2015 12:02:33 +0000 (12:02 +0000)]
SELinux: Use d_is_positive() rather than testing dentry->d_inode

Use d_is_positive() rather than testing dentry->d_inode in SELinux to get rid
of direct references to d_inode outside of the VFS.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoSmack: Use d_is_positive() rather than testing dentry->d_inode
David Howells [Thu, 29 Jan 2015 12:02:32 +0000 (12:02 +0000)]
Smack: Use d_is_positive() rather than testing dentry->d_inode

Use d_is_positive() rather than testing dentry->d_inode in Smack to get rid of
direct references to d_inode outside of the VFS.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoTOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()
David Howells [Thu, 29 Jan 2015 12:02:32 +0000 (12:02 +0000)]
TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()

Use d_is_dir() rather than d_inode and S_ISDIR().  Note that this will include
fake directories such as automount triggers.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoApparmor: Use d_is_positive/negative() rather than testing dentry->d_inode
David Howells [Thu, 29 Jan 2015 12:02:31 +0000 (12:02 +0000)]
Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode

Use d_is_positive(dentry) or d_is_negative(dentry) rather than testing
dentry->d_inode as the dentry may cover another layer that has an inode when
the top layer doesn't or may hold a 0,0 chardev that's actually a whiteout.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoApparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb
David Howells [Thu, 29 Jan 2015 12:02:31 +0000 (12:02 +0000)]
Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb

mediated_filesystem() should use dentry->d_sb not dentry->d_inode->i_sb and
should avoid file_inode() also since it is really dealing with the path.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: Split DCACHE_FILE_TYPE into regular and special types
David Howells [Thu, 29 Jan 2015 12:02:29 +0000 (12:02 +0000)]
VFS: Split DCACHE_FILE_TYPE into regular and special types

Split DCACHE_FILE_TYPE into DCACHE_REGULAR_TYPE (dentries representing regular
files) and DCACHE_SPECIAL_TYPE (representing blockdev, chardev, FIFO and
socket files).

d_is_reg() and d_is_special() are added to detect these subtypes and
d_is_file() is left as the union of the two.

This allows a number of places that use S_ISREG(dentry->d_inode->i_mode) to
use d_is_reg(dentry) instead.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: Add a fallthrough flag for marking virtual dentries
David Howells [Thu, 29 Jan 2015 12:02:28 +0000 (12:02 +0000)]
VFS: Add a fallthrough flag for marking virtual dentries

Add a DCACHE_FALLTHRU flag to indicate that, in a layered filesystem, this is
a virtual dentry that covers another one in a lower layer that should be used
instead.  This may be recorded on medium if directory integration is stored
there.

The flag can be set with d_set_fallthru() and tested with d_is_fallthru().

Original-author: Valerie Aurora <vaurora@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: Add a whiteout dentry type
David Howells [Thu, 29 Jan 2015 12:02:27 +0000 (12:02 +0000)]
VFS: Add a whiteout dentry type

Add DCACHE_WHITEOUT_TYPE and provide a d_is_whiteout() accessor function.  A
d_is_miss() accessor is also added for ordinary cache misses and
d_is_negative() is modified to indicate either an ordinary miss or an enforced
miss (whiteout).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: Introduce inode-getting helpers for layered/unioned fs environments
David Howells [Thu, 29 Jan 2015 12:02:27 +0000 (12:02 +0000)]
VFS: Introduce inode-getting helpers for layered/unioned fs environments

Introduce some function for getting the inode (and also the dentry) in an
environment where layered/unioned filesystems are in operation.

The problem is that we have places where we need *both* the union dentry and
the lower source or workspace inode or dentry available, but we can only have
a handle on one of them.  Therefore we need to derive the handle to the other
from that.

The idea is to introduce an extra field in struct dentry that allows the union
dentry to refer to and pin the lower dentry.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sun, 22 Feb 2015 03:41:38 +0000 (19:41 -0800)]
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS updates from Ralf Baechle:
 "This is the main pull request for MIPS:

   - a number of fixes that didn't make the 3.19 release.

   - a number of cleanups.

   - preliminary support for Cavium's Octeon 3 SOCs which feature up to
     48 MIPS64 R3 cores with FPU and hardware virtualization.

   - support for MIPS R6 processors.

     Revision 6 of the MIPS architecture is a major revision of the MIPS
     architecture which does away with many of original sins of the
     architecture such as branch delay slots.  This and other changes in
     R6 require major changes throughout the entire MIPS core
     architecture code and make up for the lion share of this pull
     request.

   - finally some preparatory work for eXtendend Physical Address
     support, which allows support of up to 40 bit of physical address
     space on 32 bit processors"

     [ Ahh, MIPS can't leave the PAE brain damage alone.  It's like
       every CPU architect has to make that mistake, but pee in the snow
       by changing the TLA.  But whether it's called PAE, LPAE or XPA,
       it's horrid crud   - Linus ]

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (114 commits)
  MIPS: sead3: Corrected get_c0_perfcount_int
  MIPS: mm: Remove dead macro definitions
  MIPS: OCTEON: irq: add CIB and other fixes
  MIPS: OCTEON: Don't do acknowledge operations for level triggered irqs.
  MIPS: OCTEON: More OCTEONIII support
  MIPS: OCTEON: Remove setting of processor specific CVMCTL icache bits.
  MIPS: OCTEON: Core-15169 Workaround and general CVMSEG cleanup.
  MIPS: OCTEON: Update octeon-model.h code for new SoCs.
  MIPS: OCTEON: Implement DCache errata workaround for all CN6XXX
  MIPS: OCTEON: Add little-endian support to asm/octeon/octeon.h
  MIPS: OCTEON: Implement the core-16057 workaround
  MIPS: OCTEON: Delete unused COP2 saving code
  MIPS: OCTEON: Use correct instruction to read 64-bit COP0 register
  MIPS: OCTEON: Save and restore CP2 SHA3 state
  MIPS: OCTEON: Fix FP context save.
  MIPS: OCTEON: Save/Restore wider multiply registers in OCTEON III CPUs
  MIPS: boot: Provide more uImage options
  MIPS: Remove unneeded #ifdef __KERNEL__ from asm/processor.h
  MIPS: ip22-gio: Remove legacy suspend/resume support
  mips: pci: Add ifdef around pci_proc_domain
  ...

9 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sun, 22 Feb 2015 03:21:54 +0000 (19:21 -0800)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "A few fixes that came in too late to make it into the first set of
  pull requests but would still be nice to have in -rc1.

  The majority of these are trivial build fixes for bugs that I found
  myself using randconfig testing, and a set of two patches from Uwe to
  mark DT strings as 'const' where appropriate, to resolve inconsistent
  section attributes"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: make of_device_ids const
  ARM: make arrays containing machine compatible strings const
  ARM: mm: Remove Kconfig symbol CACHE_PL310
  ARM: rockchip: force built-in regulator support for PM
  ARM: mvebu: build armada375-smp code conditionally
  ARM: sti: always enable RESET_CONTROLLER
  ARM: rockchip: make rockchip_suspend_init conditional
  ARM: ixp4xx: fix {in,out}s{bwl} data types
  ARM: prima2: do not select SMP_ON_UP
  ARM: at91: fix pm declarations
  ARM: davinci: multi-soc kernels require AUTO_ZRELADDR
  ARM: davinci: davinci_cfg_reg cannot be init
  ARM: BCM: put back ARCH_MULTI_V7 dependency for mobile
  ARM: vexpress: use ARM_CPU_SUSPEND if needed
  ARM: dts: add I2C device nodes for Broadcom Cygnus
  ARM: dts: BCM63xx: fix L2 cache properties

9 years agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sun, 22 Feb 2015 03:16:42 +0000 (19:16 -0800)]
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull misc SCSI patches from James Bottomley:
 "This is a short patch set representing a couple of left overs from the
  merge window (debug removal and MAINTAINER changes).

  Plus one merge window regression (the local workqueue for hpsa) and a
  set of bug fixes for several issues (two for scsi-mq and the rest an
  assortment of long standing stuff, all cc'd to stable)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  sg: fix EWOULDBLOCK errors with scsi-mq
  sg: fix unkillable I/O wait deadlock with scsi-mq
  sg: fix read() error reporting
  wd719x: add missing .module to wd719x_template
  hpsa: correct compiler warnings introduced by hpsa-add-local-workqueue patch
  fixed invalid assignment of 64bit mask to host dma_boundary for scatter gather segment boundary limit.
  fcoe: Transition maintainership to Vasu
  am53c974: remove left-over debugging code

9 years agoMerge tag 'xfs-pnfs-for-linus-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 21 Feb 2015 22:09:38 +0000 (14:09 -0800)]
Merge tag 'xfs-pnfs-for-linus-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs

Pull xfs pnfs block layout support from Dave Chinner:
 "This contains the changes to XFS needed to support the PNFS block
  layout server that you pulled in through Bruce's NFS server tree
  merge.

  I originally thought that I'd need to merge changes into the NFS
  server side, but Bruce had already picked them up and so this is
  purely changes to the fs/xfs/ codebase.

  Summary:

  This update contains the implementation of the PNFS server export
  methods that enable use of XFS filesystems as a block layout target"

* tag 'xfs-pnfs-for-linus-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs:
  xfs: recall pNFS layouts on conflicting access
  xfs: implement pNFS export operations