Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1678364 > unrolled thread
| Started by | Chris Packham <chris.packham@alliedtelesis.co.nz> |
|---|---|
| First post | 2017-06-30 03:00 +0200 |
| Last post | 2017-07-02 19:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/6] sh: sh7785lcr: add GPIO lookup table for i2c controller reset Chris Packham <chris.packham@alliedtelesis.co.nz> - 2017-06-30 03:00 +0200
Re: [PATCH 1/6] sh: sh7785lcr: add GPIO lookup table for i2c controller reset kbuild test robot <lkp@intel.com> - 2017-07-02 18:40 +0200
Re: [PATCH 1/6] sh: sh7785lcr: add GPIO lookup table for i2c controller reset Geert Uytterhoeven <geert@linux-m68k.org> - 2017-07-02 19:20 +0200
| From | Chris Packham <chris.packham@alliedtelesis.co.nz> |
|---|---|
| Date | 2017-06-30 03:00 +0200 |
| Subject | [PATCH 1/6] sh: sh7785lcr: add GPIO lookup table for i2c controller reset |
| Message-ID | <tXSrT-6F8-15@gated-at.bofh.it> |
Define the GPIO connected to the PCA9564 using a GPIO lookup table. This
will allow the i2c-pca-platform driver to use the device managed APIs to
lookup the gpio instead of using platform_data.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
arch/sh/boards/board-sh7785lcr.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c
index 2c4771ee84cd..4c321d0da945 100644
--- a/arch/sh/boards/board-sh7785lcr.c
+++ b/arch/sh/boards/board-sh7785lcr.c
@@ -25,6 +25,7 @@
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/errno.h>
+#include <linux/gpio/machine.h>
#include <mach/sh7785lcr.h>
#include <cpu/sh7785.h>
#include <asm/heartbeat.h>
@@ -243,6 +244,14 @@ static struct resource i2c_resources[] = {
},
};
+static struct gpiod_lookup_table i2c_gpio_table = {
+ .dev_id = "i2c.0",
+ .table = {
+ GPIO_LOOKUP("pfc-sh7757", 0, "reset-gpios", GPIO_ACTIVE_LOW),
+ { },
+ },
+};
+
static struct i2c_pca9564_pf_platform_data i2c_platform_data = {
.gpio = 0,
.i2c_clock_speed = I2C_PCA_CON_330kHz,
@@ -283,6 +292,7 @@ static int __init sh7785lcr_devices_setup(void)
i2c_device.num_resources = ARRAY_SIZE(i2c_proto_resources);
}
+ gpiod_add_lookup(&i2c_gpio_table);
return platform_add_devices(sh7785lcr_devices,
ARRAY_SIZE(sh7785lcr_devices));
}
--
2.13.0
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2017-07-02 18:40 +0200 |
| Subject | Re: [PATCH 1/6] sh: sh7785lcr: add GPIO lookup table for i2c controller reset |
| Message-ID | <tYQ4G-4Bb-41@gated-at.bofh.it> |
| In reply to | #1678364 |
[Multipart message — attachments visible in raw view] — view raw
Hi Chris,
[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on v4.12-rc7 next-20170630]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Chris-Packham/sh-sh7785lcr-add-GPIO-lookup-table-for-i2c-controller-reset/20170702-214426
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: sh-sh7785lcr_32bit_defconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sh
All errors (new ones prefixed by >>):
arch/sh/boards/board-sh7785lcr.c: In function 'sh7785lcr_devices_setup':
>> arch/sh/boards/board-sh7785lcr.c:295:2: error: implicit declaration of function 'gpiod_add_lookup' [-Werror=implicit-function-declaration]
gpiod_add_lookup(&i2c_gpio_table);
^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/gpiod_add_lookup +295 arch/sh/boards/board-sh7785lcr.c
289
290 if (mach_is_sh7785lcr_pt()) {
291 i2c_device.resource = i2c_proto_resources;
292 i2c_device.num_resources = ARRAY_SIZE(i2c_proto_resources);
293 }
294
> 295 gpiod_add_lookup(&i2c_gpio_table);
296 return platform_add_devices(sh7785lcr_devices,
297 ARRAY_SIZE(sh7785lcr_devices));
298 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2017-07-02 19:20 +0200 |
| Subject | Re: [PATCH 1/6] sh: sh7785lcr: add GPIO lookup table for i2c controller reset |
| Message-ID | <tYQHo-550-3@gated-at.bofh.it> |
| In reply to | #1679525 |
Hi Chris,
On Sun, Jul 2, 2017 at 6:47 PM, kbuild test robot <lkp@intel.com> wrote:
> [auto build test ERROR on wsa/i2c/for-next]
> [also build test ERROR on v4.12-rc7 next-20170630]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Chris-Packham/sh-sh7785lcr-add-GPIO-lookup-table-for-i2c-controller-reset/20170702-214426
> base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
> config: sh-sh7785lcr_32bit_defconfig (attached as .config)
> compiler: sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=sh
>
> All errors (new ones prefixed by >>):
>
> arch/sh/boards/board-sh7785lcr.c: In function 'sh7785lcr_devices_setup':
>>> arch/sh/boards/board-sh7785lcr.c:295:2: error: implicit declaration of function 'gpiod_add_lookup' [-Werror=implicit-function-declaration]
> gpiod_add_lookup(&i2c_gpio_table);
It's called gpiod_add_lookup_table()
https://www.kernel.org/pub/tools/crosstool/ is your friend...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web