• Linus Walleij's avatar
    pinctrl: adi2: Fix Kconfig build problem · 57db94d4
    Linus Walleij authored
    
    [ Upstream commit 1c363531dd814dc4fe10865722bf6b0f72ce4673 ]
    
    The build robot is complaining on Blackfin:
    
    drivers/pinctrl/pinctrl-adi2.c: In function 'port_setup':
    >> drivers/pinctrl/pinctrl-adi2.c:221:21: error: dereferencing
       pointer to incomplete type 'struct gpio_port_t'
          writew(readw(&regs->port_fer) & ~BIT(offset),
                            ^~
    drivers/pinctrl/pinctrl-adi2.c: In function 'adi_gpio_ack_irq':
    >> drivers/pinctrl/pinctrl-adi2.c:266:18: error: dereferencing
    pointer to incomplete type 'struct bfin_pint_regs'
          if (readl(&regs->invert_set) & pintbit)
                         ^~
    It seems the driver need to include <asm/gpio.h> and <asm/irq.h>
    to compile.
    
    The Blackfin architecture was re-defining the Kconfig
    PINCTRL symbol which is not OK, so replaced this with
    PINCTRL_BLACKFIN_ADI2 which selects PINCTRL and PINCTRL_ADI2
    just like most arches do.
    
    Further, the old GPIO driver symbol GPIO_ADI was possible to
    select at the same time as selecting PINCTRL. This was not
    working because the arch-local <asm/gpio.h> header contains
    an explicit #ifndef PINCTRL clause making compilation break
    if you combine them. The same is true for DEBUG_MMRS.
    
    Make sure the ADI2 pinctrl driver is not selected at the same
    time as the old GPIO implementation. (This should be converted
    to use gpiolib or pincontrol and move to drivers/...) Also make
    sure the old GPIO_ADI driver or DEBUG_MMRS is not selected at
    the same time as the new PINCTRL implementation, and only make
    PINCTRL_ADI2 selectable for the Blackfin families that actually
    have it.
    
    This way it is still possible to add e.g. I2C-based pin
    control expanders on the Blackfin.
    
    Cc: Steven Miao <realmz6@gmail.com>
    Cc: Huanhuan Feng <huanhuan.feng@analog.com>
    Signed-off-by: 's avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: 's avatarSasha Levin <alexander.levin@verizon.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    57db94d4
Name
Last commit
Last update
..
boot Loading commit data...
configs Loading commit data...
include Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mach-bf518 Loading commit data...
mach-bf527 Loading commit data...
mach-bf533 Loading commit data...
mach-bf537 Loading commit data...
mach-bf538 Loading commit data...
mach-bf548 Loading commit data...
mach-bf561 Loading commit data...
mach-bf609 Loading commit data...
mach-common Loading commit data...
mm Loading commit data...
oprofile Loading commit data...
Clear_BSD.txt Loading commit data...
Kconfig Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...