Commit graph

899,394 commits

Author SHA1 Message Date
Hui Liu
c4e2bcf66f power: qcom: qbg: add jeita/step-chg parameters for QBG algorithm
Parse JEITA and step charging settings from battery
profile and send them to userspace algorithm for
TTF calculation.

Change-Id: I6250b34ecdca0d94d672f5859843cc4c54923412
Signed-off-by: Hui Liu <huliu@codeaurora.org>
2021-07-12 10:08:44 +08:00
qctecmdr
fca1612fcf Merge "soc: qcom: Return correct error code when program_key fails fails" 2021-07-11 07:42:48 -07:00
qctecmdr
6392f903e7 Merge "power: supply: qbg: Fixes in QBG driver" 2021-07-11 07:42:48 -07:00
qctecmdr
304bff3f76 Merge "cnss2: Add more debug info in ipc_log" 2021-07-11 07:42:48 -07:00
qctecmdr
8e3080036b Merge "Merge android11-5.4.86+ (fe9e863) into msm-5.4" 2021-07-11 07:42:47 -07:00
Vaibhav Agrawal
175aff99f1 soc: qcom: Return correct error code when program_key fails fails
When we call crypto_qti_program_key to program the key, and
it fails due to trustzone busy issue, we try to call invalidate
key method just after that, and in the process, overwrite the
error code returned by the program key failure. Fix this by handling
the errors from both program key and invalidate key separately,
and return the program key error code to caller.

Test: Verified device boot up and reboot.

Change-Id: Iaff0844f68b4886c23e1840d7e0e4a404d38fc96
Signed-off-by: Vaibhav Agrawal <vagrawa@codeaurora.org>
2021-07-10 02:34:11 -07:00
Rohith Kollalsi
e3d4ff77a7 usb: f_cdev: USB remote wake up feature implementation for DUN
Implement usb remote wake up feature for dun on sdx12.
For super speed this feature supports wake up of a
particular function from suspend, where as for high speed,
remote wakeup doesn't support wakeup of a particular function
from suspend, but entire usb bus needs to wakeup. When usb_func_wakeup
in composite driver fails because it needs to wake usb bus before
function wakeup is triggered, -EAGAIN is returned which cannot be
considered as a function wakeup failure. Hence add proper handling
in function driver for EAGAIN return case.

Change-Id: I15c18a4a7203e82c74ad1b4905c08eff91d91b4f
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
2021-07-09 13:29:30 -07:00
qctecmdr
de4a213901 Merge "clk: qcom: debugcc: Add missing measure only clocks" 2021-07-09 06:01:38 -07:00
qctecmdr
d7e3014dc0 Merge "input: qcom-hv-haptics: Update the VMAX configuration" 2021-07-09 06:01:37 -07:00
qctecmdr
ddbef40a73 Merge "msm: kgsl: Retry process private open in a special failure case" 2021-07-09 06:01:36 -07:00
qctecmdr
cae2be6e8e Merge "clk: qcom: clk-alpha-pll: Update the steps to slew the Lucid PLL" 2021-07-09 06:01:36 -07:00
qctecmdr
a757adffe8 Merge "soc: qcom: Correct the modem data for wdog bite handler" 2021-07-09 06:01:35 -07:00
Taniya Das
fd141c2398 clk: qcom: clk-alpha-pll: Update the steps to slew the Lucid PLL
When PLL HW_UPDATE_LOGIC_BYPASS bit is not set then PLL can be
updated dynamically by setting the PLL_UPDATE bit in mode register
and hardware would clear the PLL_UPDATE automatically when
PLL_ACK_LATCH is asserted.

Change-Id: I1c568c9fdd37a554d71fc5c3d840a71e983baf60
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2021-07-09 02:32:00 -07:00
Srinivasarao P
1154cfab73 Merge android11-5.4.86+ (fe9e863) into msm-5.4
* refs/heads/tmp-fe9e863:
  FROMGIT: bpf: Do not change gso_size during bpf_skb_change_proto()
  ANDROID: selinux: modify RTM_GETNEIGH{TBL}

Change-Id: I02fcc7795c4380aafb293dd8f575cccdc8e86825
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2021-07-09 14:55:35 +05:30
Deepak Kumar
65e208cf89 msm: kgsl: Retry process private open in a special failure case
Currently, process private open/kgsl_open fails in case same pid
previous process private refcount is zero but destroy didn't
complete yet. In this failure case, as we are sure that destroy
is triggered and just pending to finish, retry process private
open again after some delay to ensure process private open is
successful.

Change-Id: I7cd8a2b7d64d9472121ffa8633d0621923f5ec89
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2021-07-09 14:36:28 +05:30
qctecmdr
821dd9939b Merge "msm: sps: Correct descriptor fifo address to dump contents" 2021-07-09 01:51:15 -07:00
lijuang
dcb104f131 soc: qcom: Correct the modem data for wdog bite handler
Correct the modem data for wdog bite handler, otherwise it will access
a invalid subsys.

Change-Id: Iedd7b85597fa95d283d3a7b9bdd59c8a7c765792
Signed-off-by: lijuang <lijuang@codeaurora.org>
2021-07-08 23:54:59 -07:00
Kiran Gunda
bce19700f7 input: qcom-hv-haptics: Update the VMAX configuration
The VMAX_STEP value is different for HV and MV haptics.
Update the VMAX configuration accordingly.

Change-Id: I5d0f00e9a07e76b01b16539d79897675ddd63117
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2021-07-08 23:51:25 -07:00
Madhuri Medasani
a155840f63 clk: qcom: debugcc: Add missing measure only clocks
Add missing clocks having measure only support for BLAIR.

Change-Id: I005d3d7853dbdaddcce82a844ee61341981eb501
Signed-off-by: Madhuri Medasani <mmedasan@codeaurora.org>
2021-07-08 20:27:17 -07:00
qctecmdr
c76c741a86 Merge "icnss2: Add Null check before dereferencing variables" 2021-07-08 18:06:02 -07:00
qctecmdr
38f07e2e36 Merge "msm: synx: Fix accessing uninitialized variable" 2021-07-08 18:06:02 -07:00
qctecmdr
581bc36999 Merge "mmc: core: Remove unnecessary scale debugfs entry" 2021-07-08 08:24:31 -07:00
qctecmdr
891649f939 Merge "usb: fix various gadget panics on 10gbps cabling" 2021-07-08 08:24:31 -07:00
qctecmdr
c519e10445 Merge "msm: pcie: update RC MPS based on MPSS" 2021-07-08 08:24:30 -07:00
qctecmdr
0889086dbb Merge "power: qpnp-qg: Add support to clear soh upon first profile load" 2021-07-08 08:24:30 -07:00
Rama Krishna Phani A
c76ce6f848 msm: sps: Correct descriptor fifo address to dump contents
Few clients of BAM will use SMMU for data transfers.
Assign correct descriptor fifo address for SMMU clients
of BAM while dumping contents.

Change-Id: I21584e6778315f51cac0d202d41f4c81a56fcbf0
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
2021-07-08 18:50:27 +05:30
Ajay Prathi
f094710be7 msm: sps: Use iomem attribute for base address
Clients may use ioremap api to obtain the bam base address.
Add iomem attribute to the base address field
in the public SPS structure to avoid type casts.

Change-Id: Iba2ec1a9d84c3d57e2ce314ba9dc0b81644db2fb
Signed-off-by: Ajay Prathi <aprathi@codeaurora.org>
2021-07-08 18:50:19 +05:30
qctecmdr
5b3872731b Merge "sched: Improve the scheduler" 2021-07-07 23:18:38 -07:00
Sumukh Hallymysore Ravindra
1e954f343d msm: synx: Fix accessing uninitialized variable
Change fixes accessing possible uninitialized
variable in an error log.

Change-Id: Ibc72faddb7073c0408c2c822991b9835992dffaf
Signed-off-by: Sumukh Hallymysore Ravindra <shallymy@codeaurora.org>
2021-07-07 22:01:14 -07:00
Vijay Patil
550d642faa icnss2: Add Null check before dereferencing variables
Add Null check before dereferencing dev for set FW log mode,
force wake request & force wake response. Add ERR_OR_NULL check
for wpss load API gets called for wpss subsystem. Check for qdss
memory segment length.

Change-Id: Id4a43fa9ae332faa7f5741f338d985db8272d17a
Signed-off-by: Vijay Patil <vijaylil@codeaurora.org>
2021-07-07 14:46:46 +05:30
Pratham Pratap
f2f05457ef usb: gadget: Restart USB session if start xfer fails for ep0
Currently driver is just proceding further if start xfer times
out for ep0. Start xfer failing for ep0 indicates that the
controller is already in bad state and it can access unmapped
address leading to SMMU fault. Prevent this by marking this as
an error event and restart USB session.

Change-Id: Ia46387e16a79318ad945079ced7209a8f2bf47ef
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
2021-07-07 02:04:03 -07:00
Lingutla Chandrasekhar
34afd1c16e sched: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: I37d6cb75ca8b08d9ca155b86b7d71ff369f46e14
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2021-07-07 10:51:31 +05:30
Kavya Nunna
c0b667d58c power: qpnp-qg: Add support to clear soh upon first profile load
When the battery profile is loaded first time, update the
clear soh property so that soh algorithm can clear stored
parameters.

Change-Id: Idfc25c589f8422b76768229e52dab7d670c6b231
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
2021-07-06 22:19:19 -07:00
Kavya Nunna
a459581244 include: dt-bindings: Add iio-property for clear soh
Add iio property for clear soh to update userspace
on first profile load.

Change-Id: I7a9c2cf886ad7da76f6156c3ac12828bf37fe78a
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
2021-07-06 22:18:06 -07:00
Shyam Kumar Thella
9a48d58ca2 power: supply: qbg: Fixes in QBG driver
Add changes required in QBG driver after validation on pm5100.
1. Add sample time for different QBG modes.
2. Store batt id and essential param revid after each FIFO processing and
   at startup use that data to decide whether to load SDAM data or not.
3. PM5100 ADC reports the batt_id directly, drop the voltage based
   conversion logic.
4. Fix the LSB value for current.

Change-Id: Ib51f8c5e48c89ee7bf60e5ee9a6c575617461a02
Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
2021-07-06 22:02:28 -07:00
Sarthak Garg
52da491c29 mmc: core: Remove unnecessary scale debugfs entry
Current scale debugfs entry is quite unstable and used barely.
Hardware cmd timeout and some other issues are being seen when trying to
modify the scale entry.
Remove unnecessary scale debugfs entry to avoid such issues.

Change-Id: I9486a9fe7498ba1855153202415fca80debb13f9
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2021-07-06 21:30:41 -07:00
Maciej Żenczykowski
478702145f usb: fix various gadget panics on 10gbps cabling
usb_assign_descriptors() is called with 5 parameters,
the last 4 of which are the usb_descriptor_header for:
  full-speed (USB1.1 - 12Mbps [including USB1.0 low-speed @ 1.5Mbps),
  high-speed (USB2.0 - 480Mbps),
  super-speed (USB3.0 - 5Gbps),
  super-speed-plus (USB3.1 - 10Gbps).

The differences between full/high/super-speed descriptors are usually
substantial (due to changes in the maximum usb block size from 64 to 512
to 1024 bytes and other differences in the specs), while the difference
between 5 and 10Gbps descriptors may be as little as nothing
(in many cases the same tuning is simply good enough).

However if a gadget driver calls usb_assign_descriptors() with
a NULL descriptor for super-speed-plus and is then used on a max 10gbps
configuration, the kernel will crash with a null pointer dereference,
when a 10gbps capable device port + cable + host port combination shows up.
(This wouldn't happen if the gadget max-speed was set to 5gbps, but
it of course defaults to the maximum, and there's no real reason to
artificially limit it)

The fix is to simply use the 5gbps descriptor as the 10gbps descriptor,
if a 10gbps descriptor wasn't provided.

Obviously this won't fix the problem if the 5gbps descriptor is also
NULL, but such cases can't be so trivially solved (and any such gadgets
are unlikely to be used with USB3 ports any way).

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210609024459.1126080-1-zenczykowski@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: 032e288097a553db5653af552dd8035cd2a0ba96
Change-Id: Ic90930c8ff99f2a3749c79a268f0a410827e485c
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
2021-07-06 08:31:38 -07:00
qctecmdr
0d384b92bf Merge "cnss2: Add code to notify mhi about link down" 2021-07-06 05:09:13 -07:00
Tony Truong
52eb9e1439 msm: pcie: update RC MPS based on MPSS
Scale PCIe RC Max Payload Size (MPS) based on its capability
Max Payload Size Supported (MPSS). Configurating RC MPS to the
largest setting possible will help improve overall PCIe link
bandwidth performance.

Change-Id: Ice31cf0ab97fd7dd83736eea77e42ff00fb3148c
Signed-off-by: Tony Truong <truong@codeaurora.org>
2021-07-05 23:28:03 -07:00
Tony Truong
b96fd565f8 msm: pcie: add support to update MPS for all child PCI devices
Update Max Payload size (MPS) for all child PCI devices of RC.
Child PCI devices will have their MPS scaled to at most RC MPS.
Configuring all child PCI devices with the largest MPS possible
will help improve overall PCIe link bandwidth performance.

Change-Id: I871b49a5ec07d020a445a59f622ceec6061dfc26
Signed-off-by: Tony Truong <truong@codeaurora.org>
2021-07-05 23:18:51 -07:00
qctecmdr
3f7b291018 Merge "coresight: fix etr pice mode issue" 2021-07-05 22:49:49 -07:00
qctecmdr
5b9483c75b Merge "msm: kgsl: Add inode info in kgsl mem dump" 2021-07-05 18:35:51 -07:00
qctecmdr
ebd7f8e1c0 Merge "taskstats: properly account NR_KERNEL_MISC_RECLAIMABLE" 2021-07-05 03:02:08 -07:00
qctecmdr
1e9f7380d5 Merge "pinctrl: qcs404: update gpio, function and group binding" 2021-07-05 03:02:08 -07:00
qctecmdr
67683b3310 Merge "soc: wdog: Ensure missing user watchdog pet can trigger bite" 2021-07-05 03:02:08 -07:00
qctecmdr
ee417bda82 Merge "defconfig: sdxlemur: Enable DRM and GKI_HIDDEN_DRM_CONFIGS on sdxlemur" 2021-07-05 03:02:08 -07:00
qctecmdr
72b140fb68 Merge "Merge android11-5.4.86+ (e399f16) into msm-5.4" 2021-07-05 03:02:07 -07:00
qctecmdr
34c4a7f112 Merge "usb: dwc3: Add support of disable L1 in HS mode" 2021-07-05 03:02:07 -07:00
qctecmdr
7f2cb0175f Merge "mhi: core: Notify all mhi client's for PCIe link down recovery" 2021-07-05 03:02:07 -07:00
qctecmdr
b21450113f Merge "spi: spi-msm-geni: Store the wrapper dev handle for LE VM also" 2021-07-05 03:02:06 -07:00