1. 09 Jan, 2020 37 commits
  2. 04 Jan, 2020 3 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.19.93 · 3d40d711
      Greg Kroah-Hartman authored
      3d40d711
    • Christophe Leroy's avatar
      spi: fsl: use platform_get_irq() instead of of_irq_to_resource() · 947e8372
      Christophe Leroy authored
      commit 63aa6a69 upstream.
      
      Unlike irq_of_parse_and_map() which has a dummy definition on SPARC,
      of_irq_to_resource() hasn't.
      
      But as platform_get_irq() can be used instead and is generic, use it.
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Suggested-by: default avatarMark Brown <broonie@kernel.org>
      Fixes: 	3194d253 ("spi: fsl: don't map irq during probe")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Link: https://lore.kernel.org/r/091a277fd0b3356dca1e29858c1c96983fc9cb25.1576172743.git.christophe.leroy@c-s.frSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      947e8372
    • Hans de Goede's avatar
      pinctrl: baytrail: Really serialize all register accesses · bbe414a1
      Hans de Goede authored
      [ Upstream commit 40ecab55 ]
      
      Commit 39ce8150 ("pinctrl: baytrail: Serialize all register access")
      added a spinlock around all register accesses because:
      
      "There is a hardware issue in Intel Baytrail where concurrent GPIO register
       access might result reads of 0xffffffff and writes might get dropped
       completely."
      
      Testing has shown that this does not catch all cases, there are still
      2 problems remaining
      
      1) The original fix uses a spinlock per byt_gpio device / struct,
      additional testing has shown that this is not sufficient concurent
      accesses to 2 different GPIO banks also suffer from the same problem.
      
      This commit fixes this by moving to a single global lock.
      
      2) The original fix did not add a lock around the register accesses in
      the suspend/resume handling.
      
      Since pinctrl-baytrail.c is using normal suspend/resume handlers,
      interrupts are still enabled during suspend/resume handling. Nothing
      should be using the GPIOs when they are being taken down, _but_ the
      GPIOs themselves may still cause interrupts, which are likely to
      use (read) the triggering GPIO. So we need to protect against
      concurrent GPIO register accesses in the suspend/resume handlers too.
      
      This commit fixes this by adding the missing spin_lock / unlock calls.
      
      The 2 fixes together fix the Acer Switch 10 SW5-012 getting completely
      confused after a suspend resume. The DSDT for this device has a bug
      in its _LID method which reprograms the home and power button trigger-
      flags requesting both high and low _level_ interrupts so the IRQs for
      these 2 GPIOs continuously fire. This combined with the saving of
      registers during suspend, triggers concurrent GPIO register accesses
      resulting in saving 0xffffffff as pconf0 value during suspend and then
      when restoring this on resume the pinmux settings get all messed up,
      resulting in various I2C busses being stuck, the wifi no longer working
      and often the tablet simply not coming out of suspend at all.
      
      Cc: stable@vger.kernel.org
      Fixes: 39ce8150 ("pinctrl: baytrail: Serialize all register access")
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      bbe414a1