WiPower charging depends on VADC which is not yet ported. Disable
it for now in order to allow pmi8994 charger to work for other
use cases, such as USB charging and detection.
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Since the config object is created on the stack, ensure that
it is initialized to zero. Otherwise an invalid pointer access
may occur when trying to dereference the cfg->of_node pointer
that's typically left unset.
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Enable USB_GADGET, USB_CONFIGFS and several of the most used
function drivers to allow device mode operation. These drivers
provide functionality previously provided by the Android gadget
driver.
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Enable DWC3, QUSB and QMP PHY drivers to support the USB
controller hardware. Also enable XHCI_HCD for USB host mode.
This is the second take, after fixing compilation errors in
dwc3-msm.c.
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Fix link errors when USB_GADGET=n which causes dwc3/gadget.c
not to be built. These symbols are only used in the msm_ep_config/
unconfig functions so we can conditionally compile them.
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Add functionality for configurable hi, low and critical low.
Change the trip point attributes to allow userspace clients
with root access to set temperature for configurable hi and
low temperature.
Change-Id: I25c9c3bcfd58e44da5369187d1095559062f1860
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
This reverts commit 383ac33a1e2ab375e41387cf05132533ae178c36.
The temperature sensor drivers registering with thermal
core framework can call the thermal_sensor_trip() API in
interrupt context. This might cause potential thermal
reset issues because the interrupt might be disabled till
this API returns.
Change-Id: I8d6dfc55386fbdea8e51e7abbb0e7632208c6c38
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Add separate threads for sysfs notify. This is required
so that any thermal trip is not blocked while handling
sysfs notify.
Change-Id: Ifee206c29fd1b3c226a342b7f048250d5062397e
Signed-off-by: Shiju Mathew <shijum@codeaurora.org>
[imaund@codeaurora.org: Resolved context conflicts and updated a call
of INIT_COMPLETION to reinit_completion]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
Program the thresholds every time regardless so we guarantee
the threshold is programmed. Previous code didn't reprogram
the threshold if it was already believed to be set. This
check can be wrong is some cornor cases.
Change-Id: Ie94cb40302c585b2b779da57ad70d32cc2445c96
Signed-off-by: Jeff Bernard <jbernard@codeaurora.org>
Lock the sensor threshold list during notifications so it
isn't updated until notifications are sent out nor can
something else update thresholds until all notifications
are sent out.
Change-Id: Iafce75fa7fceda3de867044861e4a2e3eef47c95
Signed-off-by: Jeff Bernard <jbernard@codeaurora.org>
Add support to notify the userspace through sysfs
notification when a userspace threshold is crossed.
Change-Id: Ifdea7f15f288d1dca5365aedad16d1bdbc80be6c
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Currently, there is no API to query the current temperature
in sensor framework. Add a generic API to get it.
Change-Id: I038e9a118e77eb6a3599b7d45a0cc8757990d2ef
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Conflicts:
include/linux/thermal.h
Fix the thermal sys code to pass the proper trip type
expected by tsens driver to get the tsens trip
temperature.
CRs-Fixed: 608753
Change-Id: I527af21bf13d8c5a93b92b34fa5f05c527a08bcd
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Add NULL check for sensor name before using it in sensor_get_id and
return NULL explicitly when sensor id is not valid in get_sensor of
thermal core.
Change-Id: I4200a5691183aa2d40ef8ed64554f0beb8ce6d0d
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
Add new API to enable or disable the kernel client's trip
threshold request. The enable or disable trip threshold requests
from different kernel clients and userspace client will
activate/deactivate the corresponding clients threshold request.
Modify thermal sys framework to include only the active
thresholds from clients to determine the current trip
thresholds for tsens.
CRs-Fixed: 561775
Change-Id: I304ac00daa8a0a1a68b60153c29ee6cb5c3507b1
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
[joshc: drop msm_thermal chunk]
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Sensor threshold min and max are calculated to be binding around the
current temp, but they fail if there no thresholds available with the
min < curr_temp and the max > curr_temp.
Fix negative temperatures handling.
Change-Id: I124d2a9249f705d41469b8e0efffe2dfdf05e292
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Negative temperature values can be set by thermal clients
to the TSENS driver. Having unsgined long type prevents
clients using the set_trip_temp() thermal api to set
negative temperature values. On msm-3.4 kernel this api
had support to set negative temperature. Change the type
to support the negative temperature.
Change-Id: I987aed5a291b76d8360a9256cad0ff0c1adb06c8
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Sensor API allow drivers to set min or max thresholds and get
notified when the corresponding sensor crosses these thresholds.
The sensor API, uses the THERMAL_TRIP_CONFIGURABLE_HI and
THERMAL_TRIP_CONFIGURABLE_LOW, to set the threshold. The existing
sysfs interfaces will not be affected by the newly added API.
Change-Id: I85d2ae132fc3b7b6d157faf0a7390e31fdc7e6da
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Conflicts:
include/linux/thermal.h
Add functionality for configurable hi, low and critical low.
Change the trip point attributes to allow userspace clients
with root access to set temperature for configurable hi and
low temperature.
Change-Id: I25c9c3bcfd58e44da5369187d1095559062f1860
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Conflicts:
drivers/thermal/thermal_core.c
Add TSENS Thermal driver. Include support to activate
a trip type and mode.
This snapshot is taken as of msm-3.14 commit 3bc54cf86b
(Merge "msm: camera: Add dummy sub module in sensor pipeline")
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Conflicts:
drivers/thermal/Kconfig
drivers/thermal/Makefile
include/linux/thermal.h
Change-Id: Ie8a089afc0cf9e45ac000dff425a3e6206c1b9b1
Currently, memshare relies on the system monitor only for
releasing memory for the allocated clients. It may happen that
XPU is still intact on the modem side while driver tries to
release the memory. This patch ensures that memory release only
happens if XPU is released.
Change-Id: I45716c0abe6bc08559854782ff73a332e148a7cb
Signed-off-by: Katish Paran <kparan@codeaurora.org>
Port the memshare driver and apply the following memshare driver
changes taken from msm-3.10 kernel branch as of msm-3.10 commit
4493220f memshare: Boot time allocation and handling
multiple clients
2ae4997a memshare: Donot re-allocate the memory for the
clients
059dcd59 memshare: Do not overwrite the response for the
failure case
ed6d183f memshare: Change the compatible property field
for child node
b473fc4e2 memshare: Free the memory after XPU unlocking is
done
95c114c39 memshare: Add query size api support for clients
60f310d4e memshare: Change dma attribute to
DMA_ATTR_NO_KERNEL_MAPPING
73075545 memshare: Remove local connection status variable
98dd2908 memshare: Place error check to prevent out of
bound access
Change-Id: Iecf0a9828efd1d56c309a2af882c13ce36e7fc06
Signed-off-by: Katish Paran <kparan@codeaurora.org>
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
Use proper printk format specifier to print phys_addr_t
type variable.
Change-Id: I7c55e44e813d8d41e1ead03280044c8542a24922
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Add support for HYP call to setup the sharedmem permissions
for the MPSS client.
Change-Id: I3b48ae962865d8d0a0ea6e3fbb8e21278b59c690
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
This is a snapshot of the MSM sharedmem driver as of msm-3.14
commit:
149717c082aab8168283b7e0c23d8bd5a45b1999
( uio: msm_sharedmem: Add custom mmap )
The following changes are included:
02d55287 uio: msm_sharedmem: Restrict debugfs write to root.
de961fc7 uio: msm_sharedmem: Return ENOMEM if the shared mem addr
is zero.
b974ce64 uio: msm_sharedmem: Add addtional information to debugfs
c46af547 uio: msm_sharedmem: Add support for dynamic shared memory
allocation
Change-Id: I49902f018bde1d59d41027b7e46268cc17231a3e
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
The IPC Router G-Link Transport permits IPC Router communication over
G-Link to the other processors in the SoC.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
IPC Router is a peer-to-peer, message oriented router that supports name
service and limited multihop routing for interprocessor messages in the
SoC.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
The networking module uses iov_iter library to manage the vector buffers
from user-space. Use iov_iter accessor functions to copy the data from/to
the user-space vector buffers.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Update the function signature of sendmsg and recvmsg operations.
Pass the kernel socket flag to the updated socket object allocation
function.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
qmi_encdec.h header file is no longer required in IPC Router. Remove
including that header file.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
IPC Logging is a low latency and minimal overhead logging framework used
by many interprocessor communication drivers such as GLink.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Using the physical counter leads to a kernel BUG_ON(). Update the
IPC Logging Driver to use virtual counter.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
The SMEM log allows certain log events to be synchronized between
multiple processors in the SoC.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
ion_cma_heap.o, ion_cma_secure_heap.o, and ion_system_secure_heap.o
all call functions which are only available if CONFIG_MSM_ION
is enabled.
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>