Commit bf64f7fe authored by Jackie Liu's avatar Jackie Liu Committed by Thomas Bogendoerfer
Browse files

MIPS: rb532: move GPIOD definition into C-files



My kernel robot reports build error from drivers/iio/adc/da9150-gpadc.c,

  drivers/iio/adc/da9150-gpadc.c:254:13: error: ‘DA9150_GPADC_CHAN_0x08’
  undeclared here (not in a function); did you mean ‘DA9150_GPADC_CHAN_TBAT’?
     254 |  .channel = DA9150_GPADC_CHAN_##_id,

We define GPIOD in rb.h, in fact it should only be used in gpio.c, but
it affects the driver da9150-gpadc.c which goes against the original
intention of the design, just move it to its scope.

Fixes: 1b432840 ("MIPS: RB532: GPIO register offsets are relative to GPIOBASE")
Suggested-by: default avatarJonathan Cameron <jic23@kernel.org>
Suggested-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Reported-by: default avatark2ci <kernel-bot@kylinos.cn>
Signed-off-by: default avatarJackie Liu <liuyun01@kylinos.cn>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 34123208
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -29,15 +29,6 @@
#define DEV3TC		0x01003C
#define BTCS		0x010040
#define BTCOMPARE	0x010044
#define GPIOBASE	0x050000
/* Offsets relative to GPIOBASE */
#define GPIOFUNC	0x00
#define GPIOCFG		0x04
#define GPIOD		0x08
#define GPIOILEVEL	0x0C
#define GPIOISTAT	0x10
#define GPIONMIEN	0x14
#define IMASK6		0x38
#define LO_WPX		(1 << 0)
#define LO_ALE		(1 << 1)
#define LO_CLE		(1 << 2)
+10 −0
Original line number Diff line number Diff line
@@ -37,6 +37,16 @@
#include <asm/mach-rc32434/rb.h>
#include <asm/mach-rc32434/gpio.h>

#define GPIOBASE	0x050000
/* Offsets relative to GPIOBASE */
#define GPIOFUNC	0x00
#define GPIOCFG		0x04
#define GPIOD		0x08
#define GPIOILEVEL	0x0C
#define GPIOISTAT	0x10
#define GPIONMIEN	0x14
#define IMASK6		0x38

struct rb532_gpio_chip {
	struct gpio_chip chip;
	void __iomem	 *regbase;