Commit Graph

1990 Commits (b9394d8a657cd3c064fa432aa0905c1b58b38fe9)

Author SHA1 Message Date
Linus Torvalds 151173e8ce Highlights:
- OpenFirmware/DeviceTree support for the Power Supply core: the core now
   automatically populates supplied_from hierarchy from the device tree.
   With these patches chargers and batteries can now lookup each other
   without the board files support shim. Rhyland Klein at NVIDIA did the
   work;
 
 - New ST-Ericsson ABX500 hwmon driver. The driver is heavily using the
   AB85xx core and depends on some recent changes to it, so that is why the
   driver comes through the battery tree. It has an appropriate ack from
   the hwmon maintainer (i.e. Guenter Roeck). Martin Persson at ST-Ericsson
   and Hongbo Zhang at Linaro authored the driver;
 
 - Final bits to sync AB85xx ST-Ericsson changes into mainline. The changes
   touch mfd parts, but these were acked by the appropriate MFD maintainer
   (i.e. Samuel Ortiz). Lee Jones at Linaro did most of the work and lead
   the submission process.
 
 Minor changes, but still worth mentioning:
 
 - Battery temperature reporting fix for Nokia N900 phones;
 - Versatile Express poweroff driver moved into drivers/power/reset/.
 - Tree-wise: use devm_kzalloc() where appropriate;
 - Tree-wise: dev_pm_ops cleanups/fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRf1BPAAoJEGgI9fZJve1bwyoP/3Gv+qStzbN7mUtIVEvH3EAe
 aVJwlODFzEZjk5xoiw7Dc8PuBE8O948hWOnQyCuUQ8+OfK6SyNIjexPYy3Z25a0F
 cX9JMj7rtPWHvxo2q/YuKwBPZoxj/JIPyxwUT7akwXoHAV059fvcy9R1DfFX2Qur
 hSP0NXTg+guvEpxGV4bC2l+LWZPmDFK9n0RsorttYaBvsiRDWl0c2TY2byofYlBw
 ++m/rI8Qgl8db8pKq/WDue62HtMt3kmZj6ZIgej3Wb0+GIRmYHMyPIyAkf82Wlw2
 g2sGNPT7cstrSNOozegzJ7UghJObcYDFf10NCgvFMNjmAT1dAwdneQHEWy6Ek7pT
 9X3e0LmaFqVbufFp4xFiLkMutsCLLTnGyXIbzs7RkTm3XBVIUqiDWtI6I6X44ohG
 6PJn8vUlufu7owXrqFpgSBar2U1vfoQdhInmz4hbQeff0qn2nX/BGNwhxYptZ549
 TudsI9WGzJ6fvYQ56zh6+BfiA0FmjhUiSKOtrXImrhxE6gUf3IOJyMQlkxLx5t8D
 uuhBmO0J6kDi2lqF6alOEo+UDefJj4mUJn2tnIdis90+lNQlSV02GEtiwFT1zt1z
 LFW0xshQkxZ4lMa28h35FB1/Z11ApUOe4Es+OKADDJhAnxdZzXcAwIRyPRRPgdsy
 jTnJno+Kxk9wXLcekxVE
 =5BdE
 -----END PGP SIGNATURE-----

Merge tag 'for-v3.10' of git://git.infradead.org/battery-2.6

Pull battery updates from Anton Vorontsov:
 "Highlights:

   - OpenFirmware/DeviceTree support for the Power Supply core: the core
     now automatically populates supplied_from hierarchy from the device
     tree.  With these patches chargers and batteries can now lookup
     each other without the board files support shim.  Rhyland Klein at
     NVIDIA did the work

   - New ST-Ericsson ABX500 hwmon driver.  The driver is heavily using
     the AB85xx core and depends on some recent changes to it, so that
     is why the driver comes through the battery tree.  It has an
     appropriate ack from the hwmon maintainer (i.e.  Guenter Roeck).
     Martin Persson at ST-Ericsson and Hongbo Zhang at Linaro authored
     the driver

   - Final bits to sync AB85xx ST-Ericsson changes into mainline.  The
     changes touch mfd parts, but these were acked by the appropriate
     MFD maintainer (ie Samuel Ortiz).  Lee Jones at Linaro did most of
     the work and lead the submission process.

  Minor changes, but still worth mentioning:

   - Battery temperature reporting fix for Nokia N900 phones
   - Versatile Express poweroff driver moved into drivers/power/reset/
   - Tree-wide: use devm_kzalloc() where appropriate
   - Tree-wide: dev_pm_ops cleanups/fixes"

* tag 'for-v3.10' of git://git.infradead.org/battery-2.6: (112 commits)
  pm2301-charger: Fix suspend/resume
  charger-manager: Use kmemdup instead of kzalloc + memcpy
  power_supply: Populate supplied_from hierarchy from the device tree
  power_supply: Add core support for supplied_from
  power_supply: Define Binding for power-supplies
  rx51_battery: Fix reporting temperature
  hwmon: Add ST-Ericsson ABX500 hwmon driver
  ab8500_bmdata: Export abx500_res_to_temp tables for hwmon
  ab8500_{bmdata,fg}: Add const attributes to some data arrays
  ab8500_bmdata: Eliminate CamelCase warning of some variables
  ab8500_btemp: Make ab8500_btemp_get* interfaces public
  goldfish_battery: Use resource_size()
  lp8788-charger: Use PAGE_SIZE for the sysfs read operation
  max8925_power: Use devm_kzalloc()
  da9030_battery: Use devm_kzalloc()
  da9052-battery: Use devm_kzalloc()
  ds2760_battery: Use devm_kzalloc()
  ds2780_battery: Use devm_kzalloc()
  gpio-charger: Use devm_kzalloc()
  isp1704_charger: Use devm_kzalloc()
  ...
2013-04-30 15:15:24 -07:00
Linus Torvalds 8ded8d4e4f regulator: Updates for v3.10
The diffstat and changelog here is dominated by Lee Jones' heroic
 efforts to sync the ab8500 driver that's been maintained out of tree
 with mainline (plus Axel's cleanup work on the results) but there's a
 few other things here:
 
 - Axel Lin added regulator_map_voltage_ascend() optimising a common
   pattern for drivers using the core code.
 - Milo Kim tought the regulator core to handle regulators sharing an
   enable GPIO, avoiding the need to do hacks to support such systems.
 - Andrew Bresticker added code to handle missing supplies for regulators
   more sensibly for device tree systems, reducing the need for stubbing
   there.
 
 plus the usual batch of driver specific updates and fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRfohQAAoJELSic+t+oim9MvgP/2PxUNYQ8XIEXwCFP4GGsS8x
 NxFRAEpRJPBqa6qnTDywnN5VyBykTqKDfcA0EILW7Hz+EzWKpqucsloli0e7B4VE
 PMXf5s5YPwRLDslAv1VYMzKbGzzB2jDWlVjhXtiBRNXSUv2zwR1MWnoguQzSXq8J
 pE4uh6u2/5FUO/upcQ9LxmmBGr2CFZ/egKK3HvAWpidWOO9ykzIA8VzAD5dKAwzV
 Bo63ia51ymxn1HyokhPtIpko4+J6KYO3Lts8vi+g1DT1aA1nAHTcN4ewUl1v5NkD
 xFBpt06m95AQ7y9oQ1gdcGXDefnfdrzPtFZkofVVJpYNMtcbxOoO+WJk2ZUBjhrZ
 cpVmvqELfRp/eMr1xe1XJIuLelyE+bOCx36F5FQgGCQNI+gNWT2SlRCWeH4VLhh+
 Zeuqnhlce5Chv0wsjrNk4biwj981V3uKNo/n/O9mDQAXLYC2AVGJbXL04EcoxXag
 ButmfjWshYUzEXmxpXD9+pas4EMsuziWqCQjtuVRtTf9XSWkps39mitPRu3h2aWg
 IwWlk3/eMI3WPr7eE7vcu5PvOnQ9Nm6fasx3NhxjiYBVwktyprV3tMhKDBjt8qdG
 frzOfimOUGumeKinFm7tfP5EQE4prfwpN/kT+PPleNeXARe3AWKLsatO1mEtey9b
 t1PC8z5k8/9rBDIWvzq3
 =rX43
 -----END PGP SIGNATURE-----

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

Pull regulator updates from Mark Brown:
 "The diffstat and changelog here is dominated by Lee Jones' heroic
  efforts to sync the ab8500 driver that's been maintained out of tree
  with mainline (plus Axel's cleanup work on the results) but there's a
  few other things here:

   - Axel Lin added regulator_map_voltage_ascend() optimising a common
     pattern for drivers using the core code.
   - Milo Kim tought the regulator core to handle regulators sharing an
     enable GPIO, avoiding the need to do hacks to support such systems.
   - Andrew Bresticker added code to handle missing supplies for
     regulators more sensibly for device tree systems, reducing the need
     for stubbing there.

  plus the usual batch of driver specific updates and fixes"

* tag 'regulator-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (152 commits)
  regulator: mc13892: Fix MC13892_SWITCHERS0_SWxHI bit in set_voltage_sel
  regulator: Remove NULL test before calling regulator_unregister()
  regulator: mc13783: Add device tree probe support
  regulator: mc13xxx: Add warning of incorrect names of regulators
  regulator: max77686: Don't update max77686->opmode if update register fails
  regulator: max8952: Add missing config.of_node setting for regulator register
  regulator: ab3100: Fix regulator register error handling
  regulator: tps6524x: Use regulator_map_voltage_ascend
  regulator: lp8788-buck: Use regulator_map_voltage_ascend
  regulator: lp872x: Use regulator_map_voltage_ascend
  regulator: mc13892: Use regulator_map_voltage_ascend for mc13892_sw_regulator_ops
  regulator: tps65023: Use regulator_map_voltage_ascend
  regulator: tps65023: Merge tps65020 ldo1 and ldo2 vsel table
  regulator: tps6507x: Use regulator_map_voltage_ascend
  regulator: mc13892: Fix MC13892_SWITCHERS0_SWxHI bit in set_voltage_sel
  regulator: ab3100: device tree support
  regulator: ab3100: refactor probe to use IDs
  regulator: max8973: Don't override control1 variable when set ramp delay bits
  regulator: tps80031: Convert tps80031_dcdc_ops to [get|set]_voltage_sel_regmap
  regulator: tps80031: Fix LDO2 track mode for TPS80031 or TPS80032-ES1.0
  ...
2013-04-29 16:32:25 -07:00
Linus Walleij 8735bc2fe6 regulator: ab3100: device tree support
This implements device tree support for the AB3100 regulators
driver. The initial settings are moved out of platform data
and into the driver for the device tree case, as it appears
that there is no way to supply this as AUXDATA for an I2C
device. The style and bindings are heavily inspired by
Lee Jones' style for AB8500.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-24 10:54:07 +01:00
Greg Kroah-Hartman 2638953fcd extcon: arizona: Updates for v3.10
There's a bunch of different things in this series, I can split them out
 if need be:
 
  - Support for configuring the button detection circuit to reflect the
    accessories supplied with the system.
  - Improvements in the HPDET based detection scheme.
  - Additional robustness against more pathological use cases.
  - A few small standalone fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRWr1qAAoJELSic+t+oim9DUwP/3ur4GgIjk4T3Kix364EeWyw
 CDipdcxw/kEIopXSbFX3nMolWvvA0bEtOVGnu67lTm1K2YQxStn9XnK/SnijZq0x
 DR7cWygKwWVF+STYZrWW3OX/4Lyb3MCCeKqBTmw8LNUBHIrWgEi7YB96G3aO+top
 lsHlPNhXYfG65017NmLyGdWCVsCnzRA21nj4ZPJORf9ij+5wNCJwcCsCLvC1kULX
 ol5apYUoToEUCrkHa5x5vYVEGif3483CwPIteKLUWyHgQ1vIxkNqxAQLxJHdyH+M
 +tJ+qKciavttUjXhIwZ/ZaOY5NiQo8d/1OQFUb2z1ZmOpj7uS7ICS6nBg2pBRK+h
 vRY/q+0zZI89o6gggV5HFHmwJtCiYmcLgsX3YL4KH4oXTX/nQvUkkSKzWf3pXCQb
 NpmcWhRuGsiNr6qq/twdJ+34ddxgesmXwtzozlecZ4Goz/9ooInpT5QYtXWzHFqm
 vbUrfk+WrXY6jpz5Xo2hDf2N7zmZaBiPbggJk5wymCWscHl4gANjkfHYEoRedUnX
 VKC21WHxaR22e0KLKo+Aq+eDdOy8BZjCKbOUbhhWe1L5TCQ6QojptLyNJJIuNQ7c
 NAdu8nQDLUnQBC8HTZrDWlsjo/xIatozvhWyI3NX5Q9VSgkCYnu7fpQ/Q2UYn13p
 MkxOYhqCsBuqH9cPDvB8
 =6SXJ
 -----END PGP SIGNATURE-----

Merge tag 'extcon-arizona-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into char-misc-next

Mark writes:

	extcon: arizona: Updates for v3.10

	There's a bunch of different things in this series, I can split them out
	if need be:

	 - Support for configuring the button detection circuit to reflect the
	   accessories supplied with the system.
	 - Improvements in the HPDET based detection scheme.
	 - Additional robustness against more pathological use cases.
	 - A few small standalone fixes.
2013-04-03 11:28:18 -07:00
Mark Brown 253b5374f0 mfd: wm5102: Add registers for microphone detection level configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-01 22:03:37 +01:00
David Brown 02dbd0ff54 mfd: pm8921: Disable driver until it gets fixed
The pm8921 driver has been broken for a while now, but was prevented
from compiling because the SSBI bus driver was missing.  Now that SSBI
is present, pm8921 causes compile fails.

Until the pm8921 driver is fixed, mark it as BROKEN to prevent
compiles from failing.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-26 14:28:14 -07:00
Greg Kroah-Hartman e58b9a25ee ASoC/extcon: arizona: Fix interaction between HPDET and headphone outputs
This patch series covers both ASoC and extcon subsystems and fixes an
 interaction between the HPDET function and the headphone outputs - we
 really shouldn't run HPDET while the headphone is active.  The first
 patch is a refactoring to make the extcon side easier.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRUcMYAAoJELSic+t+oim9PkAP/RQWC98LrD3kQgVk22MIDdyk
 P7dr37AePy+nMHP/sp3XIVyeD6pwuRWrlf31jAgMsXSb/+8ymJ3oO3t6aPUa9V9+
 KsxxoSUW+/ZO+88aK4r/w/Y45XMqMXsoEwllIxZoEpHXhDIxYFyF8wloPBXLzzbw
 AALowigrNbeYuijr5R1oV+kUOcT8DpzbamoK0jSbpdBdoPEP3ypD/yJTdi/RSyu/
 ELRNZFy4jUw2B3HVOB1YxUeCPpPA63u1oTypFgD7XrQX5v4MDuWyCv5bbBd7KhBk
 vbK/PHti5CMvi5RbA2EHbkI+n/Lb1qfnxIggN5BaSOQ1tlqrHnMlHYoSE/Sjterh
 TDGyYDNrWU1Wve2NTDJEd8oECPwm+8ABBnRYgwtnth/4D/EFkT+6Pv8FuIlYg1ku
 Tj/jwS2q/q26WfssDOph/GfUXtaagMALY99yy/HXM9RPYztOnUyvJIXLzKUUdapT
 KluChggzbj5ytsSy3L808BkgDxYTwHxva4q+n0ST4hDIeqe95HyE8gZA8jrYOf7T
 oA4tsBL3i0YGkPoPkVhMY9qeV0AOwDVlZioGP9Qcs8EI/Z9Bri8NZ4iW8VWkNoTt
 QG7EyuJy90VI/XvGgpITXKXxWQStMZG4+df6pXcn1h47K6ujtDyK/PBBt3t0OPCp
 WihSDHwuFQPSDWYULbZQ
 =gc7f
 -----END PGP SIGNATURE-----

Merge tag 'arizona-extcon-asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into char-misc-next

Mark writes:

	ASoC/extcon: arizona: Fix interaction between HPDET and headphone outputs

	This patch series covers both ASoC and extcon subsystems and fixes an
	interaction between the HPDET function and the headphone outputs - we
	really shouldn't run HPDET while the headphone is active.  The first
	patch is a refactoring to make the extcon side easier.
2013-03-26 09:19:02 -07:00
David Brown ce44bf5b55 SSBI: Remove MSM_ prefix from SSBI drivers
Although the SSBI sub is currently only used on MSM SoCs, it is still
a bus in its own right.  Remove this msm_ prefix from the driver and
it's symbols.  Clients can now refer directly to ssbi_write() and
ssbi_read().

Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 10:39:40 -07:00
Anton Vorontsov 441a499e5a Merge branch 'for-mfd-and-power' of git://git.linaro.org/people/ljones/linux-3.0-ux500
From Lee Jones <lee.jones@linaro.org>:

"Please find the next instalment of the AB8500 Power drivers upgrade. A lot of
work has taken place on the internal development track, but little effort has
gone into mainlining it. There is a large backlog of patches which are in need
of forward-porting, then upstreaming. This patch-set aims to make a large dent
into them."

Conflicts:
	drivers/mfd/ab8500-gpadc.c
2013-03-18 19:02:58 -07:00
Arnd Bergmann 037154105e mfd: twl4030-madc: Remove __exit_p annotation
4740f73fe5 "mfd: remove use of __devexit" removed the __devexit annotation
on the twl4030_madc_remove function, but left an __exit_p() present on the
pointer to this function. Using __exit_p was as wrong with the devexit in
place as it is now, but now we get a gcc warning about an unused function.

In order for the twl4030_madc_remove to work correctly in built-in code, we
have to remove the __exit_p.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-15 07:42:22 +01:00
Axel Lin 54fc4037ac mfd: ab8500-gpadc: Complain if we fail to enable vtvout LDO
Since commit c8801a8e
"regulator: core: Mark all get and enable calls as __must_check",
we must check return value of regulator_enable() to silence below build warning.

  CC      drivers/mfd/ab8500-gpadc.o
drivers/mfd/ab8500-gpadc.c: In function 'ab8500_gpadc_runtime_resume':
drivers/mfd/ab8500-gpadc.c:598:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
drivers/mfd/ab8500-gpadc.c: In function 'ab8500_gpadc_probe':
drivers/mfd/ab8500-gpadc.c:655:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

Also convert to devm_regulator_get(), this fixes a missing regulator_put() call
in ab8500_gpadc_remove().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-12 09:34:39 +01:00
Mark Brown 6049bcefad mfd: twl4030-audio: Fix argument type for twl4030_audio_disable_resource()
Looks like the conversion to enum was missed for the definition of this
function, the declaration has been updated.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-12 09:25:51 +01:00
Mark Brown 80e4e6716e mfd: tps65912: Declare and use tps65912_irq_exit()
Clean up interrupts on exit, silencing a sparse warning caused by
tps65912_irq_exit() being defined but not prototyped as we go.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-12 09:25:50 +01:00
Laxman Dewangan df545d1cd0 mfd: palmas: Provide irq flags through DT/platform data
Currently driver sets the irq type to IRQF_TRIGGER_LOW which is
causing interrupt registration failure in ARM based SoCs as:
[    0.208479] genirq: Setting trigger mode 8 for irq 118 failed (gic_set_type+0x0/0xf0)
[    0.208513] dummy 0-0059: Failed to request IRQ 118: -22

Provide the irq flags through platform data if device is registered
through board file or get the irq type from DT node property in place
of hardcoding the irq flag in driver to support multiple platforms.

Also configure the device to generate the interrupt signal according to
flag type.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-12 09:25:49 +01:00
Axel Lin 5c854aaece mfd: Make AB8500_CORE select POWER_SUPPLY to fix build error
This patch fixes below build error when CONFIG_POWER_SUPPLY is not set.

drivers/built-in.o: In function `ab8500_power_off':
drivers/mfd/ab8500-sysctrl.c:37: undefined reference to `power_supply_get_by_name'
drivers/mfd/ab8500-sysctrl.c:53: undefined reference to `power_supply_get_by_name'
make: *** [vmlinux] Error 1

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-12 09:25:31 +01:00
Roger Quadros 26bacba15e mfd: omap-usb-host: Actually update hostconfig
The helper functions omap_usbhs_rev1_hostconfig()
and omap_usbhs_rev2_hostconfig() don't write into
the hostconfig register. Make sure that we write
the return value into the hostconfig register.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-12 09:07:27 +01:00
Lee Jones 93ff722e88 ab8500-fg: Add power cut feature for ab8505 and ab8540
Add support for a power cut feature which allows user to
configure when ab8505 and ab8540 based platforms should shut
down system due to low battery.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-03-07 12:35:36 +08:00
Lee Jones 9f9ba15f74 mfd: ab8500-debugfs: Trivially beautify the debugfs driver
Just lots of white space corrections, changing some of the 4 space
tabs to 8 and pulling back some of the double tabbing back into
singles, such as the remaining of the driver.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:29:36 +08:00
Dariusz Szymczak f348fefd2a mfd: ab8500-core: Hierarchical interrupt registers
Make use of the hierarchical interrupt rergister called
ITLatchHier1 - 3 also for the 8500 platform (currently the
hierarchical interrupt registers are used only for the 8540
and 9540 platforms). This will make the interrupt routing
go faster since fewer i2c reads need to made in the most
common cases.

Signed-off-by: Dariusz Szymczak <dariusz.xd.szymczak@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mian Yousaf KAUKAB <mian.yousaf.kaukab@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:29:31 +08:00
srinidhi kasagar 7b830ae4e5 mfd: ab8500-debug: Convert to kstrtoul_from_user
Use kstrtoul_from_user for getting an unsigned long from userspace
which is less error prone.

Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:29:26 +08:00
Linus Walleij eb1f95872a mfd: ab8500-debug: Add explicit dependencies
As I am working on SPARSE_IRQ a number of implicit resource
grabs in the kernel become evident. For example, some includes
like <linux/irqs.h> would implicitly include <mach/irqs.h>
and then from there <mach/db8500-regs.h>.

In many cases it is masking the fact that drivers do not
properly use resources to pass their dependencies, base
addresses etc. So write explicit #include statements with
TODO items to have this fixed the proper way to all drivers
doing this.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:29:20 +08:00
Ulf Hansson 9ee17676a5 mfd: ab8500-core: Add abx500-clk as an mfd child device
Hierarchically, the abx500-clk shall be considered as a child of the
ab8500 core. The abx500-clk is intiated at arch init and thus the clks
will be available when clients needs them.

Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@stericsson.com>
Reviewed-by: Gabriel FERNANDEZ <gabriel.fernandez@stericsson.com>
Reviewed-by: Philippe BEGNIC <philippe.begnic@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:29:15 +08:00
Lee Jones 971480f520 mfd: ab8500-debug: Add register map for ab8540.
Required to read out correct debug information from the AB chip.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:29:10 +08:00
Lee Jones f38487f22d mfd: ab8500-debugfs: Change AB8500 debug permissions
Enable group write permissions for ab8500 debug MFD driver.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:29:05 +08:00
Mattias Wallin abee26cdb6 mfd: ab8500-core: Show turn on status at boot
Several states can be detected when a device is initially turned on.
This patch displays these states in the log. If none of the states
are true, then we report that too.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:29:00 +08:00
Lee Jones 127629d74e mfd: ab8500-debug: Add ADC input channel usb_id in debugfs
Signed-off-by: Yang QU <yang.qu@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Alexandre BOURDIOL <alexandre.bourdiol@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:55 +08:00
Lee Jones c7ebaee292 mfd: ab8500-debugfs: Dump sim registers
This patch allows to dump the SIM registers from debugfs. It will
temporary change the config to allow APE side to read the SIM registers.
Note that this read can cause problem on modem side since the modem
can't read these registers while the operation is ongoing.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:50 +08:00
Rabin Vincent c55355221e mfd: ab8500-sysctrl: AB8505 doesn't have SYSCLKREQ5..8
So we're removing support for it.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Tested-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:45 +08:00
Lee Jones 492390c8fd mfd: ab8500-core: Add additional resources to ab8505_iddet_resources
Add VBUS_DET_R, VBUS_DET_F IRQ, ID_DET_PLUGR and ID_DET_PLUGF IRQ
information to ab8505_iddet_resources. These are required to get
interrupts for AB8505 cut-2.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:40 +08:00
Lee Jones 7c8f023616 mfd: ab8500-gpadc: Optimise GPADC driver
Optimise GPADC driver:
 * for code readability and maintenance by grouping similar cheking
 * for performance by grouping several writing to control register

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:35 +08:00
Lee Jones bc6b4132bc mfd: ab8500-debug: Add support for the AB8540
Allow GPADC debug information to be shown when executing on an AB8540
based platform.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@stericsson.com>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:28 +08:00
Lee Jones e4bffe8d8a mfd: ab8500-gpadc: Add support for the AB8540
This patch enables the GPADC to work on AB8540 based platforms.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:21 +08:00
Lee Jones 7593209460 mfd: ab8500-sysctrl: Add new reset function
Add a new reset function which uses the AB WD with 0 timeout.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:16 +08:00
Lee Jones 9581ae39de mfd: ab8500-debug: Add support for ab8505 and ab9540
Make it possible to dump all registers in ab8505 and ab9540.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:12 +08:00
Lee Jones e436ddff57 mfd: ab8500-debugfs: Add tests for ab8540 based platform initialisations
Signed-off-by: Alexandre Torgue <alexandre.torgue@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Tested-by: Maxime COQUELIN <maxime.coquelin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:06 +08:00
Marcus Danielsson 2377e52f7c mfd: ab8500-sysctrl: Error check clean up
Add error checks to see if sysctrl was probed as it should.
If the sysctrl_dev is not set the return value is -EINVAL.

Signed-off-by: Marcus Danielsson <marcus.danielsson@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Tested-by: Per FORLIN <per.forlin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:28:02 +08:00
Jonas Aaberg 2cf64e2648 mfd: ab8500-debug: Add wake-up info
Add information regarding what ab interrupt that caused
a wake-up from suspend in <debugfs>/ab8500/interrupts.
Also print the name of the interrupts, not just the numbers.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Per FORLIN <per.forlin@stericsson.com>
Tested-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:57 +08:00
Jonas Aaberg 222460cb4b mfd: ab8500-debug: Better error handling on crash
Stop trying to read i2c registers if one fail.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:52 +08:00
Lee Jones 3e1a498f27 mfd: ab8500-core: Add Interrupt support for ab8540
ITSource/ITLatch 7, 8, 9 and 10 don't exist on AB8540. This patch
replaces them with '-1' in the interrupt list, and handles the '-1'
in the code accordingly.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:47 +08:00
Lee Jones 4b106fb989 mfd: ab8500-core: Rework MFD sub-device initialisation structures
Here we're separating Battery Management devices into their own
structure, removing the common device structure & redistribute them
amongst the individual platform structs and completing the population
of them.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:41 +08:00
Lee Jones c0eda9aef1 mfd: ab8500-core: Add ADC support for ab8540
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:36 +08:00
Lee Jones 5ff9090f3d mfd: ab8500-debug: Function to save all ABB registers to mem
Dump function that stores all readable ABB registers to a memory
areas where they can be accessed from dump file.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:31 +08:00
Mattias Wallin cfc0849c66 mfd: ab8500-debug: Print banks in hex
This patch changes bank prints to use hex value.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Daniel WILLERUD <daniel.willerud@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:25 +08:00
Lee Jones a29264b68a mfd: ab8500-core: APE Interrupts are not cleared
There are missing register descriptions from the AB8505 user manual
and these need to be masked so that the APEINT line can toggle.
This patch also affects the behaviour of AB9540.

Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Maxime COQUELIN <maxime.coquelin@stericsson.com>
Reviewed-by: Alexandre TORGUE <alexandre.torgue@stericsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:20 +08:00
Lee Jones 7348234625 mfd: ab8500-gpadc: Add gpadc hw conversion
Add the support of gpacd hw conversion and make the number of
sample configurable.

Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Tested-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:14 +08:00
Jonas Aaberg d89cc5aad1 mfd: ab8500-gpadc: Reread on failure
Reread the gpadc once upon failure.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:10 +08:00
Daniel WILLERUD 774c50abae mfd: ab8500-gpadc: Implemented suspend/resume
suspend/resume methods implemented to prevent suspend while the gpadc
driver is busy.

Signed-off-by: Daniel WILLERUD <daniel.willerud@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:27:04 +08:00
Rajkumar Kasirajan f04a9d8adf mfd: ab8500-sysctrl: Update correct turn on status
In L9540, turn_on_status register is not updated correctly if
the device is rebooted with AC/USB charger connected. Due to
this, the device boots android instead of entering into charge
only mode. Read the AC/USB status register to detect the charger
presence and update the turn on status manually.

Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com>
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Rupesh KUMAR <rupesh.kumar@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Tested-by: Rupesh KUMAR <rupesh.kumar@stericsson.com>
Tested-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-07 12:26:47 +08:00
Tejun Heo 9f12563db1 mfd: convert to idr_alloc()
Convert to the much saner new idr interface.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 19:10:17 -08:00
Linus Torvalds ab7826595e This is the MFD pull request for the 3.9 merge window.
No new drivers this time, but a bunch of fairly big cleanups:
 
 - Roger Quadros worked on a OMAP USBHS and TLL platform data consolidation,
   OMAP5 support and clock management code cleanup.
 
 - The first step of a major sync for the ab8500 driver from Lee Jones. In
   particular, the debugfs and the sysct interfaces got extended and improved.
 
 - Peter Ujfalusi sent a nice patchset for cleaning and fixing the twl-core
   driver, with a much needed module id lookup code improvement.
 
 - The regular wm5102 and arizona cleanups and fixes from Mark Brown.
 
 - Laxman Dewangan extended the palmas APIs in order to implement the palmas
   GPIO and rt drivers.
 
 - Laxman also added DT support for the tps65090 driver.
 
 - The Intel SCH and ICH drivers got a couple fixes from Aaron Sierra and
   Darren Hart.
 
 - Linus Walleij patchset for the ab8500 driver allowed ab8500 and ab9540 based
   devices to switch to the new abx500 pin-ctrl driver.
 
 - The max8925 now has device tree and irqdomain support thanks to Qing Xu.
 
 - The recently added rtsx driver got a few cleanups and fixes for a better
   card detection code path and now also supports the RTS5227 chipset, thanks
   to Wei Wang and Roger Tseng.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRJWtoAAoJEIqAPN1PVmxKHvEP/2B0uUJQpRjTjc9lgrzaUdFO
 QdSyj8Vpz1fZPF3cDuik/Be91U1nICyJWZZ7Yvngih3kbqiGw8nbp9AATwdF4Anl
 +QEtPS9YIpu1w5NS4r01q+cx3NxFsaR5yfNPKLWWnLtN8zHq4qQS8SF8jjdrsgkz
 zUJrjn1GfPPeuyR6Fuko9Mxk6oQ6TUazWJwmxzSCcrKKQ7GlAnbRWcwv2Qnv3GTg
 xi9S85xmLtVhLmMIQ2OR4JP56Vc49OL2/+hv1uShtFVDR4JLeZ5l8j0IPjgXJTrv
 ZbcrzEfJkV+zkY5RmDQrZzNLIWQmH9lj0bzitrS8Ii622J/mfnvQEgnC5fObphjg
 sYKJuBtO9o7XtFJxH7/oXdwM2gC5jDy43FmRv9J2mIDVoX8kNZMzY/sqmL8jm7KD
 MZU0D7liOyF3/1VbZHGSplKp+HKd5XYXCDQEesG/urkDr2edYHdb52iUVYGC32yV
 MaTqXnRMGURdjhCorAZPV8hoQOSWV8pj6oskk+E3upCmWjQWdhKMw3/HzasDLO9B
 eoQSgwZXJLTV8hJjAdgPUjZbxyOyW+9jKA12nyqwX3noq0NseSSJaeZUWmLecmbF
 vXcg4LAwSUycNJ0DxtWC2oEUV9jv4B+dOE7avVT6BDSvth4nzDlO9gOTtxBLcgTz
 JKrAPxY1nS4AUXJbsYTq
 =BhC1
 -----END PGP SIGNATURE-----

Merge tag 'mfd-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull MFS updates from Samuel Ortiz:
 "This is the MFD pull request for the 3.9 merge window.

  No new drivers this time, but a bunch of fairly big cleanups:

   - Roger Quadros worked on a OMAP USBHS and TLL platform data
     consolidation, OMAP5 support and clock management code cleanup.

   - The first step of a major sync for the ab8500 driver from Lee
     Jones.  In particular, the debugfs and the sysct interfaces got
     extended and improved.

   - Peter Ujfalusi sent a nice patchset for cleaning and fixing the
     twl-core driver, with a much needed module id lookup code
     improvement.

   - The regular wm5102 and arizona cleanups and fixes from Mark Brown.

   - Laxman Dewangan extended the palmas APIs in order to implement the
     palmas GPIO and rt drivers.

   - Laxman also added DT support for the tps65090 driver.

   - The Intel SCH and ICH drivers got a couple fixes from Aaron Sierra
     and Darren Hart.

   - Linus Walleij patchset for the ab8500 driver allowed ab8500 and
     ab9540 based devices to switch to the new abx500 pin-ctrl driver.

   - The max8925 now has device tree and irqdomain support thanks to
     Qing Xu.

   - The recently added rtsx driver got a few cleanups and fixes for a
     better card detection code path and now also supports the RTS5227
     chipset, thanks to Wei Wang and Roger Tseng."

* tag 'mfd-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (109 commits)
  mfd: lpc_ich: Use devres API to allocate private data
  mfd: lpc_ich: Add Device IDs for Intel Wellsburg PCH
  mfd: lpc_sch: Accomodate partial population of the MFD devices
  mfd: da9052-i2c: Staticize da9052_i2c_fix()
  mfd: syscon: Fix sparse warning
  mfd: twl-core: Fix kernel panic on boot
  mfd: rtsx: Fix issue that booting OS with SD card inserted
  mfd: ab8500: Fix compile error
  mfd: Add missing GENERIC_HARDIRQS dependecies
  Documentation: Add docs for max8925 dt
  mfd: max8925: Add dts
  mfd: max8925: Support dt for backlight
  mfd: max8925: Fix onkey driver irq base
  mfd: max8925: Fix mfd device register failure
  mfd: max8925: Add irqdomain for dt
  mfd: vexpress: Allow vexpress-sysreg to self-initialise
  mfd: rtsx: Support RTS5227
  mfd: rtsx: Implement driving adjustment to device-dependent callbacks
  mfd: vexpress: Add pseudo-GPIO based LEDs
  mfd: ab8500: Rename ab8500 to abx500 for hwmon driver
  ...
2013-02-24 20:00:58 -08:00