From: Jackie Liu <liu.yun@linux.dev>
To: linus.walleij@linaro.org, ralf@linux-mips.org, tsbogend@alpha.franken.de
Cc: linux-mips@vger.kernel.org, jic23@kernel.org, andy.shevchenko@gmail.com
Subject: [PATCH v2] MIPS: rb532: move GPIOD definition into C-files
Date: Wed, 30 Mar 2022 10:01:39 +0800 [thread overview]
Message-ID: <20220330020139.3302852-1-liu.yun@linux.dev> (raw)
In-Reply-To: <CAHp75VcAL6avNxMSVo9nWbxXOnKmXAiuGMV=uWwAx0BdHnf-+Q@mail.gmail.com>
From: Jackie Liu <liuyun01@kylinos.cn>
My kernel robot report build error from drivers/iio/adc/da9150-gpadc.c,
We define GPIOD in rb.h, in fact he 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 his scope.
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
v1->v2:
Keep GPIONMIEN and IMASK6 as hardware document.
arch/mips/include/asm/mach-rc32434/rb.h | 9 ---------
arch/mips/rb532/gpio.c | 10 ++++++++++
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/arch/mips/include/asm/mach-rc32434/rb.h b/arch/mips/include/asm/mach-rc32434/rb.h
index 34d179ca020b..dd9d4b026e62 100644
--- a/arch/mips/include/asm/mach-rc32434/rb.h
+++ b/arch/mips/include/asm/mach-rc32434/rb.h
@@ -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)
diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c
index 94f02ada4082..29c21b9d42da 100644
--- a/arch/mips/rb532/gpio.c
+++ b/arch/mips/rb532/gpio.c
@@ -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;
--
2.25.1
next prev parent reply other threads:[~2022-03-30 2:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 1:45 [PATCH] MIPS: rb532: move GPIOD definition into C-files Jackie Liu
2022-03-29 12:54 ` Andy Shevchenko
2022-03-30 1:46 ` Jackie Liu
2022-03-30 6:42 ` Thomas Bogendoerfer
2022-03-30 9:23 ` Andy Shevchenko
2022-03-30 9:32 ` Thomas Bogendoerfer
2022-03-30 9:41 ` Andy Shevchenko
2022-03-30 9:56 ` Jackie Liu
2022-03-30 10:01 ` Andy Shevchenko
2022-03-30 10:04 ` Jackie Liu
2022-03-30 10:02 ` Thomas Bogendoerfer
2022-03-30 2:01 ` Jackie Liu [this message]
2022-03-30 2:07 ` [PATCH v3] " Jackie Liu
2022-03-30 8:52 ` Sergei Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220330020139.3302852-1-liu.yun@linux.dev \
--to=liu.yun@linux.dev \
--cc=andy.shevchenko@gmail.com \
--cc=jic23@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-mips@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.