1. 29 6月, 2017 1 次提交
  2. 20 6月, 2017 1 次提交
  3. 09 6月, 2017 2 次提交
  4. 23 5月, 2017 1 次提交
    • H
      gpio: crystalcove: Do not write regular gpio registers for virtual GPIOs · 9a752b4c
      Hans de Goede 提交于
      The Crystal Cove PMIC has 16 real GPIOs but the ACPI code for devices
      with this PMIC may address up to 95 GPIOs, these extra GPIOs are
      called virtual GPIOs and are used by the ACPI code as a method of
      accessing various non GPIO bits of PMIC.
      
      Commit dcdc3018 ("gpio: crystalcove: support virtual GPIO") added
      dummy support for these to avoid a bunch of ACPI errors, but instead of
      ignoring writes / reads to them by doing:
      
      if (gpio >= CRYSTALCOVE_GPIO_NUM)
      	return 0;
      
      It accidentally introduced the following wrong check:
      
      if (gpio > CRYSTALCOVE_VGPIO_NUM)
      	return 0;
      
      Which means that attempts by the ACPI code to access these gpios
      causes some arbitrary gpio to get touched through for example
      GPIO1P0CTLO + gpionr % 8.
      
      Since we do support input/output (but not interrupts) on the 0x5e
      virtual GPIO, this commit makes to_reg return -ENOTSUPP for unsupported
      virtual GPIOs so as to not have to check for (gpio >= CRYSTALCOVE_GPIO_NUM
      && gpio != 0x5e) everywhere and to make it easier to add support for more
      virtual GPIOs in the future.
      
      It then adds a check for to_reg returning an error to all callers where
      this may happen fixing the ACPI code accessing virtual GPIOs accidentally
      causing changes to real GPIOs.
      
      Fixes: dcdc3018 ("gpio: crystalcove: support virtual GPIO")
      Cc: Aaron Lu <aaron.lu@intel.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      9a752b4c
  5. 22 5月, 2017 1 次提交
  6. 28 4月, 2017 4 次提交
  7. 27 4月, 2017 1 次提交
  8. 25 4月, 2017 1 次提交
  9. 24 4月, 2017 6 次提交
  10. 20 4月, 2017 1 次提交
    • D
      Annotate hardware config module parameters in drivers/gpio/ · d759f906
      David Howells 提交于
      When the kernel is running in secure boot mode, we lock down the kernel to
      prevent userspace from modifying the running kernel image.  Whilst this
      includes prohibiting access to things like /dev/mem, it must also prevent
      access by means of configuring driver modules in such a way as to cause a
      device to access or modify the kernel image.
      
      To this end, annotate module_param* statements that refer to hardware
      configuration and indicate for future reference what type of parameter they
      specify.  The parameter parser in the core sees this information and can
      skip such parameters with an error message if the kernel is locked down.
      The module initialisation then runs as normal, but just sees whatever the
      default values for those parameters is.
      
      Note that we do still need to do the module initialisation because some
      drivers have viable defaults set in case parameters aren't specified and
      some drivers support automatic configuration (e.g. PNP or PCI) in addition
      to manually coded parameters.
      
      This patch annotates drivers in drivers/gpio/.
      Suggested-by: NAlan Cox <gnomes@lxorguk.ukuu.org.uk>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      cc: Alexandre Courbot <gnurou@gmail.com>
      cc: linux-gpio@vger.kernel.org
      d759f906
  11. 13 4月, 2017 1 次提交
  12. 07 4月, 2017 3 次提交
  13. 30 3月, 2017 2 次提交
  14. 28 3月, 2017 3 次提交
  15. 24 3月, 2017 5 次提交
  16. 23 3月, 2017 7 次提交