Commit Graph

25712 Commits

Author SHA1 Message Date
Sagar Dharia
29f35f08b9 slimbus: Provide separate APIs to connect source and sink ports
Source and sink ports for a channel may be connected from different
clients.
Multiple sink ports and 1 source port can be connected to a channel.
Ports are freed/zeroed when channel is removed.

Change-Id: I165bb9db4fb43a9a884ea14ffed08f8d11b65c39
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2012-01-27 14:57:41 -07:00
Sagar Dharia
4ec2ff4a32 slimbus: Support more than 1 clients to use a channel
There is a possibility that 2 or more clients can use the same
channel, one as producer and the other(s) as sink.
The slim_query_ch API gives the ability for a client to specify
channel number it needs to use.
Reference counting is used to make sure channel is not deallocated
until the last caller deallocates it.
Another counter (def) is used to keep track of channel definition and
removal. Channel definition is sent to hardware when the producer
and/or consumer(s) connects ports to the channel. Channel is only
removed when all clients indicate they want to remove channel.

Change-Id: Ic5084680419e16ee238d2e62c02e5430170b387d
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2012-01-26 11:24:09 -07:00
Lynus Vaz
31b5290e0f msm: kgsl: Introduce a KGSL_USER_MEM_TYPE_MAX enum
Introduce an enum for the max memory type supported by kgsl. This is
used by kgsl_test to pass the correct parameters to kgsl.

CRs-fixed: 331563
Change-Id: I9d9ab813148234ff23da557b92f24e9f71a7cab8
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
2012-01-23 18:14:23 +05:30
Linux Build Service Account
04d2815859 Merge "thermal: msm8960_tsens: Read TSENS temperature" into msm-3.0 2012-01-22 16:18:53 -08:00
Linux Build Service Account
c362a4e18a Merge changes I84b3ca1e,I41db99f8 into msm-3.0
* changes:
  ASoc: msm: Add support for adie RX & TX calibration
  Revert "msm: audio: qdsp6v2: Support for out-of-band calibration"
2012-01-21 14:43:02 -08:00
Linux Build Service Account
279e22cf54 Merge "mfd: pm8xxx-misc: add an API to preload the dVdd regulator" into msm-3.0 2012-01-21 13:03:00 -08:00
Ben Romberger
b760323c5c ASoc: msm: Add support for adie RX & TX calibration
Add support for adie RX & TX calibration. This calibration
is used for RMC and speaker protection. A non-blocking
function was created for AFE memory map since it is now
being called from an atomic process and the acdb driver
was changed to use to use atomic variables.

Change-Id: Id6c6ca7a303ef5ee5d23a9932e910e6a7a08805d
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2012-01-20 17:10:55 -08:00
Siddartha Mohanadoss
ccd49854a0 thermal: msm8960_tsens: Read TSENS temperature
Add kernel API to read TSENS temperature for clients
in the kernel space. Currently the TSENS driver only
supports reading the TSENS temperature from the
thermal sys.

Split the TSENS initialization into two parts.
First is to perform the initial calibration that is
used to convert the raw ADC code to Degrees Celcius
and initialize the TSENS HW. Second is to register the
TSENS driver to the linux thermal framework and create
the temperature zones that will be accessed by the
Thermal daemon to set thresholds, read the temperature
and receive notifications.

Change-Id: Id2305a7aa755e1e9cfaecd8b5c1870ed05d9b5e9
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2012-01-20 15:36:59 -08:00
Linux Build Service Account
3074cc33aa Merge "USB: OTG: msm: Implement data contact detection based on timeout" into msm-3.0 2012-01-20 14:12:37 -08:00
David Collins
4724272b4b mfd: pm8xxx-misc: add an API to preload the dVdd regulator
Add a new API, pm8xxx_preload_dVdd, which will preload the dVdd
regulator on PMIC PM8901 chips during off state. This can help
to reduce fluctuations in the dVdd voltage during startup at the
cost of additional off state current draw.

This API should only be called if dVdd startup issues are
suspected.

Change-Id: Ic7ee60539de37a761bb9ca6c5200327a7b99da89
CRs-Fixed: 326086
Signed-off-by: David Collins <collinsd@codeaurora.org>
2012-01-20 11:34:58 -08:00
Linux Build Service Account
87c8d39d24 Merge "regulator: Add devm_regulator_get()" into msm-3.0 2012-01-20 04:12:37 -08:00
Pavankumar Kondeti
2d09e5fe33 USB: OTG: msm: Implement data contact detection based on timeout
Data contact can be detected by either current source or timeout
methods.  The current source method is not working for an unknown
reason.  Implement timeout based data contact detection.  The spec
allows any timeout between 300msec to 900msec.  Use 600msec.

CRs-fixed: 330217
Change-Id: I67151d1412f43ba974cc1afb164d6473f89d2dbf
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2012-01-20 08:38:57 +05:30
Linux Build Service Account
87b57c9b86 Merge "input: atmel_mxt_ts: Add support for keyarray object" into msm-3.0 2012-01-19 17:33:48 -08:00
Linux Build Service Account
1980cb37f5 Merge changes Icc844d30,I527768f0,If1cd6dda,I8cc87d5a into msm-3.0
* changes:
  msm: board: Add ION heap for Audio
  msm: board: Increase ION MM heap size
  msm: board: Restore SF and MM heap to PMEM sizes
  gpu: ion: Add new heap for qse comm
2012-01-19 13:23:10 -08:00
Linux Build Service Account
32a110abce Merge changes Iab2aff3d,I5ff76c3a into msm-3.0
* changes:
  of/irq: of_irq_init: add check for parent equal to child node
  of/irq: introduce of_irq_init
2012-01-19 11:52:58 -08:00
Linux Build Service Account
ca6a61e107 Merge changes I4917de40,Id64bc384,Iae5182ff into msm-3.0
* changes:
  mfd: pm8038-core: enable bms and charger devices
  msm: 8930: enable charger, bms and ccadc
  mfd: pm8xxx: add charger, bms and ccadc devices on PM8038
2012-01-19 01:54:26 -08:00
Mohan Pallaka
382d3ce841 input: atmel_mxt_ts: Add support for keyarray object
Keyarray(T15) object is used for handling capactive keys.
It can handle 32 keys and the keys supported are passed
from platform data as key_codes.

Change-Id: Iac589afb59e8ff69b6e1eb86bafdc0b5382c3edd
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2012-01-19 12:27:21 +05:30
Olav Haugan
80854eb491 gpu: ion: Add new heap for qse comm
Add new 1MB carveout heap for Qualcomm Secure Executive (QSE)
communications.

Change-Id: I8cc87d5af68e9fd4f775770b16638ee01ef88e05
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-01-18 17:44:32 -08:00
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
Rob Herring
54dca2dd09 of/irq: introduce of_irq_init
of_irq_init will scan the devicetree for matching interrupt controller
nodes. Then it calls an initialization function for each found controller
in the proper order with parent nodes initialized before child nodes.

Based on initial pseudo code from Grant Likely.

Changes in v4:
- Drop unnecessary empty list check
- Be more verbose on errors
- Simplify "if (!desc) WARN_ON(1)" to "if (WARN_ON(!desc))"

Changes in v3:
- add missing kfree's found by Jamie
- Implement Grant's comments to simplify the init loop
- fix function comments

Changes in v2:
- Complete re-write of list searching code from Grant Likely

Change-Id: I5ff76c3aa0f7bdf66577970dd9506336cd5712dd
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>
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2012-01-18 11:01:40 -08:00
Stephen Boyd
acf149d4a0 regulator: Add devm_regulator_get()
Add a resource managed regulator_get() to simplify regulator
usage in drivers. This allows driver authors to "get and forget"
about their regulators by automatically calling regulator_put()
when the driver is detached.

[Fixed up a couple of coding style issues -- broonie]
Change-Id: Ie32415c3a9f2c4aa99a98b6cb92a784e23d874ea
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-17 17:42:35 -08:00
David Keitel
310eb689ab mfd: pm8xxx: add charger, bms and ccadc devices on PM8038
Add supported power devices such as charger, bms and CCADC.

These devices are required to be enabled to provide charging
functionality to the 8930 platform.

Change-Id: Iae5182ff26ba1cbcb256aeb1aee619f7a368765f
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2012-01-17 14:55:09 -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