The adc notification callback assumes that it will end up selecting
the correct state. However, if the parameters are outside the
expected values, the code could end up dereferencing a null pointer.
Fix this by returning before that pointer is dereferenced.
Change-Id: I42642b475a1032c3a7395336381f3bd6c1396dde
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
The gcc_gpu_bimc_gfx_src_clk and gcc_gpu_snoc_dvm_gfx_clk need
to left at their default state of ON. Remove controlling them
from the linux clock driver to avoid disabling them during
late_init.
Change-Id: If3d964840362b6147ba7c9e26c4a3f5d20e5a557
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Destination scaler can be turned off within each display commit IOCTL.
When it is disabled, the mixer dimension must be reset to match the
panel configuration. It is also required to update the destination
scaler block when there is a ON/OFF transition because all HW setting is
gone after such power event. Power event includes general suspend
resume, FB driver shutdown and reload, and auto clock gating.
CRs-Fixed: 1077684
Change-Id: I340f778583bb63d6436c4ef8f51ead77a2871625
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
Invalidate the domain cfg when destroying the domain
otherwise this can cause issues on subsequent attaches.
For example if the cfb cbndx is not cleared then a new
context won't get assigned to the domain.
Change-Id: If576c6c8a7da90c4ce3f1061df4b3ba0dce495e1
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Both dynamic FPS (DFPS) and adaptive variable refresh (AVR) depend
and modify the programmable fetch. During DFPS update period, which
is between 2 VSYNC, it is necessary to disable the AVR during this
period, otherwise it will cause the timing engine hangs.
CRs-Fixed: 1073650
Change-Id: I2836ef5b7f37f627a32a0b4332dc299a60012704
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
Reported by static analysis tools. generic_device_group() may return
NULL on an error case.
Change-Id: I33e8e859e99d4f7c4616aeee1da8214497e30625
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Update the VDD_APC0 and VDD_APC1 CPR RO scaling factors
for msmcobalt v2 to match the latest hardware characterization
guidelines.
CRs-Fixed: 1080409
Change-Id: I8250304e918f55d233e9b3f01c57f297f73e74ba
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
Handle WDSP_EVENT_PRE_SHUTDOWN event to indicate link down event to G-Link
core and the clients of G-Link. Handle WDSP_EVENT_POST_BOOTUP event to
indicate link up event.
CRs-Fixed: 1080354
Change-Id: I12c04ceb7af51cc5d2f0c79b524ef783dc5f749e
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Gain for TX decimator block needs to be set after the
corresponding decimator is enabled. Otherwise, gain will
not take affect. Apply the gain by reading from regmap cache
to the codec decimator hardware after decimator is enabled.
CRs-Fixed: 1079227
Change-Id: If56c84007f4dae2ff8f424b576756ee5906c24d4
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Gain for TX decimator block needs to be set after the
corresponding decimator is enabled. Otherwise, gain will
not take affect. Apply the gain by reading from regmap cache
to the codec decimator hardware after decimator is enabled.
CRs-fixed: 982473
Change-Id: Ib2d189b56e58b038a343fc974e6e3b8ef29f982d
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add sysfs entry for force fw_update support in Goodix
driver.
Change the usage of kstrtoul to sscanf in driver to avoid
portability issues.
Change-Id: I147a3e465170dda7af415ade29c04257d9b11a6b
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Add debugfs entries for address and data to read the registers
of Goodix controller.
Change-Id: I6543d523e39771615d0e1b684780141e108a2aa4
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
The MDSS DP driver has compilation issues on msmfalcon 32-bit builds.
Remove config for the driver to skip compilation till the relevant
issues are resolved.
Change-Id: I8b4d464c793fd943abca2b9041f5751abc9ed22b
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msmcobalt QVR has different hardware design with MTP.
Add sound card entry for msmcobalt QVR to enable wsa,
earpiece and microphones.
CRs-Fixed: 1078551
Change-Id: Ic55c44de74e537463a218619861f28c1e6eb66c1
Signed-off-by: Meng Wang <mwang@codeaurora.org>
If the bootloader uses the long descriptor format and jumps to
kernel decompressor code, TTBCR may not be in a right state.
Before enabling the MMU, it is required to clear the TTBCR.PD0
field to use TTBR0 for translation table walks.
The commit dbece45894 ("ARM: 7501/1: decompressor:
reset ttbcr for VMSA ARMv7 cores") does the reset of TTBCR.N, but
doesn't consider all the bits for the size of TTBCR.N.
Clear TTBCR.PD0 field and reset all the three bits of TTBCR.N to
indicate the use of TTBR0 and the correct base address width.
Change-Id: Ib497ef7ecdee6c517205ec76724283d4cbd89bdc
Fixes: dbece45894 ("ARM: 7501/1: decompressor: reset ttbcr for VMSA ARMv7 cores")
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: 117e5e9c4cfcb7628f08de074fbfefec1bb678b7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
The GPU PLL initial configuration is modified to 800MHz and also update the
RCG to be able to support force enable/disable for gfx3d_clk_src.
Change-Id: I8e6d7dba762b678070d66e291347af2cdf804ae5
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Add support for Venus PIL which facilitates the loading of venus
firmware, authentication and bringing it out of reset.
Change-Id: I3cdef3870dfd88562f3435d678698e3a906ae673
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
CPP frame message is used to send all frame data
to Microcontroller. It is sent every frame. CPP kernel
driver has to add information to it before transfer it.
The message has to be validated before manipulations.
If it is not valid the message and corresponding frame
are discarded.
b/30074605
CRs-Fixed: 1049826
Change-Id: I3e11ca7f6df4bb0d928512f81f3e3dc40fed791a
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
Whenever the battery profile is loaded, notify charger SW with
float voltage and FCC obtained from the battery profile.
Change-Id: I0419b34fde9d74460b849ee8a7ef7e2cdf5592d2
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Fast charge current (FCC) and float voltage are parameters that
are battery specific and needs to be set based on the profile
detected by Fuel Gauge driver. Expose the following properties
from battery power supply so that FG can set them.
- POWER_SUPPLY_PROP_VOLTAGE_MAX
- POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX
Change-Id: I72465484b154b1a758285d58906ce7661a246767
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Try.SNK is not permitted in PD per spec. Disable it while
pd_active is true.
Change-Id: I90891232d37b95f011b3f2d5278f0fd0f4c9eb71
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
The policy engine needs to be informed that its time to start
its activities when APSD results are available and/or PD_ALLOWED
is decided. USB type property shouldn't change after that.
Since HVDCP_TIMEOUT_VOTER is the last one to cast its allow vote
in the sequence, use it to reflect the PE_START property.
While at it since PE_START property is returned assuming an atomic
context, the read of PD_ALLOWED could be moved to its sleepable
variants. This aids in keeping the policy engine code simple and also
assures race free code.
Change-Id: Ib98ac10d87200a2fd5492e27399f696f2468eba6
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Make sure to properly clear the PD_IN_HARD_RESET property upon
reaching the SNK_Transition_to_default state to ensure that the
charger driver is notified that hard reset has completed. Move
the clearing of pd->hard_reset flag here as well for clarity.
Also clear the pd->in_pr_swap flag when initiating or receiving
hard reset signal as that should promptly abort any PR swap
operation in progress.
Change-Id: I967e3841af614ecd2129bf60dc08a1b19731c4e3
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Support the new POWER_SUPPLY_PROP_PE_START property which
indicates when the policy engine state machine can begin.
This helps to simplify the psy_changed() routine as we can
now rely on this property to indicate that PROP_TYPEC_MODE
and PROP_TYPE are already settled. The state machine work
can now simply begin when seeing a change in TYPEC_MODE.
This replaces the previous use of PROP_PD_ALLOWED which prior
to commit 18da08334e ("usb: pd: Handle PD_ALLOWED within
state machine") was intended to be a marker to start up
the policy engine but now simply indicates whether or not to
start PD comms. We can now move reading of this property to
usbpd_set_state() as it is now only needed locally in the
SNK_STARTUP handling.
Change-Id: Ia0b9e5b011ae72e1afcaf5109b8253d124afc021
Signed-off-by: Jack Pham <jackp@codeaurora.org>
This property will be used to indicate to the policy engine that it
should start its activities.
Change-Id: I9deb48f7bff71b022c5899e6eff7617526d02324
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
A merge conflict resolution caused a break statement to be dropped in
the case block for reporting input_current_limited property.
Fix this.
Change-Id: Ic5c9626628f05f3167f9f8d0b78b04b83446f413
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Correct the secure address threshold to 0x0A since Misc peripheral has
secure registers starting as early as 0x0A
CRs-Fixed: 1048242
Change-Id: Id7ec03919e2fd08540cd7e677bf5e4048d73c23d
Signed-off-by: Harry Yang <harryy@codeaurora.org>