1
0
Fork 0
remarkable-linux/arch/blackfin
Linus Walleij 4fdb10391b pinctrl: adi2: Fix Kconfig build problem
[ Upstream commit 1c363531dd ]

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: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20 10:07:32 +01:00
..
boot blackfin: Ignore generated uImages 2013-09-13 10:42:39 +08:00
configs bf609: enable soft switch gpio driver by default 2015-04-23 21:34:29 +08:00
include blackfin: no access_ok() for __copy_{to,from}_user() 2016-09-15 19:51:57 -04:00
kernel ptrace: Don't allow accessing an undumpable mm 2017-01-06 10:40:13 +01:00
lib Blackfin: comment spelling s/divsor/divisor/ 2016-04-18 12:51:57 +02:00
mach-bf518 blackfin: cleanup board files 2014-04-12 08:48:01 +08:00
mach-bf527 Input: ad7879 - move header to platform_data directory 2016-03-08 10:51:10 -08:00
mach-bf533 arch/blackfin/mach-bf533/boards/stamp.c: add linux/delay.h 2015-01-08 15:10:52 -08:00
mach-bf537 Linux 4.5 2016-03-15 16:54:45 -07:00
mach-bf538 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-03-17 21:51:52 -07:00
mach-bf548 gpio: Include linux/gpio.h instead of asm/gpio.h 2016-02-16 00:20:03 +01:00
mach-bf561 Merge 4.8-rc5 into char-misc-next 2016-09-05 08:04:07 +02:00
mach-bf609 [media] ezkit/cobalt: drop unused op_656_range setting 2016-07-12 13:36:09 -03:00
mach-common This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
mm treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
oprofile Blackfin arch: remove hardware PM code, oprofile not use it 2009-01-07 23:14:39 +08:00
Clear_BSD.txt blackfin: license: Change ADI BSD license 2012-05-21 14:54:30 +08:00
Kconfig pinctrl: adi2: Fix Kconfig build problem 2017-12-20 10:07:32 +01:00
Kconfig.debug pinctrl: adi2: Fix Kconfig build problem 2017-12-20 10:07:32 +01:00
Makefile blackfin: rename vmImage to uImage after we move to buildroot 2013-05-07 18:26:39 +08:00