Commit Graph

628286 Commits

Author SHA1 Message Date
Linus Torvalds 5a9f228a18 regulator: Changes for v4.9
This is an extremely quiet release for the regulator API, we've got a
 small set of bug fixes and minor feature enhancements for drivers plus a
 couple of more visible changes:
 
  - Add support for ramp times in regulators that don't use selectors.
  - New driver for LTC3676.
 -----BEGIN PGP SIGNATURE-----
 
 iQEwBAABCAAaBQJX83uoExxicm9vbmllQGtlcm5lbC5vcmcACgkQJNaLcl1Uh9AI
 Vgf/TKsgLY/UGdEhgmuSCWDI+64e8NjHRADRYR3rpgg8gfa5LeB6M+Zha6FnEWxn
 FAj93OAcszNZqHz8ZLZcyV2j9rXhhRlPI1FadAe+0FTQgqN0EKREsL4MHgJNz8C5
 mHe/87t8u+4xvscK7JjyvmmMk2UlvvmH8mmaAHTSa3QiX/Jc2isok6NFI370hDRq
 DlmgqKU9plZU7hqtvseNFcgiQ1iaFXI6B0Fv6O87czzVvokHdt5BKugKq4LhwInH
 A2H6MXap0H2f8GSmFBtXCSonnTKOKYkAUnbEC1LUASCTxPAIEMVMTdO3jV05wI8g
 vsy/95OrfLvzKgrE/UlQlV1WZg==
 =bca4
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "This is an extremely quiet release for the regulator API, we've got a
  small set of bug fixes and minor feature enhancements for drivers plus
  a couple of more visible changes:

   - add support for ramp times in regulators that don't use selectors.

   - new driver for LTC3676"

* tag 'regulator-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: dbx500: remove unused functions in dbx500-prcmu.c
  regulator: pv88080: Update regulator for PV88080 BB silicon support
  regulator: core: don't return error with inadequate reason
  regulator: tps65910: Work around silicon erratum SWCZ010
  regulator: core: Add set_voltage_time op
  regulator: core: Don't skip set_voltage_time when ramp delay disabled
  regulator: core: Simplify error flow in _regulator_do_set_voltage()
  regulator: core: Use local ops variable in _regulator_do_set_voltage()
  regulator: hi6421: mark hi6421_regulator_ldo_get_optimum_mode() static
  regulator: Kconfig: Fix typo
  regulator: bindings: Use the correct symbol for second
  regulator: Remove support for optional supplies in the bulk API
  regulator: Add LTC3676 support
  regulator: rk808: Delete owner assignment
  regulator: tps65218: do not disable DCDC3 during poweroff on broken PMICs
  mfd: tps65218: add version check to the PMIC probe
2016-10-04 11:16:38 -07:00
Linus Torvalds 808c2b0583 regmap: Updates for v4.9
Another quiet release, a few small extensions to the set of register
 maps we support and an improvement in the debugfs code:
 
  - Allow viewing of cached contents for write only registers via
    debugfs.
  - Support a wider range of read/write flag masks in register formats.
  - Support more little endian formats.
 -----BEGIN PGP SIGNATURE-----
 
 iQEwBAABCAAaBQJX8x9EExxicm9vbmllQGtlcm5lbC5vcmcACgkQJNaLcl1Uh9Dc
 mQf8Do/0T9bM0vTQFB9fcdOtYEa73vuDNbo0zCVAXEGJp862Z9OFB1oS5UInH9Os
 T6gahxFR4tApv+89p9f7WGE2ppeiclkc9rpBdig6sBUtDGzF3+VT+N0LLV5I1TgA
 FcYRFBXxewwk7qWywEd1IypRa6s2fazOqj7eYdqSpaFAyewpXMRKrnPNbtxbYDkx
 MkIBADyT4ZfzOQQjxyff7vjVpWn8A41bD/ojhm9WLJL/Mxu/1q23nyTUYH7qqAAL
 HC1DZFqUt2jbshmNozF9JlKuEGb1M2hXRptKLUJlynyVsnk2RO3OEUOW8haoxFBh
 7Puxh+SsERDRHKiBkbFYnuBjLA==
 =0fj2
 -----END PGP SIGNATURE-----

Merge tag 'regmap-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull regmap updates from Mark Brown:
 "Another quiet release, a few small extensions to the set of register
  maps we support and an improvement in the debugfs code:

   - allow viewing of cached contents for write only registers via
     debugfs.

   - support a wider range of read/write flag masks in register formats.

   - support more little endian formats"

* tag 'regmap-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Add missing little endian functions
  regmap: Allow longer flag masks for read and write
  regmap: debugfs: Add support for dumping write only device registers
  regmap: Add a function to check if a regmap register is cached
2016-10-04 11:12:35 -07:00
Linus Torvalds 5617c122e6 The core clk framework changes are small again. They're mostly minor fixes
that weren't causing enough problems (or any problems when we're just
 clarifying things) to warrant sending outside the merge window. The
 majority of changes are in drivers for various SoCs. Full details
 are in the logs, but here's the summary.
 
 Core:
 
  - Better support for DeviceTree overlays with the addition of the
    CLK_OF_DECLARE_DRIVER macro. Now we won't probe a clk driver
    for a device node that matched during of_clk_init(), unless
    the driver uses CLK_OF_DECLARE_DRIVER instead of CLK_OF_DECLARE.
    This allows overlays to work cleanly for drivers that must probe
    before the device model is ready, and also after it's ready
    when an overlay is loaded.
 
  - Clarification in the code around how clk_hw pointers are returned
    from of clk providers
 
  - Proper migration of prepare/enable counts to parents when the
    clk tree is constructed
 
 New Drivers:
 
  - Socionext's UniPhier SoCs
  - Loongson1C
  - ZTE ZX296718
  - Qualcomm MDM9615
  - Amlogic GXBB AO clocks and resets
  - Broadcom BCM53573 ILP
  - Maxim MAX77620
 
 Updates:
 
  - Four Allwinner SoCs are migrated to the new style clk driver (A31, A31s,
    A23 and A33)
  - Exynos 5xxx audio and DRAM clks
  - Loongson1B AC97, DMA and NAND clks
  - Rockchip DDR clks and rk3399 driver tweaks
  - Renesas R-Car M3-W (r8a7796) SoC SDHI interface and Watchdog timer clks
  - Renasas R-Car H3 and M3-W CMT clks and RAVB+Thermal clks for M3-W
  - Amlogic GXBB MMC gate clks
  - at91 sama5d4 sckc
  - Removal of STiH415 and STiH416 clk support as the SoC is being removed
  - Rework of STiH4xx clk support for new style bindings
  - Continuation of driver migration to clk_hw based registration APIs
  - xgene PMD support
  - bcm2835 critical clk markings
  - ARM versatile ICST
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJX8v/WAAoJEK0CiJfG5JUl0YsQAJr91iV+yHQJAML1BS+nQO9T
 NMbGx/7Pmi2E2S7d62BtQO1kw4zFUX1rURfoTKWfB7vTfHLm1zs5S6MSLxayEr34
 S3PCheFxPQY7OuzCfDFhMeavDha0bZ2jha7IHdshZndA/ZwYX3ghyHFEQf0rzRE+
 HJ3+TGYijXi+/3dyM95HJrZ5A91cJhqhzmSfCvAG/cJgPDHkM8lDvhmNfiO+b4WX
 0BLM+OQj3m5Ob7AXV8L2M3/CELKBzf8gZlDYP4b8LT5xc5P+225UevWQnFpJ6BWt
 32ANz5Wc3MRJw7db4/A5aR/UNCaZZCfC/Sd8BXrHL+7RuxxnHAGEBPeAH5Pd0ubF
 zn1kZ7fQVvDbqim2S9gw6u7i4YoiYTj1PmQmY3j2iosjGxj2n2RK0zha4Y65b2rV
 CxlW07nKvNOgJH7bfQSazM6RIPpht7uDwKJ9dWb20uzRIOL2t94Msg1eXQvgD9ec
 nBn7wq6yBGlyvgg5s9WBogwUWJyg0wXrhN84q+cjptCqFfXUwR1AKRvS+T2EP2G0
 B4HFw/hvnJqGgv5xBh/jWt9ZyqvLB0cSRMZtTcSMclrCdcECd2PbF4gVKUR99wVH
 ND1fai1/PbLZ4yxuUAuEQ5P866aq6Hj5iEXqe0dGUpA1lZWrYrB+vs/lwADyBcsR
 7//DbP9+dHZFbJDQyiWK
 =NFUB
 -----END PGP SIGNATURE-----

Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk framework updates from Stephen Boyd:
 "The core clk framework changes are small again. They're mostly minor
  fixes that weren't causing enough problems (or any problems when we're
  just clarifying things) to warrant sending outside the merge window.
  The majority of changes are in drivers for various SoCs. Full details
  are in the logs, but here's the summary.

  Core:

   - Better support for DeviceTree overlays with the addition of the
     CLK_OF_DECLARE_DRIVER macro. Now we won't probe a clk driver for a
     device node that matched during of_clk_init(), unless the driver
     uses CLK_OF_DECLARE_DRIVER instead of CLK_OF_DECLARE. This allows
     overlays to work cleanly for drivers that must probe before the
     device model is ready, and also after it's ready when an overlay is
     loaded.

   - Clarification in the code around how clk_hw pointers are returned
     from of clk providers

   - Proper migration of prepare/enable counts to parents when the clk
     tree is constructed

  New Drivers:

   - Socionext's UniPhier SoCs
   - Loongson1C
   - ZTE ZX296718
   - Qualcomm MDM9615
   - Amlogic GXBB AO clocks and resets
   - Broadcom BCM53573 ILP
   - Maxim MAX77620

 Updates:

   - Four Allwinner SoCs are migrated to the new style clk driver (A31,
     A31s, A23 and A33)
   - Exynos 5xxx audio and DRAM clks
   - Loongson1B AC97, DMA and NAND clks
   - Rockchip DDR clks and rk3399 driver tweaks
   - Renesas R-Car M3-W (r8a7796) SoC SDHI interface and Watchdog timer
     clks
   - Renasas R-Car H3 and M3-W CMT clks and RAVB+Thermal clks for M3-W
   - Amlogic GXBB MMC gate clks
   - at91 sama5d4 sckc
   - Removal of STiH415 and STiH416 clk support as the SoC is being
     removed
   - Rework of STiH4xx clk support for new style bindings
   - Continuation of driver migration to clk_hw based registration APIs
   - xgene PMD support
   - bcm2835 critical clk markings
   - ARM versatile ICST"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (199 commits)
  CLK: Add Loongson1C clock support
  clk: Loongson1: Make use of GENMASK
  clk: Loongson1: Update clocks of Loongson1B
  clk: Loongson1: Refactor Loongson1 clock
  clk: change the type of clk_hw_onecell_data.num to unsigned int
  clk: zx296718: register driver earlier with core_initcall
  clk: mvebu: dynamically allocate resources in Armada CP110 system controller
  clk: mvebu: fix setting unwanted flags in CP110 gate clock
  clk: nxp: clk-lpc32xx: Unmap region obtained by of_iomap
  clk: mediatek: clk-mt8173: Unmap region obtained by of_iomap
  clk: sunxi-ng: Fix reset offset for the A23 and A33
  clk: at91: sckc: optimize boot time
  clk: at91: Add sama5d4 sckc support
  clk: at91: move slow clock controller clocks to sckc.c
  clk: imx6: initialize GPU clocks
  clk: imx6: fix i.MX6DL clock tree to reflect reality
  clk: imx53: Add clocks configuration
  clk: uniphier: add clock data for UniPhier SoCs
  clk: uniphier: add core support code for UniPhier clock driver
  clk: bcm: Add driver for BCM53573 ILP clock
  ...
2016-10-04 11:04:57 -07:00
Linus Torvalds 77b0a4aa07 hwmon updates for v4.9
- New hwmon registration API, including ports of several drivers
   to the new API
 - New hwmon driver for APM X-Gene SoC
 - Added support for UCD90160, DPS-460, DPS-800, and SGD009 PMBUs chips
 - Various cleanups, minor improvements, and fixes in several drivers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJX8cQ6AAoJEMsfJm/On5mBlWIP/RpA4b05gsYOG1SVW/SuZZPu
 IJfFkvGgOORgMS0gg8bNk3WyNNnqinbB4A6xucR/7Q7gRyk+3NYR6mNIsyP3UcAm
 KHJF9jgUr02vO6reMGGrqrR3cQ14omHgHqXBWQny7JkZ3/6Xyvg/LuarAZ+ZsUfp
 cNALIBsHoxyBSF4W7g5PJILtVbA+aW854CQ7UU/S0I2rjR9cqLu9HHvPUeYIazfO
 Tn4XM1vZCPLH5OhvIRURCy7FaZjwmxhPZhgF5fqAgDUF0VTQAhiOZB9jcz5NQq2q
 sSzlXSd2qqdJSTabtaBDl3O9GsfFrtT0LsFT0Rycx9JedgbV+Euy240uGVUnbHdT
 Gh8TVmOYx6qldDj/Hu5DF+kKnIH8vL6fp5blA6b/3EKwv14MUBNC/hxrmOcxyo5T
 qBnos0FlF9Ut4QLdRWM0rorZkCWxJWCXV8CvPX79b8iospKD/+Fgr69z7UgZuljA
 rcXZJR65oz4cJGMFr4dR+CcC0y2Jqqn5mcQAaGSR0RcII6EpSa+3Zb+2nBE4VGyQ
 vZpmxEEjMu9C8SI5DAczLwIMOsW4/pTTB6f8lLKiKRM2eJ7mAyk0KCF+9JIaKjaL
 qigWHlJI9FpXQiuek+pMXTVBTzs6fO/NSVfPUfEyAoyyuQePCjqVsQdn/h+lzQHC
 1FiFIvnzlxb4ESZ5pfS1
 =FLdn
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:

 - New hwmon registration API, including ports of several drivers to the
   new API

 - New hwmon driver for APM X-Gene SoC

 - Added support for UCD90160, DPS-460, DPS-800, and SGD009 PMBUs chips

 - Various cleanups, minor improvements, and fixes in several drivers

* tag 'hwmon-for-linus-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (54 commits)
  hwmon: (nct6775) Add support for multiple virtual temperature sources
  hwmon: (adt7470) No need for additional synchronization on kthread_stop()
  hwmon: (lm95241) Update module description to include LM95231
  hwmon: (lm95245) Select REGMAP_I2C
  hwmon: (ibmpowernv) Fix label for cores numbers not threads
  hwmon: (adt7470) Allow faster removal
  hwmon: (adt7470) Add write support to alarm_mask
  hwmon: (xgene) access mailbox as RAM
  hwmon: (lm95245) Use new hwmon registration API
  hwmon: (lm95241) Convert to use new hwmon registration API
  hwmon: (jc42) Convert to use new hwmon registration API
  hwmon: (max31790) Convert to use new hwmon registration API
  hwmon: (nct7904) Convert to use new hwmon registration API
  hwmon: (ltc4245) Convert to use new hwmon registration API
  hwmon: (tmp421) Convert to use new hwmon registration API
  hwmon: (tmp102) Convert to use new hwmon registration API
  hwmon: (lm90) Convert to use new hwmon registration API
  hwmon: (lm75) Convert to use new hwmon registration API
  hwmon: (xgene) Fix crash when alarm occurs before driver probe
  hwmon: (iio_hwmon) defer probe when no channel is found
  ...
2016-10-04 10:56:14 -07:00
Keith Busch 181ffd19cc x86/PCI: VMD: Move VMD driver to drivers/pci/host
Move the driver source and Kconfig to the PCI host bridge drivers directory
and move the config option to a more appropriate sub-menu instead of
occupying the top-level location.

Update the Kconfig option with the X86_64 dependency that was implicitly
included from the previous location, and add information about the module
name when built as a loadable module.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Jon Derrick <jonathan.derrick@intel.com>
2016-10-04 12:26:37 -05:00
Linus Torvalds f80fa1822d Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
Pull LED driver updates from Jacek Anaszewski:
 "Three new LED class drivers and some minor fixes and improvementes to
  the leds-gpio driver, LED Trigger core and documentation"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
  leds: triggers: Check return value of kobject_uevent_env()
  leds: triggers: Return from led_trigger_set() if there is nothing to do
  leds: gpio: fix and simplify error handling in gpio_leds_create
  leds: gpio: switch to managed version of led_classdev_register
  leds: gpio: fix and simplify reading property "label"
  leds: gpio: simplify gpio_leds_create
  leds: gpio: add helper cdev_to_gpio_led_data
  leds: gpio: fix an unhandled error case in create_gpio_led
  leds: gpio: introduce gpio_blink_set_t
  leds: add driver for Mellanox systems LEDs
  Documentation: move oneshot trigger attributes documentation to ABI
  leds: centralize definition of "default-state" property
  leds: add PM8058 LEDs driver
  leds: pm8058: add device tree bindings
  leds: do not overflow sysfs buffer in led_trigger_show
  leds: make triggers explicitly non-modular
  DT: leds: Add bindings for ISSI is31fl319x
  leds: is31fl319x: 1/3/6/9-channel light effect led driver
2016-10-04 10:25:53 -07:00
Shawn Lin ca19890840 PCI: rockchip: Fix wrong transmitted FTS count
If the expected number of FTS aren't received by RC when exiting from L0s,
the LTSSM will fall into recover state, which means it will need to send TS
for retraining which makes the latency of exiting from L0s a little longer
than expected.  This issue is caused by an incorrect reset value of FTS
count on PLC1 register (offset 0x4).  The expected value for Gen1/2 should
be more than 240 and we may leave a little margin here.  Fix this before
starting Gen1 training which will make TS1 contain the correct FTS count.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2016-10-04 12:20:22 -05:00
Shawn Lin 58c6990c5e PCI: rockchip: Improve the deassert sequence of four reset pins
Per TRM, we need to deassert the four reset pins simultaneously.  Currently
the reset framework doesn't support that so we did it one by one.  It seems
no side effect found but it does impact the state machine of controller, so
sometimes the change speed bit is not set when sending training sequence
from recover state.  After the silicon RTL review from SoC guys, we don't
need to do the sequence recommended by TRM, and could just move the
deassert of mgmt_sticky_rst to the first place.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2016-10-04 12:18:25 -05:00
Rajat Jain 277743ef61 PCI: rockchip: Increase the Max Credit update interval
Increase the likelihood of link state to automatically go to L1 and save
some power.

The default credit update interval of 7.5 us results in the rootport
sending UpdateFC-P and UpdateFC-NP packets too often, thus resulting in the
link never going to L1, and always staying in L0/L0s.  The value 24 us was
chosen after some experiments and peeking over the PCIe bus to see that we
do enter L1 substate when there is not enough traffic on the PCIe bus.

Signed-off-by: Rajat Jain <rajatja@google.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-10-04 12:16:03 -05:00
Sergei Shtylyov b3327f7fae PCI: rcar: Try increasing PCIe link speed to 5 GT/s at boot
The PCIe link speed is initially set to 2.5 GT/s.  Try to increase the link
speed to 5 GT/s.

Based on original patch by Grigory Kletsko
<grigory.kletsko@cogentembedded.com>.

[bhelgaas: remove "Trying speed up" message, remove unused SPCHG]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
2016-10-04 11:42:39 -05:00
Charles Keepax b8d336ed90 mfd: arizona: Handle probe deferral for reset GPIO
The Arizona CODECs will generally function correctly without a reset line
although it is strongly advised to have one, as such we do allow the system
to boot if the reset gpio is missing or incorrectly specified.  However
we should fail probe if we get a probe deferral request, this patch adds
handling for this case.

Reported-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>
2016-10-04 15:48:05 +01:00
Charles Keepax 1961531d1a mfd: arizona: Remove arizona_of_get_named_gpio helper function
This function is only used in a single place and no new users will be
added as all the devices other required GPIOs are already handled. As
such just merge the code back into the calling function.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2016-10-04 15:48:05 +01:00
Richard Fitzgerald f4c0526225 mfd: arizona: Add DT options for max_channels_clocked and PDM speaker config
This patch adds DT settings for the max_channels_clocked, spk_fmt and
spk_mute pdata.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Peter Ujfalusi 0133d32346 mfd: twl6040: Register child device for twl6040-pdmclk
The McPDM in OMAP4/5 is using the pdmclk from twl6040 as functional clock.
The twl6040-pdmclk driver provides a clock which can be used to make sure
that the pdmclk is active when the McPDM is in use.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Lee Jones 25d94a11db mfd: cros_ec_spi: Remove unused variable 'request'
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Lee Jones c7c7627770 mfd: omap-usb-host: Return value is not 'const int'
Change from 'const int' to just 'int'.

Cc: <robh+dt@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Lee Jones 364c517edc mfd: ab8500-debugfs: Remove 'weak' function suspend_test_wake_cause_interrupt_is_mine()
There are no other functions which can over-ride it.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Lee Jones e58d3e76be mfd: ab8500-debugfs: Remove ab8500_dump_all_banks_to_mem()
Doesn't appear to be used.  No call sites exist.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Lee Jones 45ff2b685a mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls
There are no call sites for these functions.  Strip them out.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Lee Jones c45eab2cb0 mfd: ab8500-debugfs: Prevent initialised field from being over-written
Due to the lack of parity in the way array fields have been named/
numbered, a mistake was made where more debug fields were declared
than actually existed.  In doing so, 2 fields were added, which
although unclear, were already declared in the array.  The result
was that the latter declarations trashed the former ones.

This patch places the array back in the correct order and removes
the offending NULL entries.

While we're at it, let's ensure this doesn't happen again by naming
each field properly and add a new *_LAST define to describe how
many fields there should be.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Lee Jones c646e2b115 mfd: max8997-irq: 'inline' should be at the beginning of the declaration
Reported by [-Wold-style-declaration].

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Arnd Bergmann fae5e033d6 mfd: rk808: Fix RK818_IRQ_DISCHG_ILIM initializer
When building with -Woverride-init, we get a warning about an incorrect
initializer:

drivers/mfd/rk808.c:244:8: error: initialized field overwritten [-Werror=override-init]
  [RK818_IRQ_DISCHG_ILIM] = {

This is clearly a mistake, as both RK818_IRQ_DISCHG_ILIM and RK818_IRQ_USB_OV
are defined as '7', but they refer to different register bits. Changing
RK818_IRQ_DISCHG_ILIM to 15 is consistent with how all other 14 interrupts are
handled here, so I'm assuming this is what it should have been.

Fixes: 2eedcbfc06 ("mfd: rk808: Add RK818 support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Arnd Bergmann b4feabe917 mfd: tps65217: Fix nonstandard declaration
The tps65217 gained a new warning when building with W=1:

drivers/mfd/tps65217.c:85:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]

This fixes it by putting the 'inline' modifier before 'const'.

Fixes: 262d5cc6ceb2 ("mfd: tps65217: Add support for IRQs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:05 +01:00
Axel Lin fe62c477df mfd: lp873x: Remove unused mutex lock from struct lp873x
The mutex is not used, so remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:04 +01:00
Boris Brezillon 2c2469bc03 mfd: atmel-hlcdc: Do not sleep in atomic context
readl_poll_timeout() calls usleep_range(), but
regmap_atmel_hlcdc_reg_write() is called in atomic context (regmap
spinlock held).

Replace the readl_poll_timeout() call by readl_poll_timeout_atomic().

Cc: <stable@vger.kernel.org>
Fixes: ea31c0cf9b ("mfd: atmel-hlcdc: Implement config synchronization")
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:04 +01:00
Arnd Bergmann 22a96b85ea mfd: exynos-lpass: Mark PM functions as __maybe_unused
The newly added exynos lpass driver produces a build warning when
CONFIG_PM is disabled since the only callers of exynos_lpass_disable
are under an #ifdef:

drivers/mfd/exynos-lpass.c:93:13: error: 'exynos_lpass_disable' defined but not used [-Werror=unused-function]
 static void exynos_lpass_disable(struct exynos_lpass *lpass)

This removes the #ifdef and replaces it with __maybe_unused annotations
so the compiler can leave out the unused code silently with less
room for mistakes.

Fixes: 36c26760bba8 ("mfd: Add Samsung Exynos Low Power Audio Subsystem driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:04 +01:00
Jarkko Nikula c50cdd62dd mfd: intel-lpss: Add default I2C device properties for Apollo Lake
Default I2C device properties for Intel Broxton, especially SDA hold time
may not be enough on Intel Apollo Lake. These properties are used in case
we don't get timing parameters from ACPI.

The default SDA hold time for Broxton may fail with arbitration lost errors
on Apollo Lake:

  i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration

Fix this by using different default device properties on Apollo Lake than
Broxton.

Reported-by: Paul Liu <paul.liu@canonical.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156181
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:04 +01:00
Paul Gortmaker 7a243b6323 mfd: twl-core: Make it explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config TWL4030_CORE
drivers/mfd/Kconfig:    bool "TI TWL4030/TWL5030/TWL6030/TPS659x0 Support"

...meaning that it currently is not being built as a module by anyone.

Lets remove what modular code that we can, so that when reading the
driver there is less doubt that it is builtin-only.  Note that we can't
remove the twl_remove() itself ; it is still used by the probe unwind
routine.  So we leave it linked into the .remove as well, even though
it will most likely never be called via that path from an unbind.

Since module_i2c_driver() uses the same init level priority as
builtin_i2c_driver() the init ordering remains unchanged with
this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:04 +01:00
Paul Gortmaker 391cd33a0b mfd: sun6i-prcm: Make it explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_SUN6I_PRCM
drivers/mfd/Kconfig:    bool "Allwinner A31 PRCM controller"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modularity so that when reading the
driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:04 +01:00
Paul Gortmaker da4d0f2425 mfd: smsc-ece1099: Make it explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_SMSC
drivers/mfd/Kconfig:       bool "SMSC ECE1099 series chips"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since module_init was not in use by this code, the init ordering
remains unchanged with this commit.

We replace module.h with init.h and delete an unused moduleparam.h
include.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:04 +01:00
Paul Gortmaker b3fe9c5c47 mfd: intel_msic: Make it explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_INTEL_MSIC
drivers/mfd/Kconfig:    bool "Intel MSIC

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple instances of module references, so that
when reading the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Paul Gortmaker ed401e8ff4 mfd: as3722: Convert MFD_AS3722 from bool to tristate
The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_AS3722
drivers/mfd/Kconfig:    bool "ams AS3722 Power Management IC"

...meaning that it currently is not being built as a module by anyone.

In response to an earlier patch set suggesting removal of the unused
modular code, Laxman suggested that this driver be instead moved to
tristate.

We do that here, and confirm it can build and modpost as a tristate.
However there remains to be runtime testing in order to ensure this
change is 100% functional for "=m".

Cc: Florian Lobmaier <florian.lobmaier@ams.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Paul Gortmaker 0a589167b3 mfd: altera-a10sr: Make it explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_ALTERA_A10SR
drivers/mfd/Kconfig:    bool "Altera Arria10 DevKit System Resource chip"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since builtin_driver() uses the same init level priority as
module_spi_driver() the init ordering remains unchanged with
this commit. [Note that there is no builtin_spi_driver macro,
so we open-code what it would be via builtin_driver().]

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

Cc: Thor Thayer <tthayer@opensource.altera.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Marcin Niestroj dea9c730e5 mfd: tps65217: Add power button as subdevice
Add tps65217 power buttor subdevice with assigned IRQ resources.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Marcin Niestroj 6556bdacf6 mfd: tps65217: Add support for IRQs
Add support for handling IRQs: power button, AC and USB power state
changes. Mask and interrupt bits are shared within one register, which
prevents us to use regmap_irq implementation. New irq_domain is created in
order to add interrupt handling for each tps65217's subsystem. IRQ
resources have been added for charger subsystem to be able to notify about
AC and USB state changes.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Julia Lawall 7e94e51525 mfd: sm501: Constify gpio_chip structures
These structures are only used to copy into other structures, so declare
them as const.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct gpio_chip i@p = { ... };

@ok@
identifier r.i;
expression e;
position p;
@@
e = i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct gpio_chip e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct gpio_chip i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Andrew Jeffery cc370ab50e syscon: dt-bindings: Add documentation for Aspeed system control units
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Joel Stanley <joel@jms.id.au>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Lee Jones 80366127be MAINTAINERS: Add MFD's DT bindings directory to MFD entry
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Arnd Bergmann b53046cbf8 mfd: ucb1x00: Remove NO_IRQ check
probe_irq_off() returns '0' on failure, not NO_IRQ, so the check
in this driver is clearly wrong. This replaces it with the
regular '!irq' check used in other drivers.

The sa1100 platform that this driver is used on originally numbered
all its interrupts starting at '0', which would have conflicted with
this change, but as of commit 18f3aec ("ARM: 8230/1: sa1100: shift
IRQs by one"), this is not a problem any more.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Wenyou Yang bab1e0c018 doc: bindings: mfd: act8945a: Update the example
Since the act8945a-charger is regarded as a sub-device and it using
"interrupts" property, update the examples section.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Peter Ujfalusi c78cb17867 mfd: twl6040: The chip does not support bulk access
Bulk access is not working with twl6040, we need to use single register
access. Bulk access would happen when we try to sync the regcache after
power on.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Charles Keepax 3612b27cfb mfd: arizona: Use suspend_noirq inplace of suspend_late
As runtime PM doesn't function whilst processing system suspend/resume
operations and the Arizona IRQ handlers need runtime PM to function
we must disable IRQs during these operations. Whilst this is
already done in the driver we are using suspend/suspend_late and
resume/resume_noirq to do so which has two problems. Firstly, as
suspend_late is before suspend_noirq that means we still have a
small window where an IRQ can cause issues.  Secondly, if another
suspend_late handler fails after ours has run then (as resume_noirq
will not run) we will make unbalanced calls to enable_irq.

This is all simply fixed by using the suspend_noirq callback rather
than suspend_late. Whilst we are doing this tidy the code up a little,
and use the appropriate helper macros.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Wenyou Yang 7235711aec mfd: act8945a: Add .of_compatible for act8945a-charger
To regard the act8945a-charger as a sub-device, add .of_compatible for
act8945a-charger cell.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:03 +01:00
Charles Keepax 75d8a2b041 mfd: arizona: Add sensible return value to some error paths
There are some cases in arizona_dev_init, such as where we don't
recognise the chip ID, in which we head to the error path without
setting a sensible error code in ret. This would lead to the chip
silently failing probe, as it would still return 0. Fix this up by
adding appropriate sets of the return value.

Whilst adding these update the existing paths that do return an error
when the chip is not recognised to use ENODEV, which seems like a better
fit.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:02 +01:00
Sylwester Nawrocki c695abab24 mfd: Add Samsung Exynos Low Power Audio Subsystem driver
This patch adds common driver for the Top block of the Samsung Exynos
SoC Low Power Audio Subsystem.  This is a minimal driver which prepares
resources for IP blocks like I2S, audio DMA and UART and exposes
a regmap for the Top block registers.  Also system power ops are added
to ensure the Audio Subsystem is operational after system suspend/resume
cycle.

Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:02 +01:00
Sylwester Nawrocki e18183cefc mfd: Add DT bindings documentation for Samsung Exynos LPASS
This patch adds documentation of the DT bindings for the Samsung
Exynos SoC Low Power Audio Subsystem.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:02 +01:00
Steve Twiss 547120edba mfd: da9053: Ensure the FAULT_LOG is cleared during MFD driver probe
The function da9052_clear_fault_log() is added to mitigate the case of
persistent data being transferred between reboots.

Clearance of any the persistent information within the DA9053 FAULT_LOG
register must be completed during start-up so the fault-log does not
continue with previous values. A clearance function has been added here in
the kernel driver because wiping the fault-log cannot be counted on outside
the Linux kernel.

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Reviewed-by: Adam Thomson <adam.thomson.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:02 +01:00
Markus Elfring 29090265a2 mfd: dm355evm_msp: Refactoring for add_child()
Adjust jump targets according to the Linux coding style convention.
Another check for the variable "status" can be omitted then at the end.

Link: https://lkml.kernel.org/g/<20160628163146.GG29166@dell>
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:02 +01:00
Lu Baolu 8dcc5ff8fc mfd: rtsx_usb: Avoid setting ucr->current_sg.status
Member "status" of struct usb_sg_request is managed by usb core. A
spin lock is used to serialize the change of it. The driver could
check the value of req->status, but should avoid changing it without
the hold of the spinlock. Otherwise, it could cause race or error
in usb core.

This patch could be backported to stable kernels with version later
than v3.14.

Cc: stable@vger.kernel.org # 3.14+
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Roger Tseng <rogerable@realtek.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:02 +01:00
Russell King 09185a5999 mfd: ucb1x00: Allow IRQ probing to work with IRQs > 32
probe_irq_on() only returns non-zero if it found any interrupts below
IRQ32 which could be probe candidates.  If all the probable interrupts
are higher than 32, then this will cause a failure.  Fix this.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04 15:48:02 +01:00