Currently, when a single channel's brightness is set, and then cleared
to zero subsequently, the LED stays on instead of getting turned off
because symmetrical brightness distribution logic does not allow the
paired channel's brightness to be set to zero. Fix this.
It was also observed that the brightness of a channel that is getting
turned off doesn't show up as zero, so fix that as well.
In addition, strengthen error-checking of the "qcom,led-mask" device
tree property.
Change-Id: I245ec2177b2ebe0f567eb96397dd13a05a587d60
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Update driver to initialize and do null checks for variables in
error path.
Change-Id: I4b012d856decd02dcc3e82d13213ddd529838e98
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
Add clock IDs for APSSCC clients to be able to request for clocks
from these clock controllers.
Change-Id: I284beb3b62a4f5c4521c7e7e0f9d068c469a85bb
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
Set saved cmac on ioctl from user space.
Write saved cmac to shared memory on SSR.
Read calculated cmac from shared memory.
Provide calculated cmac to user space via sysfs.
Cleanup unused IAR-STATE fuses.
Cleanup unused IAR-FEATURE-ENABLED fuse.
Read actual PIL area size from register.
pbl_cmac_show() returns binary rather than string.
Change IOCTL to use variable-size-array.
Change-Id: Ic4ea38685f6b9d1100a28bd958e44f513373fea9
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
To give sufficient time to die notifier to complete
their work, add a watchdog die notifier, to reset the
watchdog. Also, increase priority of watchdog panic
notifier and make minidump oops notifiers run after
watchdog oops notifiers.
Change-Id: Ifc53cc5c3b1ecc1554a971b9f2334319cad62bfd
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Current implementation only collect shadow register when host
force triggered RDDM.
Extend it to any RDDM scenario.
Change-Id: I8a14950b9b4cd42df016ecbb2eac6dc7d8ae115c
Signed-off-by: Lin Bai <lbai@codeaurora.org>
Define CPAS MP limit feature ids. This feature
information used for some target SKUs to check the particular
ISP HW is capable of how much max resolution during the probe time.
Define feature type disable, enable or value. Some features are enable
type, if bit is set in the fuse register means feature is enabled.
Some features are disabled type, if bit is set in the fuse
register means feature is disabled. Some feature are value type, here
multiple bit together make a value which indicates some feature.
Change-Id: I5a10eee2e42cbc26312968b02bb0f154f2684cb7
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
each register contain one parameter,
there is no need to read register before write,
it can improve time when change a mode.
Change-Id: Ifc9e7fd1f9bf9c6a048308dcc0cc2a476d1fc2d4
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
To support SA8155, we need the following clocks:
GCC_GPU_CFG_AHB_CLK, GCC_DDRSS_GPU_AXI_CLK.
Change-Id: Ie2b4ec643136c11c1fa679a12f20b72ced3a6263
Signed-off-by: Hui Li <hul@codeaurora.org>
Due to a race condition between the probe and glink message
callback, it is observed that the glink messages/notifications
can be handled even after the probe failure which leads to
an invalid memory access. Fix it by introducing "initialized"
flag. While at it, add few error logs to identify the exact
message failures.
Change-Id: I18e61dea734efde6a11ee072793da8eead269b12
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
currently when power up with no usb cable, chip only disable
when system enter suspend state, disable chip during probe
will consume lower power early.
another fix is no need to disable chip again for suspend operation.
Change-Id: I182b8d96c45c0225fed2be6b35c0aba488c0589f
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
In certain devices, LED channels are paired and connected to two
separate LEDs. Due to symmetrical configuration, a switch that controls
all four channels sets the same brightness value to both LEDs, which is
not the intended behaviour; hence, handle this case separately.
E.g. If flash0 (group 1) is set to 144 and flash1 (group 2) is set to
1056, current will be distributed evenly to all 4 channels like so: 300
mA would be set on all channels (as 144 + 1056 = 1200; 1200 / 4 = 300).
Change this to:
144 / 2 = 72 on channels 0 and 3 (group 1)
1056 / 2 = 528 on channels 1 and 2 (group 2).
Change-Id: Ie135811d59104cfa5551d17ebbb729a57c101099
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
The GMU streams events to the host by sending an HFI message
on the f2h debug queue. These messages will be processed by
by the f2h daemon. The HFI interrupt handler will add these
packets to a secondary list, not the primary list into which
the more time critical TS_RETIRE and other messages go.
The f2h daemon first processes packets on the main list
and then the ones on the secondary list to avoid delaying
the time critical packets. It then reads the events from the
GMU log in memory and writes them out to ftrace.
Change-Id: I3f6cc13f39c2a60d24f2b92c4a97bacef8036f85
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
Do not process HFI messages on the message queue in the interrupt
handler before interrupts are enabled on that queue. Otherwise, the
interrupt handler will read it off the queue, and then the inline
handler will not find any messages on the queue.
Change-Id: I569f29250c27a1a74e206489ad8234b2be39d448
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
GMU events will be streamed to the host if GMU log streaming is
enabled. Being able to view GMU events on the same timeline
as GPU and host events is helpful for profiling. Add a sync event
to map GMU AO counter ticks to the ftrace timeline just before
bringing the GMU out of reset.
Change-Id: I7e2696f4d0d8666a2fcdfccb358619277e5949b8
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
Currently, wireless FW update is done by the user once a FW file
is pushed to one of the firmware folders and with user writing
to "wireless_fw_update" or "wireless_fw_force_update" under
/sys/class/qcom-battery.
As per the recent requirements to add CRC check during wireless
firmware update process, add "wireless_fw_crc" property through
which the user can pass CRC before doing FW update. Since this
adds extra time for validating the CRC, increase the wait time
for FW update completion from 500 ms to 1 second. Also, print an
error log if FW update is not done.
E.g.
echo 0x1234 > /sys/class/qcom-battery/wireless_fw_crc
echo 1 > /sys/class/qcom-battery/wireless_fw_update
Now with adding this support, if CRC is not set, FW update would
fail as the charger firmware validates the CRC passed.
Change-Id: Id66cd84984b6206bf866ee1f18f7b32d9090c5dd
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
When the remote subsystem restarts (SSR) or the charger firmware
restarts (PDR), resend the ICL/FCC votes from clients like USB
driver, thermal SW once the subsystem is up.
Change-Id: Ia0da3747fdb98c7873b65c948b76f6b6a286e31c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
PMX65 belongs to the PMIC7 family of chips that makes use of PMK8350 to
read ADC data from their onboard channels.
Change-Id: Id0c51bc6c69568d6ea67e5067c8c81ebf6719b63
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
USB_CONFIGFS_RNDIS is currently enabled by gki_defconfig.
Although the upstream F_RNDIS driver can coexist with the USB
GSI driver, currently there is a conflict in userspace that can
result in choosing the wrong one. Disable the SW-only F_RNDIS
driver to allow the GSI driver to be enabled exclusively.
Change-Id: I272b632dda1e792931102f94554cd26065389b34
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Now that CONFIG_LEDS_CLASS_FLASH and CONFIG_LEDS_TRIGGER_TIMER
are enabled in gki_defconfig, remove them from lahaina_GKI.config
so that those modules gets updates from ACK.
Change-Id: Ie913c96eac0453b386fcee1d8a167da6da233e1c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Secure call may return session-id in the registers if the call
is interrupted. Before restoring the registers extract the
session id and store it in quirk structure.
Change-Id: I2a07ebdea704b8e86472dccb4b95e60f8e4c6736
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Add support for RPMH clock driver for sdxlemur.
Change-Id: I04cb69e4044a4edc65d3482205852d436eb88b5d
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
Update the message string and adjust the message length as mailbox
controller expects 4-byte aligned buffer.
Change-Id: Ifc357a27b63d1d04f5d0149f637814e5d35262f4
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <mmandaya@codeaurora.org>
Battery Current Limiting (BCL) prevents voltage droops and peak currents
on battery packs preventing under voltage lockout and over current. Send
the feature enable hfi only after the first boot so that the feature
configuration in trustzone goes through.
Change-Id: I113f1b6e505fd67f8b0c6bab7279731efcc6054a
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <mmandaya@codeaurora.org>
This reverts commit f85843d3df ("iommu/arm-smmu: Add support to disable
page-table coherency")
This change was added in order to allow iommu clients to disable page
table coherency.
However when page table coherency is disabled using this property on an
SMMU which is configured to be IO-coherent the attempts by the page table
code to apply CMOs on page table entries will be ignored because the
device it is using to apply the CMOs, the SMMU device, is IO-coherent.
This can result in the SMMU seeing stale page table entries.
Since this feature doesn't work and no clients are using revert it.
Change-Id: If6881d24722dd7f1a7398caf6cd904cc7f792bde
Signed-off-by: Liam Mark <lmark@codeaurora.org>
HFI messages are only SZ_1K bytes. From this, derive HWSCHED_MAX_NUMIBS
as the number of maximum IBs that can be in a single submission in
hwscheduling.
Change-Id: Id6d5cd2c8130479bc83f731ddd564af8c552e531
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Say preemption is enabled and a context is bound to ringbuffer-1.
It's internal timestamp say is 0x4000. Now if we disable preemption,
all the contexts are bound to ringbuffer-0. Now, say the context
is going away. The context destroy path will check timestamp 0x4000
which is from the stale ringbuffer, against ringbuffer-0, and its very
likely that ringbuffer-0's timestamp is less than 0x4000 which will
cause a false context-detach fault. Fix this by updating the context's
internal timestamp to the last retired timestamp on the new ringbuffer.
Also, toggle preemption only if ringbuffers are completely drained.
Change-Id: I674978593b11df3998765017c270c3f0dde6c0a5
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
dev_err() can take milliseconds to finish which can allow
GMU to come out of IFPC and go back to IFPC before kgsl gets
a chance to update the fenced register.
Change-Id: Ic1846188213da571c23d52b8a78eb2162a8adc7b
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
VBUS can be detected via a dedicated PMIC pin. Add support
for reporting the VBUS status.
[Fixed cocci error: WARNING: Assignment of bool to 0/1]
Change-Id: If1739017f33a502df1c15ca720f9df830e66bfbd
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
This helps establish submission order of submissions across
ringbuffers as well as help establish how long the recent
submissions took on the GPU.
Change-Id: I181d1b49c23b37888106370609dc086ccb3439ae
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>