Initialize the op_mode register and program the direction_enable
field in this register correctly
CRs-Fixed: 1008505
Change-Id: I2dbcb8eb1ef5c6e0ebcbfb9f298a14344fbe7ce3
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Enable VADC_HC and BTM peripheral driver on PMcobalt
to support reading and setting thresholds on ADC
channel such as voltage phone power(vph_pwr) and
thermistors.
Change-Id: I783d87714145f58fefc9e1e6a09d1ecfab56744b
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
The current method of cat-ing register file dumps the entire
address space. One can use dd command to dump a subrange within
the address space. However one needs to know the string length
of each line which is derived from max address, the character
length of each register entry and the format.
Provide simple means to dump a range by allowing user to specify
the start address and the count of registers. When the data is read
convert the dump address to a starting position in the file. Similarly
if the file offset goes beyond the dump range return 0 to indicate
that the data is already dumped.
Also provide means to write to a register address.
CRs-Fixed: 1001770
Change-Id: I3466ce89007d127151f6760328edad116d679db8
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Support retention by checking interrupt status rather than logical
address register. During retention, interrupt status is zero'ed but
logical address may be retained to avoid report-present generation.
Change-Id: I9e7f24c5f4eb722643bf3fac2d5c898ad107dd24
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Update v4l2_event32 structure with updated elements
from v4l2_event structure. Also copy and update
reserved and other fields during 32 bit ioctl handling.
CRs-Fixed: 1013345
Change-Id: I3038a2c0c7f2b7f13c412dc04890744d8dbe37ee
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Enable Coresight drivers for msmcoblt. These devices can be used to
configure and enable trace functionality on msmcobalt.
Change-Id: Ib4b50d7df15114d417898c36b229441766bd5b42
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Add the property to determine GPU bitness which
is used by the clients via KGSL ioctl.
Certain clients of KGSL such as Open-CL driver
need to know explicitly about the GPU mode.
Change-Id: I77523d7816edb9776014aaf3aa85321af0d20aaf
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
The host AHB aperture for reading the HSLQ/SP/TP and shader memory
blocks might be blocked on A5XX targets so use the CP crash dump
utility to read them instead. Downside if the crashdumper goes boom
we'll have to skip those registers in the fallback.
Change-Id: Ic0dedbad3c7b485c696198bdfcb78d45e929ec22
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
A505 GPU is having two different frequency plans, for
loading a specific frequency plan add speed bin read
information capability to A505.
Change-Id: I259020d7e4613d043e213ab2cb41e80ceb11f46a
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Do not allocate memory for IB descriptors for commands
of types profiling buffers, sync and markers.
This fixes the memory leak due to allocation of
memory for such commands and these were never freed.
CRs-Fixed: 996651
Change-Id: Ib168d60ad89e0fd55cd1f10b773b7cdaa7400ace
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
This change includes the below:
- Add 1M and 8k pools and structure the allocator to use all pools
from the largest page to the smallest
- Reserve a set number of pages for each of these pools at init time
- When allocating, use the reserved pools and then fall back to
allocating from system memory using only 8k and 4k pages
- Remove maximums on the pool sizes
- Zero the memory when we create the pool initially and add pages
back to the pool on free
CRs-Fixed: 995735
Change-Id: I9440bad62d3e13b434902f167c9d23467b1c4235
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
When IPA clock is enabled, suspend bit is cleared
and if pipe is non-empty EOT is posted internally.
At the same time, there is a possibility that SPS
driver posts EOT. This can result into incorrect
state of polling state and switch to intr mode is
tried repeatedly. Make a change to check if we are
in intr mode already in addition to the polling state.
Change-Id: I1af08605f7d2d234b0e5a4e3c8928db6cff5c7b4
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
There is a new Qualcomm Technology Inc. Plug-n-play(QPNP) PMIC chip,
which introduces brand new flash LED hardware. The new hardware
comes with up to 3 LEDs support, different register mapping layout,
and different torch enablement requirement. Therefore, a new driver
is introduced to cover this need.
Change-Id: Ic878f1a946955edff3a9228e7fe54b7a525e37b1
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Update the Venus clock frequency for different Venus load. There
were kernel panic as the BIMC clocks were OFF. Add the bimc_smmu
gdsc to turn ON the BIMC clocks. Add secure context banks.
Change-Id: I120ce95ea20434b41ac88a5d686b994630516435
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
enable rndis_ipa on cobalt build to support
IPA-offload data path.
Change-Id: I98c462b56dbe01930456a16d5eeb6646b0a2db83
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Change the touch screen to match WQHD display
Change-Id: Ia0b77f23b26941ea2a53451ae61c46aa0ada731c
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Add API in slimbus driver for clients to get the
matching ID table which helps in accessing driver
data and name fields.
CRs-fixed: 975738
Change-Id: I09c9f1de74e348b032d215cbb0fb9ba6c7aecf18
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Currently ipa_usb_init_teth_prot() is called before gsi_bind()
gets called as a result of usb_add_function() call. gsi_bind()
is polulating ipa_init_params which is passed to
ipa_usb_init_teth_prot(). Since usb_add_function() is getting
called later after gsi_bind_config() returns, ipa_init_params
remains unpopulated and results into ipa_usb_init_teth_prot()
returning failure. Fix this issue by moving the call to
gsi_bind(). This also matches to ipa_usb_deinit_teth_prot()
call in gsi_unbind().
CRs-Fixed: 1013830
Change-Id: I824d3fa62e2736962680ae1c883b9a2916346331
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
dep name needs to be updated only for non-gsi endpoints
since gsi endpoints are statically assigned. Due to merge
from previous kernel dep name is updated twice upon ep
disable. This is causing gsi ep names to get modified
resulting into failure in finding the original gsi ep name
upon function bind. Hence update the dep name only once
at the end of ep disable and skip it for gsi eps.
CRs-Fixed: 1013830
Change-Id: Iea9282cc8fb4f13d066d25c63ccb1da1881c0a8a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
gsi driver does not call the gadget API usb_ep_enable()
instead uses gsi ep operation call back to enable gsi ep.
As a result ep->enabled flag remains clear. Later function
driver calls usb_ep_disble() API from gadget framework and
ep disable operation gets skipped. This causes start transfer
command to fail next time when gsi ep gets enabled. Fix this
issue by calling gsi ep disable operation instead of calling
gadget API.
CRs-Fixed: 1013830
Change-Id: I06570dec368b430321ec196a5e4338f657c43b42
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
gsi driver does not call the gadget API usb_ep_enable()
instead uses gsi ep operation call back to enable gsi ep.
As a result ep->enabled flag remains clear. Later function
driver calls usb_ep_disble() API from gadget framework and
ep disable operation gets skipped. Fix this by adding gsi ep
operation for ep disable. This makes the enable and
disable ep operations both handled by gsi ep ops.
CRs-Fixed: 1013830
Change-Id: I5caa9a839b9fdd144af0a59a7c605777f7a3a659
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Call flow control API when RNDIS packet filter control message is
received. This allows to call the registered flow control call back
from rndis clients supporting hw accelerated path.
CRs-Fixed: 1013824
Change-Id: I87793e31d4db10acf1103127a2d1ad942d253c67
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
In case w_index or w_value of an OS descriptor does not match
for a device or an interface, value remains set to -EOPNOTSUPP.
This is assigned to an unsigned request length and becomes a
large integer value. When driver tries to allocate a buffer
of this large integer value DMA allocator complaints for out of
SW-IOMMU space. Hence check this variable for negative value and
return without queuing ep0 request.
CRs-Fixed: 1013316
Change-Id: I705d0d54fb17ca3042533f0106f91912215bd52a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
configfs_dev_cleanup function can double free os_desc
and buffer when called from different context. For
example, this can be called from composite_unbind() and
when composite_bind() fails. Fix this issue by setting
request and buffer pointer to NULL after kfree.
CRs-Fixed: 1013316
Change-Id: I6e87289627b23fc368f990fc7962854eeb3fbbc1
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
The hmss_gpll0_clk_src RCG only needs an SVS2 vote on CX
to run. Update the FMAXes in the linux clock driver.
CRs-Fixed: 1013237
Change-Id: I31aaeb7cf965bfbee4aa219936d8e298899b61a8
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Commit b7d5b597f16a ("regulator: cpr3-regulator: add support for
configuring CPR IRQ affinity") added a call to
register_hotcpu_notifier() but did not add a call to
unregister_hotcpu_notifier(). Correct this so that the IRQ
affinity notifier is unregistered when a cpr3-regulator device
is unregistered.
Change-Id: I6379559e201f14a0fd46c1e06761fae356ec9813
CRs-Fixed: 949650
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add support for the partial binning open-loop voltage fuse values
used on MSMCOBALT chips. Raise the voltage applied for lower
corners when specified by the fuse values in order to ensure
stability.
Change-Id: Ia3f95778d0dab1be9d15fa95d1fc5624606689ec
CRs-Fixed: 1009279
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add voltage regulator support to power the WLAN hardware.
CRs-Fixed: 982993
Change-Id: Ic36ac920497d05131ef8162a42ee5318600a3473
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
Fix the potential memory leak in panel_debugfs_create_array func
by freeing the allocated memory in error return case.
CRs-Fixed: 1005536
Change-Id: If2bf7dbe7caedfa42337639fea739974f99960b4
Signed-off-by: Ping Li <pingli@codeaurora.org>
Add voltage and current specs for regulators for the
Synaptics driver.
Change-Id: I94c7d5b20fc73ba49b0c8613297f0514fedb3d97
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
Set the PP feature cfg_payload properly to avoid invalid pointer
cases.
CRs-Fixed: 1004933
Change-Id: I44314b49a6ebb5dedfdedfcddd88c12eabd1f125
Signed-off-by: Ping Li <pingli@codeaurora.org>
DISPLAY_MISR_LCDC block doesn't have corresponding mdss_mdp_misr_table,
this change corrects the block id check for mdss_mdp_misr_table.
CRs-Fixed: 1001224
Change-Id: I74b03c31542d4b239eb2ffdc4dc6345dff5eab86
Signed-off-by: Ping Li <pingli@codeaurora.org>
Correct rotator chroma alignment to 128 byte for nv12 ubwc format. Chroma
block artifacts are seen without this correction.
CRs-Fixed: 1013358
Change-Id: I715094188dc2b61c04879f8f6ce7b2c8f2d815c5
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Add apps side data port entries for audio slimbus instance based
on audio usecases.
CRs-Fixed: 1003083
Change-Id: I4fd83519ab75a1d979573b63761676f7c99593d4
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Add device node for the USB PD PHY peripheral found in PMICOBALT.
Reference this from the USB3 node as its extcon device as it
provides notifications of cable insertion/removal.
Change-Id: I42916b13e5d28dd3f3b0ed40c53767cbd7ae32b1
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Enable USB_PD_POLICY and QPNP_USB_PDPHY drivers which
support USB Power Delivery.
Change-Id: I44a385af5c68b0bf656fc705a07251850fb38fde
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Add sysfs attributes that will live under /sys/class/usbpd/usbpd0
which will give state information such as:
- received PDOs from the peer source
- whether an explicit contract is established
- selecting a new PDO (thereby sending a Request message)
- current and supported power, data roles
Change-Id: I5c3cf9a0239c0274709a1771e4fda8c6f5baaa77
Signed-off-by: Jack Pham <jackp@codeaurora.org>
This change adds protocol layer handling as well as the
policy engine state machine.
Change-Id: I5323f82192960d1fd7d3a20baf040d6d80c06be5
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The QPNP PD PHY resides in the PMIC and handles USB Power Delivery
data transmission and reception over the CC lines. This driver
communicates to this device over SPMI or I2C buses. Introduce APIs
that upper layers will use to implement the protocol layer and
policy engine.
Change-Id: I75dec23c297fd5e07d14741e6627b473012b7a01
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Add PD policy engine driver. This driver will interact
with the charger/Type-C module via power_supply framework,
and in turn notify the USB controller on when to begin/end
data operation using extcon. For this initial patch this
driver is simply acting as a pass-through between Type-C
connection states and relaying them as USB/USB_HOST
notifications.
Change-Id: Ieba8e68761beef83a572b75b6b5f3b7ab7802e9e
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Enable QPNP_SMB2 device support for the msmcobalt platform.
CRs-Fixed: 1005389
Change-Id: I0ecabc0febd38ad55cee69bb415a0856a3e83a73
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
QPNP SMB2 charger controls enabling VBUS and VCONN regulators.
- VBUS is used to support OTG connected devices
- VCONN is used to support Type-C powered cables
Add regulator devices for VBUS and VCONN.
CRs-Fixed: 1005389
Change-Id: Ia8dd2d6c8d51765dc49bdfa15565aed09c6a3893
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Add the QPNP SMB2 charger device that is present in PMICOBALT.
CRs-Fixed: 1005389
Change-Id: I03be96c229095b666d8e1a84c718989d84ec506e
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
The QPNP SMB2 charger driver supports the charger peripheral present in
the PMICOBALT chip.
This charger peripheral is common among other chips, therefore the
driver uses the smb library to support all common functionality.
Register access is provided by the parent device via regmap. Interrupts
are controlled by the parent device, and handlers are registered by the
QPNP SMB2 charger driver.
The power supply framework is used to communicate battery and usb
properties to userspace and other driver consumers such as fuel gauge,
USB, and USB-PD.
VBUS and VCONN regulators are registered for supporting OTG, and powered
Type-C cables respectively.
CRs-Fixed: 1005389
Change-Id: I160ce3c8caae6999f52590099cf6d1de957dbbaf
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Harry Yang <harryy@codeaurora.org>
A library of common structures and functions that should be used by all
charger drivers that support an SMB charger peripheral.
The library includes high level register read/write access, interrupt
handlers, voter callbacks, and power supply property getters. It should be
extended with any functionality that can be leveraged by an SMB charger
peripheral.
All drivers that support an SMB charger peripheral should define their own
struct smb_charger to interface with the library.
CRs-Fixed: 1005389
Change-Id: I36796332af667874c1246ec35984122d45de6938
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Consumers may not want to specify a callback, especially for boolean
votables which only care about the state of the client votes rather than
reacting to a change in the effective result.
CRs-Fixed: 1005389
Change-Id: I72274126a382ef8e32d89e1e8aa98348aaaac420
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
The correct function is prempt_enable_no_resched(). The other
function is reserved for the scheduler core.
Change-Id: Ib36697de003f6a59a608a0024d5351dc15ff8715
Signed-off-by: Todd Kjos <tkjos@google.com>
Git-commit: 776e5bca6446b3aac03b4685b4f4f72446ddcba0
Git-repo: https://android.googlesource.com/kernel/msm
[odhyade@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Omprakash Dhyade <odhyade@codeaurora.org>
Use wake_up_interruptible_sync() to hint to the scheduler binder
transactions are synchronous wakeups. Disable premption while waking
to avoid ping-ponging on the binder lock.
Change-Id: Ic406a232d0873662f80148e37acefe5243d912a0
Signed-off-by: Todd Kjos <tkjos@google.com>
Git-commit: 443c026e90820170aa3db2c21d2933ae5922f900
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Omprakash Dhyade <odhyade@codeaurora.org>