Commit Graph

25691 Commits

Author SHA1 Message Date
Olav Haugan
42ebe71efc gpu: ion: Add support for adjacent heaps
ION has to guarantee that two of the heaps are
adjacent to each other. This is due to a limitation
in the hardware. Add code to ensure these heaps
are adjacent.

Change-Id: Icc18437a50e1d872112468d02b61ab47fd70acc9
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-01-18 16:40:39 -08:00
Linux Build Service Account
3110d3fbe0 Merge "tzcom: Add support for modifying specific fields in cmd_buf" into msm-3.0 2012-01-18 15:18:40 -08:00
Michael Bohan
cf68d7a3f7 irq: irqdomain: Add API to find free irq range
When registering irq chip drivers, one common requirement is to
specify the irq_domain irq_base and nr_irq. These fields represent
the system wide logical interrupt range the domain occupies.
For systems with only one interrupt controller, it's trivial to
know these values. But for systems with several irq chip drivers,
it becomes painful to keep track of interrupt ranges in platform
defines. These create needless compile time dependencies, of
which the Device Tree aims to solve.

irq_alloc_desc() can search for a free irq, but is very
inefficient for determining the availability of large ranges.
Additionally, some irq chip drivers allocate irq descriptors
lazily. For example, portions of the Device Tree may not be parsed
until a particular bus is probed. But of_irq_init() is intended to
be run at init time, and this is a natural time to allocate irq
domains. Thus by the time we allocate our irq descriptors, we already
need to know a range of acceptable irqs to use for the domain.

To solve these problems, let's introduce
irq_domain_find_free_range(), which will return to the caller the
first available irq domain range not used already by the system.
This range can then be specified with irq_domain_add().

Change-Id: I8b0f5d25b173c76b8fc5d4f46b3fe9c6bf5c3c8f
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2012-01-16 14:25:55 -08:00
Michael Bohan
6f4df41a29 irq: irqdomain: Change irq_domain_add to detect errors
It should not be valid to add an irq_domain with a logical irq
range that overlaps with another already registered to the
system. Return an error on such an occurrence.

This change also inherently sorts the irq_domains by logical
irq_base as they are added.

Change-Id: Idef697dbe4584d783703d053fbf09f1b17e62ab0
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2012-01-16 14:25:54 -08:00
Michael Bohan
e6717fdd1f irq: irqdomain: Add support for dynamic irq_desc allocations
The current irq_domain_add() design assumes the underlying
irq_descs are valid when irq_domain_add() is called. It also
assumes that every hwirq enlisted in the irq_domain is valid.
Often, these assumptions are not correct.

Typically, irq_domain_add() is called at board_init time, but
sometimes interrupt chip drivers are not initialized until an
underlying bus is probed. When using SPARSE_IRQ, it's quite
natural to hold off allocating irq_descs until the board
topology specifies them as included.

And in such device topologies, there's no guarantee that chip
interrupt numbers will be contiguous. For example, each hwirq may
map to a particular device, but that device may or may not be
present in the actual hardware configuration. In order to support
this, we need the concept of an irq_domain that supports holes
in it.

In order to solve these problems, let's break the irq_domain
creation from the irq registration process. The irq_domain
creation can occur at init time and then have no dependencies. An
interrupt is not 'registered' with the domain until its resources
have already been allocated by the chip driver. For simple cases,
an additional API is provided to register the entire
logical irq_domain range to provide feature parity with what
already exists.

Change-Id: Ie3340d07ba8663196dc87d1185e3bb7fbed4be4d
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2012-01-16 14:25:42 -08:00
Olav Haugan
0703dbf608 gpu: ion: Refactor platform data
Refactor platform data to allow for better
expansion in the future. Add void * for
elements unique to each heap type.

Change-Id: I435679819c67ce917b5798009eff7e71047fd2ea
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-01-15 09:30:35 -08:00
Linux Build Service Account
dcaf3a849e Merge "clk: add helper functions clk_prepare_enable and clk_disable_unprepare" into msm-3.0 2012-01-15 07:03:04 -08:00
Richard Zhao
4e302a9efc clk: add helper functions clk_prepare_enable and clk_disable_unprepare
It's for migrating to generic clk framework API.

The helper functions  help cases clk_enable/clk_disable is used
in non-atomic context.
For example, Call clk_enable in probe and clk_disable in remove.

Change-Id: If4023d1856ecc07f332f072c1b4831ad3cba82de
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2012-01-15 00:30:00 -08:00
Olav Haugan
0a85251cd8 gpu: ion: Add support for secure buffers
Secure buffers provides a way to allow premium encrypted
multimedia content to be decrypted in a secured
memory area that does not allow for interception of the
decrypted content.

Add support for heap type that allow heap to be
used for content protection. Introduce new content
protection heap type and id's.

Change-Id: Idd56aa8805b5b74d1b9ab3fe8964aacc218668c1
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-01-14 22:18:45 -07:00
Linux Build Service Account
35b3b80063 Merge changes If05e598b,Idf4760c7 into msm-3.0
* changes:
  power: pm8921-charger: support for external charger drivers
  power: core: add power supply APIs
2012-01-14 02:35:05 -08:00
Mona Hossain
6e2e26984f tzcom: Add support for modifying specific fields in cmd_buf
Allow client to send information to replace a specific field of
the cmd buffer with the physical address.  This is done via a new
IOCTL, TZCOM_IOCTL_SEND_CMD_FD_REQ, which is used to import the
ion fd handle. This IOCTL takes in a new send_cmd_fd_op_req
structure that has the same format as send-cmd_op_req with a
new field added: an array of ion handles (ifd_data.fd) and
cmd_buf_offset.

The client sends in an array of ion fd handle along with the
offset to the command buffer field.

This new IOCTL allows a client to send information regarding
which field(s) (at cmd_buf_offset) in the cmd_buf to replace.
These field(s) are replaced with the physical addr of the
buffer addressed by the respective ifd_data.fd handle.

Change-Id: If210013d46e24776fe6f5c6aa257505b3b1e6e00
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
2012-01-13 19:02:53 -08:00
David Keitel
88e1b57f00 power: pm8921-charger: support for external charger drivers
Allow the pm8921-charger driver to initiate charging on a
registered 3rd party charging driver through the power supply class.
Also enable the maintenance of charging properties such as online
and charge type using the power supply class rather than
directly depending on the 3rd party driver.

When a external charger is registered using power_supply_register
the external_power_changed callback of the charger driver checks
for an external charger named "dc". This removes the dependency
of a 3rd party charger to call directly into the charger driver.

Also, update the isl9519q driver to reflect the changes and
utilize power supply class calls to enable charging
on the isl chip from PM8921 charger driver.

This serves as an example for other 3rd party external
chargers supporting PMIC with high current charging.

Finally, add pr_fmt macro which automatically adds function name
to print statements and remove __func__ from individual print
statements.

Change-Id: If05e598be260d924ec3263bad33317cf4e7543a1
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2012-01-13 12:05:11 -08:00
David Keitel
65ddd84042 power: core: add power supply APIs
Rename power_supply_set_charging_by to power_supply_set_online to
more accurately reflect the intent of the API.

Add power_supply_set_charge_type to enable a charger driver to set
a POWER_SUPPLY_PROP_CHARGE_TYPE. Ultimately this is handled like
a request, the receiving charger driver then can handle the request
and report the adequate POWER_SUPPLY_PROP_CHARGE_TYPE once necessary
action has been taken.

Change-Id: Idf4760c7d6c0f61a9eccc656cd469a6ac5fdc6cd
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2012-01-13 12:04:50 -08:00
Lynus Vaz
bdb0c07e65 msm: IDLE_TIMER wakes up waiting processes
The msm_idle_stats_update_event() function is now a public function.
In case of IDLE_TIMER expiry, kgsl calls this function to immediately
wake up waiting processes.

Change-Id: Ia259d10e08deea71db047d8091cc97066fba3c1c
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
2012-01-13 09:03:46 +05:30
Rohit Vaswani
b766bef8a1 msm: Remove references to tcsr in fsm9XXX targets
In FSM9XXX TCSR address space cannot be accessed from Apps
processor anymore.

Change-Id: I32d3c02fa8908d91619e2e340de7c844128131a6
Acked-by: Kaushik Sikdar <ksidkar@qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2012-01-12 11:01:50 -08:00
Linux Build Service Account
b64b97a5f7 Merge "[media] v4l: add control definitions for codec devices" into msm-3.0 2012-01-12 07:59:39 -08:00
Vinay Kalia
e1ba2705ea msm: wfd: Adds writeback start/stop functionality.
Removes register/unregister calls and replaces them
with start/stop. No need to pre-register the buffers
anymore.

Change-Id: I2f12c3a5791252ad09032cc628d93fb1dc50fee0
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
2012-01-11 12:17:35 -08:00
Linux Build Service Account
3ccc82179d Merge changes I0059a438,Ic6455ac0,I3ac329f2 into msm-3.0
* changes:
  Revert "cpu-hotplug: Add the function 'cpu_hotplug_inprogress'"
  Revert "printk: Don't allow cpu to get console lock during hotplugging"
  Revert "partition_sched_domains: Do not destroy old sched domain on cpu_up"
2012-01-11 08:03:55 -08:00
Kamil Debski
5f0fb77cb2 [media] v4l: add control definitions for codec devices
Add control definitions and documentation for controls
specific to codec devices.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Change-Id: I94e1be196120988cfee2420ba6bd342eece1f481
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-01-10 15:44:52 -08:00
Manu Gautam
5143b25310 msm: clock: Use device names to distinguish between USB clocks
Drivers should now use their device names to distinguish between
clocks of the same type rather than the clock name. Clock names
are updated to match the new naming convention.

CRs-Fixed: 327559
Change-Id: I78757806589e037a0655a63e7ee20c935214c99d
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2012-01-09 22:32:33 -07:00
Linux Build Service Account
ec3c193aa6 Merge changes I4973b80b,I3c4fd9d3 into msm-3.0
* changes:
  msm: 8930: Add ADC clients
  mfd: pmic8038-core: Add HK/XOADC device
2012-01-09 17:18:37 -08:00
Linux Build Service Account
d846875671 Merge "wcnss: Add Riva 'power on lock' APIs" into msm-3.0 2012-01-09 07:08:43 -08:00
Linux Build Service Account
34fbc76b64 Merge changes I53faf607,I9590fff7 into msm-3.0
* changes:
  msm: rotator: Add bus scaling support
  msm: display: Add rotator bus scaling vectors for 8660/8960
2012-01-07 05:17:01 -08:00
Linux Build Service Account
917e39eccf Merge changes I788b28d3,I459a18bb into msm-3.0
* changes:
  video:msm: Adding stub for MSMFB_MDP_PP ioctls
  include:linux: Adding MSMFB_MDP_PP IOCTL
2012-01-07 05:17:01 -08:00
Linux Build Service Account
9fd62602cb Merge changes I31954b3f,I350a14c3,I27759a00 into msm-3.0
* changes:
  power: pm8921-charger: Add pm8921_set_usb_power_supply_type
  power: pm8921-charger: warn if the battery is hot
  power: pm8921-charger: end of charge fixes
2012-01-07 05:17:01 -08:00
Pravin Tamkhane
02a4068e48 include:linux: Adding MSMFB_MDP_PP IOCTL
Add MSMFB_MDP_PP IOCTL and required data structures for new post processing
features

Change-Id: I459a18bbb739f79833901159a19c2c8705147b57
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2012-01-06 18:29:45 -08:00
Siddartha Mohanadoss
ef10213c2f mfd: pmic8038-core: Add HK/XOADC device
HouseKeeping ADC (HKADC) on the PMIC is used by clients
to measure voltage, current and temperature. Clients
include the Battery, Charger and Thermal clients that
require reading the ADC in real time. This also
supports reading the ADC channels that are mapped through
the PMIC MPP's such as the PA THERM channel.

Change-Id: I3c4fd9d368550c1cca168ea097e0d457d01d695e
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2012-01-06 18:15:08 -08:00
Nagamalleswararao Ganji
5fabbd6c0e msm: display: Add rotator bus scaling vectors for 8660/8960
Add rotator bus scaling vectors for 8660 & 8960 targets

Change-Id: I9590fff72a57687b110355e3862d5ac5cf61e0cc
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
2012-01-06 18:13:00 -08:00
Linux Build Service Account
d80dd681e2 Merge "usb: gadget: fix crash on USB cable disconnection" into msm-3.0 2012-01-06 17:41:49 -08:00
Nagamalleswararao Ganji
880f847f5d msm-fb: display: ION based allocation for writeback buffers
ION based allocation is added for the writeback support
for content security.

Change-Id: Iaa7ec07a7cbc05c818af6f26a2c42c8c36b9bcb5
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
2012-01-06 14:49:23 -08:00
Olav Haugan
b5be7998c6 gpu: ion: Add heap ids
Add heap ids for ion heaps. Remove unused
system contiguous heap. Fix vmalloc heap name.

Change-Id: I3c3a653a53c8db8b66a7bba2abac0dfe560c407c
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-01-06 14:49:08 -08:00
Michael Bohan
c1105e186a Revert "cpu-hotplug: Add the function 'cpu_hotplug_inprogress'"
This reverts commit 3d321a3570.

Since sched domains are allocated dynamically now these
changes are N/A for 3.0. Hence the revert.

Change-Id: I0059a4384c871815c01455d4b6f5c8be582a5d73
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2012-01-05 10:15:53 -08:00
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
Ofir Cohen
4da266f11a usb: gadget: fix crash on USB cable disconnection
Crash was observed (9x15) when USB cable was
disconnected. Root cause was NULL pointer and
USB BAM reset due to USB PHY reset. On 9x15 no
reset on disconnect will be performed.

CRs-Fixed: 326999
Change-Id: I006afb8dcd225caf9280dd915f8af3edfaebff5a
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
2012-01-03 13:04:46 +02:00
Anirudh Ghayal
4786e9fdba drivers: pm8058: Delete pmic8058 specific subdevice drivers
PM8058 subdevices now use pm8xxx based drivers.
Delete keypad, power-key, vibrator, rtc, mpp, gpio, thermal,
batt-alarm, misc drivers.

Change-Id: I7cb06a48b7d724aa1e1790ba88feeece1701bb35
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2012-01-02 09:57:46 +05:30
Sameer Thalappil
aebc0d8c24 wcnss: Add Riva 'power on lock' APIs
During SSR Riva should not be 'powered on' until all the host
drivers finish their shutdown routines. Add APIs to support
this synchronization mechanism.

Change-Id: Id211cf2deb7accd0e4bdfe8cd328e6807eac875e
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2012-01-01 13:45:23 -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