Commit Graph

29545 Commits

Author SHA1 Message Date
David Herrmann
2cff1bf905 HID: uhid: forward output request to user-space
If the hid-driver wants to send standardized data to the device it uses a
linux input_event. We forward this to the user-space transport-level
driver so they can perform the requested action on the device.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-03-04 12:45:07 -08:00
David Herrmann
d42565627f HID: uhid: forward open/close events to user-space
HID core notifies us with *_open/*_close callbacks when there is an actual
user of our device. We forward these to user-space so they can react on
this. This allows user-space to skip I/O unless they receive an OPEN
event. When they receive a CLOSE event they can stop I/O again to save
energy.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-03-04 12:45:07 -08:00
David Herrmann
49dca004e2 HID: uhid: add UHID_START and UHID_STOP events
We send UHID_START and UHID_STOP events to user-space when the HID core
starts/stops the device. This notifies user-space about driver readiness
and data-I/O can start now.

This directly forwards the callbacks from hid-core to user-space.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-03-04 12:45:06 -08:00
David Herrmann
2d040ffbd0 HID: uhid: allow feeding input data into uhid devices
This adds a new event type UHID_INPUT which allows user-space to feed raw
HID reports into the HID subsystem. We copy the data into kernel memory
and directly feed it into the HID core.

There is no error handling of the events couldn't be parsed so user-space
should consider all events successfull unless read() returns an error.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-03-04 12:45:05 -08:00
David Herrmann
4cde483c27 HID: uhid: add UHID_CREATE and UHID_DESTROY events
UHID_CREATE and UHID_DESTROY are used to create and destroy a device on an
open uhid char-device. Internally, we allocate and register an HID device
with the HID core and immediately start the device. From now on events may
be received or sent to the device.

The UHID_CREATE event has a payload similar to the data used by
Bluetooth-HIDP when creating a new connection.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-03-04 12:45:04 -08:00
David Herrmann
dfab99ef47 HID: uhid: add internal message buffer
When receiving messages from the HID subsystem, we need to process them
and store them in an internal buffer so user-space can read() on the char
device to retrieve the messages.

This adds a static buffer for 32 messages to each uhid device. Each
message is dynamically allocated so the uhid_device structure does not get
too big.

uhid_queue() adds a message to the buffer. If the buffer is full, the
message is discarded. uhid_queue_event() is an helper for messages without
payload.

This also adds a public header: uhid.h. It contains the declarations for
the user-space API. It is built around "struct uhid_event" which contains
a type field which specifies the event type and each event can then add a
variable-length payload. For now, there is only a dummy event but later
patches will add new event types and payloads.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-03-04 12:45:02 -08:00
Ajay Dudani
5f7f224e7b msm: hsic: Retry port RESUME if unable to send SOFs within 3ms
Due to h/w bug in hsic controller, interrupts are disabled during
resume signalling (~20ms), commit: e404049ae, which may result in
below issues
1. Delayed MDP interrupts causing display stutters
2. Since default workqueue disables preemption for 20ms, the kernel
   scheduler schedules out the worker thread for long time. It results
   in MDM crash due to delayed response
To avoid busy loop, port resume is performed without disabling the
interrupts. Due to this if resume time constraint is not met then
don't start SOF and retry RESUME after some time. This delay (w/o SOF)
lets the device to enter SUSPEND state (after issuing remote wakeup)
and followed by RESUME after sometime. Also, Move the resume code to
hsic controller driver to avoid changes to ehci upstream code.

CRs-Fixed: 383752
Change-Id: Ic4768587bbb9a00d8cf495065ec9e14c46a5c1d4
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:44:58 -08:00
Devin Kim
66e19b7a38 EHCI: HSIC: Use counter for timeout in ulpi_read()
ulpi_read() relies on jiffies to calculate the timeout
for read operation on phy register. Calling ulpi_read()
with interrupts disabled, freezes jiffies on local processor.
In case of phy lockup this results in infinite loop leading
to watchdog reset. Use loop counter for timeout instead of
jiffies for read operation to avoid watchdog reset.

CRs-Fixed: 388234
Change-Id: I1d46052b087c42b9f422b6f7eb691498fa104718
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2013-03-04 12:44:52 -08:00
samin.ryu
32680eaa3a leds: pm8xxx: change adjust brightness routine
add pwm_adjust_brightness field for current control.

Change-Id: If0ba79324fcf50334f88f006a8ff30b59b7d4982
2013-03-04 12:44:46 -08:00
Ajay Dudani
7196637a6e gpu: ion: Add compatibility with future changes
Several changes are pending to be pulled in which are
not compatible with our changes. Specifically, a new
field to the allocation ioctl is added and the ioctl
numbers for cache flushing need to be changed.
Add these changes now until full changes can be pulled
in the future.

Change-Id: I9540495e25c7b6c414a6e3719f66f2cd9f78c585
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:44:45 -08:00
choongryeol.lee
4e4f4dabfd power: pm8921: consideration of ibat max overwrite
The thermal mitigation and battery temp control can overwrite
the ibat max value each other. So this patch remove the possibility
of overwrite ibat max value by mitigation and battery temp control.

Change-Id: Ib0f7bf2b8bd2e474d1d9c76bd5100b05310cb048
2013-03-04 12:44:44 -08:00
choongryeol.lee
58a482fbef power: battery: add argument to set_health_state()
Add argument to set_health_state() for notification
of current change to charger driver.

Change-Id: I4ae2875c5b2c29689d11f8dbe5be20e5667453d4
2013-03-04 12:44:43 -08:00
Devin Kim
152964bd36 android_vibrator: clean up codes and handle errors
Change-Id: I86e8d7a77a1f0a2b03bcb1b434fb68cb1d7b6e1a
2013-03-04 12:44:40 -08:00
Iliyan Malchev
e05110dbd7 msm_ion.h: switch to using legacy_ion.h
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:44:38 -08:00
Iliyan Malchev
0cc2262f23 legacy_ion.h: a backwards-compatibility copy of ion.h
cloned from include/linux/ion.h at:

commit b6b0b65325e6f5eb5fcfd88d270f710d947f7962
Author: Brian Muramatsu <btmura@google.com>
Date:   Mon Jul 30 22:54:08 2012 -0700

    Add heap_mask to ion_allocation_data

Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:44:37 -08:00
kibum.lee
e897ca1223 usb: msm_otg: fix for TA detection bug
This patch solves the problem of recognize usb link when the TA is slow to
connect.

Change-Id: I9ebd118a53175a272117a75b5a5a1554da9c3d8b
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:44:35 -08:00
Iliyan Malchev
47bb9eb414 Revert "msm: tty: update receive room just before writing data to the ldisc"
This reverts commit 913565a83d74fe1da0914e8c355345bc616131c4.
2013-03-04 12:44:26 -08:00
kyungtae.oh
f8de54b40d mako: power: use wireless charger api instead of power supply api
This is expected to prevent missing wireless charger state.
The bms needs to know if anything is connected to the wireless charging.

Change-Id: Ie97130cc515d19ab17b67267d9aca7588c1fff72
2013-03-04 12:44:23 -08:00
Devin Kim
5d51c40a8d power: battery: add battery temperature control
The battery temperature should be controlled for safty.
So this patch indroduce battery temperature control.

Change-Id: Ia00e7ce5bf697591be2da94f9a7c2960738642d5
2013-03-04 12:44:22 -08:00
Devin Kim
7024f83d08 pm8xxx-adc: add the functions to set tuning parameters
We need to tune the board specific adcmap parameters
So need functions to set specific parameters.

void pm8xxx_set_adcmap_btm_threshold(void *pts, int size)
void pm8xxx_set_adcmap_pa_therm(void *pts, int size)
void pm8xxx_set_adcmap_ntcg_104ef_104fb(void *pts, int size)

Change-Id: Ie78c11f5fb998ecc456defa3c8e3e7a3e0b9b45f
2013-03-04 12:44:20 -08:00
Naseer Ahmed
8b1bd63cfb msm: mdp: Fix reserved field usage
An earlier commit(ec5b2f)increased the number of reserved fields
in the kernel standard fb.h header changing the struct size.
This caused issues with userland applications using the corresponding
bionic header. This patch revert the earlier increas in size
and makes corresponding adjustments to the reserved field usage.
A follow up patch will remove usage of reserved fields entirely.
2013-03-04 12:44:09 -08:00
Devin Kim
1681b2682b mako: set the led max brightness from 100 to 10
Change-Id: I41025f0b884be2a7226ca5a30731002723344415
2013-03-04 12:44:06 -08:00
samin.ryu
21e0694a39 leds: pm8xxx: add pwm control sysfs files
PWM(frequency) is controlled by userspace

Change-Id: I6a3194de0b843841cdf56941dbcc43fcdc3a4f42
2013-03-04 12:44:05 -08:00
Ajay Dudani
51edcc2511 power: pm8921-charger: enable battery alarm
During UVLO events the charger hardware may lock up
if it is in hardware clock switching mode.

To fix this add a battery alarm with a lower threshold
that disables hardware clock switching.

When the system is awake the resume callback ensures
that the charger is running off of the 19.2 MhZ clock
which does not allow the charger to lock up. Therefore
if the battery alarm wakes up the device before hitting
UVLO the charger hardware will not be in hardware clock
switching mode.

CRs-Fixed: 374607
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>

Change-Id: I1bb20b2e7ff1a11f032b12b4abd4804ed130fe4a
2013-03-04 12:43:59 -08:00
Jaeseong GIM
93c86c992b mako: debug: porting lge crash handler
Change-Id: I913d372131a25bb9c0d90680f5e96cebb8883055
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:43:39 -08:00
Brian Muramatsu
fb84f15d19 Add heap_mask to ion_allocation_data 2013-03-04 12:43:36 -08:00
wongab.jeon
3e8639b3ad mako: nfc: add new nfc broadcom driver
Change-Id: I3b06a3c77c8d935798fcbdb627a7fca983503d08
2013-03-04 12:43:35 -08:00
choongryeol.lee
2cb854aebc mako: backlight: sync backlight on/off with lcd on/off
To avoid dispalying garbage during lcd on/off, the turning on
lcd should be done before backlight on and turning off backlight
should be finished before lcd off. But current implementation
doesn't guarantee these on/off sequence. This patch ensure the
sequence of lcd and backligth on/off.

Change-Id: I11771d395c1a68b4e70b63639f50c773a665b441
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	drivers/video/msm/msm_fb.c
2013-03-04 12:43:34 -08:00
kyungtae.oh
935c9a4c10 power: add wirelesscharger(WLC) bq51051b driver
Change-Id: I61c4b9c3d648e8f709ec78708271f807ceed1715
2013-03-04 12:43:29 -08:00
choongryeol.lee
01fc0013e4 mako: display: enable CABC function
CABC(Content Adaptive Backlight Control) is supported by
mako lcd panel. So this patch enables it to reduce power
consumption.

Change-Id: I433281bc5fe4e638cfeba1beb9cb61e1775f3896
2013-03-04 12:43:27 -08:00
Jongrak Kwon
3a2532eeba mako: touch: support new touch panel (PLG137/0.9T)
Use ARRAYED_TOUCH_FW_BIN feature to support both new(PLG137/0.9T)
and old(TM2000/0.55T) panels with one binary.

Firmware Verison: New - E003, Old - E059 (no change)

Change-Id: Ia96eba137f8a02054eb8067d47dc887edffb9970
2013-03-04 12:43:21 -08:00
choongryeol.lee
69c553ed59 slimport: add slimport anx7808 driver
add slimport anx7808 driver

Change-Id: I133d5272172532a52e27e08779b97789c104173a
2013-03-04 12:43:19 -08:00
Devin Kim
969adb1605 camera: add header file for lm3559 platform data
- add new header file for lm3559 platform data
- unregister device when removing device

Change-Id: I6eb32097c61347df800be86cf4fbc84d27e6cc50
2013-03-04 12:43:16 -08:00
Devin Kim
3b795c2300 backlight: lm3530: cleanup codes
- add include/linux/platform_data/lm35xx_bl.h
- remove redundant variables and codes
- handle the erorrs in probe
- fix the memory leak

Change-Id: I279ebc9098f70e78d618abdcc75df23bbf8e604a
2013-03-04 12:43:08 -08:00
Jongrak Kwon
c4a40d73e9 mako: touch: added tool type and touch minor option
- Let the low level driver pass tool type and use it
  (Synaptics: PEN when major = 0, minor = 0, Other: FINGER)
- Split touch major and minor value to choose
  circle vs. ellipse from platform datai
  (Currently defined to support circle)

Change-Id: Ibd79efb5d88843174c45147a4c7ea170632c3fdb
2013-03-04 09:12:26 -08:00
Jongrak Kwon
d8943732ca mako: touch: disable ghost finger correction
The ghost function sets FORCE_FAST_RELAXATION and
FORCE_UPDATE registers, which cause touch abnormal function
after resume.

Also code clean up for register map initialization.

Change-Id: Ib442d4d7a2e995048fba902fe852a3851fdbf418
2013-03-04 09:12:21 -08:00
Jongrak Kwon
37b9eb8046 mako: touch: use MT protocol type B
- not applied to hard key function, so removed hard key stuff
- jitter and accuracy filter function also changed but not used at the moment
- corrected some wrong error handling in touch_probe and synaptics_ts_probe

Change-Id: I1af3032612cdedbfac9da9c5df17eeb861344226
2013-03-04 09:12:20 -08:00
Devin Kim
9710588005 cradle: add hall ic driver
support hall ic (BU52031NVX) for cradle

Change-Id: I1de44a0c1d5ab1359fc1a02eb674b08be8590100
2013-03-04 09:12:07 -08:00
Devin Kim
e947d9a443 audio: fsa8008: fix typo in header file
Change-Id: Iec7d63e82cf58e575dd7b95da9613032de9feef5
2013-03-04 09:11:56 -08:00
ehgrace.kim
5fbfe21b85 audio: enable fsa8008 for earjack detection
Change-Id: Ifc6f9aa6fa6520002dec150808bb9192e48ed0a8
2013-03-04 09:11:55 -08:00
Jongrak Kwon
0b7f6b4498 mako: touch: disable button and clean up
- disable button function
- clean up configuration
- remove unused codes
- remove softkey handlers
- remove interrupt thread (ISR send to work queue directly)

Change-Id: Id8bbf5d554e12a477e402c966b9ef21e1a02d86f
2013-03-04 09:11:54 -08:00
roy.park
0f8e962294 power: support LGE battery 2100mAh
Add battery 2100mAh profile and update Battery mornitoring system(BMS)

Change-Id: Iea118f1665241c7e4192a77db791b80426a01b60
2013-03-04 09:11:48 -08:00
Jongrak Kwon
000adcf065 mako: touch driver merge
- lge touch common driver
- synaptics touch driver integration with lge common driver

Change-Id: I72e53f8d16610155ab1a31a366e33910a41643be
2013-02-28 12:14:25 -08:00
Devin Kim
ea89be9220 mako: initial bring up the mako hardware
support the initial mako hardware. enabled basic power, storage,
debug-uart.

Change-Id: Ie9f6d5ef1219cb0c3761bb69a3a8fcfdcbb86f19
2013-02-28 12:13:31 -08:00
Michael Bohan
12eb83a820 platform: msm: Add driver for QPNP PMIC clkdiv peripherals
This driver supports the Qualcomm PNP clkdiv peripheral. It
allowed for configuring divide factors for various clock outputs
on the PMIC. The source clock is CXO.

The driver allows for configuration of the clkdiv device through
Device Tree. Some optional parameters may be specified instead at
runtime with the qpnp_clkdiv_config() API.

Change-Id: I393ed0e4389fb3c1dfe0bcdb40944102d2e09894
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2013-02-27 18:21:35 -08:00
Chaithanya Krishna Bacharaju
2e868cd76c msm: audio: qdsp5: Add Support for AC3/EAC3 driver
Add new driver to support AC3/EAC3 playback.

Change-Id: I217d354d80ce1848e1c552416045a31b54a4a994
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2013-02-27 18:21:34 -08:00
Abhijeet Dharmapurikar
2acc8a93ff power: pm8921-bms: charging curve adjustments
It was observed that while charging the reported soc sometimes reaches
100% before end of charging happens. At other times it does not reach
100% at end of charge and a abrupt jump to 100% soc happens.

Fix this by linearly increasing soc based on battery charge current
after constant voltage phase is reached. Constant voltage phase is
reached when battery voltage reaches the max value.

Also once constant voltage phase is reached and the voltage or charge
current decreases keep reporting the earlier soc. This could be because
of a transient system load.

Change-Id: I14c2f42d7897041db038ce85ce1124cf1ef261af
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-27 18:21:22 -08:00
Manu Gautam
82dfa13354 usb: msm_otg: Add support for separate ASYNC IRQ to exit LPM
Some USB cores have a separate IRQ line for issuing ASYNC
interrupts in LPM. This interrupt needs to be enabled only
when hardware is put in low power state.

Change-Id: Ie7de237ccbaa90294b20d3fce594ec280cb1641a
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2013-02-27 18:21:21 -08:00
Abhijeet Dharmapurikar
fbb8dc031a power: pm8921-bms: limit voltage correction
The "adjust_soc" algorithm where we change the open circuit voltage
(ocv) in steps so that the state of charge (soc) starts approaching
the estimated soc, causes nonlinearity in the soc curves if an incorrect
resistance value is fed to the algorithm.

As battery ages and temperature changes, it is hard to estimate the
exact battery resistance.

So to fix the nonlinearity, limit the amount by which the ocv is
changed. Make it proportional to the current, i.e. change ocv by
small amounts in light load and let it change by proportionally
large amounts in heavy load situations.

Also, make the point where the soc is adjusted configurable via platform
data instead of forcing it to 25%.

Change-Id: Idc141e6bf3172dab278afe1900f5a1f9cdd624dd
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-27 18:21:12 -08:00
Abhijeet Dharmapurikar
e10943c916 power: pm8921-bms: provide option to ignore shutdown soc
Few platforms do not want to use the shutdown soc. Provide a option to
selectively disable it.

Change-Id: Ie57d474f4e81e4ce2e7e7a4a92cda20d4c8dd184
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-27 18:21:10 -08:00