From: kbuild test robot <lkp@intel.com>
To: Stefan Agner <stefan@agner.ch>
Cc: kbuild-all@01.org, dmitry.torokhov@gmail.com,
michael.hennerich@analog.com, robh+dt@kernel.org,
mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
galak@codeaurora.org, realmz6@gmail.com, broonie@kernel.org,
jic23@kernel.org, linux-input@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Stefan Agner <stefan@agner.ch>
Subject: Re: [PATCH 3/3] input: touchscreen: ad7879: add device tree support
Date: Tue, 26 Jan 2016 11:28:18 +0800 [thread overview]
Message-ID: <201601261141.IjtEfRpQ%fengguang.wu@intel.com> (raw)
In-Reply-To: <1453777477-29706-3-git-send-email-stefan@agner.ch>
[-- Attachment #1: Type: text/plain, Size: 5977 bytes --]
Hi Stefan,
[auto build test ERROR on input/next]
[also build test ERROR on v4.5-rc1 next-20160125]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Stefan-Agner/input-touchscreen-ad7879-move-header-to-input-subdirectory/20160126-110813
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: x86_64-randconfig-x012-01260845 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
In file included from drivers/input/touchscreen/ad7879-spi.c:14:0:
>> drivers/input/touchscreen/ad7879.h:28:21: warning: 'struct ad7879_platform_data' declared inside parameter list
const struct ad7879_bus_ops *bops);
^
>> drivers/input/touchscreen/ad7879.h:28:21: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/input/touchscreen/ad7879-spi.c: In function 'ad7879_spi_probe':
>> drivers/input/touchscreen/ad7879-spi.c:131:55: error: 'pdata' undeclared (first use in this function)
ts = ad7879_probe(&spi->dev, AD7879_DEVID, spi->irq, pdata,
^
drivers/input/touchscreen/ad7879-spi.c:131:55: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/input/touchscreen/ad7879-spi.c:131:7: error: too many arguments to function 'ad7879_probe'
ts = ad7879_probe(&spi->dev, AD7879_DEVID, spi->irq, pdata,
^
In file included from drivers/input/touchscreen/ad7879-spi.c:14:0:
drivers/input/touchscreen/ad7879.h:26:16: note: declared here
struct ad7879 *ad7879_probe(struct device *dev, u8 devid, unsigned irq,
^
vim +/pdata +131 drivers/input/touchscreen/ad7879-spi.c
8
9 #include <linux/input.h> /* BUS_SPI */
10 #include <linux/pm.h>
11 #include <linux/spi/spi.h>
12 #include <linux/module.h>
13
> 14 #include "ad7879.h"
15
16 #define AD7879_DEVID 0x7A /* AD7879/AD7889 */
17
18 #define MAX_SPI_FREQ_HZ 5000000
19 #define AD7879_CMD_MAGIC 0xE000
20 #define AD7879_CMD_READ (1 << 10)
21 #define AD7879_CMD(reg) (AD7879_CMD_MAGIC | ((reg) & 0xF))
22 #define AD7879_WRITECMD(reg) (AD7879_CMD(reg))
23 #define AD7879_READCMD(reg) (AD7879_CMD(reg) | AD7879_CMD_READ)
24
25 /*
26 * ad7879_read/write are only used for initial setup and for sysfs controls.
27 * The main traffic is done in ad7879_collect().
28 */
29
30 static int ad7879_spi_xfer(struct spi_device *spi,
31 u16 cmd, u8 count, u16 *tx_buf, u16 *rx_buf)
32 {
33 struct spi_message msg;
34 struct spi_transfer *xfers;
35 void *spi_data;
36 u16 *command;
37 u16 *_rx_buf = _rx_buf; /* shut gcc up */
38 u8 idx;
39 int ret;
40
41 xfers = spi_data = kzalloc(sizeof(*xfers) * (count + 2), GFP_KERNEL);
42 if (!spi_data)
43 return -ENOMEM;
44
45 spi_message_init(&msg);
46
47 command = spi_data;
48 command[0] = cmd;
49 if (count == 1) {
50 /* ad7879_spi_{read,write} gave us buf on stack */
51 command[1] = *tx_buf;
52 tx_buf = &command[1];
53 _rx_buf = rx_buf;
54 rx_buf = &command[2];
55 }
56
57 ++xfers;
58 xfers[0].tx_buf = command;
59 xfers[0].len = 2;
60 spi_message_add_tail(&xfers[0], &msg);
61 ++xfers;
62
63 for (idx = 0; idx < count; ++idx) {
64 if (rx_buf)
65 xfers[idx].rx_buf = &rx_buf[idx];
66 if (tx_buf)
67 xfers[idx].tx_buf = &tx_buf[idx];
68 xfers[idx].len = 2;
69 spi_message_add_tail(&xfers[idx], &msg);
70 }
71
72 ret = spi_sync(spi, &msg);
73
74 if (count == 1)
75 _rx_buf[0] = command[2];
76
77 kfree(spi_data);
78
79 return ret;
80 }
81
82 static int ad7879_spi_multi_read(struct device *dev,
83 u8 first_reg, u8 count, u16 *buf)
84 {
85 struct spi_device *spi = to_spi_device(dev);
86
87 return ad7879_spi_xfer(spi, AD7879_READCMD(first_reg), count, NULL, buf);
88 }
89
90 static int ad7879_spi_read(struct device *dev, u8 reg)
91 {
92 struct spi_device *spi = to_spi_device(dev);
93 u16 ret, dummy;
94
95 return ad7879_spi_xfer(spi, AD7879_READCMD(reg), 1, &dummy, &ret) ? : ret;
96 }
97
98 static int ad7879_spi_write(struct device *dev, u8 reg, u16 val)
99 {
100 struct spi_device *spi = to_spi_device(dev);
101 u16 dummy;
102
103 return ad7879_spi_xfer(spi, AD7879_WRITECMD(reg), 1, &val, &dummy);
104 }
105
106 static const struct ad7879_bus_ops ad7879_spi_bus_ops = {
107 .bustype = BUS_SPI,
108 .read = ad7879_spi_read,
109 .multi_read = ad7879_spi_multi_read,
110 .write = ad7879_spi_write,
111 };
112
113 static int ad7879_spi_probe(struct spi_device *spi)
114 {
115 struct ad7879 *ts;
116 int err;
117
118 /* don't exceed max specified SPI CLK frequency */
119 if (spi->max_speed_hz > MAX_SPI_FREQ_HZ) {
120 dev_err(&spi->dev, "SPI CLK %d Hz?\n", spi->max_speed_hz);
121 return -EINVAL;
122 }
123
124 spi->bits_per_word = 16;
125 err = spi_setup(spi);
126 if (err) {
127 dev_dbg(&spi->dev, "spi master doesn't support 16 bits/word\n");
128 return err;
129 }
130
> 131 ts = ad7879_probe(&spi->dev, AD7879_DEVID, spi->irq, pdata,
132 dev_get_platdata(&spi->dev), &ad7879_spi_bus_ops);
133 if (IS_ERR(ts))
134 return PTR_ERR(ts);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 26323 bytes --]
next prev parent reply other threads:[~2016-01-26 3:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 3:04 [PATCH 1/3] input: touchscreen: ad7879: move header to input subdirectory Stefan Agner
2016-01-26 3:04 ` [PATCH 2/3] input: touchscreen: ad7879: fix default x/y axis assignment Stefan Agner
2016-01-26 7:58 ` Michael Hennerich
2016-01-26 17:04 ` Stefan Agner
2016-01-27 23:40 ` Dmitry Torokhov
2016-01-26 3:04 ` [PATCH 3/3] input: touchscreen: ad7879: add device tree support Stefan Agner
2016-01-26 3:28 ` kbuild test robot [this message]
2016-01-26 3:57 ` kbuild test robot
2016-01-26 4:50 ` kbuild test robot
2016-01-26 8:14 ` Michael Hennerich
2016-01-26 17:10 ` Stefan Agner
2016-01-27 23:38 ` Dmitry Torokhov
2016-01-29 3:00 ` Rob Herring
2016-01-27 23:35 ` [PATCH 1/3] input: touchscreen: ad7879: move header to input subdirectory Dmitry Torokhov
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=201601261141.IjtEfRpQ%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jic23@kernel.org \
--cc=kbuild-all@01.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=michael.hennerich@analog.com \
--cc=realmz6@gmail.com \
--cc=robh+dt@kernel.org \
--cc=stefan@agner.ch \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®