[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201905201215.y8vIVQNE%lkp@intel.com>
Date: Mon, 20 May 2019 12:11:17 +0800
From: kbuild test robot <lkp@...el.com>
To: Amelie Delaunay <amelie.delaunay@...com>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org,
Lee Jones <lee.jones@...aro.org>
Subject: drivers//pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip'
has no member named 'of_node'
Hi Amelie,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a188339ca5a396acc588e5851ed7e19f66b0ebd9
commit: 1490d9f841b186664f9d3ca213dcfa4464a60680 pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver
date: 10 days ago
config: um-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 1490d9f841b186664f9d3ca213dcfa4464a60680
# save the attached .config to linux build tree
make ARCH=um
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
drivers//pinctrl/pinctrl-stmfx.c: In function 'stmfx_pinctrl_probe':
>> drivers//pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node'
pctl->gpio_chip.of_node = np;
^
vim +652 drivers//pinctrl/pinctrl-stmfx.c
588
589 static int stmfx_pinctrl_probe(struct platform_device *pdev)
590 {
591 struct stmfx *stmfx = dev_get_drvdata(pdev->dev.parent);
592 struct device_node *np = pdev->dev.of_node;
593 struct stmfx_pinctrl *pctl;
594 u32 n;
595 int irq, ret;
596
597 pctl = devm_kzalloc(stmfx->dev, sizeof(*pctl), GFP_KERNEL);
598 if (!pctl)
599 return -ENOMEM;
600
601 platform_set_drvdata(pdev, pctl);
602
603 pctl->dev = &pdev->dev;
604 pctl->stmfx = stmfx;
605
606 if (!of_find_property(np, "gpio-ranges", NULL)) {
607 dev_err(pctl->dev, "missing required gpio-ranges property\n");
608 return -EINVAL;
609 }
610
611 irq = platform_get_irq(pdev, 0);
612 if (irq <= 0) {
613 dev_err(pctl->dev, "failed to get irq\n");
614 return -ENXIO;
615 }
616
617 mutex_init(&pctl->lock);
618
619 /* Register pin controller */
620 pctl->pctl_desc.name = "stmfx-pinctrl";
621 pctl->pctl_desc.pctlops = &stmfx_pinctrl_ops;
622 pctl->pctl_desc.confops = &stmfx_pinconf_ops;
623 pctl->pctl_desc.pins = stmfx_pins;
624 pctl->pctl_desc.npins = ARRAY_SIZE(stmfx_pins);
625 pctl->pctl_desc.owner = THIS_MODULE;
626
627 ret = devm_pinctrl_register_and_init(pctl->dev, &pctl->pctl_desc,
628 pctl, &pctl->pctl_dev);
629 if (ret) {
630 dev_err(pctl->dev, "pinctrl registration failed\n");
631 return ret;
632 }
633
634 ret = pinctrl_enable(pctl->pctl_dev);
635 if (ret) {
636 dev_err(pctl->dev, "pinctrl enable failed\n");
637 return ret;
638 }
639
640 /* Register gpio controller */
641 pctl->gpio_chip.label = "stmfx-gpio";
642 pctl->gpio_chip.parent = pctl->dev;
643 pctl->gpio_chip.get_direction = stmfx_gpio_get_direction;
644 pctl->gpio_chip.direction_input = stmfx_gpio_direction_input;
645 pctl->gpio_chip.direction_output = stmfx_gpio_direction_output;
646 pctl->gpio_chip.get = stmfx_gpio_get;
647 pctl->gpio_chip.set = stmfx_gpio_set;
648 pctl->gpio_chip.set_config = gpiochip_generic_config;
649 pctl->gpio_chip.base = -1;
650 pctl->gpio_chip.ngpio = pctl->pctl_desc.npins;
651 pctl->gpio_chip.can_sleep = true;
> 652 pctl->gpio_chip.of_node = np;
653 pctl->gpio_chip.need_valid_mask = true;
654
655 ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl);
656 if (ret) {
657 dev_err(pctl->dev, "gpio_chip registration failed\n");
658 return ret;
659 }
660
661 ret = stmfx_pinctrl_gpio_function_enable(pctl);
662 if (ret)
663 return ret;
664
665 pctl->irq_chip.name = dev_name(pctl->dev);
666 pctl->irq_chip.irq_mask = stmfx_pinctrl_irq_mask;
667 pctl->irq_chip.irq_unmask = stmfx_pinctrl_irq_unmask;
668 pctl->irq_chip.irq_set_type = stmfx_pinctrl_irq_set_type;
669 pctl->irq_chip.irq_bus_lock = stmfx_pinctrl_irq_bus_lock;
670 pctl->irq_chip.irq_bus_sync_unlock = stmfx_pinctrl_irq_bus_sync_unlock;
671 for_each_clear_bit(n, &pctl->gpio_valid_mask, pctl->gpio_chip.ngpio)
672 clear_bit(n, pctl->gpio_chip.valid_mask);
673
674 ret = gpiochip_irqchip_add_nested(&pctl->gpio_chip, &pctl->irq_chip,
675 0, handle_bad_irq, IRQ_TYPE_NONE);
676 if (ret) {
677 dev_err(pctl->dev, "cannot add irqchip to gpiochip\n");
678 return ret;
679 }
680
681 ret = devm_request_threaded_irq(pctl->dev, irq, NULL,
682 stmfx_pinctrl_irq_thread_fn,
683 IRQF_ONESHOT,
684 pctl->irq_chip.name, pctl);
685 if (ret) {
686 dev_err(pctl->dev, "cannot request irq%d\n", irq);
687 return ret;
688 }
689
690 gpiochip_set_nested_irqchip(&pctl->gpio_chip, &pctl->irq_chip, irq);
691
692 dev_info(pctl->dev,
693 "%ld GPIOs available\n", hweight_long(pctl->gpio_valid_mask));
694
695 return 0;
696 }
697
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (20695 bytes)
Powered by blists - more mailing lists