A set of GPIO fixes for the v3.14 series:

- Get #ifdef's right in the <linux/gpio/consumer.h> header.
 
 - Minor fixes to tb10x, clps711x, bcm281xx, intel-mid and
   xtensa GPIO drivers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJS+4lBAAoJEEEQszewGV1zFzIQAKNEGIZrm+GdEKULoJ2E0SIN
 MzXRgZV3xiz7giroSdbiF+MBb6rE/0Ixa8EnrZ1JBz+OXCEYKYOS/TXbDNPAnjU2
 OI+4aiGUe7cb+Y787z/tggw01twaCYISbdoST+RHwtRi+fizSI0nLLDx3iXMb24t
 1EUjQm/Gv+X3zSwt9zYpv3qO/tiQxf6SVTnYOuGS2DDJX6tXwxpFmlGZGf78cBTs
 2SdfxZmrDU8M+Mqul4i4BmIVfUsgROZaD7YeYVu7tJp2aPyPgPz6PC1YrxYhxOZH
 w4mOhao+anDM8IWBu2jLn6CBl4QN0tgKZJ65dm58wce55q8q/8McOqrSWR9THzAy
 W9niY430MXuY1M2ZB1vsJP0ICR5wSKWf6NkIJOsWVTVLDP4JT3kQoOV+zCTHi+Y8
 UarlFgf54OazF8y2sUcXgSKHIntjmyU/sT04d+27k6RkJl9Nvu7kzRXu+hZBNiEj
 M00E89NxSnUoKQhp5WFcLBBt1MzFxhxRu/Z7EbdkrKIsiIs0iYpZ2met93RjCp/O
 zhoKHmyOLuIGqozRUeQvGS4E8J1Gw2c9opIVnqkF7cuQx5l/Au/OGHMB4A5AVwEa
 ywV+ipxbI+fVlCbRNFAiKhjHAHsK3jDWEsT7vANSy5lRaegL9RCTvMfj/GP34QAG
 gxG2UXLwp37wevGHsV1s
 =pj2O
 -----END PGP SIGNATURE-----

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

Pull GPIO fixes from Linus Walleij:
 "Here are some accumulated patches with small fixes for this and that
  in a few GPIO drivers, and a more important fix to an #ifdef in the
  GPIO consumer header.

  Summary:

   - Get #ifdef's right in the <linux/gpio/consumer.h> header.

   - Minor fixes to tb10x, clps711x, bcm281xx, intel-mid and xtensa GPIO
     drivers"

* tag 'gpio-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: consumer.h: Move forward declarations outside #ifdef
  gpio: tb10x: GPIO_TB10X needs to select GENERIC_IRQ_CHIP
  gpio: clps711x: Add module alias to support module auto loading
  gpio: bcm281xx: Update MODULE_AUTHOR
  gpio: intel-mid: fix the incorrect return of idle callback
  gpio: xtensa: fix build when XCHAL_HAVE_CP is 0
This commit is contained in:
Linus Torvalds 2014-02-12 09:12:04 -08:00
commit dea054fc7f
6 changed files with 24 additions and 6 deletions

View File

@ -403,6 +403,7 @@ config GPIO_GRGPIO
config GPIO_TB10X
bool
select GENERIC_IRQ_CHIP
select OF_GPIO
comment "I2C GPIO expanders:"

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2012-2013 Broadcom Corporation
* Copyright (C) 2012-2014 Broadcom Corporation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@ -657,6 +657,6 @@ static struct platform_driver bcm_kona_gpio_driver = {
module_platform_driver(bcm_kona_gpio_driver);
MODULE_AUTHOR("Broadcom");
MODULE_AUTHOR("Broadcom Corporation <bcm-kernel-feedback-list@broadcom.com>");
MODULE_DESCRIPTION("Broadcom Kona GPIO Driver");
MODULE_LICENSE("GPL v2");

View File

@ -97,3 +97,4 @@ module_platform_driver(clps711x_gpio_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Alexander Shiyan <shc_work@mail.ru>");
MODULE_DESCRIPTION("CLPS711X GPIO driver");
MODULE_ALIAS("platform:clps711x-gpio");

View File

@ -394,8 +394,8 @@ static const struct irq_domain_ops intel_gpio_irq_ops = {
static int intel_gpio_runtime_idle(struct device *dev)
{
pm_schedule_suspend(dev, 500);
return -EBUSY;
int err = pm_schedule_suspend(dev, 500);
return err ?: -EBUSY;
}
static const struct dev_pm_ops intel_gpio_pm_ops = {

View File

@ -40,6 +40,8 @@
#error GPIO32 option is not enabled for your xtensa core variant
#endif
#if XCHAL_HAVE_CP
static inline unsigned long enable_cp(unsigned long *cpenable)
{
unsigned long flags;
@ -57,6 +59,20 @@ static inline void disable_cp(unsigned long flags, unsigned long cpenable)
local_irq_restore(flags);
}
#else
static inline unsigned long enable_cp(unsigned long *cpenable)
{
*cpenable = 0; /* avoid uninitialized value warning */
return 0;
}
static inline void disable_cp(unsigned long flags, unsigned long cpenable)
{
}
#endif /* XCHAL_HAVE_CP */
static int xtensa_impwire_get_direction(struct gpio_chip *gc, unsigned offset)
{
return 1; /* input only */

View File

@ -4,8 +4,6 @@
#include <linux/err.h>
#include <linux/kernel.h>
#ifdef CONFIG_GPIOLIB
struct device;
struct gpio_chip;
@ -18,6 +16,8 @@ struct gpio_chip;
*/
struct gpio_desc;
#ifdef CONFIG_GPIOLIB
/* Acquire and dispose GPIOs */
struct gpio_desc *__must_check gpiod_get(struct device *dev,
const char *con_id);