Commit Graph

5793 Commits

Author SHA1 Message Date
Tao Huang
3430c68a33 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (660 commits)
  ANDROID: keychord: Check for write data size
  ANDROID: sdcardfs: Set num in extension_details during make_item
  ANDROID: sdcardfs: Hold i_mutex for i_size_write
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck64-XTS
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck128-XTS
  BACKPORT, FROMGIT: crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS
  FROMGIT: crypto: speck - export common helpers
  BACKPORT, FROMGIT: crypto: speck - add support for the Speck block cipher
  UPSTREAM: ANDROID: binder: synchronize_rcu() when using POLLFREE.
  f2fs: updates on v4.16-rc1
  BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register()
  BACKPORT: tee: shm: don't put_page on null shm->pages
  BACKPORT: tee: shm: make function __tee_shm_alloc static
  BACKPORT: tee: optee: check type of registered shared memory
  BACKPORT: tee: add start argument to shm_register callback
  BACKPORT: tee: optee: fix header dependencies
  BACKPORT: tee: shm: inline tee_shm_get_id()
  BACKPORT: tee: use reference counting for tee_context
  BACKPORT: tee: optee: enable dynamic SHM support
  BACKPORT: tee: optee: add optee-specific shared pool implementation
  ...

Conflicts:
	drivers/irqchip/Kconfig
	drivers/media/i2c/tc35874x.c
	drivers/media/v4l2-core/v4l2-compat-ioctl32.c
	drivers/usb/gadget/function/f_fs.c
	fs/f2fs/node.c

Change-Id: Icecd73a515821b536fa3d81ea91b63d9b3699916
2018-03-09 19:10:14 +08:00
Suren Baghdasaryan
6aa8d8c0cd ANDROID: keychord: Check for write data size
keychord driver causes a kernel warning when writing more than
(1 << (MAX_ORDER - 1)) * PAGE_SIZE bytes to /dev/keychord.
In reality writes to this file should be much smaller, so
limiting data size to PAGE_SIZE seems to be appropriate.
This change checks write data size and if it's more than
PAGE_SIZE causes write to fail.

Bug: 73962978

Change-Id: I8a064a396d4259ffca924fa35d80e9700c4f8d79
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-03-05 22:01:49 +05:30
Amit Pundir
24740dab5c Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

Conflicts:
    fs/f2fs/extent_cache.c
        Pick changes from AOSP Change-Id: Icd8a85ac0c19a8aa25cd2591a12b4e9b85bdf1c5
        ("f2fs: catch up to v4.14-rc1")

    fs/f2fs/namei.c
        Pick changes from AOSP F2FS backport commit 7d5c08fd91
        ("f2fs: backport from (4c1fad64 - Merge tag 'for-f2fs-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs)")
2018-03-05 20:20:17 +05:30
Linus Walleij
8aba7c88ee UPSTREAM: gpio: change member .dev to .parent
The name .dev in a struct is normally reserved for a struct device
that is let us say a superclass to the thing described by the struct.
struct gpio_chip stands out by confusingly using a struct device *dev
to point to the parent device (such as a platform_device) that
represents the hardware. As we want to give gpio_chip:s real devices,
this is not working. We need to rename this member to parent.

This was done by two coccinelle scripts, I guess it is possible to
combine them into one, but I don't know such stuff. They look like
this:

@@
struct gpio_chip *var;
@@
-var->dev
+var->parent

and:

@@
struct gpio_chip var;
@@
-var.dev
+var.parent

and:

@@
struct bgpio_chip *var;
@@
-var->gc.dev
+var->gc.parent

Plus a few instances of bgpio that I couldn't figure out how
to teach Coccinelle to rewrite.

This patch hits all over the place, but I *strongly* prefer this
solution to any piecemal approaches that just exercise patch
mechanics all over the place. It mainly hits drivers/gpio and
drivers/pinctrl which is my own backyard anyway.

Change-Id: Ib178cec5ee519164386cb60ba7f6c3f796e84f0e
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Rafał Miłecki <zajec5@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Alek Du <alek.du@intel.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 58383c7842)
2018-02-28 14:55:00 +08:00
Arnd Bergmann
9975bd33e1 Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-uninitialized warning
commit ea4348c846 upstream.

Older versions of gcc warn about the tca8418_irq_handler function
as they can't keep track of the variable assignment inside of the
loop when using the -Wmaybe-unintialized flag:

drivers/input/keyboard/tca8418_keypad.c: In function ‘tca8418_irq_handler’:
drivers/input/keyboard/tca8418_keypad.c:172:9: error: ‘reg’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/input/keyboard/tca8418_keypad.c:165:5: note: ‘reg’ was declared here

This is fixed in gcc-6, but it's possible to rearrange the code
in a way that avoids the warning on older compilers as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:49 +01:00
Tao Huang
0be7b88d66 drivers/input/touchscreen/cy8c_touchpad: fix compile warning
drivers/input/touchscreen/cy8c_touchpad.c:77:20: warning: xfer_msg[1].flags
is used uninitialized in this function [-Wuninitialized]

Change-Id: I2d1f199f098b38af92037e2ebbd63c05fc4a1f35
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-13 10:01:26 +08:00
Zorro Liu
5db5490025 drivers: input: sensors: update accel sensor mma7660 driver
Change-Id: Id3cf0cf3a14a07010524d0de58dc523bfcb3b735
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-11 19:17:53 +08:00
Zorro Liu
caf5f86288 Revert "drivers: input: sensors: reset sensor rate"
This reverts commit 3726b810fe.

Change-Id: I23692bb090f5a1c946b57071366d4611bc3d7189
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-09 11:24:29 +08:00
Zorro Liu
a5e68c507a drivers: input: sensors: add gsensor stk8baxx
Change-Id: I983df89f746e42221009e9123116900041b9a06a
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-09 11:24:13 +08:00
Tao Huang
8d2d0b6a51 Merge tag 'lsk-v4.4-18.02-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 18.02 v4.4-android

* tag 'lsk-v4.4-18.02-android': (131 commits)
  Linux 4.4.114
  nfsd: auth: Fix gid sorting when rootsquash enabled
  net: tcp: close sock if net namespace is exiting
  flow_dissector: properly cap thoff field
  ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY
  net: Allow neigh contructor functions ability to modify the primary_key
  vmxnet3: repair memory leak
  sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf
  sctp: do not allow the v4 socket to bind a v4mapped v6 address
  r8169: fix memory corruption on retrieval of hardware statistics.
  pppoe: take ->needed_headroom of lower device into account on xmit
  net: qdisc_pkt_len_init() should be more robust
  tcp: __tcp_hdrlen() helper
  net: igmp: fix source address check for IGMPv3 reports
  lan78xx: Fix failure in USB Full Speed
  ipv6: ip6_make_skb() needs to clear cork.base.dst
  ipv6: fix udpv6 sendmsg crash caused by too small MTU
  ipv6: Fix getsockopt() for sockets with default IPV6_AUTOFLOWLABEL
  dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state
  hrtimer: Reset hrtimer cpu base proper on CPU hotplug
  ...
2018-02-07 20:59:20 +08:00
Zorro Liu
3726b810fe drivers: input: sensors: reset sensor rate
Change-Id: I3fc1fbe5c054867fe6ce93f64bc2dc14f6abeb9c
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-02 19:06:30 +08:00
Alex Shi
59e35359ec Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android 2018-02-01 12:02:38 +08:00
Tao Huang
f9eefeeaa7 rk: add SPDX license identifier to files with no license
Change-Id: I754250669891307b0deab2bdab1bd01512713f79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-31 20:56:06 +08:00
Aaron Ma
9af7500349 Input: trackpoint - force 3 buttons if 0 button is reported
commit f5d07b9e98 upstream.

Lenovo introduced trackpoint compatible sticks with minimum PS/2 commands.
They supposed to reply with 0x02, 0x03, or 0x04 in response to the
"Read Extended ID" command, so we would know not to try certain extended
commands. Unfortunately even some trackpoints reporting the original IBM
version (0x01 firmware 0x0e) now respond with incorrect data to the "Get
Extended Buttons" command:

 thinkpad_acpi: ThinkPad BIOS R0DET87W (1.87 ), EC unknown
 thinkpad_acpi: Lenovo ThinkPad E470, model 20H1004SGE

 psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 0/0

Since there are no trackpoints without buttons, let's assume the trackpoint
has 3 buttons when we get 0 response to the extended buttons query.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=196253
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-31 12:06:11 +01:00
Tao Huang
640193f76b Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (733 commits)
  LSK-ANDROID: memcg: Remove wrong ->attach callback
  LSK-ANDROID: arm64: mm: Fix __create_pgd_mapping() call
  ANDROID: sdcardfs: Move default_normal to superblock
  blkdev: Refactoring block io latency histogram codes
  FROMLIST: arm64: kpti: Fix the interaction between ASID switching and software PAN
  FROMLIST: arm64: Move post_ttbr_update_workaround to C code
  FROMLIST: arm64: mm: Rename post_ttbr0_update_workaround
  sched: EAS: Initialize push_task as NULL to avoid direct reference on out_unlock path
  fscrypt: updates on 4.15-rc4
  ANDROID: uid_sys_stats: fix the comment
  BACKPORT: tee: indicate privileged dev in gen_caps
  BACKPORT: tee: optee: sync with new naming of interrupts
  BACKPORT: tee: tee_shm: Constify dma_buf_ops structures.
  BACKPORT: tee: optee: interruptible RPC sleep
  BACKPORT: tee: optee: add const to tee_driver_ops and tee_desc structures
  BACKPORT: tee.txt: standardize document format
  BACKPORT: tee: add forward declaration for struct device
  BACKPORT: tee: optee: fix uninitialized symbol 'parg'
  BACKPORT: tee: add ARM_SMCCC dependency
  BACKPORT: selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables
  ...

Conflicts:
	arch/arm64/kernel/vdso.c
	drivers/usb/host/xhci-plat.c
	include/drm/drmP.h
	include/linux/kasan.h
	kernel/time/timekeeping.c
	mm/kasan/kasan.c
	security/selinux/nlmsgtab.c

Also add this commit:
0bcdc0987c ("time: Fix ktime_get_raw() incorrect base accumulation")
2018-01-26 19:26:47 +08:00
Tao Huang
8f9e364c9c input: keyboard: remove unused rk29_keys driver
Change-Id: I4faf4e44cbfad2b3353d49baa75b3d21d9a01edf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-25 10:23:37 +08:00
Johan Hovold
b6306f3fdc Input: twl4030-vibra - fix sibling-node lookup
commit 5b18920199 upstream.

A helper purported to look up a child node based on its name was using
the wrong of-helper and ended up prematurely freeing the parent of-node
while searching the whole device tree depth-first starting at the parent
node.

Fixes: 64b9e4d803 ("input: twl4030-vibra: Support for DT booted kernel")
Fixes: e661d0a044 ("Input: twl4030-vibra - fix ERROR: Bad of_node_put() warning")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23 19:50:16 +01:00
Johan Hovold
a89e1ac9b0 Input: twl6040-vibra - fix child-node lookup
commit dcaf12a8b0 upstream.

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at parent rather than just matching on
its children.

Later sanity checks on node properties (which would likely be missing)
should prevent this from causing much trouble however, especially as the
original premature free of the parent node has already been fixed
separately (but that "fix" was apparently never backported to stable).

Fixes: e7ec014a47 ("Input: twl6040-vibra - update for device tree support")
Fixes: c52c545ead ("Input: twl6040-vibra - fix DT node memory management")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: H. Nikolaus Schaller <hns@goldelico.com> (on Pyra OMAP5 hardware)
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23 19:50:16 +01:00
H. Nikolaus Schaller
8e70d48622 Input: twl6040-vibra - fix DT node memory management
commit c52c545ead upstream.

commit e7ec014a47 ("Input: twl6040-vibra - update for device tree support")

made the separate vibra DT node to a subnode of the twl6040.

It now calls of_find_node_by_name() to locate the "vibra" subnode.
This function has a side effect to call of_node_put on() for the twl6040
parent node passed in as a parameter. This causes trouble later on.

Solution: we must call of_node_get() before of_find_node_by_name()

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23 19:50:15 +01:00
Johan Hovold
47970b4ea0 Input: 88pm860x-ts - fix child-node lookup
commit 906bf7daa0 upstream.

Fix child node-lookup during probe, which ended up searching the whole
device tree depth-first starting at parent rather than just matching on
its children.

To make things worse, the parent node was prematurely freed, while the
child node was leaked.

Fixes: 2e57d56747 ("mfd: 88pm860x: Device tree support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23 19:50:15 +01:00
Amit Pundir
395ae9f4e6 Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

Conflicts:
    kernel/fork.c
        Conflict due to Kaiser implementation in LTS 4.4.110.
    net/ipv4/raw.c
        Minor conflict due to LTS commit
        be27b620a8 ("net: ipv4: fix for a race condition in raw_sendmsg")
2018-01-22 11:50:22 +05:30
Zhou weixin
9d44f5ccfc input: touchscreen: add gt1x driver
Change-Id: Ic4c5abf51c3dd5383bdc91029afbc7c903c2093a
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-01-18 18:14:34 +08:00
Zhou weixin
d1ce97ac91 input: touchscreen: gsl3673: add tp driver for rk3326 f863 board
Change-Id: I9aef5a8972887782c8becf6ddba3bc3649cb82fa
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2018-01-12 14:21:46 +08:00
Aaron Ma
0a99730ae0 Input: elantech - add new icbody type 15
commit 10d900303f upstream.

The touchpad of Lenovo Thinkpad L480 reports it's version as 15.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10 09:27:12 +01:00
Zorro Liu
aae2e5388c driver: input: sensors: modify accel sensor calibration offset
Change-Id: I411f148b38aa0b4feabf9135123d20d3006798fa
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-01-09 14:09:48 +08:00
Zorro Liu
48ce086873 drivers: input: sensors: reset sensor rate if rate is out of range
Change-Id: I7d78b0bf3bab24c18a13ba72b0868fb609a6ceb3
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-01-04 14:28:21 +08:00
Alex Shi
317c5652a7 Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android 2017-12-21 12:06:53 +08:00
Dmitry Torokhov
dbfba339c7 Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list
[ Upstream commit a4c2a13129 ]

TUXEDO BU1406 does not implement active multiplexing mode properly,
and takes around 550 ms in i8042_set_mux_mode(). Given that the
device does not have external AUX port, there is no downside in
disabling the MUX mode.

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Suggested-by: Vojtech Pavlik <vojtech@suse.cz>
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20 10:04:53 +01:00
Tao Huang
e4b484d077 input: sensor-dev: fix compilation warning for !PM_SLEEP
Change-Id: I4f63d7a86ebe3d0015a4d409f0f256b70f7e7cf8
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-12-13 15:56:09 +08:00
Zorro Liu
b8e487f1f6 driver: input: sensor: convert gyro sensor data to match user level
Change-Id: If23a83abc26c46ed31da11f6c2e49fdb8625e7a5
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-12-04 09:41:56 +08:00
Zorro Liu
4b5687dec0 driver: input: sensor: convert gsensor data to match user level
Change-Id: I6c32eab3aad9da36609b7fb0fd24473e0e9ae22d
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-12-04 09:41:56 +08:00
Xinhuang Li
cbc0075a13 input: rc: Fix clk get error
when the work clock is the same as the bus clock.drop
the "clock-names" property as the PWM uses only one
clock (the driver now needs to call devm_clk_get with NULL).

Change-Id: I7fcdd9635f81778a3dc522d99d0fc081408d6fea
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-12-01 18:22:23 +08:00
Tao Huang
afd240d168 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (510 commits)
  Linux 4.4.103
  Revert "sctp: do not peel off an assoc from one netns to another one"
  xen: xenbus driver must not accept invalid transaction ids
  s390/kbuild: enable modversions for symbols exported from asm
  ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data
  btrfs: return the actual error value from from btrfs_uuid_tree_iterate
  ASoC: rsnd: don't double free kctrl
  netfilter: nf_tables: fix oob access
  netfilter: nft_queue: use raw_smp_processor_id()
  spi: SPI_FSL_DSPI should depend on HAS_DMA
  staging: iio: cdc: fix improper return value
  iio: light: fix improper return value
  mac80211: Suppress NEW_PEER_CANDIDATE event if no room
  mac80211: Remove invalid flag operations in mesh TSF synchronization
  drm: Apply range restriction after color adjustment when allocation
  ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBE
  ath10k: set CTS protection VDEV param only if VDEV is up
  ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats()
  ath10k: ignore configuring the incorrect board_id
  ath10k: fix incorrect txpower set by P2P_DEVICE interface
  ...

Conflicts:
	drivers/media/v4l2-core/v4l2-ctrls.c
	kernel/sched/fair.c

Change-Id: I48152b2a0ab1f9f07e1da7823119b94f9b9e1751
2017-12-01 11:04:13 +08:00
Zorro Liu
6639a96a5d drivers: sensor: modify sensor calibrate function
1.check gsensor value when doing calibration
2.return calibration err number

Change-Id: Iff2839ad75ba9df1f724e8a6a59848d1af5ac952
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-27 12:05:18 +08:00
Xinhuang Li
00f0ddd6a2 input: rc: compatible with different numbers of clks definitions
rk3328 has two clk for pwm module

Change-Id: I85e7f08ef2f850a53dd16403f96ee4b0a0596c61
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-24 10:29:26 +08:00
Zorro Liu
6bf00d509a driver: input: sensor: improve lis3dh init and data read
Change-Id: Ie5bb012a2f60b966179cacba1fbff530c172dae3
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-23 15:27:17 +08:00
Amit Pundir
839f249169 Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Conflicts due to AOSP's backported commits:
    fs/f2fs/crypto.c
    fs/f2fs/crypto_fname.c
        Deleted by AOSP commit c1286ff41c ("f2fs: backport from (4c1fad64 -
        Merge tag 'for-f2fs-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs)")

    fs/f2fs/crypto_key.c
    fs/f2fs/data.c
    fs/f2fs/file.c
        AOSP commit 13f002354d ("f2fs: catch up to v4.14-rc1")
        override most of stable 4.4.y changes.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2017-11-20 20:53:19 +05:30
Dmitry Torokhov
b7c625ce6d Input: ims-psu - check if CDC union descriptor is sane
commit ea04efee76 upstream.

Before trying to use CDC union descriptor, try to validate whether that it
is sane by checking that intf->altsetting->extra is big enough and that
descriptor bLength is not too big and not too small.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-18 11:11:05 +01:00
Zorro Liu
ab372c6336 driver: input: sensor: calibration data store in vendor storage
Change-Id: I338475309e716774c0b9ef81d9cbb425088b58a2
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-16 14:38:32 +08:00
Zorro Liu
2b5d85d7b2 driver: input: sensor: fix unbalanced enable for some sensor irq
[   31.190438] Unbalanced enable for IRQ 163
[   31.190481] ------------[ cut here ]------------
[   31.190495] WARNING: at kernel/irq/manage.c:513
[   31.190505] Modules linked in: bcmdhd
[   31.190525]
[   31.190544] CPU: 1 PID: 270 Comm: sensors@1.0-ser Not tainted 4.4.93 #175
[   31.190561] Hardware name: Rockchip rk3368 xkp board (DT)
[   31.190575] task: ffffffc076ac2700 task.stack: ffffffc076b28000
[   31.190601] PC is at __enable_irq+0x34/0x74
[   31.190614] LR is at __enable_irq+0x34/0x74
...
[   31.198173] [<ffffff80080f5d84>] __enable_irq+0x34/0x74
[   31.198188] [<ffffff80080f5e30>] enable_irq+0x6c/0x94
[   31.198207] [<ffffff800868e11c>] sensor_enable+0x78/0x13c
[   31.198222] [<ffffff800868e8a8>] light_dev_ioctl+0x1a4/0x1d4
[   31.198240] [<ffffff80081c71d4>] do_vfs_ioctl+0x5e4/0x720
[   31.198254] [<ffffff80081c7370>] SyS_ioctl+0x60/0x88
[   31.198270] [<ffffff8008082930>] el0_svc_naked+0x24/0x28

Change-Id: Ieba4a76910fde7381ea4b8113cca20fa068fabbd
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-16 09:43:05 +08:00
Kai-Heng Feng
05b690ccb0 Input: elan_i2c - add ELAN060C to the ACPI table
commit cdea6a30c2 upstream.

ELAN060C touchpad uses elan_i2c as its driver. It can be
found on Lenovo ideapad 320-14AST.

BugLink: https://bugs.launchpad.net/bugs/1727544
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-15 17:13:13 +01:00
Akinobu Mita
aa4af0fca1 Input: mpr121 - set missing event capability
[ Upstream commit 9723ddc8fe ]

This driver reports misc scan input events on the sensor's status
register changes.  But the event capability for them was not set in the
device initialization, so these events were ignored.

This change adds the missing event capability.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-15 17:13:10 +01:00
Akinobu Mita
0a731928f2 Input: mpr121 - handle multiple bits change of status register
[ Upstream commit 08fea55e37 ]

This driver reports input events on their interrupts which are triggered
by the sensor's status register changes.  But only single bit change is
reported in the interrupt handler.  So if there are multiple bits are
changed at almost the same time, other press or release events are ignored.

This fixes it by detecting all changed bits in the status register.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-15 17:13:10 +01:00
Zorro Liu
7f1ae55f96 driver: input: sensor: gyro: add new and to pass vts
1.add mpu6500 gyro driver
2.mpu6500 and mpu6880 to pass vts

Change-Id: I7a18578847e92c2cacd8d9b545455840b3a7b318
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-14 15:31:54 +08:00
Zorro Liu
49c623158c driver: input: sensor: update mpu6500 and mpu6880 accel driver
rate is not correct in interrupt mode, so just return and we
always use poll mode

Change-Id: I494600852907a8fff6599305195f5b4ccdb0bf7c
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-14 15:31:24 +08:00
Zorro Liu
42d5ef26c7 driver: sensor: add gyro sensor calibration function
Change-Id: Ic1e638631541f84d51c5e2c5bb3813e5a45a3fbe
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-14 15:31:13 +08:00
Zorro Liu
806fc43f29 driver: input: sensor: client is always null, we should not use it
[    3.427327] [<ffffff8008520c18>] dev_driver_string+0x0/0x34
[    3.432895] [<ffffff800852157c>] _dev_info+0x74/0x94
[    3.437860] [<ffffff8008690988>] sensor_register_slave+0x80/0x8c
[    3.443858] [<ffffff8009052874>] gsensor_mma8452_init+0x24/0x2c
[    3.449776] [<ffffff80080831f0>] do_one_initcall+0x178/0x194
[    3.455437] [<ffffff8009020ddc>] kernel_init_freeable+0x1a4/0x25c
[    3.461531] [<ffffff8008ae9940>] kernel_init+0x10/0xf8
[    3.466666] [<ffffff80080828d0>] ret_from_fork+0x10/0x40

Change-Id: I16e608e82c4da098b6d7b42fa7c3a2dc864724f6
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-13 10:29:47 +08:00
Zorro Liu
b9561487ed driver: input: sensor: add reprobe function
Change-Id: Ia4e405814851084825505e357fb95d95267fddaf
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-10 20:02:31 +08:00
Zorro Liu
a32d316fcc driver: sensors: improve sensor driver to pass android vts test
1) coding style
2) gsensor calibration by user
3) make sensor rate setting effective

Change-Id: I123674ad2fde72b0aa84e6135669ce1f44d5229d
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-10 20:02:11 +08:00
Zorro Liu
506a44f3cf driver: input: sensor: update lis3dh, mc3230, mpu6500, mpu6880 drivers
1.apply sensor rate
2.can pass android vts test

Change-Id: Ib4877fe3696e3724f8f9a2d21873438841e1b97f
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-10 20:00:20 +08:00