Re: [PATCH v8 2/9] Input: goodix - reset device at init

From: kbuild test robot
Date: Sat Oct 10 2015 - 19:36:57 EST


Hi Irina,

[auto build test ERROR on v4.3-rc4 -- if it's inappropriate base, please ignore]

config: x86_64-randconfig-h0-10110617 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

drivers/input/touchscreen/goodix.c: In function 'goodix_int_sync':
>> drivers/input/touchscreen/goodix.c:250:10: error: implicit declaration of function 'gpiod_direction_output' [-Werror=implicit-function-declaration]
error = gpiod_direction_output(ts->gpiod_int, 0);
^
>> drivers/input/touchscreen/goodix.c:255:9: error: implicit declaration of function 'gpiod_direction_input' [-Werror=implicit-function-declaration]
return gpiod_direction_input(ts->gpiod_int);
^
drivers/input/touchscreen/goodix.c: In function 'goodix_get_gpio_config':
>> drivers/input/touchscreen/goodix.c:304:10: error: implicit declaration of function 'devm_gpiod_get' [-Werror=implicit-function-declaration]
gpiod = devm_gpiod_get(dev, GOODIX_GPIO_INT_NAME, GPIOD_IN);
^
>> drivers/input/touchscreen/goodix.c:304:52: error: 'GPIOD_IN' undeclared (first use in this function)
gpiod = devm_gpiod_get(dev, GOODIX_GPIO_INT_NAME, GPIOD_IN);
^
drivers/input/touchscreen/goodix.c:304:52: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors

vim +/gpiod_direction_output +250 drivers/input/touchscreen/goodix.c

244 }
245
246 static int goodix_int_sync(struct goodix_ts_data *ts)
247 {
248 int error;
249
> 250 error = gpiod_direction_output(ts->gpiod_int, 0);
251 if (error)
252 return error;
253 msleep(50); /* T5: 50ms */
254
> 255 return gpiod_direction_input(ts->gpiod_int);
256 }
257
258 /**
259 * goodix_reset - Reset device during power on
260 *
261 * @ts: goodix_ts_data pointer
262 */
263 static int goodix_reset(struct goodix_ts_data *ts)
264 {
265 int error;
266
267 /* begin select I2C slave addr */
268 error = gpiod_direction_output(ts->gpiod_rst, 0);
269 if (error)
270 return error;
271 msleep(20); /* T2: > 10ms */
272 /* HIGH: 0x28/0x29, LOW: 0xBA/0xBB */
273 error = gpiod_direction_output(ts->gpiod_int, ts->client->addr == 0x14);
274 if (error)
275 return error;
276 usleep_range(100, 2000); /* T3: > 100us */
277 error = gpiod_direction_output(ts->gpiod_rst, 1);
278 if (error)
279 return error;
280 usleep_range(6000, 10000); /* T4: > 5ms */
281 /* end select I2C slave addr */
282 error = gpiod_direction_input(ts->gpiod_rst);
283 if (error)
284 return error;
285 return goodix_int_sync(ts);
286 }
287
288 /**
289 * goodix_get_gpio_config - Get GPIO config from ACPI/DT
290 *
291 * @ts: goodix_ts_data pointer
292 */
293 static int goodix_get_gpio_config(struct goodix_ts_data *ts)
294 {
295 int error;
296 struct device *dev;
297 struct gpio_desc *gpiod;
298
299 if (!ts->client)
300 return -EINVAL;
301 dev = &ts->client->dev;
302
303 /* Get the interrupt GPIO pin number */
> 304 gpiod = devm_gpiod_get(dev, GOODIX_GPIO_INT_NAME, GPIOD_IN);
305 if (IS_ERR(gpiod)) {
306 error = PTR_ERR(gpiod);
307 if (error != -EPROBE_DEFER)

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data