23 Sep, 2016

4 commits

  • Remove unneeded error handling on the result of a call
    to platform_get_resource() when the value is passed to
    devm_ioremap_resource().

    Signed-off-by: Wei Yongjun
    Signed-off-by: Linus Walleij

    Wei Yongjun
     
  • Linus Walleij
     
  • When using GPIO irqchip helpers to setup irqchip for a gpiolib based
    driver, it is not possible to select which GPIOs to add to the IRQ domain.
    Instead it just adds all GPIOs which is not always desired. For example
    there might be GPIOs that for some reason cannot generated normal
    interrupts at all.

    To support this we add a flag irq_need_valid_mask to struct gpio_chip. When
    this flag is set the core allocates irq_valid_mask that holds one bit for
    each GPIO the chip has. By default all bits are set but drivers can
    manipulate this using set_bit() and clear_bit() accordingly.

    Then when gpiochip_irqchip_add() is called, this mask is checked and all
    GPIOs with bit is set are added to the IRQ domain created for the GPIO
    chip.

    Suggested-by: Linus Walleij
    Signed-off-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Mika Westerberg
     
  • commit d47529b2e9fe
    "gpio: don't include module.h in shared driver header"
    removed from the header.

    It seems arch/arm/mach-omap2/board-rx51-peripherals.c
    is using __initdata_or_module from through
    to , so break this dependency
    so that we get a clean compile.

    Cc: Paul Gortmaker
    Cc: Tony Lindgren
    Fixes: d47529b2e9fe ("gpio: don't include module.h in shared driver header")
    Signed-off-by: Linus Walleij

    Linus Walleij
     

19 Sep, 2016

2 commits


18 Sep, 2016

2 commits


15 Sep, 2016

9 commits

  • In case of error, the function devm_ioremap_resource() returns ERR_PTR()
    and never returns NULL. The NULL test in the return value check should
    be replaced with IS_ERR().

    Signed-off-by: Wei Yongjun
    Acked-by: Joel Stanley
    Signed-off-by: Linus Walleij

    Wei Yongjun
     
  • Most shared headers in include/linux don't need to know what the
    internals of a struct module are; all they care about is that it
    is a struct and hence they may require a pointer to one.

    The advantage in this is that module.h is including a lot of stuff
    itself, and an otherwise empty C file that just contains module.h
    will result in ~750kB from CPP (compared to say 12kB from init.h)

    So we have approximately 50 instances of "struct module;" in the
    various include/linux headers already that help us keep module.h
    out of other headers; here we do the same for gpio.

    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Linus Walleij

    Paul Gortmaker
     
  • The Kconfig for this file is:

    drivers/gpio/Kconfig:config GPIO_WHISKEY_COVE
    drivers/gpio/Kconfig: tristate "GPIO support for Whiskey Cove PMIC"

    ...but however it does not include module.h -- it in turn gets it from
    another header (gpio/driver.h) and we'd like to replace that with a
    forward delcaration of "struct module;" but if we do, this file will
    fail to compile.

    So we fix this first to avoid putting build failures into the bisect
    commit history.

    Cc: Ajay Thomas
    Cc: Bin Gao
    Cc: Andy Shevchenko
    Cc: Mika Westerberg
    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Linus Walleij

    Paul Gortmaker
     
  • The Kconfig for this file is:

    drivers/gpio/Kconfig:config GPIO_LOONGSON1
    drivers/gpio/Kconfig: tristate "Loongson1 GPIO support"

    ...but however it does not include module.h -- it in turn gets it from
    another header (gpio/driver.h) and we'd like to replace that with a
    forward delcaration of "struct module;" but if we do, this file will
    fail to compile.

    So we fix this first to avoid putting build failures into the bisect
    commit history.

    Cc: Keguang Zhang
    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: linux-mips@linux-mips.org
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Linus Walleij

    Paul Gortmaker
     
  • The Kconfig for this file is:

    drivers/gpio/Kconfig:config GPIO_ATH79
    drivers/gpio/Kconfig: tristate "Atheros AR71XX/AR724X/AR913X GPIO support"

    ...but however it does not include module.h -- it in turn gets it from
    another header (gpio/driver.h) and we'd like to replace that with a
    forward delcaration of "struct module;" but if we do, this file will
    fail to compile.

    So we fix this first to avoid putting build failures into the bisect
    commit history.

    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Linus Walleij

    Paul Gortmaker
     
  • The Kconfig for this file is:

    drivers/gpio/Kconfig:config GPIO_ALTERA
    drivers/gpio/Kconfig: tristate "Altera GPIO"

    ...but however it does not include module.h -- it in turn gets it from
    another header (gpio/driver.h) and we'd like to replace that with a
    forward delcaration of "struct module;" but if we do, this file will
    fail to compile.

    So we fix this first to avoid putting build failures into the bisect
    commit history.

    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Linus Walleij

    Paul Gortmaker
     
  • The Kconfig for this file is:

    drivers/gpio/Kconfig:config GPIO_TS4800
    drivers/gpio/Kconfig: tristate "TS-4800 DIO blocks and compatibles"

    ...but however it does not include module.h -- it in turn gets it from
    another header (gpio/driver.h) and we'd like to replace that with a
    forward delcaration of "struct module;" but if we do, this file will
    fail to compile.

    So we fix this first to avoid putting build failures into the bisect
    commit history.

    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Linus Walleij

    Paul Gortmaker
     
  • This file is currently getting module.h from a global gpio header
    and it will faii to build once we remove module.h from that.

    However, the driver is controlled with the following Kconfig:

    drivers/gpio/Kconfig:config GPIO_SX150X
    drivers/gpio/Kconfig: bool "Semtech SX150x I2C GPIO expander"

    and hence the two lines of MODULE_DEVICE_TABLE are no-ops that
    can simply be deleted.

    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Linus Walleij

    Paul Gortmaker
     
  • This file is currently getting module.h from a global gpio header
    and it will fail to build once we remove module.h from that.

    However, the driver is controlled with the following Kconfig:

    drivers/gpio/Kconfig:config GPIO_PALMAS
    drivers/gpio/Kconfig: bool "TI PALMAS series PMICs GPIO"

    and hence the line of MODULE_DEVICE_TABLE is a no-op that can simply
    be deleted. In fact it should have been removed in an earlier commit
    that did demodularization, however the unseen include prevented my
    build testing from detecting it.

    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Linus Walleij

    Paul Gortmaker
     

13 Sep, 2016

7 commits


12 Sep, 2016

10 commits


08 Sep, 2016

2 commits


07 Sep, 2016

3 commits

  • The Aspeed SoCs contain GPIOs banked by letter, where each bank contains
    8 pins. The GPIO banks are then grouped in sets of four in the register
    layout.

    The implementation exposes multiple banks through the one driver and
    requests and releases pins via the pinctrl subsystem. The hardware
    supports generation of interrupts from all GPIO-capable pins.

    A number of hardware features are not yet supported: Configuration of
    interrupt direction (ARM or LPC), debouncing, and WDT reset tolerance
    for output ports.

    Signed-off-by: Joel Stanley
    Signed-off-by: Alistair Popple
    Signed-off-by: Jeremy Kerr
    Signed-off-by: Andrew Jeffery
    Signed-off-by: Linus Walleij

    Joel Stanley
     
  • Signed-off-by: Andrew Jeffery
    Acked-by: Joel Stanley
    Acked-by: Rob Herring
    Signed-off-by: Linus Walleij

    Andrew Jeffery
     
  • The recent addition of the regulator support has led to the pca953x_remove
    function returning uninitialized data when no platform data pointer is
    provided, as gcc warns when using -Wmaybe-uninitialized:

    drivers/gpio/gpio-pca953x.c: In function 'pca953x_remove':
    drivers/gpio/gpio-pca953x.c:860:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

    This restores the previous behavior, returning 0 on success.

    Signed-off-by: Arnd Bergmann
    Fixes: e23efa311110 ("gpio: pca954x: Add vcc regulator and enable it")
    Acked-by: Phil Reid
    Signed-off-by: Linus Walleij

    Arnd Bergmann
     

31 Aug, 2016

1 commit