usb: dwc3: remove unused platform glue

Change-Id: Ic072626d3848c637af05b150118db0dbfa4aa79f
usb: dwc3-msm: do not change USB power supply's 'type' property

Since USB_DCP type is considered as "Main" type power supply,
USB type power supply doesn't need to update its type to USB_DCP.
If USB type power supply have not "USB" type, some userspace code
cannot parse USB power supply's property.

Change-Id: Ibd2ec8cb4a23af47da586110279abdee7ab3b459
usb: dwc3-msm: handle USB_DCP as AC type power supply

To handle USB_DCP type charger as AC type charger, when
USB_DCP is detected, update AC power supply's property
instead of USB power supply's property.

Change-Id: Ib60e01c2520e16ec0f6d8c83abb19b06f2602b38
usb: dwc3-msm: add OF property for adc thresholds

Change-Id: I8222bfd9248ae2ca3d794692ffee42f9c133e638
slimport: support 500mA charging with slimport.

dwc3_otg codes will be used for slimport charge detection.
when TA is inserted to slimport cable, (while cable connected to usb slot)
500mA charging will activated.

Change-Id: Ie7f53f967d3e912ae395d0a1adee33ad9aa56277
usb: dwc3: start charging before device enumeration

In case of SDP charger, charging cannot start before
usb enumeration. But in some application, it is needed
to start charging even though enumeration is not finished.
So this patch enable charging before enumeration.

Change-Id: I38bf61d227c3cd5167465cbed96ee3002b0b11eb
usb: dwc3: fix missing AC charger removal

Current implementaion cannot detect AC charger removal.
This patch fix it.

Change-Id: I2978902723fd67ba79a1551b24063d0ca37d5207
hammerhead: disable the uart console as default

Analog switch for Headset and UART has crosstalk issue. It makes a noise
when using headset due to messages via uart. So only enable the uart console
to avoid crosstalk issue when using earjack debugger

It will be enabled if detected earjack debugger

Change-Id: I66dbf139a1e6c9a78c316824fe8110d7130eaae0
Signed-off-by: Devin Kim <dojip.kim@lge.com>
usb: gadget: increase the notification packet max size

LGE host driver's notification packet max size is 16.
We need to increase max packet size to 16 from 10.

Change-Id: I8a1f8b731b92bddc52c43d32792822246c7e0885
Signed-off-by: Devin Kim <dojip.kim@lge.com>
usb: dwc3-msm: remove unnecessary power supply changed event

Since the setting of POWER_SUPPLY_PROP_TYPE is doing nothing,
it is not needed to happen power supply changed event.
Remove unnecessary power supply event.

Change-Id: I2d733a5d1f0feb5755b3e9d5ec09083eb3803736
Signed-off-by: choongryeol.lee <choongryeol.lee@lge.com>
usb: dwc3-msm: skip current setting in case of DCP charger type

In case of DCP charger, since the current setting is done by
charger driver with appropriate value, otg driver doesn't
need to set current limit. To prevent conflict of current
limit setting with charger, skip it in case of DCP charger type.

Change-Id: I040f22440ace24ec2a22ca368d0056427099e78c
Signed-off-by: choongryeol.lee <choongryeol.lee@lge.com>
usb: charger: increase charger detection time to 10s

prevents incorrect detection of TA until poll of 10s

Change-Id: I5a76df9a579b9b175191119fb02126eac7e9957f
Signed-off-by: mohamed.khadri <mohamed.khadri@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
usb: dwc3: Fix wrong mA setting in USB/TA removal while slimport connected

When slimport dongle is connected with USB/TA, should not set mA value
if USB/TA removal happens only.  Otherwise, otg will detect wrong mA value
(500mA) even if we connect TA charger after removing slimport dongle.

Change-Id: I7fbff96050d306d84399518a1673cddfde36daa9
Signed-off-by: jihyun.seong <jihyun.seong@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
usb: gadget: audio: use configured interface nums for audio control/stream

Change-Id: I75decdc810497e95bef0cfac793791cdd803b7ca
Signed-off-by: mohamed.khadri <mohamed.khadri@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
usb: dwc3: add option to remove vbus power setting

Add option to remove vbus power setting in gadget driver.
This option can be set through device tree to keep
battery charging in usb suspend mode.

Change-Id: Ie53290701608a0ea01595bac2e681a41240b22d4
Signed-off-by: choongryeol.lee <choongryeol.lee@lge.com>
usb: dwc3: reduce the charger detection dcd poll time to 1.5s

There are some old chargers which have dp/dm floating. Since
that charger are out of spec, usb driver cannot detect charger
type until poll retry end. Previously it took 10 sec.
Reduce the charger detection retry time to 1.5s for quick
abnormal charger detection.

Change-Id: Idf671f23c2372aeed0b279865fa2c4f2088a8d31
Signed-off-by: mohamed.khadri <mohamed.khadri@lge.com>
Signed-off-by: choongryeol.lee <choongryeol.lee@lge.com>
usb: dwc3: read charging current from slimport driver

We should read the value of charging current from slimport driver.
Slimport dongle would support for different charging current by its
own type. So the slimport driver should be able to decide the value.

Bug: 10859143
Change-Id: Idd395d1cca17792182a6ccd3284256e806227e33
Signed-off-by: jude84.kim <jude84.kim@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: choongryeol.lee <choongryeol.lee@lge.com>
drivers: cpufreq: Send a uevent when governor changes

 * Useful so userspace tools can reconfigure.

Change-Id: Ib423910b8b9ac791ebe81a75bf399f58272f64f2
cpufreq: Fix broken uevents for cpufreq governor and cpu devices

cyanogens uevent commit when the governor changes was rendered
non-working since kitkat (or so) as the uevent filter function
caused events to be dropped. Now hook into cpufreq_core_init()
and cpufreq_add_dev_interface() to create our basic ksets for
cpufreq and cpu devices. Also, we don't need to set environmental
data, so clean it up a bit.

This commit requires a change in ueventd.rc that add rules for
several files of interest.

Change-Id: I3aafa0d4e18363e1d68535f513099ecd27024007