drivers/gpio/gpio-adp5588.c:282:24: error: 'struct gpio_chip' has no member named 'irq'

From: kbuild test robot
Date: Thu May 23 2019 - 10:13:26 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 54dee406374ce8adb352c48e175176247cb8db7c
commit: 9f22af1167815ce10909529412de33122be44758 gpio: adp5588: Add device tree support
date: 3 months ago
config: i386-randconfig-n0-05232030 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 9f22af1167815ce10909529412de33122be44758
# save the attached .config to linux build tree
make ARCH=i386

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

drivers/gpio/gpio-adp5588.c: In function 'adp5588_irq_handler':
>> drivers/gpio/gpio-adp5588.c:282:24: error: 'struct gpio_chip' has no member named 'irq'
dev->gpio_chip.irq.domain,
^
drivers/gpio/gpio-adp5588.c: In function 'adp5588_irq_setup':
>> drivers/gpio/gpio-adp5588.c:319:8: error: implicit declaration of function 'gpiochip_irqchip_add_nested'; did you mean 'gpiochip_is_requested'? [-Werror=implicit-function-declaration]
ret = gpiochip_irqchip_add_nested(&dev->gpio_chip,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiochip_is_requested
>> drivers/gpio/gpio-adp5588.c:328:2: error: implicit declaration of function 'gpiochip_set_nested_irqchip'; did you mean 'gpiochip_enable_irq'? [-Werror=implicit-function-declaration]
gpiochip_set_nested_irqchip(&dev->gpio_chip,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiochip_enable_irq
cc1: some warnings being treated as errors

vim +282 drivers/gpio/gpio-adp5588.c

261
262 static irqreturn_t adp5588_irq_handler(int irq, void *devid)
263 {
264 struct adp5588_gpio *dev = devid;
265 unsigned status, bank, bit, pending;
266 int ret;
267 status = adp5588_gpio_read(dev->client, INT_STAT);
268
269 if (status & ADP5588_GPI_INT) {
270 ret = adp5588_gpio_read_intstat(dev->client, dev->irq_stat);
271 if (ret < 0)
272 memset(dev->irq_stat, 0, ARRAY_SIZE(dev->irq_stat));
273
274 for (bank = 0, bit = 0; bank <= ADP5588_BANK(ADP5588_MAXGPIO);
275 bank++, bit = 0) {
276 pending = dev->irq_stat[bank] & dev->irq_mask[bank];
277
278 while (pending) {
279 if (pending & (1 << bit)) {
280 handle_nested_irq(
281 irq_find_mapping(
> 282 dev->gpio_chip.irq.domain,
283 (bank << 3) + bit));
284 pending &= ~(1 << bit);
285 }
286 bit++;
287 }
288 }
289 }
290
291 adp5588_gpio_write(dev->client, INT_STAT, status); /* Status is W1C */
292
293 return IRQ_HANDLED;
294 }
295
296 static int adp5588_irq_setup(struct adp5588_gpio *dev)
297 {
298 struct i2c_client *client = dev->client;
299 int ret;
300 struct adp5588_gpio_platform_data *pdata =
301 dev_get_platdata(&client->dev);
302 int irq_base = pdata ? pdata->irq_base : 0;
303
304 adp5588_gpio_write(client, CFG, ADP5588_AUTO_INC);
305 adp5588_gpio_write(client, INT_STAT, -1); /* status is W1C */
306 adp5588_gpio_read_intstat(client, dev->irq_stat); /* read to clear */
307
308 mutex_init(&dev->irq_lock);
309
310 ret = devm_request_threaded_irq(&client->dev, client->irq,
311 NULL, adp5588_irq_handler, IRQF_ONESHOT
312 | IRQF_TRIGGER_FALLING | IRQF_SHARED,
313 dev_name(&client->dev), dev);
314 if (ret) {
315 dev_err(&client->dev, "failed to request irq %d\n",
316 client->irq);
317 return ret;
318 }
> 319 ret = gpiochip_irqchip_add_nested(&dev->gpio_chip,
320 &adp5588_irq_chip, irq_base,
321 handle_simple_irq,
322 IRQ_TYPE_NONE);
323 if (ret) {
324 dev_err(&client->dev,
325 "could not connect irqchip to gpiochip\n");
326 return ret;
327 }
> 328 gpiochip_set_nested_irqchip(&dev->gpio_chip,
329 &adp5588_irq_chip,
330 client->irq);
331
332 adp5588_gpio_write(client, CFG,
333 ADP5588_AUTO_INC | ADP5588_INT_CFG | ADP5588_GPI_INT);
334
335 return 0;
336 }
337

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

Attachment: .config.gz
Description: application/gzip