Require that a frame from the buffer pool is only held for the time
required to populate it in the touch driver's interrupt handler. This
ensures that buffers are only freed when they are not in use by the
client touch driver.
Bug: 139955910
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Change-Id: Id7ab070d5a11dbae89292f09c0212357063d652e
Add support for the poll file operation so consumers do not appear to be
livelocked when blocked on reads for an extended period of time.
Bug: 139955910
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Change-Id: I70381241a6317f5b56415444b93ba814368d4e16
Dynamically select major device number and register the touch_offload
device at /dev/touch_offload when the driver is initialized.
Bug: 139955910
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Change-Id: I5cb01b236fc0733d698898697c83ac117b975501
The touch_offload driver augments traditional touchscreen drivers with
the ability to capture and export heatmap and coordinate touch data for
processing in user space. The driver's client can query the touch data
available, configure which content is captured, read queued data as it
is captured, and report detected touch events back to the driver.
Bug: 139955910
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Change-Id: Ifa2f003f281bfdf6f289ee3b15cd1ee47220f0ec
Somehow qmi_send_request() will block over 10 secs. This will cause
qmi_txn_wait() with timeout_ms(500 here) can't work at all by purpose.
Therefore, create work task to send the qmi request to resolve this case.
07-28 10:27:46.437 root 5775 5775 I fts spi1.0: kernel releasing bus access from SLPI
...
07-28 10:27:56.569 root 5775 5775 I : failed to send QMI message -11
07-28 10:27:56.569 root 5775 5775 E fts spi1.0: send request failed with: -11
...
07-28 10:28:08.203 root 5775 5775 I fts spi1.0: kernel requesting bus access from SLPI
...
07-28 10:28:18.328 root 5775 5775 I : failed to send QMI message -11
07-28 10:28:18.328 root 5775 5775 E fts spi1.0: send request failed with: -11
...
07-28 10:28:18.385 root 5775 5775 I fts spi1.0: kernel releasing bus access from SLPI
...
07-28 10:28:28.572 root 5775 5775 I : failed to send QMI message -11
07-28 10:28:28.573 root 5775 5775 E fts spi1.0: send request failed with: -11
Bug: 140730871
Change-Id: I4fe826f3b8726e2652f2264b56a31a0c920304bd
Signed-off-by: Super Liu <supercjliu@google.com>
(cherry picked from commit 29f869f220)
Support extended format report, so get more complex touch report events.
Change-Id: If8b6a5266ec26f032bfcb6dddae0ae907a055fe6
Signed-off-by: Fei Mao <feim1@codeaurora.org>
Somehow qmi_send_request() will block over 10 secs. This will cause
qmi_txn_wait() with timeout_ms(500 here) can't work at all by purpose.
Therefore, create work task to send the qmi request to resolve this case.
07-28 10:27:46.437 root 5775 5775 I fts spi1.0: kernel releasing bus access from SLPI
...
07-28 10:27:56.569 root 5775 5775 I : failed to send QMI message -11
07-28 10:27:56.569 root 5775 5775 E fts spi1.0: send request failed with: -11
...
07-28 10:28:08.203 root 5775 5775 I fts spi1.0: kernel requesting bus access from SLPI
...
07-28 10:28:18.328 root 5775 5775 I : failed to send QMI message -11
07-28 10:28:18.328 root 5775 5775 E fts spi1.0: send request failed with: -11
...
07-28 10:28:18.385 root 5775 5775 I fts spi1.0: kernel releasing bus access from SLPI
...
07-28 10:28:28.572 root 5775 5775 I : failed to send QMI message -11
07-28 10:28:28.573 root 5775 5775 E fts spi1.0: send request failed with: -11
Bug: 138704455
Change-Id: I4fe826f3b8726e2652f2264b56a31a0c920304bd
Signed-off-by: Super Liu <supercjliu@google.com>
The access (r/w) to the list of heatmap buffers was protected by the
heatmap lock. However, the actual usage of the buffers was not.
Therefore, once a buffer is dequeued from the list, it was being
modified without the lock protection. This lead to the following
problem: during teardown, if a touch interrupt comes in, the buffers can
be torn down but still be accessed from the heatmap read. This caused
kernel panic (leading to ramdump).
To reproduce the bug, write a program that accesses the heatmap video
device, and then crashes (happened during HAL development). Next,
continuosly touch the screen (to keep generating interrupts), and launch
the HAL process. The phone will enter ramdump after HAL crashes.
To fix this, move the bus read into a separate step in the interrupt
routine. Now there's a private temporary buffer on the stack that the
bus read is pulling data into. Once the bus read is finished, the data
from the temporary buffer gets copied into the actual (user-readable)
heatmap frame in a single locking operation.
This change means that we no longer (*) check if there are available
buffers before we begin the bus read. This could lead to inefficiency,
since at the end of the bus read, we may find out that there aren't any
free buffers, so we will drop the frame. That would mean that the bus
read was wasteful. In real life testing, however, such a situation was
not observed.
* we do actually check
Still, to account for this possibility, we add an optimization. If we
see that this situation happens at least 3 times in a row, we will start
checking for the availability of free buffers before doing the bus read.
This would also help prevent logspam, which currently happens in a
situation where the user process decided to stop reading buffers, but
did not stop streaming.
We don't want to unconditionally check for availability of free buffers
before the bus read, because it is possible that a buffer may become
available during the read itself. The read can take several
milliseconds, so this could give the user space additional time to
process the existing data and return a buffer.
To check for whether the streaming is currently on, use official api
"vb2_is_streaming", instead of using hidden api "streaming".
Small additional fixes:
- Ensure consistent use of strength_t
- Add a doc for heatmap_read
Bug: 117469302
Test: crashes no longer observed using the steps described above
Change-Id: I2b77a79469e22ce4ee39827a951a2ace58db8972
Signed-Off-By: Siarhei Vishniakou <svv@google.com>
(cherry picked from commit b5a5623e4d8ef20afa04c7d28d32413a911f8677)
move headers to include path so they can be included
without relative paths
Bug: 114454293
Test: Build with TBN Enabled
Change-Id: I7c8013c240059f4899f6ea4cd38dba2be42c6980
Signed-off-by: Harpreet "Eli" Sangha <eliptus@google.com>
bootreason would be brought to kernel cmdline for debugging usage
bootreason is set to 'WDT' by bootloader by default
bootreason is set to 'PANIC' or 0 when KP or reboot is triggered
Bug: 119667605
Change-Id: I0cf672e2f48182f357f30b0f289426baa2c0901e
Signed-off-by: Jone Chou <jonechou@google.com>
Match video device name with input device name.
There isn't an explicit API in v4l2 to get the video device name. The
closest API to this is struct v4l2_capability.card that is obtained via
VIDIOC_QUERYCAP ioctl.
Currently, the "card" field is set to the touch driver name, which may
(and usually does) not correspond to the input device name. To fix this,
add an optional reference to the parent input device.
The decision was made here to just provide an input device reference
instead of just copying the string name into the v4l2 struct. The
rationale is that the logic is simpler, the nullness check can be more
meaningful (if not specified, can default to driver name), and it is
more efficient to just keep a pointer around instead of worrying about
copying strings, allocating the proper amount of space, etc.
Test: tested with C1. With additional (unreleased) code to match the
input device with a video device in inputflinger, able to correctly
receive the video frames and pass that on to higher layers of the stack.
Bug: 111480215
Signed-Off-By: Siarhei Vishniakou <svv@google.com>
Bug: 119216282
Change-Id: I2b84a6d5d06a0cb88ab0ae03ec1fa32c1a1e7405
Signed-off-by: Harpreet "Eli" Sangha <eliptus@google.com>
(cherry picked from commit 964ea6531b393e84b387d8c8b501f0bc2cfc5b47)
Register v4l2 device to report heatmap data. Use MSC_TIMESTAMP events
to synchronize the video frames with the input events.
Now includes:
- Support for B1 and C1
- registering of the v4l-touch device in the touch driver
- data properly written to video frame
- timestamps are populated
- report msc_timestamp before sync, but read_heatmap after:
this informs user space that input event occurred, and allows the
i2c read to happen in parallel. Then, user space can wait on the frame
to become available.
Bug: 62940136
Test: used the HeatMapDemo app to visually confirm the output
Bug: 119216282
Signed-off-by: Siarhei Vishniakou <svv@google.com>
Signed-off-by: Harpreet "Eli" Sangha <eliptus@google.com>
Change-Id: Ib282a0c59849a07cac542c1cdc6ed2b3d035a6af
(cherry picked from commit 1cfc8285368f7c435900ef4db5f6fef91e53cd26)
Refactor the qpnp-power-on driver to reduce complexity, improve
readability, and resolve various minor coding concerns.
Change-Id: I27382f07a6ba3e2d0c64aa731393afff27628a36
Signed-off-by: David Collins <collinsd@codeaurora.org>
- Modified sec_ts driver and added sec_cmd
- Modified Linux header files with changes from open source kernel
Bug: 69859019
Change-Id: Ibd8b53eadb5726720505dfdd4f25e290b8de3e97
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
(cherry picked from commit 89979af2fd417af1eef643eb610debdbcf9905c0)
Add PMIC PON peripheral power-on and power-off types in a device
tree header file. Use these constants in the qpnp-power-on
driver enums to ensure that device tree and the driver are always
in-sync. Also update device tree binding documentation to match
what is supported by the driver.
Change-Id: I77f924f846380a3eaf968de6c85a8680ed0ca6ea
Signed-off-by: David Collins <collinsd@codeaurora.org>
* remotes/msm-4.9/tmp-39dae59:
Linux 4.14-rc8
x86/module: Detect and skip invalid relocations
objtool: Prevent GCC from merging annotate_unreachable(), take 2
Revert "x86/mm: Stop calling leave_mm() in idle code"
Documentation: Add Frank Rowand to list of enforcement statement endorsers
doc: add Willy Tarreau to the list of enforcement statement endorsers
tools/headers: Synchronize kernel ABI headers
objtool: Resync objtool's instruction decoder source code copy with the kernel's latest version
Input: sparse-keymap - send sync event for KE_SW/KE_VSW
Input: ar1021_i2c - set INPUT_PROP_DIRECT
arch/tile: Implement ->set_state_oneshot_stopped()
Update MIPS email addresses
x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo
mm, swap: fix race between swap count continuation operations
mm/huge_memory.c: deposit page table when copying a PMD migration entry
initramfs: fix initramfs rebuilds w/ compression after disabling
fs/hugetlbfs/inode.c: fix hwpoison reserve accounting
ocfs2: fstrim: Fix start offset of first cluster group during fstrim
mm, /proc/pid/pagemap: fix soft dirty marking for PMD migration entry
userfaultfd: hugetlbfs: prevent UFFDIO_COPY to fill beyond the end of i_size
Documentation: Add Tim Bird to list of enforcement statement endorsers
net: systemport: Correct IPG length settings
tcp: do not mangle skb->cb[] in tcp_make_synack()
fib: fib_dump_info can no longer use __in_dev_get_rtnl
stmmac: use of_property_read_u32 instead of read_u8
net_sched: hold netns refcnt for each action
net_sched: acquire RTNL in tc_action_net_exit()
powerpc/perf: Fix core-imc hotplug callback failure during imc initialization
Kbuild: don't pass "-C" to preprocessor when processing linker scripts
Revert "x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz""
arm64: ensure __dump_instr() checks addr_limit
KVM: x86: Update APICv on APIC reset
KVM: VMX: Do not fully reset PI descriptor on vCPU reset
kvm: Return -ENODEV from update_persistent_clock
futex: futex_wake_op, do not fail on invalid op
MIPS: Update email address for Marcin Nowakowski
License cleanup: add SPDX license identifier to uapi header files with a license
License cleanup: add SPDX license identifier to uapi header files with no license
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
KEYS: fix out-of-bounds read during ASN.1 parsing
KEYS: trusted: fix writing past end of buffer in trusted_read()
KEYS: return full count in keyring_read() if buffer is too small
net: vrf: correct FRA_L3MDEV encode type
tcp_nv: fix division by zero in tcpnv_acked()
drm/amdgpu: allow harvesting check for Polaris VCE
drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting
ARM: add debug ".edata_real" symbol
MIPS: smp-cmp: Fix vpe_id build error
MAINTAINERS: Update Pistachio platform maintainers
MIPS: smp-cmp: Use right include for task_struct
signal: Fix name of SIGEMT in #if defined() check
MIPS: Update Goldfish RTC driver maintainer email address
MIPS: Update RINT emulation maintainer email address
MIPS: CPS: Fix use of current_cpu_data in preemptible code
x86/mcelog: Get rid of RCU remnants
watchdog/hardlockup/perf: Use atomics to track in-use cpu counter
watchdog/harclockup/perf: Revert a33d44843d ("watchdog/hardlockup/perf: Simplify deferred event destroy")
ARM: 8716/1: pass endianness info to sparse
drm/i915: Check incoming alignment for unfenced buffers (on i915gm)
x86/mm: fix use-after-free of vma during userfaultfd fault
ide:ide-cd: fix kernel panic resulting from missing scsi_req_init
mmc: dw_mmc: Fix the DTO timeout calculation
tcp: fix tcp_mtu_probe() vs highest_sack
ipv6: addrconf: increment ifp refcount before ipv6_del_addr()
tun/tap: sanitize TUNSETSNDBUF input
mlxsw: i2c: Fix buffer increment counter for write transaction
netfilter: nf_reject_ipv4: Fix use-after-free in send_reset
futex: Fix more put_pi_state() vs. exit_pi_state_list() races
powerpc/kprobes: Dereference function pointers only if the address does not belong to kernel text
Revert "powerpc64/elfv1: Only dereference function descriptor for non-text symbols"
mlxsw: reg: Add high and low temperature thresholds
MAINTAINERS: Remove Yotam from mlxfw
MAINTAINERS: Update Yotam's E-mail
net: hns: set correct return value
net: lapbether: fix double free
bpf: remove SK_REDIRECT from UAPI
net: phy: marvell: Only configure RGMII delays when using RGMII
MIPS: SMP: Fix deadlock & online race
MIPS: bpf: Fix a typo in build_one_insn()
MIPS: microMIPS: Fix incorrect mask in insn_table_MM
MIPS: Fix CM region target definitions
MIPS: generic: Fix compilation error from include asm/mips-cpc.h
MIPS: Fix exception entry when CONFIG_EVA enabled
irqchip/irq-mvebu-gicp: Add missing spin_lock init
drm/nouveau/kms/nv50: use the correct state for base channel notifier setup
MIPS: generic: Fix NI 169445 its build
Update MIPS email addresses
tile: pass machine size to sparse
selftests: lib.mk: print individual test results to console by default
RDMA/nldev: Enforce device index check for port callback
Revert "PM / QoS: Fix device resume latency PM QoS"
Revert "PM / QoS: Fix default runtime_pm device resume latency"
scsi: qla2xxx: Fix oops in qla2x00_probe_one error path
xfrm: Fix GSO for IPsec with GRE tunnel.
ALSA: seq: Fix nested rwsem annotation for lockdep splat
ALSA: timer: Add missing mutex lock for compat ioctls
tc-testing: fix arg to ip command: -s -> -n
net_sched: remove tcf_block_put_deferred()
l2tp: hold tunnel in pppol2tp_connect()
drm/i915: Hold rcu_read_lock when iterating over the radixtree (vma idr)
drm/i915: Hold rcu_read_lock when iterating over the radixtree (objects)
drm/i915/edp: read edp display control registers unconditionally
drm/i915: Do not rely on wm preservation for ILK watermarks
drm/i915: Cancel the modeset retry work during modeset cleanup
Mark 'ioremap_page_range()' as possibly sleeping
nvme: Fix setting logical block format when revalidating
mmc: dw_mmc: Add locking to the CTO timer
mmc: dw_mmc: Fix the CTO timeout calculation
mmc: dw_mmc: cancel the CTO timer after a voltage switch
perf/cgroup: Fix perf cgroup hierarchy support
PM / QoS: Fix default runtime_pm device resume latency
Revert "ath10k: fix napi_poll budget overflow"
ath10k: rebuild crypto header in rx data frames
cifs: check MaxPathNameComponentLength != 0 before using it
KVM: arm/arm64: vgic-its: Check GITS_BASER Valid bit before saving tables
KVM: arm/arm64: vgic-its: Check CBASER/BASER validity before enabling the ITS
KVM: arm/arm64: vgic-its: Fix vgic_its_restore_collection_table returned value
KVM: arm/arm64: vgic-its: Fix return value for device table restore
efi/libstub: arm: omit sorting of the UEFI memory map
perf tools: Unwind properly location after REJECT
virtio_blk: Fix an SG_IO regression
wcn36xx: Remove unnecessary rcu_read_unlock in wcn36xx_bss_info_changed
ARM: dts: mvebu: pl310-cache disable double-linefill
xfrm: Clear sk_dst_cache when applying per-socket policy.
perf symbols: Fix memory corruption because of zero length symbols
powerpc/64s/radix: Fix preempt imbalance in TLB flush
netfilter: nft_set_hash: disable fast_ops for 2-len keys
powerpc: Fix check for copy/paste instructions in alignment handler
powerpc/perf: Fix IMC allocation routine
xfrm: Fix xfrm_dst_cache memleak
ARM: 8715/1: add a private asm/unaligned.h
clk: uniphier: fix clock data for PXs3
Documentation: Add my name to kernel enforcement statement
nvme-rdma: fix possible hang when issuing commands during ctrl removal
arm/arm64: kvm: Disable branch profiling in HYP code
arm/arm64: kvm: Move initialization completion message
arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort
Documentation: kernel-enforcement-statement.rst: proper sort names
ASoC: rt5616: fix 0x91 default value
Documentation: Add Arm Ltd to kernel-enforcement-statement.rst
arm64: dts: uniphier: add STDMAC clock to EHCI nodes
ARM: dts: uniphier: add STDMAC clock to EHCI nodes
mmc: renesas_sdhi: fix kernel panic in _internal_dmac.c
mmc: tmio: fix swiotlb buffer is full
Documentation: kernel-enforcement-statement.rst: Remove Red Hat markings
Documentation: Add myself to the enforcement statement list
Documentation: Sign kernel enforcement statement
Add ack for Trond Myklebust to the enforcement statement
Documentation: update kernel enforcement support list
Documentation: add my name to supporters
ASoC: rt5659: connect LOUT Amp with Charge Pump
ASoC: rt5659: register power bit of LOUT Amp
KVM: arm64: its: Fix missing dynamic allocation check in scan_its_table
crypto: x86/chacha20 - satisfy stack validation 2.0
ASoC: rt5663: Change the dev getting function in rt5663_irq
ASoC: rt5514: Revert Hotword Model control
ASoC: topology: Fix a potential memory leak in 'soc_tplg_dapm_widget_denum_create()'
ASoC: topology: Fix a potential NULL pointer dereference in 'soc_tplg_dapm_widget_denum_create()'
ASoC: rt5514-spi: check irq status to schedule data copy
ASoC: adau17x1: Workaround for noise bug in ADC
Conflicts:
drivers/gpu/drm/msm/Makefile
drivers/soc/qcom/Makefile
drivers/staging/android/ion/Makefile
include/linux/coresight-stm.h
include/trace/events/kmem.h
Change-Id: I01f1779762b652b9213924caa3d54f29cf03d285
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The qpnp-power-on driver provides support for key presses via
several key specific PMIC inputs. It also supports reading
power-on reasons and configuring the power-off type (i.e.
restart, shutdown, etc).
This snapshot is taken as of msm-4.4
commit 07f2f9952c78 ("input: move qpnp-power-on driver into
input/misc directory").
Change-Id: Idcbaefa635d49075c9b93819766d722ca0eb698f
Signed-off-by: David Collins <collinsd@codeaurora.org>
gpiod API allows standard way of specifying GPIO polarity and takes it into
account when reading or setting GPIO state. It also allows us to switch to
common way of obtaining GPIO descriptor and away form legacy platform data.
Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
The gpio-matrix-keypad driver normally sets inactive columns as inputs
while scanning. This does not work for all hardware, which may require
the inactive columns to be actively driven in order to overcome any
pull-ups/downs on the columns.
Signed-off-by: David Rivshin <drivshin@allworx.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Let's drop legacy platform data support (there are no users in mainline)
and switch to using generic device properties, which will make the driver
simpler (non-OF boards can use property sets to describe hardware).
Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Instead of being OF-specific, let's switch to using generic device
properties, which will make this code usable on ACPI, device tree and
legacy boards that use property sets.
As part of the change let's rename matrix_keypad_parse_of_params() to
matrix_keypad_parse_properties().
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Extend touchscreen_parse_properties() with support for the
touchscreen-inverted-x/y and touchscreen-swapped-x-y properties and
add touchscreen_set_mt_pos() and touchscreen_report_pos() helper
functions for storing coordinates into a input_mt_pos struct, or
directly reporting them, taking these properties into account.
This commit also modifies the existing callers of
touchscreen_parse_properties() to pass in NULL for the new third
argument, keeping the existing behavior.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Drop support for platform data passed via a C-structure and switch to
device properties instead, which should make the driver compatible
with all platforms: OF, ACPI and static boards. Static boards should
use property sets to communicate device parameters to the driver.
Signed-off-by: Oreste Salerno <oreste.salerno@tomtom.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
We do not have any users of platform data in the tree and all newer
platforms are either DT or ACPI, so let's drop handling of platform data.
Tested-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
The current/old gpio framework used doesn't properly listen to
ACTIVE_LOW and ACTIVE_HIGH flags. The newer gpio framework takes into
account these flags when setting gpio values.
Since the values being output were based on voltage and not logic they
change to reflect this difference. Also use gpiod_set_value_cansleep since
wake and reset pins can be provided by bus based io expanders.
Switch from msleep(5) to udelay_range(5000,6000) to avoid check patch
warning.
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Let's move driver's platform data definitions from include/linux/input/
into include/linux/platform_data/ so that it stays with the rest of
platform data definitions.
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Let's switch form OF to device properties so that common parsing code could
work not only on device tree but also on ACPI-based platforms.
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
When applying touchscreen parameters specified in device tree let's make
sure we keep whatever setup was done by the driver and not reset the
missing values to zero.
Reported-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Some devices are not fast enough to differentiate between a fast-moving
contact and a new contact. This problem cannot be fully resolved because
information is truly missing, but it is possible to safe-guard against
obvious mistakes by restricting movement with a maximum displacement.
The new problem formulation for dmax > 0 cannot benefit from the speedup
for positive definite matrices, but since the convergence is faster, the
result is about the same. For a handful of contacts, the latency difference
is truly negligible.
Suggested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Some semi-mt drivers use the slots in a manual way, but may still
want to call parts of the frame synchronization logic. This patch
makes input_mt_drop_unused callable from those drivers.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Some variants of the Pixcir touch controller support up to 5 simultaneous
fingers and hardware tracking IDs. Prepare the driver for that.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Add common DT binding documentation for touchscreen devices and
implement input_parse_touchscreen_of_params, which parses the common
properties and configures the input device accordingly.
The method currently does not interpret the axis inversion properties,
since there is no matching flag in the generic linux input device.
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Get rid of the attb_read_val() platform hook. Instead, read the ATTB gpio
directly from the driver.
Fail if valid ATTB gpio is not provided by patform data.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Introduce helper functions to configure power and interrupt registers.
Default to IDLE mode on probe as device supports auto wakeup to ACVIE mode
on detecting finger touch.
Configure interrupt mode and polarity on start up. Power down on device
closure or module removal.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
The driver is only supported on DT enabled platforms. Convert the
driver to DT so that it can probe properly.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>