Commit Graph

1087 Commits

Author SHA1 Message Date
Samuel Ortiz 938e05bf13 regulator: Fix an s5m8767 build failure
Due to a merge conflict we are getting this:

drivers/regulator/s5m8767.c: In function ‘s5m8767_pmic_probe’:
drivers/regulator/s5m8767.c:575:2: error: implicit declaration of function
‘s5m_reg_write’ [-Werror=implicit-function-declaration]

This is fixed by fully converting this driver to the new s5m API.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-31 00:51:09 +02:00
Linus Torvalds 3e701cdfe6 MFD bits for the 3.6 merge window.
We have support for a few new drivers:
 - Samsung s2mps11
 - Wolfson Microelectronics wm5102 and wm5110
 - Marvell 88PM800 and 88PM805
 - TI twl6041
 
 We also have our regular driver improvements:
 - Device tree and IRQ domain support for STE AB8500
 - Regmap and devm_* API conversion for TI tps6586x
 - Device tree support for Samsung max77686
 - devm_* API conversion for STE AB3100
 
 Besides that, quite a lot of fixing and cleanup for mc13xxx, tps65910,
 tps65090, da9052 and twl-core.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQFpGVAAoJEIqAPN1PVmxKFNoP/1dkYngrxxV6cxdyLJ74APhG
 lVKPgaDxQhdgfwCZJmMeZK1UphZo80cWnEXG6sTHZUEQdTaslSJu5SuPfUM+fo7e
 52/dU0nx0ZE04pwPQLHbidS4TmHlbLg9oM2kmIf9RO5rg34GodwVgRL/4+k1qvhz
 aWYJt9erFhQOpqaSX66mXHSuhvzHypbcE7d2B2Ykmh3NoYiH2w9H9KmIbbb+ZLq8
 +Bp/i5Ys/vfooo+8IE2w6KZfIzMwsmmtWjjr/38yuQJaKZCh/zn23DM9HsdrVf++
 RzfniRF4YBxmeKi7zi8MFIYys8filTCXA9dXbGSAKCuUCT37yZRnUxTeN1bn7Bux
 A7KRpG7pUKQKVKqCTndvK5LcQKlT33XyW2ZzV1wVWX2JkCJ+gilPeykb8IabNvGX
 nIp0STEGR/WdCLEAKo8pJF7Usn0RuUzAug02SG/mQ6dpnLoZqp0Od5W7gRhT7M7h
 hXr/xKJ6cG5YwicpAdy5kJJ0dRgQrtaHwxrF0B68AXZ7CmAtkPuEGCYhUCFnGQUH
 XJ0CodAqqVBRyYiQS4zIpIh2nqhIdsgv4OC1+kVLbubQk+PR88zG9Jvg6i1HQi/A
 OHi7N5Wite3YUrs3sBzDKnEc/Il2YRhVaz2SLVNfZR0PS7hywHN3rK/tVFINTgei
 jNEz1H6hu7ToNLfs0UzP
 =c28c
 -----END PGP SIGNATURE-----

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

Pull MFD bits from Samuel Ortiz:
 "We have support for a few new drivers:
   - Samsung s2mps11
   - Wolfson Microelectronics wm5102 and wm5110
   - Marvell 88PM800 and 88PM805
   - TI twl6041

  We also have our regular driver improvements:
   - Device tree and IRQ domain support for STE AB8500
   - Regmap and devm_* API conversion for TI tps6586x
   - Device tree support for Samsung max77686
   - devm_* API conversion for STE AB3100

  Besides that, quite a lot of fixing and cleanup for mc13xxx, tps65910,
  tps65090, da9052 and twl-core."

Fix up mostly trivial conflicts, with the exception of
drivers/usb/host/ehci-omap.c in particular, which had some
re-organization of the reset sequence (commit 1a49e2ac9651: "EHCI:
centralize controller initialization") that clashed with commit
2761a63945 ("mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix
issues").

In particular, commit 2761a63945 moved the usb_add_hcd() to the
*middle* of the reset sequence, which clashes fairly badly with the
reset sequence re-organization (although it could have been done inside
the new omap_ehci_init() function).

I left that part of commit 2761a63945 just undone.

* tag 'mfd-3.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (110 commits)
  mfd: Ensure AB8500 platform data is passed through db8500-prcmu to MFD Core
  mfd: Arizone core should select MFD_CORE
  mfd: Fix arizona-irq.c build by selecting REGMAP_IRQ
  mfd: Add debug trace on entering and leaving arizone runtime suspend
  mfd: Correct tps65090 cell names
  mfd: Remove gpio support from tps6586x core driver
  ARM: tegra: defconfig: Enable tps6586x gpio
  gpio: tps6586x: Add gpio support through platform driver
  mfd: Cache tps6586x register through regmap
  mfd: Use regmap for tps6586x register access.
  mfd: Use devm managed resources for tps6586x
  input: Add onkey support for 88PM80X PMIC
  mfd: Add support for twl6041
  mfd: Fix twl6040 revision information
  mfd: Matches should be NULL when populate anatop child devices
  input: ab8500-ponkey: Create AB8500 domain IRQ mapping
  mfd: Add missing out of memory check for pcf50633
  Documentation: Describe the AB8500 Device Tree bindings
  mfd: Add tps65910 32-kHz-crystal-input init
  mfd: Drop modifying mc13xxx driver's id_table in probe
  ...
2012-07-30 12:41:17 -07:00
Linus Torvalds bdc0077af5 SCSI misc on 20120724
The most important feature of this patch set is the new async infrastructure
 that makes sure async_synchronize_full() synchronizes all domains and allows
 us to remove all the hacks (like having scsi_complete_async_scans() in the
 device base code) and means that the async infrastructure will "just work" in
 future. The rest is assorted driver updates (aacraid, bnx2fc, virto-scsi,
 megaraid, bfa, lpfc, qla2xxx, qla4xxx) plus a lot of infrastructure work in
 sas and FC.
 
 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJQDjDCAAoJEDeqqVYsXL0M/sMH/jVgBfF1mjR+DQuTscKyD21w
 0BQLn5OmvDZDqo44iqQzNRObw7CxkBkUtHoozsknLijw+KggER653ZOAtUdIHfI/
 /uo7iJQ3J3D/Ezm99HYSpZiF2juZwsBRtFBoKkGqOpMlzFUx5o4hUbH5OcINxnHR
 VmvJU5K1kg8D77Q6zK+Atl14/Rfibc2IoufFmbYdplUAM/tV0BpBSSHJAJvqua76
 NGMl4KJcPZnXe/4LXcxZia5A2efdFFEzaQ2mM9rUVEAgHDAxc0Zg9IoDhGd08FX4
 G55NK+6+bKb9s7bgyva0T/iy817TRCzjteeYNFrb8nBRe7aQbAivaBHQFXIyvdQ=
 =y2sh
 -----END PGP SIGNATURE-----

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull first round of SCSI updates from James Bottomley:
 "The most important feature of this patch set is the new async
  infrastructure that makes sure async_synchronize_full() synchronizes
  all domains and allows us to remove all the hacks (like having
  scsi_complete_async_scans() in the device base code) and means that
  the async infrastructure will "just work" in future.

  The rest is assorted driver updates (aacraid, bnx2fc, virto-scsi,
  megaraid, bfa, lpfc, qla2xxx, qla4xxx) plus a lot of infrastructure
  work in sas and FC.

  Signed-off-by: James Bottomley <JBottomley@Parallels.com>"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (97 commits)
  [SCSI] Revert "[SCSI] fix async probe regression"
  [SCSI] cleanup usages of scsi_complete_async_scans
  [SCSI] queue async scan work to an async_schedule domain
  [SCSI] async: make async_synchronize_full() flush all work regardless of domain
  [SCSI] async: introduce 'async_domain' type
  [SCSI] bfa: Fix to set correct return error codes and misc cleanup.
  [SCSI] aacraid: Series 7 Async. (performance) mode support
  [SCSI] aha152x: Allow use on 64bit systems
  [SCSI] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning
  [SCSI] bfa: squelch lockdep complaint with a spin_lock_init
  [SCSI] qla2xxx: remove unnecessary reads of PCI_CAP_ID_EXP
  [SCSI] qla4xxx: remove unnecessary read of PCI_CAP_ID_EXP
  [SCSI] ufs: fix incorrect return value about SUCCESS and FAILED
  [SCSI] ufs: reverse the ufshcd_is_device_present logic
  [SCSI] ufs: use module_pci_driver
  [SCSI] usb-storage: update usb devices for write cache quirk in quirk list.
  [SCSI] usb-storage: add support for write cache quirk
  [SCSI] set to WCE if usb cache quirk is present.
  [SCSI] virtio-scsi: hotplug support for virtio-scsi
  [SCSI] virtio-scsi: split scatterlist per target
  ...
2012-07-24 18:11:22 -07:00
Mark Brown 3384fb9884 Merge branch 'regulator-drivers' into regulator-next 2012-07-22 19:32:00 +01:00
Mark Brown 8cfc545e0e Merge branches 'regulator-core', 'regulator-dt' and 'regulator-dummy' into regulator-next 2012-07-22 19:31:41 +01:00
Kim, Milo ade7515fef regulator: add new lp8788 regulator driver
TI LP8788 PMU has 4 BUCKS and 22 LDOs.
The voltage of BUCK1 and BUCK2 can be controlled by external gpios.
And some LDOs also can be enabled by external gpios.
The regmap interface is used for regulator operations.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-20 11:12:15 +01:00
Axel Lin c798881e88 regulator: mc13xxx: Remove extern function declaration for mc13xxx_sw_regulator
This function does not exist, remove the extern function declaration.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-20 11:12:14 +01:00
Dan Williams 2955b47d2c [SCSI] async: introduce 'async_domain' type
This is in preparation for teaching async_synchronize_full() to sync all
pending async work, and not just on the async_running domain.  This
conversion is functionally equivalent, just embedding the existing list
in a new async_domain type.

The .registered attribute is used in a later patch to distinguish
between domains that want to be flushed by async_synchronize_full()
versus those that only expect async_synchronize_{full|cookie}_domain to
be used for flushing.

[jejb: add async.h to scsi_priv.h for struct async_domain]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-07-20 09:05:54 +01:00
Laxman Dewangan d2cfdb055d regulator: tps65910: set input_supply on desc unconditionally
Set the supply_name in the regulator descriptor unconditionally
and make this parameter as required parameter in the device
node for successfully registration of the regulator.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-17 11:08:46 +01:00
Axel Lin 8a165df7a9 regulator: palmas: Fix calcuating selector in palmas_map_voltage_smps
The logic of calculating selector in palmas_map_voltage_smps() does not match
the logic to list voltage in palmas_list_voltage_smps().

We use below equation to calculate voltage when selector > 0:
        voltage = (0.49V + (selector * 0.01V)) * RANGE
RANGE is either x1 or x2

So we need to take into account with the multiplier set in VSEL register when
calculating selector in palmas_map_voltage_smps()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-17 11:07:26 +01:00
Axel Lin 5bae062830 regulator: lp872x: Simplify implementation of lp872x_find_regulator_init_data()
Pass regulator id rahter than the index to lp872x_find_regulator_init_data(),
then the code can be simpler.
We can also get max_regulators by lp->num_regulators.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-16 20:58:30 +01:00
Axel Lin c6a717c9d7 regulator: twl: Fix list_voltate for twl6030ldo_ops
According to the datasheet, the voltage for twl6030ldo_ops is not linear for
all cases. Linear mapping is only for the selection code from
00000001 to 00011000.

Table 9. LDO Output Voltage Selection Code
CODE     VOUT(V)    COD      VOUT(V)    CODE     VOUT(V)    CODE     VOUT(V)
00000000 0          00001000 1.7        00010000 2.5        00011000 3.3
00000001 1.0        00001001 1.8        00010001 2.6        00011001 Reserved
00000010 1.1        00001010 1.9        00010010 2.7        00011010 Reserved
00000011 1.2        00001011 2.0        00010011 2.8        00011011 Reserved
00000100 1.3        00001100 2.1        00010100 2.9        00011100 Reserved
00000101 1.4        00001101 2.2        00010101 3.0        00011101 Reserved
00000110 1.5        00001110 2.3        00010110 3.1        00011110 Reserved
00000111 1.6        00001111 2.4        00010111 3.2        00011111 2.75

This patch implements the list_voltage callback based on above table.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Tested-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-16 20:58:02 +01:00
Sangbeom Kim 54227bcf20 mfd: Modify samsung mfd header
As Prefix of Samsung pmic changed from s5m to s2m,
To make common mfd driver for s2m and s5m series,
This patch rename header of Samsung mfd and modify mfd driver.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 14:28:11 +02:00
Sangbeom Kim 63063bfbff mfd: Modify samsung mfd driver for common api
Previous naming rule of samsung pmic start with s5m prefix.
But It is changed by s2m.
To cover various samsung s2m and s5m series,
This patch modify function and variable name for common usage.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 14:26:45 +02:00
Sangbeom Kim 66c9fbb989 mfd: Rename s5m file and directories to samsung
Previously, Samsung PMIC naming rule start with prefix of s5m.
But Naming rule is changed.
From now on, Prefix will be changed to s2m.
So, To support pmic series of s5m and s2m, change mfd file and directory name.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 12:57:35 +02:00
Axel Lin 4bcb9f4342 regulator: twl: Convert twl6030ldo_ops to [get|set]_voltage_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-15 22:06:05 +01:00
Axel Lin a3cb80f43a regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo
In twl6030ldo_set_voltage, current code use below formula to calculate vsel:
        vsel = (min_uV/1000 - 1000)/100 + 1;
This is worng because when min_uV is 1000000 uV, vsel is 1.
It should be 0 in this case.
Fix it by change the equation to: (This equation is common for linear mapping)
        vsel = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step);

In twl6030ldo_get_voltage, current code use below formula to calculate voltage:
        mV = 1000mv + 100mv * (vsel - 1)
This is worng because when vsel is 0, mV is 900mV. Note the min_uV is 1000mV.
Fix it by change the equation to: (This equation is common for linear mapping)
        return rdev->desc->min_uV + vsel * rdev->desc->uV_step;

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-15 22:06:05 +01:00
Axel Lin 5febb3c9d5 regulator: s5m8767: Properly handle gpio_request failure
Convert to devm_gpio_request to save a few error handling code.

This patch properly handle the gpio_request failure, we should return error
when gpio_request fails rather than just show warning.

I think one of the reason we got -EBUSY is because current code does not free
gpios in s5m8767_pmic_remove(). So it got -EBUSY when reload the module.

Yest another reason is in current code if gpio_request() returns error,
the rest of the code still calls gpio_direction_output to config buck_gpios
and buck_ds gpios. This looks wrong to me.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-15 21:49:53 +01:00
Axel Lin 8fa25eda86 regulator: max8997: Properly handle gpio_request failure
Convert to devm_gpio_request to save a few error handling code.

This patch properly handle the gpio_request failure with -EBUSY, we should
return error rather than ommit the gpio_request failure with -EBUSY.

I think one of the reason we got -EBUSY is because current code does not free
gpios in max8997_pmic_remove(). So it got -EBUSY when reload the module.

Yest another reason is in current code if gpio_request() returns -EBUSY,
the rest of the code still calls gpio_direction_output to config buck125_gpios
and set gpio value in max8997_set_gpio().  This looks wrong to me.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-15 21:49:53 +01:00
Laxman Dewangan 8a8e3d5915 regulator: tps62360: use devm_* for gpio request
Use devm_ version of gpio APIs gpio_request_one() for
requesting gpios.
This avoid extra code for freeing gpios.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-15 21:49:52 +01:00
Mark Brown d5b2e30bdc Linux 3.5-rc7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJQAfWKAAoJEHm+PkMAQRiG/DwIAIullMhkDhD/GJcn24ZbUJoa
 v6zRPK2hIavuKH/6bUoUiXT346PUYgVnRMhetuYKJFURz6KX/nmlxve/iXNn/WP1
 9hnxhE+zcnp2qKI83c3Yok09eed1KnGY5hWQkqXM2gzji/OU0pCKchOcL01l//uz
 iiWpNAXEVUnT92CafnHlZ55f/MWVqRFmDKi3Ty1YKSskhojQ6NOPsWCxrTxKVbim
 2YPXc3D+xLHzF12ufVgla20AF4KnK8m+tFugniRAqArIagpzBUP1x1wk0RN5PyBD
 FTP8lv7bSfBusp41/mPDB66WAe9EfQBoWQY6jloJjp0i8xnMyH5V05pImBV5NwU=
 =O+gl
 -----END PGP SIGNATURE-----

Merge tag 'v3.5-rc7' into regulator-drivers

Linux 3.5-rc7
2012-07-15 21:49:21 +01:00
Laxman Dewangan 7c7fac3058 regulator: tps6586x: add support for input supply
There is multiple voltage input pins on device which
takes the voltage input for different voltage regulator.
Support to configure the voltage input supplied by
different regulator for each regulators.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-13 15:21:18 +01:00
AnilKumar Ch a7f1b63eb8 regulator: tps65217: Add device tree support
This commit adds device tree support for tps65217 pmic. And usage
details are added to device tree documentation. Driver is tested
by using kernel module with regulator set and get APIs.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12 18:27:36 +01:00
Axel Lin 257ee3c6dd regulator: aat2870: Remove unused min_uV and max_uV from struct aat2870_regulator
Both min_uV and max_uV are not used in the code, remove them.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12 18:22:13 +01:00
Axel Lin 4506c6d5ea regulator: aat2870: Convert to regulator_list_voltage_table
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12 18:22:13 +01:00
Axel Lin e76b9cc7b8 regulator: da9052: initialize of_node param for regulator register
Initialize config.of_node for regulator before registering.
This is needed for DT based regulator support.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12 18:21:24 +01:00
Krystian Garbaciak 1beaf762b4 regulator: Add REGULATOR_STATUS_UNDEFINED.
REGULATOR_STATUS_UNDEFINED is to be returned by regulator, if any other state
doesn't really apply.

Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12 18:19:24 +01:00
Krystian Garbaciak 03ffcf3d08 regulator: Fix a typo in regulator_mode_to_status() core function.
Case REGULATOR_STATUS_STANDBY -> REGULATOR_MODE_STANDBY.

Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12 18:19:20 +01:00
Axel Lin c06eed397a regulator: s2mps11: Use sec_reg_write rather than sec_reg_update when mask is 0xff
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12 18:07:11 +01:00
Axel Lin 232b250475 regulator: s2mps11: Fix wrong setting for config.dev
Currently s2mps11->iodev, s2mps11->dev and config.dev point to NULL.
This patch fixes the settings for config.dev.
Current code does not need the *dev and *iodev of struct s2mps11_info,
so remove them.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12 18:06:48 +01:00
Axel Lin 2693fcab1a regulator: s2mps11: Fixup missing commas
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12 18:06:35 +01:00
Axel Lin faa95fde43 regulator: tps65910: Remvoe tps65910_reg_[read|modify_bits|read_locked|write_locked] functions
The tps65910 mfd driver has been converted to regmap APIs.
This patch adds tps65910_reg_update_bits() in include/linux/mfd/tps65910.h.
Thus we can use tps65910_reg_read/tps65910_reg_write/tps65910_reg_update_bits
directly and remove tps65910_reg_[read|modify_bits|read_locked|write_locked]
functions. With this change, we can also remove the mutex in struct tps65910_reg.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12 18:05:15 +01:00
Sangbeom Kim cb74685ecb regulator: s2mps11: Add samsung s2mps11 regulator driver
This patch add Samsung S2MPS11 regulator driver.
The S2MPS11 can support 10 Bucks and 38 LDOs and RTC.
Especially, S2MPS11 is designed for high performance
Samsung application processor.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-11 15:32:40 +01:00
Laxman Dewangan 7be531883a regulator: tps65910: correct init value of n_voltages
Recent change in the core driver to get the maximum voltage
is based on the (n_voltages -1) steps of voltage.
For the tps65910, the (n_voltages -1)th step voltage is
calculated based on the callback function list_voltage.
This function direct maps the datasheet and adjust the
first few steps for initial voltage as per datasheet,
and hence initialize the n_voltages based on datasheet.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-10 17:16:05 +01:00
Axel Lin b669e0adb9 regulator: max8952: Use core GPIO enable support
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-10 14:48:42 +01:00
Axel Lin aa851193bd regulator: max8998: Remove wrong set_suspend_[en|dis]able callback settings
Using the same ops for both [en|dis]able and set_suspend_[en|dis]able
callbacks is actively broken. This patch removes .set_suspend_disable and
.set_suspend_enable callback setting.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-09 19:45:12 +01:00
Axel Lin b1a397dc1a regulator: max8952: Remove wrong set_suspend_disable callback setting
Using the same ops for both .disable and .set_suspend_disable callbacks is
actively broken. This patch removes .set_suspend_disable callback setting.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-09 19:45:11 +01:00
Axel Lin b86bbddd6f regulator: da9052: Use for_each_child_of_node() macro
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-09 19:38:58 +01:00
Lee Jones bad76991d7 mfd: Register ab8500 devices using the newly DT:ed MFD API
Now the MFD API is Device Tree aware we can use it for platform
registration again, even when booting with DT enabled. To aid in
Device Node pointer allocation we provide each cell with the
associative compatible string.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:13 +02:00
Lee Jones 5d90322bc8 mfd: Register db8500-prcmu devices using the newly DT:ed MFD API
Now the MFD API is Device Tree aware we can use it for platform
registration again, even when booting with DT enabled. To aid in
Device Node pointer allocation we provide each cell with the
associative compatible string.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:09 +02:00
Yadwinder Singh Brar d1ef065d43 regulator: max77686: Initialise rmatch.of_node to NULL.
Now of_regulator_match() returns without finding the match if match->of_node
is not NULL.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-06 19:17:29 +01:00
Laxman Dewangan 19228a6a59 regulator: tps65910: add support for input supply
There is multiple voltage input pins on device which
takes the voltage input for different voltage regulator.
Support to configure the voltage input supplied by
different regulator for each regulators.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-06 19:11:05 +01:00
Mark Brown 86f5fcfc3e regulator: core: Mark all DT based boards as having full constraints
Since DT doesn't provide an idiomatic mechanism for enabling full
constraints and since it's much more natural with DT to provide them
just assume that a DT enabled system has full constraints.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-07-06 18:57:33 +01:00
Laxman Dewangan 6be5bfc3bf regulator: fixed: dt: support for input supply
Add support for input supply in DT parsing of node.
The input supply will be provided by the property
"vin-supply" in the regulator node.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-05 13:49:35 +01:00
Yadwinder Singh Brar 4706fcab9b regulator: max77686: Add device tree support.
This patch device tree support for regulator driver. It uses the parent
(mfd's) DT node to parse the regulator data for max77686.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-05 13:42:06 +01:00
Axel Lin 6c3b956b94 regulator: ab3100: Use rdev_get_drvdata() rather than use reg->reg_data driectly
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-05 13:34:39 +01:00
Axel Lin f8568cbd94 regulator: ab3100: Set enable enable_time in regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-05 13:34:00 +01:00
Shawn Guo e2c98eaf92 regulator: core: remove sysfs entry properly in regulator_put
With changes introduced by commit 222cc7b (regulator: core: Allow
multiple requests of a single supply mapping) on create_regulator,
regulator_put needs a corresponding update on sysfs entry removing.

Also regulator->dev still needs to get assigned in create_regulator,
otherwise, sysfs_remove_link call in regulator_put will get bypassed.

Reported-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-05 13:15:40 +01:00
Mark Brown 6dc027c977 regulator: arizona-micsupp: Force regulated mode until we have API support
It's almost certainly what the user would expect.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-04 16:22:39 +01:00
Axel Lin 9c6a74c5e0 regulator: ad5398: Fix min/max current limit boundary checking
It is ok to request current limit with min_uA < chip->min_uA and
max_uA > chip->max_uA.

We need to set min_uA = chip->min_uA if (min_uA < chip->min_uA),
this ensures the equation to calcuate selator does not return negative number.

Also set max_uA = chip->max_uA if (max_uA > chip->max_uA), as suggested by
Sonic.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-04 12:39:38 +01:00