Commit Graph

25656 Commits

Author SHA1 Message Date
David Keitel
6df9cea2c8 power: pm8921-charger: Add pm8921_set_usb_power_supply_type
USB can distinguish between types of USB connections such as a
DC charger or PC connection.

Let the USB drivers set the specifc power_supply_type via this
function.

CRs-Fixed: 326548
Change-Id: I31954b3f8d2b1e5fd72712e1f94f67fdbc2e205d
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2012-01-04 11:47:00 -08:00
Linux Build Service Account
4e566b30e0 Merge "nl80211: Change the sequence of NL attributes." into msm-3.0 2011-12-30 09:40:51 -08:00
Linux Build Service Account
e09edccb05 Merge changes I25e29ac2,Iad480631 into msm-3.0
* changes:
  mmc: card: Kill block requests if card is removed
  mmc: allow upper layers to know immediately if card has been removed
2011-12-30 09:40:51 -08:00
Adrian Hunter
8b581b08ef mmc: allow upper layers to know immediately if card has been removed
Add a function mmc_detect_card_removed() which upper layers can use to
determine immediately if a card has been removed. This function should
be called after an I/O request fails so that all queued I/O requests
can be errored out immediately instead of waiting for the card device
to be removed.

Change-Id: Iad4806319b6ad67048674adfdd919458186521d6
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
[sthumma@codeaurora.org: Fixed merge conflicts]
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2011-12-30 16:03:48 +05:30
David Collins
651394f139 regulator: pm8018-regulator: delete pm8018-regulator driver
Delete the pm8018-regulator driver now that it has been replaced
by the pm8xxx-regulator driver.

Change-Id: I18b4944dcea6ef6900f740b61621548bd1ac9d49
Signed-off-by: David Collins <collinsd@codeaurora.org>
2011-12-29 06:37:34 -08:00
David Collins
7fd42f9cb2 regulator: pm8921-regulator: delete pm8921-regulator driver
Delete the pm8921-regulator driver now that it has been replaced
by the pm8xxx-regulator driver.

Change-Id: I36ab68ae7b37988356397d4ac5039aa78a1a2955
Signed-off-by: David Collins <collinsd@codeaurora.org>
2011-12-29 06:37:34 -08:00
David Collins
8c695c5096 mfd: pm8018-core: use pm8xxx-regulator instead of pm8018-regulator
Change the pm8018-core driver so that it registers devices for
the pm8xxx-regulator driver instead of for the pm8018-regulator
driver.

This necessitates changing board file platform data for existing
PMIC 8018 regulators so that additional pm8xxx-regulator data is
properly specified.

Change-Id: I3f64f756a6c48c0dd1684f8d8e98a6fa8dddd6ca
Signed-off-by: David Collins <collinsd@codeaurora.org>
2011-12-29 06:37:34 -08:00
Deepthi Gowri
ce65e812f2 nl80211: Change the sequence of NL attributes.
change sequence of kernel NL attributes which align hostap NL
attributes sequence so it will copy probe response IE's properly
and pass it to the driver.

Change-Id: I6c3b46b99f2537c4ea0335135f21416c81797af4
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
2011-12-29 11:02:14 +05:30
Linux Build Service Account
ef9ecee3b7 Merge "power: pm8921-charger: Add api to control OVP" into msm-3.0 2011-12-28 15:21:39 -08:00
Linux Build Service Account
63f1bbe525 Merge changes I9c86d387,I05b83bd8,I722c5f7a,Ie94f443a,I70a80b3a,I64774aea into msm-3.0
* changes:
  ARM: gic: use module.h instead of export.h
  ARM: gic: fix irq_alloc_descs handling for sparse irq
  ARM: gic: add OF based initialization
  ARM: gic: add irq_domain support
  module.h: split out the EXPORT_SYMBOL into export.h
  irq: support domains with non-zero hwirq base
2011-12-28 15:21:39 -08:00
Linux Build Service Account
286e9e0b31 Merge changes I8d6e42d2,I0d48f033 into msm-3.0
* changes:
  mfd: pm8038-core: add pm8xxx-regulator device configuration data
  mfd: pm8921-core: use pm8xxx-regulator instead of pm8921-regulator
2011-12-28 08:41:18 -08:00
Linux Build Service Account
25d7bfb117 Merge changes I4d22d3a6,I04f6ba16 into msm-3.0
* changes:
  irq: Fix check for already initialized irq_domain in irq_domain_add
  irq: Add declaration of irq_domain_simple_ops to irqdomain.h
2011-12-28 03:09:00 -08:00
Linux Build Service Account
5e52b25bd7 Merge "msm: rotator: add downscale support in rotator" into msm-3.0 2011-12-27 20:39:14 -08:00
Adrian Salido-Moreno
67273e569f msm: rotator: add downscale support in rotator
Rotator is capable of performing 1/2, 1/4 and 1/8 down scaling. Add
downscale_ratio parameter to provide support for this feature.

CRs-Fixed: 315874
Change-Id: I57dc3456ccc9bec2a125750b3e9909ffcbaf45f6
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2011-12-27 17:56:49 -08:00
Abhijeet Dharmapurikar
286693063a power: pm8921-charger: Add api to control OVP
Some board configurations have different needs for usb overvoltage
thresholds and debounce time for usb detection.

Provide apis to program threshold voltage, debounce time and
disable/enable overvoltage protection.

CRs-Fixed: 324137
Change-Id: Ie618ca12be819739a623cf41e5e1198305467aa5
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2011-12-27 17:47:08 -08:00
Shalabh Jain
2f4cea6557 diag: Add support for 8930 and other upcoming targets
Change-Id: I73bf347488437955954ebfb81567be30e8da834d
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-12-27 16:10:23 -07:00
David Collins
045a76e605 mfd: pm8038-core: add pm8xxx-regulator device configuration data
Add pm8xxx-regulator configuration data into the pm8038-core
driver.  This adds support for PMIC PM8038 regulators.

Change-Id: I8d6e42d299141a6add3c41ca920d9186ad7fa3ee
Signed-off-by: David Collins <collinsd@codeaurora.org>
2011-12-27 06:29:14 -08:00
David Collins
7501674da4 mfd: pm8921-core: use pm8xxx-regulator instead of pm8921-regulator
Change the pm8921-core driver so that it registers devices for
the pm8xxx-regulator driver instead of for the pm8921-regulator
driver.

This necessitates changing board file platform data for existing
PMIC 8921 regulators so that additional pm8xxx-regulator data is
properly specified.

Change-Id: I0d48f03344265bd1b7c160bceca944f8924c694c
Signed-off-by: David Collins <collinsd@codeaurora.org>
2011-12-27 06:29:14 -08:00
Linux Build Service Account
16a43151a0 Merge "VFS: Fix race between CPU hotplug and lglocks" into msm-3.0 2011-12-27 03:07:01 -08:00
Amy Maloche
08266db27b input: atmel_mxt_ts: add gpio framework to driver
Move irq and reset gpios to driver

Change-Id: I386cfdb142cefe6ad7021a67d7d277dc0447411a
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-12-27 08:17:15 +05:30
Paul Gortmaker
110bf6b58c module.h: split out the EXPORT_SYMBOL into export.h
A lot of files pull in module.h when all they are really
looking for is the basic EXPORT_SYMBOL functionality. The
recent data from Ingo[1] shows that this is one of several
instances that has a significant impact on compile times,
and it should be targeted for factoring out (as done here).

Note that several commonly used header files in include/*
directly include <linux/module.h> themselves (some 34 of them!)
The most commonly used ones of these will have to be made
independent of module.h before the full benefit of this change
can be realized.

We also transition THIS_MODULE from module.h to export.h,
since there are lots of files with subsystem structs that
in turn will have a struct module *owner and only be doing:

	.owner = THIS_MODULE;

and absolutely nothing else modular. So, we also want to have
the THIS_MODULE definition present in the lightweight header.

[1] https://lkml.org/lkml/2011/5/23/76

Change-Id: I70a80b3ac3638f0eda1ac596ee3fba832880df07
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-26 15:48:00 +05:30
Rob Herring
60fe460c07 irq: support domains with non-zero hwirq base
Interrupt controllers can have non-zero starting value for h/w irq numbers.
Adding support in irq_domain allows the domain hwirq numbering to match
the interrupt controllers' numbering.

As this makes looping over irqs for a domain more complicated, add loop
iterators to iterate over all hwirqs and irqs for a domain.

Change-Id: I64774aea2f3efb883fe11e9f6161970f7e7dc0fc
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Tested-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-26 15:47:59 +05:30
Rob Herring
19d9d54b6b irq: Add declaration of irq_domain_simple_ops to irqdomain.h
irq_domain_simple_ops is exported, but is not declared in irqdomain.h,
so add it.

Change-Id: I04f6ba1621d349c29becea9c989ec87ef15a64bb
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: marc.zyngier@arm.com
Cc: thomas.abraham@linaro.org
Cc: jamie@jamieiles.com
Cc: b-cousson@ti.com
Cc: shawn.guo@linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: devicetree-discuss@lists.ozlabs.org
Link: http://lkml.kernel.org/r/1316017900-19918-2-git-send-email-robherring2@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-26 15:47:56 +05:30
Linux Build Service Account
1a4cb1008d Merge "nl80211/cfg80211: Add crypto settings into NEW_BEACON" into msm-3.0 2011-12-24 00:31:49 -08:00
Linux Build Service Account
b455a9ddf5 Merge "msm: iommu: Create iommu api to return the page table address" into msm-3.0 2011-12-24 00:31:49 -08:00
Linux Build Service Account
fe99c760d8 Merge changes I2717fd26,Ib30cca61 into msm-3.0
* changes:
  input: atmel_mxt_ts: modify regulator framework for mxt224E
  Input: atmel_mxt_ts - report pressure information from the driver
2011-12-23 07:37:58 -08:00
Deepthi Gowri
6f79e1678d nl80211/cfg80211: Add crypto settings into NEW_BEACON
This removes need from drivers to parse the beacon tail/head data
to figure out what crypto settings are to be used in AP mode in case
the Beacon and Probe Response frames are fully constructed in the
driver/firmware.

nl80211/cfg80211: Allow SSID to be specified in new beacon command

This makes it easier for drivers that generate Beacon and Probe Response
frames internally (in firmware most likely) in AP mode.

nl80211/cfg80211: Add extra IE configuration to AP mode setup

The NL80211_CMD_NEW_BEACON command is, in practice, requesting AP mode
operations to be started. Add new attributes to provide extra IEs
(e.g., WPS IE, P2P IE) for drivers that build Beacon, Probe Response,
and (Re)Association Response frames internally (likely in firmware).

Change-Id: Ib91cd3fa2bad68e3724db98985e3f3bac72715f0
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
2011-12-23 20:27:04 +05:30
Linux Build Service Account
0a61f3bde1 Merge "board: 8660: Add callbacks to request_region" into msm-3.0 2011-12-22 15:03:43 -08:00
Linux Build Service Account
dcee254e06 Merge "tspp: supporting files for building TSPP driver" into msm-3.0 2011-12-22 15:03:43 -08:00
Srivatsa S. Bhat
7268d54c03 VFS: Fix race between CPU hotplug and lglocks
Currently, the *_global_[un]lock_online() routines are not at all synchronized
with CPU hotplug. Soft-lockups detected as a consequence of this race was
reported earlier at https://lkml.org/lkml/2011/8/24/185. (Thanks to Cong Meng
for finding out that the root-cause of this issue is the race condition
between br_write_[un]lock() and CPU hotplug, which results in the lock states
getting messed up).

Fixing this race by just adding {get,put}_online_cpus() at appropriate places
in *_global_[un]lock_online() is not a good option, because, then suddenly
br_write_[un]lock() would become blocking, whereas they have been kept as
non-blocking all this time, and we would want to keep them that way.

So, overall, we want to ensure 3 things:
1. br_write_lock() and br_write_unlock() must remain as non-blocking.
2. The corresponding lock and unlock of the per-cpu spinlocks must not happen
   for different sets of CPUs.
3. Either prevent any new CPU online operation in between this lock-unlock, or
   ensure that the newly onlined CPU does not proceed with its corresponding
   per-cpu spinlock unlocked.

To achieve all this:
(a) We introduce a new spinlock that is taken by the *_global_lock_online()
    routine and released by the *_global_unlock_online() routine.
(b) We register a callback for CPU hotplug notifications, and this callback
    takes the same spinlock as above.
(c) We maintain a bitmap which is close to the cpu_online_mask, and once it is
    initialized in the lock_init() code, all future updates to it are done in
    the callback, under the above spinlock.
(d) The above bitmap is used (instead of cpu_online_mask) while locking and
    unlocking the per-cpu locks.

The callback takes the spinlock upon the CPU_UP_PREPARE event. So, if the
br_write_lock-unlock sequence is in progress, the callback keeps spinning,
thus preventing the CPU online operation till the lock-unlock sequence is
complete. This takes care of requirement (3).

The bitmap that we maintain remains unmodified throughout the lock-unlock
sequence, since all updates to it are managed by the callback, which takes
the same spinlock as the one taken by the lock code and released only by the
unlock routine. Combining this with (d) above, satisfies requirement (2).

Overall, since we use a spinlock (mentioned in (a)) to prevent CPU hotplug
operations from racing with br_write_lock-unlock, requirement (1) is also
taken care of.

By the way, it is to be noted that a CPU offline operation can actually run
in parallel with our lock-unlock sequence, because our callback doesn't react
to notifications earlier than CPU_DEAD (in order to maintain our bitmap
properly). And this means, since we use our own bitmap (which is stale, on
purpose) during the lock-unlock sequence, we could end up unlocking the
per-cpu lock of an offline CPU (because we had locked it earlier, when the
CPU was online), in order to satisfy requirement (2). But this is harmless,
though it looks a bit awkward.

Change-Id: If42e9ffe6ed9033b856edae5562e3a9ae4fc175a
Debugged-by: Cong Meng <mc@linux.vnet.ibm.com>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-12-22 00:16:00 -08:00
Olav Haugan
ee0f780d78 board: 8660: Add callbacks to request_region
Callbacks to request_region, release_region,
setup_region is missing from ION platform data for
SMI heap.

Change-Id: Ida603d4ac7c3246c0deedb9b80dc0c1ea64638eb
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2011-12-21 16:32:08 -08:00
David Collins
5c4a5aba9b regulator: pm8xxx-regulator: add PM8XXX regulator driver
Create a PM8XXX regulator driver that can support PMIC PM8921
variants including: PM8018, PM8038, and PM8921.

Change-Id: I60d1302e4af9a4c5caa72301c904867acd2ebe0f
Signed-off-by: David Collins <collinsd@codeaurora.org>
2011-12-21 09:55:55 -08:00
Ramesh Masavarapu
49259689fe crypto: Add bus scaling request.
Add bus bandwidth request in crypto driver modules.
Add bus scaling request information to platform data files.
Currently the support for bandwidth request is enabled and tested on
msm8960 only.

Change-Id: I77edb827b1633218405cecf3a494c13b7b982c05
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
2011-12-20 23:46:34 -07:00
Linux Build Service Account
544a005d36 Merge "vidc: Add video driver support for h264 level 3.2" into msm-3.0 2011-12-20 18:27:47 -08:00
Amy Maloche
21115ebe19 input: atmel_mxt_ts: modify regulator framework for mxt224E
Support mxt224E controller which requires both digital and analog
regulator power.

Change-Id: I2717fd26b4790cf1b6160f09e71611537b47ea3c
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-12-20 18:26:13 -08:00
Linux Build Service Account
4ab597d902 Merge changes I1a1791bb,Id71c2e0c,I817c65a4,Id9a25354,I7eade250 into msm-3.0
* changes:
  pmem: Add fmem call backs
  pmem: add support for reusable pmem
  pmem: Make request/release region return a value
  fmem: Add support for reusable virtual mappings
  fmem: Add function stubs
2011-12-19 16:52:43 -08:00
Laura Abbott
f637affcca pmem: Add fmem call backs
Add callbacks for request/release region to be used with fmem.
These files can be referenced in any board file for use with
any pmem device.

Change-Id: I1a1791bbf8fc00d3e324600aedb5361aa899bc4f
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-19 10:36:34 -08:00
Laura Abbott
511edafecf pmem: add support for reusable pmem
Individual pmem devices can now be marked as reusable. The
memory will be reused through fmem.

Change-Id: Id71c2e0c42f093420c241771d7a2620ed2accfc4
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-19 10:36:34 -08:00
Laura Abbott
72ae4bf926 pmem: Make request/release region return a value
the request_region/release_region call backs now return
an error code. This way if the request fails the allocation
can fail as well.

Change-Id: I817c65a43935fb41176ad03f5a7672fb5640084e
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-19 10:36:33 -08:00
Laura Abbott
7749792e2c fmem: Add support for reusable virtual mappings
Instead of just keeping the entire heap mapped all the
time, reserve the virtual area and map as needed.

Change-Id: Id9a253541f1462379f3f81611aec92cd760e71c8
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-19 10:36:33 -08:00
Laura Abbott
99f87d2473 fmem: Add function stubs
Add function stubs for when qcache is not enabled

Change-Id: I7eade250bee42316074fc790204154cd8f0af840
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-19 10:36:33 -08:00
Anirudh Ghayal
0c72b8462e mfd: pmic8058: Remove pm8058_hard_reset_config implementation
pm8xxx_hard_reset_config implements the required functionality,
replace the pm8058 specific call with this.

Remove ssbi_read/ssbi_write functions used in pm8058_hard_reset_config.
Remove unused variable(pm_lock) and enum(pon_config, pm8058_smpl_delay).

Change-Id: I3c5982ebab9277dc088bd3abd5621eb9acf3add9
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-12-19 09:21:39 +05:30
Anirudh Ghayal
33d93bf02c mfd: pmic8058: Remove pm8058_stay_on implementation
pm8xxx_stay_on implements the required functionality internally.

Modify other occurrences of pm8058_stay_on to pm8xxx_stay_on.

Change-Id: I1c4d932789c6b5592bcbc6fc718d037f188d0e56
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-12-19 08:57:02 +05:30
Linux Build Service Account
6af1b58f0b Merge "vfs: dont chain pipe/anon/socket on superblock s_inodes list" into msm-3.0 2011-12-16 21:09:57 -08:00
Linux Build Service Account
b508a570fa Merge "mfd: pmic8058: Remove reset_pwr_off, smpl control and WD reset control APIs" into msm-3.0 2011-12-16 21:09:57 -08:00
Linux Build Service Account
2bc47de273 Merge "hwmon: pm8xxx-adc-scale: Change scaling function" into msm-3.0 2011-12-16 12:39:32 -08:00
Linux Build Service Account
86810e75f7 Merge changes I711dbd41,I3211a122 into msm-3.0
* changes:
  msm: board-9615: USB SPS Pipes configuration fixes
  usb: gadget: Add SPS BAM-to-BAM support
2011-12-16 10:23:26 -08:00
Linux Build Service Account
187e51291e Merge "msm: vidc: Driver changes to disable demux in core decoder." into msm-3.0 2011-12-16 10:23:26 -08:00
Siddartha Mohanadoss
37e6fc0bf7 hwmon: pm8xxx-adc-scale: Change scaling function
Modify the scaling function routines for Battery temperature
and all channels whose units return milli-volts for voltage.

The Charger driver requires the Units of Voltage and temperature
in uV and 0.1 DegC according to the framework where all voltages,
currents, chargers, energies, time and temperature are in uV, uA,
uAh, uWh, seconds and tenths of degree Celsius unless otherwise
stated. In accordance with the above expected units, the scaling
functions are modified for all voltage channels and the Batt Therm.

This change fixes the XO Therm temperature scaling routine,
PA Therm and Batt id to use the ratiometric calibration.
XO Therm and PA therm units are returned as milli-degree and
degree Centigrade respectively.

Accordingly, update the clients of xoadc to handle this change in
units.

CRs-Fixed: 315797
Change-Id: I6fa3b808062563fef3b0e70cc694e3132421f735
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2011-12-16 10:16:03 -08:00
Linux Build Service Account
56c46ac124 Merge "VFS : mount lock scalability for internal mounts" into msm-3.0 2011-12-16 07:26:21 -08:00