Commit Graph

820659 Commits

Author SHA1 Message Date
Roderick Colenbrander
0ddd781eb0 UPSTREAM: HID: playstation: Add DualSense battery support
Report DualSense battery status information through power_supply class.

Bug: 167947264
CRs-fixed: 2971837
Change-Id: I161c0ebbb47c4a58bfed75748e23ca8fd214af53
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
Signed-off-by: Siarhei Vishniakou <svv@google.com>
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Git-commit: d30bca44809eb1d2937e59d3d09694f40613070d
Signed-off-by: Kishor Krishna Bhat <kishkris@codeaurora.org>
2021-08-06 13:04:56 +05:30
Roderick Colenbrander
7dee1966e6 UPSTREAM: HID: playstation: Add DualSense Bluetooth support
This patch adds support for the DualSense when operating in Bluetooth mode.
The device has the same behavior as the DualShock 4 in that by default it
sends a limited input report (0x1), but after requesting calibration data,
it switches to an extended input report (report 49), which adds data for
touchpad, motion sensors, battery and more.

Bug: 167947264
CRs-fixed: 2971837
Change-Id: I6ba3eb018f9938b71bb63cb70b26e4acdcfb788a
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
Signed-off-by: Siarhei Vishniakou <svv@google.com>
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Git-commit: 799b2b533a299ba5b64ddd22639836c2a5eaee31
Signed-off-by: Kishor Krishna Bhat <kishkris@codeaurora.org>
2021-08-06 13:02:27 +05:30
Roderick Colenbrander
1be8411693 UPSTREAM: HID: playstation: Use DualSense MAC address as unique identifier
Use the DualSense MAC Address as a unique identifier for the HID device.

Bug: 167947264
CRs-fixed: 2971837
Change-Id: If1c5a6ab0f8ebb1bdaf2528d85f5431a306aca6d
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
Signed-off-by: Siarhei Vishniakou <svv@google.com>
Git-repo:  https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Git-commit: b99dcefd78ff13349ce5c8641605d1de3d638ea0
Signed-off-by: Kishor Krishna Bhat <kishkris@codeaurora.org>
2021-08-06 12:59:53 +05:30
Roderick Colenbrander
68878f133f UPSTREAM: HID: playstation: Initial DualSense USB support
Implement the support for PlayStation DualSense gamepad in USB mode.
Support features include buttons and sticks,which adhere to the
Linux gamepad spec.

Bug: 167947264
CRs-fixed: 2971837
Change-Id: I7cf496f9b6f721cdd3e79387caa86b2ccc6378fb
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Git-commit: bc2e15a9a0228b10fece576d4f6a974c002ff07b
Signed-off-by: Kishor Krishna Bhat <kishkris@codeaurora.org>
2021-08-06 12:46:40 +05:30
Prateek Raj Singh
9093207fa9 Add support for new comanche 1.3 soc ID
Added support for new comanche 1.3 soc ID

CRs-Fixed: 2942015
Change-Id: I2f1be9127db74614b9d5c2f797468da85559c60e
Signed-off-by: Prateek Raj Singh <pratsing@codeaurora.org>
2021-05-19 12:11:43 +05:30
qctecmdr
8d72933685 Merge "max31760: add support for additional registers" 2021-05-18 15:37:53 -07:00
qctecmdr
1fc5947e81 Merge "msm: kgsl: Fix snapshot collection for ib1" 2021-05-18 07:43:45 -07:00
qctecmdr
d23086f857 Merge "defconfig: Enable config CONFIG_DEBUG_FS for msm8937_64" 2021-05-18 04:21:11 -07:00
qctecmdr
98966a3e5b Merge "msm: ipa3: Fix to copy num of rules from user space" 2021-05-18 04:21:11 -07:00
qctecmdr
a57b056a72 Merge " msm: ipa2: free the skb" 2021-05-17 23:15:42 -07:00
qctecmdr
9e85d01626 Merge "clk: qcom: clk-alpha-pll: Add support for FSM legacy mode" 2021-05-17 23:15:42 -07:00
qctecmdr
d4857f1afc Merge "defconfig: Enable ARCH_KHAJE" 2021-05-17 23:15:41 -07:00
qctecmdr
65e986ff6c Merge "soc: qcom: socinfo: Add soc information for khaje" 2021-05-17 08:06:58 -07:00
qctecmdr
2b7a67fc75 Merge "defconfig: remove CONFIG_SECURITY_PERF_EVENTS_RESTRICT" 2021-05-17 02:36:34 -07:00
Swetha Chikkaboraiah
c6a6ed986d msm: ipa2: free the skb
Free the skb once it is handled.

Change-Id: Ib5ef2b1f5729e294bd95c45b6aa1b00f03a5984d
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2021-05-17 12:44:13 +05:30
Shadab Naseem
bfa2e599e7 defconfig: Enable ARCH_KHAJE
Enable ARCH_KHAJE in the corresponding Bengal defconfig.

Change-Id: I851d907c535afb22f31582da77e2fe745baba54e
Signed-off-by: Shadab Naseem <snaseem@codeaurora.org>
2021-05-16 22:58:48 -07:00
Shadab Naseem
bd461f6eb6 msm: Add initial support for Khaje in Kconfig platform
Add ARCH_KHAJE support in the Kconfig platform.

Change-Id: I78a4efd9a3534fb5dc68d5523a2bb96551b39d44
Signed-off-by: Shadab Naseem <snaseem@codeaurora.org>
2021-05-16 22:57:29 -07:00
Shadab Naseem
f7a0c99f49 soc: qcom: socinfo: Add soc information for khaje
Add socinfo support for khaje SoC, providing SOC ID info
and dt binding info.

Change-Id: Iec428bf3f48642a26026c33788d0a964c5cd165c
Signed-off-by: Shadab Naseem <snaseem@codeaurora.org>
2021-05-16 22:56:59 -07:00
Vishnu Satheesh
faa40d6e46 defconfig: Enable config CONFIG_DEBUG_FS for msm8937_64
Enable config CONFIG_DEBUG_FS to support /sys/kernel/debug for msm8937_64.

Change-Id: I451b9b8f4b92b4009d04004dd2a1c367b0a46835
Signed-off-by: Vishnu Satheesh <vsathees@codeaurora.org>
2021-05-16 21:53:00 -07:00
Taniya Das
705b3bd107 clk: qcom: clk-alpha-pll: Add support for FSM legacy mode
The Lucid PLL could require the FSM legacy mode bit to be set for the
PLL to be operational, thus add support and set the same when the flag
is set.

While at it also update the Zonda disable function to remove the
additional offset usage.

Change-Id: I3ed4b6c38a1769c5021f17e0115215eab615ab62
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2021-05-16 20:30:40 -07:00
qctecmdr
e7babae0f9 Merge "rpmsg: qcom_smd: Ensure ordering of channel info updates" 2021-05-15 16:43:00 -07:00
qctecmdr
bd09e31f8c Merge "msm: camera: Fix for HFR120 crash while" 2021-05-15 06:29:00 -07:00
Armaan Siddiqui
45c3e70637 msm: ipa3: Fix to copy num of rules from user space
Changes done to copy num of rules from user space to
kernel side as earlier only payload was being copied.
And it is needed to check if user space payload is
not modified in between.

Change-Id: I14e15fe0c6746226cc44d224d33c00e809cd69ca
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
2021-05-15 09:17:41 +05:30
qctecmdr
2a8dfee5e6 Merge "Revert "ANDROID: security,perf: Allow further restriction of perf_event_open"" 2021-05-12 17:20:50 -07:00
Srinivasarao P
aefc845169 defconfig: remove CONFIG_SECURITY_PERF_EVENTS_RESTRICT
deleting entries of CONFIG_SECURITY_PERF_EVENTS_RESTRICT from
all defconfig files as this feature is removed.

Change-Id: Ifd46126617ce5455e2010e8bde061854cbd3b82c
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2021-05-13 01:00:08 +05:30
qctecmdr
4eb378b0bf Merge "msm: kgsl: Avoid flooding kernel log with invalid ioctl errors" 2021-05-12 09:18:19 -07:00
qctecmdr
16e57e6503 Merge "input: qti-haptics: ensure valid pointer when calling kfree" 2021-05-12 06:02:02 -07:00
Pankaj Gupta
026146ae55 msm: kgsl: Fix snapshot collection for ib1
Sometimes IB1_BASE from register does not match with IB1 of the
ring buffer, this may happen while doing save restore of IB
during preemption. In such case, to dump IB1 in snapshot, check
for overlap between IB1_BASE and IB1 from the ring buffer and
dump IB1 in snapshot as per ring buffer's IB1 base and size.

Change-Id: Ic3af8678a11f20f447fcbcbd3ec209283619b96a
Signed-off-by: Pankaj Gupta <gpankaj@codeaurora.org>
2021-05-12 17:46:28 +05:30
Fenglin Wu
ecc683a923 input: qti-haptics: ensure valid pointer when calling kfree
In haptics pattern/brake debugfs file write operation functions,
strsep() is used iteratively to split the user-passed string into
tokens for setting parameters. However, strsep() modifies the pointer
passed and hence the same pointer cannot be used in kfree(). Fix this
by copying the pointer originally allocated by kmalloc() and use it
in kfree() as well. While at it, change kmalloc() to kzalloc().

Change-Id: I5a4c08db32683dfe5e4fefbce146fee1ac6cb88b
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-05-11 10:57:22 +08:00
qctecmdr
1b28a7b846 Merge "rpmsg: qcom_smd: Add check for remote state in send api" 2021-05-10 18:26:24 -07:00
qctecmdr
b6b527b39f Merge "msm: camera: Update csiphy data rate" 2021-05-10 06:18:23 -07:00
qctecmdr
13af8c52b6 Merge "icnss2: Add support for MHI state info" 2021-05-10 06:18:23 -07:00
qctecmdr
c4b260cf62 Merge "soc: qcom: bam_dmux: Abort open/close cmd during SSR" 2021-05-10 06:18:22 -07:00
Kamal Agrawal
21f448a67c msm: kgsl: Avoid flooding kernel log with invalid ioctl errors
For invalid ioctl inputs from user, kgsl already returns -ENOIOCTLCMD error
code. Avoid flooding kernel log with such errors.

Change-Id: Iaf9c8eb0c51b221738482e2b4b02289913a2878e
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-05-10 11:43:41 +05:30
Vivek Golani
06cd87a661 rpmsg: qcom_smd: Add check for remote state in send api
Add support to check channel remote state while doing
a send. Added a wake_up_interruptible call to
unblock send api and release the mutex lock so that
channel close and reopen can happen gracefully.

Change-Id: Ifcf0dad1d9f9f4d4404d62920f1b9d2f1d45ba16
Signed-off-by: Vivek Golani <vgolani@codeaurora.org>
2021-05-10 09:29:30 +05:30
Vandana Jain
22f457e2f2 msm: camera: Update csiphy data rate
Modify the logic to iterate the frequency array &
fetch the proper data rate.

Change-Id: Ia4eaf66d0446cc39bb5b7c75c111390d3472c0eb
Signed-off-by: Vandana Jain <vandja@codeaurora.org>
2021-05-08 16:46:50 +05:30
qctecmdr
13404afbf9 Merge "tty: Fix ->pgrp locking in tiocspgrp()" 2021-05-07 07:54:07 -07:00
qctecmdr
420eb3fdc0 Merge "soc: qcom: ssr: Enable the irqs before powering up subsystems" 2021-05-06 22:00:26 -07:00
Naman Padhiar
2b63b9c9a3 icnss2: Add support for MHI state info
Read MHI state from MSA and export API to get MHI state.
Add SMP2P handshakes according to below sequence to manage
PCI EP low power state.
1. Host driver calls prevent_l1.
2. ICNSS sends SMP2P to FW with PCI_EP_POWER_SAVE_EXIT.
3. FW bring EP out of power save and update in memory
   location.
4. Once Host reads updated value it access registers.
4. Host driver calls allow_l1.
5. ICNSS send SMP2P to FW with PCI_EP_POWER_SAVE_ENTER.

Change-Id: Ia93a270cbe86d1fb7c8402c69eb9b64b1400abb6
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-05-07 10:23:07 +05:30
qctecmdr
cfceb13b9d Merge "icnss2: Add new ipc context to log smp2p related logs" 2021-05-06 17:06:43 -07:00
qctecmdr
1ddb833d21 Merge "diag: Update log and msg mask code ranges" 2021-05-06 05:56:57 -07:00
qctecmdr
9a0c26fd10 Merge "defconfig: arm: Enable CONFIG_HID_NINTENDO for QM215" 2021-05-06 05:56:56 -07:00
Anuj Garg
9cc22ed0af soc: qcom: ssr: Enable the irqs before powering up subsystems
Enabling the irqs from other subsystems before they power up. This
ensures that the irqs are not missed by hlos.

Change-Id: I501cf28c3ea7244358f26b0a2d95572022315871
Signed-off-by: Anuj Garg <anujgarg@codeaurora.org>
2021-05-06 04:50:04 -07:00
qctecmdr
5dadba8bf1 Merge "diag: Copy length and buffer locally to send to userspace client" 2021-05-06 01:01:10 -07:00
qctecmdr
b47199030e Merge "fbdev: msm: Handle rotator init failure correctly" 2021-05-06 01:01:09 -07:00
qctecmdr
fd0b744243 Merge "usb: gadget: f_cdev: Fix use after free of port in f_cdev" 2021-05-06 01:01:08 -07:00
Naman Padhiar
b78bfb9605 icnss2: Add new ipc context to log smp2p related logs
Add new ipc context to log smp2p related logs and put
aggressive logs to appropriate ipc log context to avoid
losing of critical logs.

Change-Id: Ia2a9fb8a9c724e2adc514e618abf9f032ce1ea0a
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-05-06 13:01:42 +05:30
Vivek Golani
80034cbe85 diag: Update log and msg mask code ranges
Modify log and msg mask code ranges to reflect
latest requirements.

Change-Id: I2f8effa8c727edc5872ec59e45a1d28427340932
Signed-off-by: Vivek Golani <vgolani@codeaurora.org>
2021-05-06 11:38:46 +05:30
Rohith Kollalsi
bdb11d8299 usb: gadget: f_cdev: Fix use after free of port in f_cdev
With the configfs filesystem it’s possible to manipulate kernel
object by creating/deleting folders into /config path. Here port
object is created by a mkdir and leads to allocate this object,
while the rmdir system call leads to free this object.
If one thread does these two operations of creation and deletion
of the folder and one tries to open it, it can lead to a
race condition where port object can be freed by the time
it is used in f_cdev_open leading to use after free error.

Fix this by using embedded struct device and the refcounting
mechanism built-in which increases and decreases refcount upon
creation and deletion of port and port will be freed when
reference count is zero ensuring that "port" object survives
until the last user releases it.

Change-Id: I88701ef161c9f3215631da81c3a8d4c980d12b25
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
2021-05-05 12:33:54 +05:30
qctecmdr
ba67f85742 Merge "defconfig: arm64: Enable CONFIG_HID_NINTENDO for QM215" 2021-05-04 08:31:58 -07:00