This change implements the docking station detection by reading the status
of MPP9 on PMIC8921. With this change VREG_5V(USB port 3 VBUS) is turned on
only when docking station is connected to Liquid platform in order to save
power.
Change-Id: I4282b4273adabf8aeaf8faad43cd2cfff36eeac6
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
From 8960 onwards, application processor handles master diag. Other
slave processors can come up on different time. This change will
update each slave processor with latest mask info when it comes up.
Also each time, any PC tool tries to change masks, application processor
will propagate this new mask info to the peripherals. Now, this mask
updation tasks need to be delayed. Hence, such tasks cannot be put on
regular work queue. Thus, this change also adds a new work queue for such
tasks.
This feature also requires latest build time masks on apps processor. Thus,
updated the build time masks as well.
Change-Id: I5120c3d507230d3209773cc9f929a8f2f0bf0a3d
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
1. Add OTG PET device to TPL. OTG device shall support this
device for allowing compliance automated testing.
2. Add otg_srp_reqd filed to gadget. OTG B-device shall enable
this flag when OTG PET (Protocol and Electrical Tester) that
acts as A-device sends Set Feature TEST_MODE with wIndex high
byte value = 0x06. OTG PET expects B-device to initiate SRP
after the end of current session.
3. Add otg_vbus_off to usb_bus. USB core enables this flag
when OTG PET enumerates with bcdDevice[0] field in its Device
Descriptor is equal to 1. OTG PET expects A-device to turn off
the VBUS with in 5 sec of its disconnection which allows it to
initiate SRP.
3. Add support to identify OTG PET and start HNP quickly.
Change-Id: Ib1f4d835d00ca29ff8f980c94d75a3890507dedc
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
This patch fixes the following OTG related bugs:
1. The current code does not wait for the ongoing HNP polling work to
finish upon the device disconnection which results in a crash when
accessing the udev structure in hnp polling routine.
2. bcdOTG field is added to OTG descriptor in 2.0 revision. Check OTG
descriptor size before validating bcdOTG field. A legacy device sends
2 bytes lesser than the size of OTG descriptor specified in 2.0 spec.
3. The host is required to execute a GetStatus() with a frequency of
THOST_REQ_POLL in order to determine the state of the Host request flag.
The limits of THOST_REQ_POLL are 1 - 2 sec. Use the average value 1.5 sec
for HNP polling to pass compliance tests.
Change-Id: Ie6a6a8e915d10c1347946f979c919d04d64823b4
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
If gadget is OTG capable, respond to a GetDescriptor(OTG) request
with its OTG descriptor. This patch adds a utility to function
to find and fill the requested descriptor.
Change-Id: I5b3624b1145d46179b0c4737e82a47c68604cab4
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
One frame can have multiple slices or NAL units in the
encoded bitstream output. Core can give slices information
to the driver, if slice info metadata enabled, which inturn
will be sent to the client as extradata in output buffer.
This change will enable the core with slice information
extradata feature.
Change-Id: I52935a641dc7b4921da602b0132f0b81463b5cc8
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
The compander system is intended to increase the dynamic
range of an input signal. But for the wcd9310 codec,
this feature is to use companding in a novel way in the DAC
converter path to increase the signal noise ratio.
The change is to add the compander support to wcd9310
codec. The dynamic compander enable/disable during stream
playback is not supported.
Change-Id: I916a5e4cc0a06516a691bbdcdf0103dcb7b0398c
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
Add an API to enable/disable interrupts from the chip.
This API uses func0 SDIO_CCCR_IENx register to enable/disable
interrupts from the chip.
Change-Id: I2da8d569511aeff0409744a90e7daf4704fff91d
Signed-off-by: Pavan kumar <pavan@codeaurora.org>
If a firmware upgrade fails, on subsequent boot retry a firmware
upgrade based on the bootloader id. This can be initiated through
the userspace program by writing into the update_fw sysfs entry.
Change-Id: I1d428c52f2cbfff8fe572a2bc6f0cd124111b810
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Low resolution UI is observed on HDTV connected with HDMI.
FIR (QSEED) algorithm needs to be used instead of pixel
repetition to improve the performance in case the BYPASS
composition is not used.
CRs-fixed: 332123
Change-Id: Ib4c2b107b4ae1300458cccc7e8066d31aee50a0d
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
When camera userspace daemon crashes, the server fd
will be close, which trigger the msm_server_close
function, we will check if there is an active camera
session. If camera is active, we will send a v4l2
event to HAL layer to signal an error. Application
will exit gracefully and close other open fds and
exit camera session.
Change-Id: I14ebc864d6cace7ca6f4dbfb935623a76eeccaa8
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Clients need to be able to do cache operations
on ION buffers in the kernel. Add API to
flush, invalidate, or invalidate and flush the
cache of an ION buffer.
Change-Id: I2b676dbe32372b3c17e4aaf39f51878b105a699c
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
This allows firmware upgrade only when a firmware name is provided.
The platform data (config data) of the latest firmware will point
to a NULL string which prevents auto firmware upgrade at boot
(if enabled by the userspace).
Change-Id: Ifef57a9dab9306cf4f1fe7a6c7e52c5e92a25d4a
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Create ION client and allocate buffers based on
the client handle and free the buffers when no
more needed
Change-Id: I00be9dbd3e8f5eff286d8f1bc0d61656866bf360
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
Return the reset status of the GPU unit when
IOCTL_KGSL_DEVICE_GETPROPERTY is called with
type KGSL_PROP_GPU_RESET_STAT
Change-Id: I4bb17be959eadba3ba491d94c6fd4f5824442e92
Signed-off-by: Shubhraprakash Das<sadas@codeaurora.org>
* changes:
power: pm8921-bms: add api to simultaneously read vbatt and ibatt
power: pm8921-bms: calibrate xoadc more often
power: pm8921-bms: add protection against divide by zero
power: pm8921-charger: fix 10mv error on vdd_max
power: pm8921-charger: fix reverse boosting
The compensation algorithms need simultaneous readings of the battery
voltage (vbatt) and the current flowing through it (ibatt).
One needs to put the BMS in override mode to get simultaneous vbatt
and ibatt readings.
Note that since one would need to sleep for 20 milliseconds after the
BMS is put in override mode the spin_lock is changed to mutex in the bms
driver.
Change-Id: I1bfdc1f4e84d5d3c2cd6502dd66afdfba650cc0d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Improve the values of the battery voltage read from xoadc by periodically
calibrating the xoadc.
The xoadc needs to be calibrated every time a charger is plugged in
or plugged out. This is because the reference voltage shifts a bit
when a charger is plugged in.
Provide an api to calibrate xoadc. This api will be used by the charger
driver.
CRs-Fixed: 334825
Change-Id: I09735f6e5c5d4ab8be379fe001fff81c25c95397
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
PM8921 LPG banks can be configured to connect to DTESTx.
These DTEST lines can be used to observe LPG output.
Provide a feature that allows to enable DTEST modes for
a given LPG channel.
CRs-fixed: 337902
Change-Id: If881eb089aea2a66f7324af8ac906405eef4f81a
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Add support for 5 RX and 4 TX Slimbus channel support.
Headphone/Earphone/4 DMIX/2 AMIC and IIR1 support
Change-Id: I1b7ad5e5fd9d87aab80d6533503371e63df8cc0a
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
The current core assumes TABLA as the only codec driver registering.
To support single binary for multiple targets its essential that
we remove this restriction and move to a generic framework
to support multiple codec. This can be done by moving all codec
specific code to dedicated codec driver and use core driver to probe
the codec based on slimbus device id and do generic setup for the
codec. This also helps to have same boards with different flavours
of codec variants.
The WCD9XXX family of codecs share the initial codec register
mapping which holds the Slimbus device id to identify the
codec existing on the target.Core driver now registers the
codec device based on this check.
Change-Id: I4c43d5f04c20696f4f5138411460681ec7879d34
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Enable IMEM clock for Inline mode. For Inline mode, VFE writes MCUs
of frame to IMEM and GEMINI reads it from IMEM and encode the image.
Sync VFE, IMEM and GEMINI clock to 228MHz. VFE and IMEM are running
at 228MHz. But Gemini was running at 158Mhz that creates bootleneck and
generat overflow irq error.
Add VFE_OUTPUTS_JPEG_AND_THUMBANIL operation mode to fix
FE overflow IRQ error in gemini.
Change-Id: Iaf20892d33d30e7cb8d6ab5fd75551aff260098f
Signed-off-by: Jignesh Mehta <jigneshm@codeaurora.org>
Provide commands to get/set the On channel and Off channel detection
threshold search parameters to optimize the FM search performance.
Change-Id: Id232ffe2d1231fbd44bb34b4b98263434763b7c0
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
To ensure proper battery id dectection on LiQUID and MTP
use machine_is_msm8960/8064_mtp/cdp to determine which
calibration data to use for battery. If platform is
unknown fall back on regular battery id detection.
Change-Id: I2f5629572d1e5fcac0a2feb114947b91a96f3bf0
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Add the calibration data and battery ID information for the
Desay 5200 mAh battery which is used in LiQUID platform
devices.
Change-Id: I19ff1251ee3e71fa71d4fa0c83143d4b7667a80c
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
This patch adds support for EHCI compliant USB Host Controller
for Liquid on 8064.
This driver supports Host only mode and is different from ehci-msm
which relies on OTG driver for putting hardware in low pwer mode
and PHY initialization as well.
Change-Id: I84b63b2577311900a0b434f53df547bad62f6316
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>