08 Mar, 2020

1 commit

  • Merge Linux stable release v5.4.24 into imx_5.4.y

    * tag 'v5.4.24': (3306 commits)
    Linux 5.4.24
    blktrace: Protect q->blk_trace with RCU
    kvm: nVMX: VMWRITE checks unsupported field before read-only field
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx6sll-evk.dts
    arch/arm/boot/dts/imx7ulp.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
    drivers/clk/imx/clk-composite-8m.c
    drivers/gpio/gpio-mxc.c
    drivers/irqchip/Kconfig
    drivers/mmc/host/sdhci-of-esdhc.c
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/can/flexcan.c
    drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
    drivers/net/ethernet/mscc/ocelot.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
    drivers/net/phy/realtek.c
    drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
    drivers/perf/fsl_imx8_ddr_perf.c
    drivers/tee/optee/shm_pool.c
    drivers/usb/cdns3/gadget.c
    kernel/sched/cpufreq.c
    net/core/xdp.c
    sound/soc/fsl/fsl_esai.c
    sound/soc/fsl/fsl_sai.c
    sound/soc/sof/core.c
    sound/soc/sof/imx/Kconfig
    sound/soc/sof/loader.c

    Jason Liu
     

24 Feb, 2020

1 commit

  • [ Upstream commit e112324cc0422c046f1cf54c56f333d34fa20885 ]

    The EP0700MLP1 returns bogus data on the first register read access
    (reading the threshold parameter from register 0x00):

    edt_ft5x06 2-0038: crc error: 0xfc expected, got 0x40

    It ignores writes until then. This patch adds a dummy read after which
    the number of sensors and parameter read/writes work correctly.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Marco Felsch
    Tested-by: Andy Shevchenko
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Philipp Zabel
     

20 Feb, 2020

3 commits

  • commit 5179a9dfa9440c1781816e2c9a183d1d2512dc61 upstream.

    The Yoga 11e is using LEN0049, but it doesn't have a trackstick.

    Thus, there is no need to create a software top buttons row.

    However, it seems that the device works under SMBus, so keep it as part
    of the smbus_pnp_ids.

    Signed-off-by: Benjamin Tissoires
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200115013023.9710-1-benjamin.tissoires@redhat.com
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Tissoires
     
  • commit b8a3d819f872e0a3a0a6db0dbbcd48071042fb98 upstream.

    Add touchpad LEN2044 to the list, as it is capable of working with
    psmouse.synaptics_intertouch=1

    Signed-off-by: Gaurav Agrawal
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/CADdtggVzVJq5gGNmFhKSz2MBwjTpdN5YVOdr4D3Hkkv=KZRc9g@mail.gmail.com
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Gaurav Agrawal
     
  • commit bf502391353b928e63096127e5fd8482080203f5 upstream.

    This supports RMI4 and everything seems to work, including the touchpad
    buttons. So, let's enable this by default.

    Signed-off-by: Lyude Paul
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200204194322.112638-1-lyude@redhat.com
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Lyude Paul
     

06 Feb, 2020

2 commits

  • [ Upstream commit ce535a2efb48d8d4c4e4b97e2764d7cee73d9b55 ]

    We need the of_match table if we want to use the compatible string in
    the pmic's child node and get the onkey driver loaded automatically.

    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Bartosz Golaszewski
     
  • [ Upstream commit 7f439bc2d7e8c8cc4e1bab08ab7fe1bb73c9b268 ]

    We observed a large(order-3) allocation in evdev_open() and it may
    cause an OOM kernel panic in kzalloc(), before we getting to the
    vzalloc() fallback.

    Fix it by converting kzalloc()/vzalloc() to kvzalloc() to avoid the
    OOM killer logic as we have a vmalloc fallback.

    InputReader invoked oom-killer: gfp_mask=0x240c2c0
    (GFP_KERNEL|__GFP_NOWARN|__GFP_COMP|__GFP_ZERO), nodemask=0, order=3,
    oom_score_adj=-900
    ...
    (dump_backtrace) from (show_stack+0x18/0x1c)
    (show_stack) from (dump_stack+0x94/0xa8)
    (dump_stack) from (dump_header+0x7c/0xe4)
    (dump_header) from (out_of_memory+0x334/0x348)
    (out_of_memory) from (__alloc_pages_nodemask+0xe9c/0xeb8)
    (__alloc_pages_nodemask) from (kmalloc_order_trace+0x34/0x128)
    (kmalloc_order_trace) from (__kmalloc+0x258/0x36c)
    (__kmalloc) from (evdev_open+0x5c/0x17c)
    (evdev_open) from (chrdev_open+0x100/0x204)
    (chrdev_open) from (do_dentry_open+0x21c/0x354)
    (do_dentry_open) from (vfs_open+0x58/0x84)
    (vfs_open) from (path_openat+0x640/0xc98)
    (path_openat) from (do_filp_open+0x78/0x11c)
    (do_filp_open) from (do_sys_open+0x130/0x244)
    (do_sys_open) from (SyS_openat+0x14/0x18)
    (SyS_openat) from (__sys_trace_return+0x0/0x10)
    ...
    Normal: 12488*4kB (UMEH) 6984*8kB (UMEH) 2101*16kB (UMEH) 0*32kB
    0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 139440kB
    HighMem: 206*4kB (H) 131*8kB (H) 42*16kB (H) 2*32kB (H) 0*64kB
    0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 2608kB
    ...
    Kernel panic - not syncing: Out of memory and no killable processes...

    Signed-off-by: Miles Chen
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Miles Chen
     

29 Jan, 2020

8 commits

  • commit 97e24b095348a15ec08c476423c3b3b939186ad7 upstream.

    The driver misses a check for devm_thermal_zone_of_sensor_register().
    Add a check to fix it.

    Fixes: e28d0c9cd381 ("input: convert sun4i-ts to use devm_thermal_zone_of_sensor_register")
    Signed-off-by: Chuhong Yuan
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Chuhong Yuan
     
  • commit bcfcb7f9b480dd0be8f0df2df17340ca92a03b98 upstream.

    The driver was checking the number of endpoints of the first alternate
    setting instead of the current one, something which could be used by a
    malicious device (or USB descriptor fuzzer) to trigger a NULL-pointer
    dereference.

    Fixes: 1afca2b66aac ("Input: add Pegasus Notetaker tablet driver")
    Signed-off-by: Johan Hovold
    Acked-by: Martin Kepplinger
    Acked-by: Vladis Dronov
    Link: https://lore.kernel.org/r/20191210113737.4016-2-johan@kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • commit 3111491fca4f01764e0c158c5e0f7ced808eef51 upstream.

    The driver was checking the number of endpoints of the first alternate
    setting instead of the current one, something which could lead to the
    driver binding to an invalid interface.

    This in turn could cause the driver to misbehave or trigger a WARN() in
    usb_submit_urb() that kernels with panic_on_warn set would choke on.

    Fixes: 8e20cf2bce12 ("Input: aiptek - fix crash on detecting device without endpoints")
    Signed-off-by: Johan Hovold
    Acked-by: Vladis Dronov
    Link: https://lore.kernel.org/r/20191210113737.4016-3-johan@kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • commit a8eeb74df5a6bdb214b2b581b14782c5f5a0cf83 upstream.

    The driver was checking the number of endpoints of the first alternate
    setting instead of the current one, something which could lead to the
    driver binding to an invalid interface.

    This in turn could cause the driver to misbehave or trigger a WARN() in
    usb_submit_urb() that kernels with panic_on_warn set would choke on.

    Fixes: 162f98dea487 ("Input: gtco - fix crash on detecting device without endpoints")
    Signed-off-by: Johan Hovold
    Acked-by: Vladis Dronov
    Link: https://lore.kernel.org/r/20191210113737.4016-5-johan@kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • commit 6b32391ed675827f8425a414abbc6fbd54ea54fe upstream.

    Make sure to use the current alternate setting when verifying the
    interface descriptors to avoid binding to an invalid interface.

    This in turn could cause the driver to misbehave or trigger a WARN() in
    usb_submit_urb() that kernels with panic_on_warn set would choke on.

    Fixes: bdb5c57f209c ("Input: add sur40 driver for Samsung SUR40 (aka MS Surface 2.0/Pixelsense)")
    Signed-off-by: Johan Hovold
    Acked-by: Vladis Dronov
    Link: https://lore.kernel.org/r/20191210113737.4016-8-johan@kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • commit 996d5d5f89a558a3608a46e73ccd1b99f1b1d058 upstream.

    Setting the vibrator enable_mask is not implemented correctly:

    For regmap_update_bits(map, reg, mask, val) we give in either
    regs->enable_mask or 0 (= no-op) as mask and "val" as value.
    But "val" actually refers to the vibrator voltage control register,
    which has nothing to do with the enable_mask.

    So we usually end up doing nothing when we really wanted
    to enable the vibrator.

    We want to set or clear the enable_mask (to enable/disable the vibrator).
    Therefore, change the call to always modify the enable_mask
    and set the bits only if we want to enable the vibrator.

    Fixes: d4c7c5c96c92 ("Input: pm8xxx-vib - handle separate enable register")
    Signed-off-by: Stephan Gerhold
    Link: https://lore.kernel.org/r/20200114183442.45720-1-stephan@gerhold.net
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Stephan Gerhold
     
  • commit 8ff771f8c8d55d95f102cf88a970e541a8bd6bcf upstream.

    This reverts commit a284e11c371e446371675668d8c8120a27227339.

    This causes problems (drifting cursor) with at least the F11 function that
    reads more than 32 bytes.

    The real issue is in the F54 driver, and so this should be fixed there, and
    not in rmi_smbus.c.

    So first revert this bad commit, then fix the real problem in F54 in another
    patch.

    Signed-off-by: Hans Verkuil
    Reported-by: Timo Kaufmann
    Fixes: a284e11c371e ("Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers")
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200115124819.3191024-2-hverkuil-cisco@xs4all.nl
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Hans Verkuil
     
  • commit ba9a103f40fc4a3ec7558ec9b0b97d4f92034249 upstream.

    The driver was issuing synchronous uninterruptible control requests
    without using a timeout. This could lead to the driver hanging on probe
    due to a malfunctioning (or malicious) device until the device is
    physically disconnected. While sleeping in probe the driver prevents
    other devices connected to the same hub from being added to (or removed
    from) the bus.

    The USB upper limit of five seconds per request should be more than
    enough.

    Fixes: 99f83c9c9ac9 ("[PATCH] USB: add driver for Keyspan Digital Remote")
    Signed-off-by: Johan Hovold
    Reviewed-by: Greg Kroah-Hartman
    Cc: stable # 2.6.13
    Link: https://lore.kernel.org/r/20200113171715.30621-1-johan@kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     

15 Jan, 2020

2 commits

  • commit f729a1b0f8df7091cea3729fc0e414f5326e1163 upstream.

    Going through all uses of timeval, I noticed that we screwed up
    input_event in the previous attempts to fix it:

    The time fields now match between kernel and user space, but all following
    fields are in the wrong place.

    Add the required padding that is implied by the glibc timeval definition
    to fix the layout, and use a struct initializer to avoid leaking kernel
    stack data.

    Fixes: 141e5dcaa735 ("Input: input_event - fix the CONFIG_SPARC64 mixup")
    Fixes: 2e746942ebac ("Input: input_event - provide override for sparc64")
    Signed-off-by: Arnd Bergmann
    Link: https://lore.kernel.org/r/20191213204936.3643476-2-arnd@arndb.de
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     
  • commit cb222aed03d798fc074be55e59d9a112338ee784 upstream.

    If we happen to have a garbage in input device's keycode table with values
    too big we'll end up doing clear_bit() with offset way outside of our
    bitmaps, damaging other objects within an input device or even outside of
    it. Let's add sanity checks to the returned old keycodes.

    Reported-by: syzbot+c769968809f9359b07aa@syzkaller.appspotmail.com
    Reported-by: syzbot+76f3a30e88d256644c78@syzkaller.appspotmail.com
    Link: https://lore.kernel.org/r/20191207212757.GA245964@dtor-ws
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     

05 Jan, 2020

3 commits

  • [ Upstream commit 43f06a4c639de8ee89fc348a9a3ecd70320a04dd ]

    input_mt_init_slots() may fail and we need to handle such failures.

    Tested-by: Adam Ford #imx6q-logicpd
    Tested-by: Sven Van Asbroeck # ILI2118A variant
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Dmitry Torokhov
     
  • [ Upstream commit efd7bb08a762d4f6322054c6824bd942971ac563 ]

    We should not be putting the chip into reset while interrupts are enabled
    and ISR may be running. Fix this by installing a custom devm action and
    powering off the device/resetting GPIO line from there. This ensures proper
    ordering.

    Tested-by: Matthias Fend
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Dmitry Torokhov
     
  • [ Upstream commit 463fa44eec2fef50d111ed0199cf593235065c04 ]

    Across suspend and resume, we are seeing error messages like the following:

    atmel_mxt_ts i2c-PRP0001:00: __mxt_read_reg: i2c transfer failed (-121)
    atmel_mxt_ts i2c-PRP0001:00: Failed to read T44 and T5 (-121)

    This occurs because the driver leaves its IRQ enabled. Upon resume, there
    is an IRQ pending, but the interrupt is serviced before both the driver and
    the underlying I2C bus have been resumed. This causes EREMOTEIO errors.

    Disable the IRQ in suspend, and re-enable it on resume. If there are cases
    where the driver enters suspend with interrupts disabled, that's a bug we
    should fix separately.

    Signed-off-by: Evan Green
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Evan Green
     

16 Dec, 2019

1 commit

  • This is the 5.4.3 stable release

    Conflicts:
    drivers/cpufreq/imx-cpufreq-dt.c
    drivers/spi/spi-fsl-qspi.c

    The conflict is very minor, fixed it when do the merge. The imx-cpufreq-dt.c
    is just one line code-style change, using upstream one, no any function change.

    The spi-fsl-qspi.c has minor conflicts when merge upstream fixes: c69b17da53b2
    spi: spi-fsl-qspi: Clear TDH bits in FLSHCR register

    After merge, basic boot sanity test and basic qspi test been done on i.mx

    Signed-off-by: Jason Liu

    Jason Liu
     

13 Dec, 2019

5 commits

  • In the implementation of psxpad_spi_probe() the allocated memory for
    pdev is leaked if psxpad_spi_init_ff() or input_register_polled_device()
    fail. The solution is using device managed allocation, like the one used
    for pad. Perform the allocation using
    devm_input_allocate_polled_device().

    Fixes: 8be193c7b1f4 ("Input: add support for PlayStation 1/2 joypads connected via SPI")
    Signed-off-by: Navid Emamdoost
    Acked-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Navid Emamdoost
     
  • commit df5b5e555b356662a5e4a23c6774fdfce8547d54 upstream.

    The touchscreen on the Teclast X89 is mounted upside down in relation to
    the display orientation (the touchscreen itself is mounted upright, but the
    display is mounted upside-down). Add a quirk for this so that we send
    coordinates which match the display orientation.

    Signed-off-by: Hans de Goede
    Reviewed-by: Bastien Nocera
    Link: https://lore.kernel.org/r/20191202085636.6650-1-hdegoede@redhat.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit a284e11c371e446371675668d8c8120a27227339 upstream.

    This increment of rmi_smbus in rmi_smb_read/write_block() causes
    garbage to be read/written.

    The first read of SMB_MAX_COUNT bytes is fine, but after that
    it is nonsense. Trial-and-error showed that by dropping the
    increment of rmiaddr everything is fine and the F54 function
    properly works.

    I tried a hack with rmi_smb_write_block() as well (writing to the
    same F54 touchpad data area, then reading it back), and that
    suggests that there too the rmiaddr increment has to be dropped.
    It makes sense that if it has to be dropped for read, then it has
    to be dropped for write as well.

    It looks like the initial work with F54 was done using i2c, not smbus,
    and it seems nobody ever tested F54 with smbus. The other functions
    all read/write less than SMB_MAX_COUNT as far as I can tell, so this
    issue was never noticed with non-F54 functions.

    With this change I can read out the touchpad data correctly on my
    Lenovo X1 Carbon 6th Gen laptop.

    Signed-off-by: Hans Verkuil
    Link: https://lore.kernel.org/r/8dd22e21-4933-8e9c-a696-d281872c8de7@xs4all.nl
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Hans Verkuil
     
  • commit 86bcd3a12999447faad60ec59c2d64d18d8e61ac upstream.

    F34 is a bit special as it reinitializes the device and related driver
    structs during the firmware update. This clears the fn_irq_mask which
    will then prevent F34 from receiving further interrupts, leading to
    timeouts during the firmware update. Make sure to reinitialize the
    IRQ enables at the appropriate times.

    The issue is in F34 code, but the commit in the fixes tag exposed the
    issue, as before this commit things would work by accident.

    Fixes: 363c53875aef (Input: synaptics-rmi4 - avoid processing unknown IRQs)
    Signed-off-by: Lucas Stach
    Link: https://lore.kernel.org/r/20191129133514.23224-1-l.stach@pengutronix.de
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Lucas Stach
     
  • commit fc1156f373e3927e0dcf06678906c367588bfdd6 upstream.

    Some Lenovo X1 Carbon Gen 6 laptops report LEN0091. Add this
    to the smbus_pnp_ids list.

    Signed-off-by: Hans Verkuil
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20191119105118.54285-2-hverkuil-cisco@xs4all.nl
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Hans Verkuil
     

12 Dec, 2019

1 commit

  • In case long latency spent on some board such as i.mx8mq-evk where pcie
    driver may take 200ms timing window to restore pcie link in no_irq phase,
    press event will be ignored since key maybe already released before timer
    start to run because of the above large 200ms window with irq disabled.
    Directly report press event in interrupt handler after suspend to ensure
    no press event miss in this case.

    Signed-off-by: Robin Gong
    Reviewed-by: Anson Huang

    Robin Gong
     

11 Dec, 2019

1 commit


06 Dec, 2019

1 commit


02 Dec, 2019

2 commits

  • * sensor/next: (29 commits)
    LF-99 hwmon: mag3110: correct processing order after probe error
    MLK-22296-4 misc: mpl3115: Fix build warning when CONFIG_PM_SLEEP=n
    MLK-17061-1 sensor: set sensor interrupt pins as open-drain
    hwmon: mma8451: Add regulator_disable to avoid WARN_ON
    hwmon: mag3110: Add regulator_disable to avoid WARN_ON
    ...

    Dong Aisheng
     
  • * origin/input/touch: (12 commits)
    MLK-19751 input: synaptics_dsx: free touch irq when touch suspend
    MLK-18816-2 input/touch: do not clear touch interrupt when enable irq
    MLK-17829 touchscreen: Add synaptics_dsx S3508 i2c touch driver
    MLK-14392-1 input: touch: add focaltech touch screen support
    MLK-18636 Input: egalax_ts: Restore call to i2c_set_clientdata
    ...

    Dong Aisheng
     

29 Nov, 2019

1 commit


26 Nov, 2019

1 commit

  • On i.mx8mm, kernel may hang if imx_imx_snvs_check_for_events() scheduled
    after snvs clock turned off by rtc-snvs driver while ONOFF key kept on
    pressing during kernel suspend, because imx_imx_snvs_check_for_events()
    will touch snvs rigister. Add clock management in snvs_pwrkey driver
    to fix it. Please note this clock is optional since snvs clock kept always
    on(or even no snvs root clock in clock tree)on some chips such as i.mx6sx/
    i.mx6ul.

    Signed-off-by: Robin Gong
    Reviewed-by: Anson Huang

    Robin Gong
     

25 Nov, 2019

7 commits

  • Fix build warning when CONFIG_PM_SLEEP=n, the warning message is:
    drivers/input/misc/mpl3115.c:290:12: warning: ‘mpl3115_start_chip’ defined but not used [-Wunused-function]
    static int mpl3115_start_chip(struct i2c_client *client)
    ^~~~~~~~~~~~~~~~~~

    Signed-off-by: Clark Wang
    (cherry picked from commit fd826f4b26257fe04272e0d91b53a8e448812bf3)

    Clark Wang
     
  • The sensors share an interrupt pin on imx8qm/imx8qxp mek.
    As a result, the interrupt signals will be interfered by
    each other in default push-pull status.

    This patch sets sensor interrupt pins as open-drain when
    necessary.

    Signed-off-by: Gao Pan
    (cherry-picked from 48bcb7aafa2a3ced923d1a1753bb19d89a9fc273)
    Signed-off-by: Vipul Kumar
    (cherry picked from commit 8406dfab0fdbd5d135a614c38492b2e949ce0ede)

    Gao Pan
     
  • The SCU message data field received from SCU side is 32 bit width,
    while the message defined in imx_sc_pwrkey driver is 8 bit width,
    it will cause stack corruption when SCU writes the response data,
    with CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG enabled, kernel stack
    protection will have panic. Correct the data field width to 32 bit
    to avoid this issue.

    Signed-off-by: Anson Huang
    Reviewed-by: Dong Aisheng

    Anson Huang
     
  • The SCU FW API of getting button status actually needs response
    data, but SCU FW API does NOT have return value for this API, so
    we should call this API with response but skip return value check
    to avoid below NULL pointer crash, since the msg stored in stack
    could be released when mailbox receives the response data and NULL
    pointer dump will occur as below:

    Event: time 1564685464.345502, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
    Event: time 1564685464.345502, -------------- SYN_REPORT ------------
    Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
    Mem abort info:
    ESR = 0x96000006
    EC = 0x25: DABT (current EL), IL = 32 bits
    SET = 0, FnV = 0
    EA = 0, S1PTW = 0
    Data abort info:
    ISV = 0, ISS = 0x00000006
    CM = 0, WnR = 0
    user pgtable: 4k pages, 48-bit VAs, pgdp=00000008b75c6000
    [0000000000000008] pgd=00000008b7611003, pud=00000008b77f4003, pmd=0000000000000000
    Internal error: Oops: 96000006 [#1] PREEMPT SMP
    Modules linked in:
    CPU: 0 PID: 112 Comm: kworker/0:5 Not tainted 5.3.0-rc3-next-20190809-01769-g17e0d18 #200
    Hardware name: Freescale i.MX8QXP MEK (DT)
    Workqueue: 0x0 (events)
    pstate: 60000085 (nZCv daIf -PAN -UAO)
    pc : process_one_work+0x3c/0x2b4
    lr : worker_thread+0x134/0x3e4
    sp : ffff00001216bdb0
    x29: ffff00001216bdb0 x28: ffff00001005bcd8
    x27: ffff80083b03e8b8 x26: ffff000011a204b0
    x25: ffff80083b58c4c0 x24: ffff000011a07000
    x23: 0000000112010201 x22: ffff80083cbaf840
    x21: 0000000000000000 x20: ffff80083b043220
    x19: ffff80083b043200 x18: 0000000000000000
    x17: 0000000000000000 x16: 0000000000000000
    x15: 0000000000000000 x14: 0000000000000000
    x13: 0000000000000000 x12: 0000000000000000
    x11: 0000000000000000 x10: 00000000000009a0
    x9 : ffff00001216bd50 x8 : 0000000000000018
    x7 : 0000000000000001 x6 : ffff80083cbaf860
    x5 : ffff80083cbaf860 x4 : ffff80083cbaf858
    x3 : ffff80083cbaf858 x2 : ffff80083b043228
    x1 : ffff80083b043220 x0 : 0000000000000000
    Call trace:
    process_one_work+0x3c/0x2b4
    worker_thread+0x134/0x3e4
    kthread+0xf8/0x124
    ret_from_fork+0x10/0x18
    Code: 9278deb5 eb1f001f 9a9f12b5 b94012c0 (f94006a1)
    ---[ end trace 9374afe12d7955b1 ]---

    Signed-off-by: Anson Huang

    Anson Huang
     
  • Add PWRON key driver which is based on scfw.

    Signed-off-by: Robin Gong

    Robin Gong
     
  • Add rpmsg-keys driver for i.mx7ulp.

    Signed-off-by: Robin Gong

    Robin Gong
     
  • On the imx8 MIPI DSI oled board, MIPI panel and touch share one RST
    pin. when suspend the whole system, touch will suspend first, it
    disable touch irq, and let touch work in sleep mode. Then MIPI panel
    suspend, it will give a reset signal on the RST pin. Due to this reset
    signal, touch will trigger two interrupt on GPIO1_9. Because touch
    suspend code already disable touch irq, so these two new touch interrupt
    will be pending there, and pending there in GPIO forever.

    When system resume, GPIO will restore registers in runtime resume before
    synaptics_dsx_i2c touch driver resume, so the GPIO1_9 IRQ will be unmasked
    and since its IRQ is pending there so IRQ keeps coming without touch
    driver to handle it, since it is NOT resume yet, make the system can't
    resueme back normally.

    Due to this is the hardware limitation which cause this issue, I format this
    patch to workaround this issue.
    This patch free touch irq in the touch driver suspend procedure, rather than
    just disable the touch irq.

    Reviewed-by: Fugang Duan
    Signed-off-by: Haibo Chen
    (cherry picked from commit a157605b47e2c3800d706b3ca0af24e26c92c187)
    TODO: checkpatch warnings
    Signed-off-by: Vipul Kumar

    Haibo Chen