GPIO fixes for the v4.20 series:

- Do not lose an IDA on the gpiochip register errorpath.
 
 - Fix the PXA non-pincontrol GPIO-using platforms.
 
 - Fix the direction on the mockup GPIO driver.
 
 - Add some MAINTAINERS stuff: Bartosz stepped up as GPIO
   co-maintainer, and Andy established an Intel git tree.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJb97VPAAoJEEEQszewGV1zLZwQAIotWspRLkhgCrZuREynPYoZ
 sUy/HHDRHtmuaq61aR2TYk1Z3IYGmHVQ1oQq08ythLGIhmnnaO450T5FVTJDJoTg
 Ow2PkttWN7uT2R6tlqDlRU5m5ZsHqh8W4g0GIHTN0DChTOP4W/v8iNONrbYd3oFv
 JPMPP2ZWmbD9ZhhM4MlqOJmhDnNvze/2B5FaAzoO4wUUIz9eTBpiCqW9VHgycUKS
 GDpzoePRaGklrGhcvMOycxVK8Q/EGHv72fhW1vATsVj66Z/QQoMHwn83E3PfmXjI
 oEqEKRKiE6dkmHg55mYqyn2li76QmGRoRlTpanXH/M5wAkDBCRTXyyM2WZCprmLm
 Thfnno++f9kC8i0DnevkNHS2OfHgbK2tEwxMGoKdjeMeEbX5xd29ooJpnv8DXbo7
 hUGr/MaKst++nPvVaAoE0bcNDjdvZDzgSpfie+gaaWqhVZn8yUSUP7jCYckIGY53
 Cdb54+eEj+BLCLwIyqnMurKhnEGpZ74aMdz47lPcp1zrnkkt8ffgycO/xJRBdtKo
 qSk6P7K5GvFzRb5jEHdfDlTjro34bpx+cr+qvenJoHXufoJE5FykQNtz7TGl4jzq
 Ohxlz1oNNip5gxvwsYDKSf+3rhSUAJB0ZpiwgknPx6wDeugdCywozsIHqBlcdN9+
 i7BI0xpG1AM+cghZrfvO
 =Z8GG
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "Minor stuff except the IDA leak which was kind of important to fix.
  Also new maintainers, yay.

   - Do not lose an IDA on the gpiochip register errorpath.

   - Fix the PXA non-pincontrol GPIO-using platforms.

   - Fix the direction on the mockup GPIO driver.

   - Add some MAINTAINERS stuff: Bartosz stepped up as GPIO
     co-maintainer, and Andy established an Intel git tree"

* tag 'gpio-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  MAINTAINERS: Do maintain Intel GPIO drivers via separate tree
  gpio: mockup: fix indicated direction
  gpio: pxa: fix legacy non pinctrl aware builds again
  gpio: don't free unallocated ida on gpiochip_add_data_with_key() error path
  MAINTAINERS: add myself as co-maintainer of gpiolib
This commit is contained in:
Linus Torvalds 2018-11-23 10:40:19 -08:00
commit e6005d3c42
4 changed files with 30 additions and 19 deletions

View File

@ -6305,6 +6305,7 @@ F: tools/testing/selftests/gpio/
GPIO SUBSYSTEM GPIO SUBSYSTEM
M: Linus Walleij <linus.walleij@linaro.org> M: Linus Walleij <linus.walleij@linaro.org>
M: Bartosz Golaszewski <bgolaszewski@baylibre.com>
L: linux-gpio@vger.kernel.org L: linux-gpio@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
S: Maintained S: Maintained
@ -7442,6 +7443,20 @@ S: Maintained
F: Documentation/fb/intelfb.txt F: Documentation/fb/intelfb.txt
F: drivers/video/fbdev/intelfb/ F: drivers/video/fbdev/intelfb/
INTEL GPIO DRIVERS
M: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
L: linux-gpio@vger.kernel.org
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git
F: drivers/gpio/gpio-ich.c
F: drivers/gpio/gpio-intel-mid.c
F: drivers/gpio/gpio-lynxpoint.c
F: drivers/gpio/gpio-merrifield.c
F: drivers/gpio/gpio-ml-ioh.c
F: drivers/gpio/gpio-pch.c
F: drivers/gpio/gpio-sch.c
F: drivers/gpio/gpio-sodaville.c
INTEL GVT-g DRIVERS (Intel GPU Virtualization) INTEL GVT-g DRIVERS (Intel GPU Virtualization)
M: Zhenyu Wang <zhenyuw@linux.intel.com> M: Zhenyu Wang <zhenyuw@linux.intel.com>
M: Zhi Wang <zhi.a.wang@intel.com> M: Zhi Wang <zhi.a.wang@intel.com>
@ -7452,12 +7467,6 @@ T: git https://github.com/intel/gvt-linux.git
S: Supported S: Supported
F: drivers/gpu/drm/i915/gvt/ F: drivers/gpu/drm/i915/gvt/
INTEL PMIC GPIO DRIVER
R: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
S: Maintained
F: drivers/gpio/gpio-*cove.c
F: drivers/gpio/gpio-msic.c
INTEL HID EVENT DRIVER INTEL HID EVENT DRIVER
M: Alex Hung <alex.hung@canonical.com> M: Alex Hung <alex.hung@canonical.com>
L: platform-driver-x86@vger.kernel.org L: platform-driver-x86@vger.kernel.org
@ -7545,12 +7554,6 @@ W: https://01.org/linux-acpi
S: Supported S: Supported
F: drivers/platform/x86/intel_menlow.c F: drivers/platform/x86/intel_menlow.c
INTEL MERRIFIELD GPIO DRIVER
M: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
L: linux-gpio@vger.kernel.org
S: Maintained
F: drivers/gpio/gpio-merrifield.c
INTEL MIC DRIVERS (mic) INTEL MIC DRIVERS (mic)
M: Sudeep Dutt <sudeep.dutt@intel.com> M: Sudeep Dutt <sudeep.dutt@intel.com>
M: Ashutosh Dixit <ashutosh.dixit@intel.com> M: Ashutosh Dixit <ashutosh.dixit@intel.com>
@ -7583,6 +7586,13 @@ F: drivers/platform/x86/intel_punit_ipc.c
F: arch/x86/include/asm/intel_pmc_ipc.h F: arch/x86/include/asm/intel_pmc_ipc.h
F: arch/x86/include/asm/intel_punit_ipc.h F: arch/x86/include/asm/intel_punit_ipc.h
INTEL PMIC GPIO DRIVERS
M: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git
F: drivers/gpio/gpio-*cove.c
F: drivers/gpio/gpio-msic.c
INTEL MULTIFUNCTION PMIC DEVICE DRIVERS INTEL MULTIFUNCTION PMIC DEVICE DRIVERS
R: Andy Shevchenko <andriy.shevchenko@linux.intel.com> R: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
S: Maintained S: Maintained

View File

@ -35,8 +35,8 @@
#define gpio_mockup_err(...) pr_err(GPIO_MOCKUP_NAME ": " __VA_ARGS__) #define gpio_mockup_err(...) pr_err(GPIO_MOCKUP_NAME ": " __VA_ARGS__)
enum { enum {
GPIO_MOCKUP_DIR_OUT = 0, GPIO_MOCKUP_DIR_IN = 0,
GPIO_MOCKUP_DIR_IN = 1, GPIO_MOCKUP_DIR_OUT = 1,
}; };
/* /*
@ -131,7 +131,7 @@ static int gpio_mockup_get_direction(struct gpio_chip *gc, unsigned int offset)
{ {
struct gpio_mockup_chip *chip = gpiochip_get_data(gc); struct gpio_mockup_chip *chip = gpiochip_get_data(gc);
return chip->lines[offset].dir; return !chip->lines[offset].dir;
} }
static int gpio_mockup_to_irq(struct gpio_chip *gc, unsigned int offset) static int gpio_mockup_to_irq(struct gpio_chip *gc, unsigned int offset)

View File

@ -268,8 +268,8 @@ static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
if (pxa_gpio_has_pinctrl()) { if (pxa_gpio_has_pinctrl()) {
ret = pinctrl_gpio_direction_input(chip->base + offset); ret = pinctrl_gpio_direction_input(chip->base + offset);
if (!ret) if (ret)
return 0; return ret;
} }
spin_lock_irqsave(&gpio_lock, flags); spin_lock_irqsave(&gpio_lock, flags);

View File

@ -1295,7 +1295,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data,
gdev->descs = kcalloc(chip->ngpio, sizeof(gdev->descs[0]), GFP_KERNEL); gdev->descs = kcalloc(chip->ngpio, sizeof(gdev->descs[0]), GFP_KERNEL);
if (!gdev->descs) { if (!gdev->descs) {
status = -ENOMEM; status = -ENOMEM;
goto err_free_gdev; goto err_free_ida;
} }
if (chip->ngpio == 0) { if (chip->ngpio == 0) {
@ -1427,8 +1427,9 @@ err_free_label:
kfree_const(gdev->label); kfree_const(gdev->label);
err_free_descs: err_free_descs:
kfree(gdev->descs); kfree(gdev->descs);
err_free_gdev: err_free_ida:
ida_simple_remove(&gpio_ida, gdev->id); ida_simple_remove(&gpio_ida, gdev->id);
err_free_gdev:
/* failures here can mean systems won't boot... */ /* failures here can mean systems won't boot... */
pr_err("%s: GPIOs %d..%d (%s) failed to register, %d\n", __func__, pr_err("%s: GPIOs %d..%d (%s) failed to register, %d\n", __func__,
gdev->base, gdev->base + gdev->ngpio - 1, gdev->base, gdev->base + gdev->ngpio - 1,