aboutsummaryrefslogtreecommitdiffstats
path: root/MAINTAINERS
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2017-05-13 14:39:53 +0200
committerLinus Walleij <linus.walleij@linaro.org>2017-05-23 10:02:01 +0200
commit9a752b4c9ab924033bfdb8784c680d50b2bd5684 (patch)
tree11a07759633229716ec5c8202f0bcbfcb0c30e8a /MAINTAINERS
parentgpio: aspeed: Don't attempt to debounce if disabled (diff)
downloadlinux-dev-9a752b4c9ab924033bfdb8784c680d50b2bd5684.tar.xz
linux-dev-9a752b4c9ab924033bfdb8784c680d50b2bd5684.zip
gpio: crystalcove: Do not write regular gpio registers for virtual GPIOs
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 dcdc3018d635 ("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: dcdc3018d635 ("gpio: crystalcove: support virtual GPIO") Cc: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions