linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [gpio:gpio-descriptors-extcon-cleanup 3/4] drivers/extcon/extcon-gpio.c:85:10: error: 'struct gpio_extcon_data' has no member named 'extcon_id'
@ 2020-02-17 19:51 kbuild test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2020-02-17 19:51 UTC (permalink / raw)
  To: Linus Walleij; +Cc: kbuild-all, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 10831 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-extcon-cleanup
head:   9409cd9bbfba06ffdeea264f2376f7bd0baee63a
commit: ab984ecf4e32c42e497dc38bb06d68b005c7e4d0 [3/4] extcon: gpio: Get connector type from device property
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout ab984ecf4e32c42e497dc38bb06d68b005c7e4d0
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=arm64 

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

All errors (new ones prefixed by >>):

   drivers/extcon/extcon-gpio.c: In function 'gpio_extcon_probe':
>> drivers/extcon/extcon-gpio.c:85:10: error: 'struct gpio_extcon_data' has no member named 'extcon_id'
     if (data->extcon_id > EXTCON_NONE)
             ^~

vim +85 drivers/extcon/extcon-gpio.c

be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   63  
44f34fd4a7f804 drivers/extcon/extcon-gpio.c Bill Pemberton 2012-11-19   64  static int gpio_extcon_probe(struct platform_device *pdev)
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   65  {
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   66  	struct gpio_extcon_data *data;
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   67  	struct device *dev = &pdev->dev;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   68  	unsigned long irq_flags;
17ca6c83c514ff drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   69  	u32 debounce_usecs;
ab984ecf4e32c4 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   70  	u32 connector_type;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   71  	int irq;
1073514b11c221 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-08-29   72  	int ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   73  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   74  	data = devm_kzalloc(dev, sizeof(struct gpio_extcon_data), GFP_KERNEL);
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   75  	if (!data)
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   76  		return -ENOMEM;
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   77  
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   78  	/*
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   79  	 * FIXME: extcon_id represents the unique identifier of external
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   80  	 * connectors such as EXTCON_USB, EXTCON_DISP_HDMI and so on. extcon_id
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   81  	 * is necessary to register the extcon device. But, it's not yet
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   82  	 * developed to get the extcon id from device-tree or others.
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   83  	 * On later, it have to be solved.
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   84  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  @85  	if (data->extcon_id > EXTCON_NONE)
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   86  		return -EINVAL;
60cd62d4f7d681 drivers/extcon/extcon-gpio.c Chanwoo Choi   2014-04-21   87  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   88  	data->gpiod = devm_gpiod_get(dev, "extcon", GPIOD_IN);
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   89  	if (IS_ERR(data->gpiod))
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   90  		return PTR_ERR(data->gpiod);
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   91  	irq = gpiod_to_irq(data->gpiod);
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   92  	if (irq <= 0)
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   93  		return irq;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   94  
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   95  	/*
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   96  	 * It is unlikely that this is an acknowledged interrupt that goes
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   97  	 * away after handling, what we are looking for are falling edges
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   98  	 * if the signal is active low, and rising edges if the signal is
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   99  	 * active high.
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  100  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  101  	if (gpiod_is_active_low(data->gpiod))
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  102  		irq_flags = IRQF_TRIGGER_FALLING;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  103  	else
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  104  		irq_flags = IRQF_TRIGGER_RISING;
4288d9b8edcec7 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-11-22  105  
ab984ecf4e32c4 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  106  	ret = device_property_read_u32(dev, "extcon-connector-types", &connector_type);
ab984ecf4e32c4 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  107  	if (ret || !connector_type) {
ab984ecf4e32c4 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  108  		dev_err(dev, "illegal cable type or undefined cable type\n");
ab984ecf4e32c4 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  109  		return -EINVAL;
ab984ecf4e32c4 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  110  	}
ab984ecf4e32c4 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  111  	data->connector_type[0] = connector_type;
ab984ecf4e32c4 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  112  	data->connector_type[1] = EXTCON_NONE;
ab984ecf4e32c4 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  113  
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  114  	/* Allocate the memory of extcon devie and register extcon device */
ab984ecf4e32c4 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  115  	data->edev = devm_extcon_dev_allocate(dev, data->connector_type);
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  116  	if (IS_ERR(data->edev)) {
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  117  		dev_err(dev, "failed to allocate extcon device\n");
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  118  		return -ENOMEM;
338de0ca682ca9 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-09-10  119  	}
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  120  
17ca6c83c514ff drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  121  	ret = device_property_read_u32(dev, "input-debounce", &debounce_usecs);
17ca6c83c514ff drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  122  	if (ret || !debounce_usecs) {
17ca6c83c514ff drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  123  		dev_err(dev, "illegal debounce value, set to 20 ms\n");
17ca6c83c514ff drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  124  		debounce_usecs = 20000;
17ca6c83c514ff drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  125  	}
17ca6c83c514ff drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  126  	ret = gpiod_set_debounce(data->gpiod, debounce_usecs);
17ca6c83c514ff drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  127  	if (ret)
17ca6c83c514ff drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  128  		data->debounce_jiffies = msecs_to_jiffies(debounce_usecs * 1000);
17ca6c83c514ff drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  129  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  130  	ret = devm_extcon_dev_register(dev, data->edev);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  131  	if (ret < 0)
01eaf2458773b2 drivers/extcon/extcon_gpio.c Axel Lin       2012-06-16  132  		return ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  133  
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  134  	INIT_DELAYED_WORK(&data->work, gpio_extcon_work);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  135  
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  136  	/*
b51b387020ee1c drivers/extcon/extcon-gpio.c Moritz Fischer 2015-12-23  137  	 * Request the interrupt of gpio to detect whether external connector
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  138  	 * is attached or detached.
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  139  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  140  	ret = devm_request_any_context_irq(dev, irq,
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  141  					gpio_irq_handler, irq_flags,
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  142  					pdev->name, data);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  143  	if (ret < 0)
d92c2f12f8a940 drivers/extcon/extcon-gpio.c Sangjung Woo   2014-04-21  144  		return ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  145  
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  146  	platform_set_drvdata(pdev, data);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  147  	/* Perform initial detection */
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  148  	gpio_extcon_work(&data->work.work);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  149  
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  150  	return 0;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  151  }
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  152  

:::::: The code at line 85 was first introduced by commit
:::::: 8bc4810b435a3338346efd70e94c4d6fd0863635 extcon: gpio: Request reasonable interrupts

:::::: TO: Linus Walleij <linus.walleij@linaro.org>
:::::: CC: Chanwoo Choi <cw00.choi@samsung.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 70493 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [gpio:gpio-descriptors-extcon-cleanup 3/4] drivers/extcon/extcon-gpio.c:85:10: error: 'struct gpio_extcon_data' has no member named 'extcon_id'
@ 2020-04-16  0:51 kbuild test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2020-04-16  0:51 UTC (permalink / raw)
  To: Linus Walleij; +Cc: kbuild-all, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 10686 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-extcon-cleanup
head:   3fa5fd1800f07660a1468bb2a7f886af0e7e33cd
commit: 9aefa1ae0c6d7d0a619a878cb66e97f645ab9abe [3/4] extcon: gpio: Get connector type from device property
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        git checkout 9aefa1ae0c6d7d0a619a878cb66e97f645ab9abe
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/extcon/extcon-gpio.c: In function 'gpio_extcon_probe':
>> drivers/extcon/extcon-gpio.c:85:10: error: 'struct gpio_extcon_data' has no member named 'extcon_id'
     if (data->extcon_id > EXTCON_NONE)
             ^~

vim +85 drivers/extcon/extcon-gpio.c

be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   63  
44f34fd4a7f804 drivers/extcon/extcon-gpio.c Bill Pemberton 2012-11-19   64  static int gpio_extcon_probe(struct platform_device *pdev)
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   65  {
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   66  	struct gpio_extcon_data *data;
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   67  	struct device *dev = &pdev->dev;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   68  	unsigned long irq_flags;
c56c36ab24436e drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   69  	u32 debounce_usecs;
9aefa1ae0c6d7d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   70  	u32 connector_type;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   71  	int irq;
1073514b11c221 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-08-29   72  	int ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   73  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   74  	data = devm_kzalloc(dev, sizeof(struct gpio_extcon_data), GFP_KERNEL);
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   75  	if (!data)
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   76  		return -ENOMEM;
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   77  
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   78  	/*
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   79  	 * FIXME: extcon_id represents the unique identifier of external
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   80  	 * connectors such as EXTCON_USB, EXTCON_DISP_HDMI and so on. extcon_id
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   81  	 * is necessary to register the extcon device. But, it's not yet
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   82  	 * developed to get the extcon id from device-tree or others.
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   83  	 * On later, it have to be solved.
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   84  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  @85  	if (data->extcon_id > EXTCON_NONE)
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   86  		return -EINVAL;
60cd62d4f7d681 drivers/extcon/extcon-gpio.c Chanwoo Choi   2014-04-21   87  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   88  	data->gpiod = devm_gpiod_get(dev, "extcon", GPIOD_IN);
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   89  	if (IS_ERR(data->gpiod))
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   90  		return PTR_ERR(data->gpiod);
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   91  	irq = gpiod_to_irq(data->gpiod);
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   92  	if (irq <= 0)
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   93  		return irq;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   94  
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   95  	/*
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   96  	 * It is unlikely that this is an acknowledged interrupt that goes
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   97  	 * away after handling, what we are looking for are falling edges
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   98  	 * if the signal is active low, and rising edges if the signal is
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   99  	 * active high.
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  100  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  101  	if (gpiod_is_active_low(data->gpiod))
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  102  		irq_flags = IRQF_TRIGGER_FALLING;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  103  	else
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  104  		irq_flags = IRQF_TRIGGER_RISING;
4288d9b8edcec7 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-11-22  105  
9aefa1ae0c6d7d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  106  	ret = device_property_read_u32(dev, "extcon-connector-types", &connector_type);
9aefa1ae0c6d7d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  107  	if (ret || !connector_type) {
9aefa1ae0c6d7d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  108  		dev_err(dev, "illegal cable type or undefined cable type\n");
9aefa1ae0c6d7d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  109  		return -EINVAL;
9aefa1ae0c6d7d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  110  	}
9aefa1ae0c6d7d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  111  	data->connector_type[0] = connector_type;
9aefa1ae0c6d7d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  112  	data->connector_type[1] = EXTCON_NONE;
9aefa1ae0c6d7d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  113  
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  114  	/* Allocate the memory of extcon devie and register extcon device */
9aefa1ae0c6d7d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  115  	data->edev = devm_extcon_dev_allocate(dev, data->connector_type);
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  116  	if (IS_ERR(data->edev)) {
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  117  		dev_err(dev, "failed to allocate extcon device\n");
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  118  		return -ENOMEM;
338de0ca682ca9 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-09-10  119  	}
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  120  
c56c36ab24436e drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  121  	ret = device_property_read_u32(dev, "input-debounce", &debounce_usecs);
c56c36ab24436e drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  122  	if (ret || !debounce_usecs) {
c56c36ab24436e drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  123  		dev_err(dev, "illegal debounce value, set to 20 ms\n");
c56c36ab24436e drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  124  		debounce_usecs = 20000;
c56c36ab24436e drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  125  	}
c56c36ab24436e drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  126  	ret = gpiod_set_debounce(data->gpiod, debounce_usecs);
c56c36ab24436e drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  127  	if (ret)
c56c36ab24436e drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  128  		data->debounce_jiffies = msecs_to_jiffies(debounce_usecs * 1000);
c56c36ab24436e drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  129  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  130  	ret = devm_extcon_dev_register(dev, data->edev);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  131  	if (ret < 0)
01eaf2458773b2 drivers/extcon/extcon_gpio.c Axel Lin       2012-06-16  132  		return ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  133  
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  134  	INIT_DELAYED_WORK(&data->work, gpio_extcon_work);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  135  
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  136  	/*
b51b387020ee1c drivers/extcon/extcon-gpio.c Moritz Fischer 2015-12-23  137  	 * Request the interrupt of gpio to detect whether external connector
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  138  	 * is attached or detached.
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  139  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  140  	ret = devm_request_any_context_irq(dev, irq,
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  141  					gpio_irq_handler, irq_flags,
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  142  					pdev->name, data);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  143  	if (ret < 0)
d92c2f12f8a940 drivers/extcon/extcon-gpio.c Sangjung Woo   2014-04-21  144  		return ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  145  
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  146  	platform_set_drvdata(pdev, data);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  147  	/* Perform initial detection */
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  148  	gpio_extcon_work(&data->work.work);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  149  
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  150  	return 0;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  151  }
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  152  

:::::: The code at line 85 was first introduced by commit
:::::: 8bc4810b435a3338346efd70e94c4d6fd0863635 extcon: gpio: Request reasonable interrupts

:::::: TO: Linus Walleij <linus.walleij@linaro.org>
:::::: CC: Chanwoo Choi <cw00.choi@samsung.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 72528 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [gpio:gpio-descriptors-extcon-cleanup 3/4] drivers/extcon/extcon-gpio.c:85:10: error: 'struct gpio_extcon_data' has no member named 'extcon_id'
@ 2020-06-27  5:38 kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-06-27  5:38 UTC (permalink / raw)
  To: Linus Walleij; +Cc: kbuild-all, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 10806 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-extcon-cleanup
head:   d6cb89d185311c4f5f3847afa77ce99b189da4ff
commit: fa2df1657cf2abfbd2405a286bb9960655a556ed [3/4] extcon: gpio: Get connector type from device property
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        git checkout fa2df1657cf2abfbd2405a286bb9960655a556ed
        # save the attached .config to linux build tree
        make W=1 ARCH=um 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
   drivers/extcon/extcon-gpio.c: In function 'gpio_extcon_probe':
>> drivers/extcon/extcon-gpio.c:85:10: error: 'struct gpio_extcon_data' has no member named 'extcon_id'
      85 |  if (data->extcon_id > EXTCON_NONE)
         |          ^~

vim +85 drivers/extcon/extcon-gpio.c

be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   63  
44f34fd4a7f804 drivers/extcon/extcon-gpio.c Bill Pemberton 2012-11-19   64  static int gpio_extcon_probe(struct platform_device *pdev)
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   65  {
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   66  	struct gpio_extcon_data *data;
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   67  	struct device *dev = &pdev->dev;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   68  	unsigned long irq_flags;
9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   69  	u32 debounce_usecs;
fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   70  	u32 connector_type;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   71  	int irq;
1073514b11c221 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-08-29   72  	int ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   73  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   74  	data = devm_kzalloc(dev, sizeof(struct gpio_extcon_data), GFP_KERNEL);
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   75  	if (!data)
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   76  		return -ENOMEM;
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   77  
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   78  	/*
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   79  	 * FIXME: extcon_id represents the unique identifier of external
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   80  	 * connectors such as EXTCON_USB, EXTCON_DISP_HDMI and so on. extcon_id
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   81  	 * is necessary to register the extcon device. But, it's not yet
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   82  	 * developed to get the extcon id from device-tree or others.
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   83  	 * On later, it have to be solved.
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   84  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  @85  	if (data->extcon_id > EXTCON_NONE)
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   86  		return -EINVAL;
60cd62d4f7d681 drivers/extcon/extcon-gpio.c Chanwoo Choi   2014-04-21   87  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   88  	data->gpiod = devm_gpiod_get(dev, "extcon", GPIOD_IN);
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   89  	if (IS_ERR(data->gpiod))
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   90  		return PTR_ERR(data->gpiod);
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   91  	irq = gpiod_to_irq(data->gpiod);
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   92  	if (irq <= 0)
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   93  		return irq;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   94  
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   95  	/*
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   96  	 * It is unlikely that this is an acknowledged interrupt that goes
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   97  	 * away after handling, what we are looking for are falling edges
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   98  	 * if the signal is active low, and rising edges if the signal is
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   99  	 * active high.
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  100  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  101  	if (gpiod_is_active_low(data->gpiod))
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  102  		irq_flags = IRQF_TRIGGER_FALLING;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  103  	else
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  104  		irq_flags = IRQF_TRIGGER_RISING;
4288d9b8edcec7 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-11-22  105  
fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  106  	ret = device_property_read_u32(dev, "extcon-connector-types", &connector_type);
fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  107  	if (ret || !connector_type) {
fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  108  		dev_err(dev, "illegal cable type or undefined cable type\n");
fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  109  		return -EINVAL;
fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  110  	}
fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  111  	data->connector_type[0] = connector_type;
fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  112  	data->connector_type[1] = EXTCON_NONE;
fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  113  
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  114  	/* Allocate the memory of extcon devie and register extcon device */
fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  115  	data->edev = devm_extcon_dev_allocate(dev, data->connector_type);
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  116  	if (IS_ERR(data->edev)) {
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  117  		dev_err(dev, "failed to allocate extcon device\n");
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  118  		return -ENOMEM;
338de0ca682ca9 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-09-10  119  	}
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  120  
9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  121  	ret = device_property_read_u32(dev, "input-debounce", &debounce_usecs);
9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  122  	if (ret || !debounce_usecs) {
9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  123  		dev_err(dev, "illegal debounce value, set to 20 ms\n");
9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  124  		debounce_usecs = 20000;
9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  125  	}
9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  126  	ret = gpiod_set_debounce(data->gpiod, debounce_usecs);
9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  127  	if (ret)
9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  128  		data->debounce_jiffies = msecs_to_jiffies(debounce_usecs * 1000);
9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  129  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  130  	ret = devm_extcon_dev_register(dev, data->edev);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  131  	if (ret < 0)
01eaf2458773b2 drivers/extcon/extcon_gpio.c Axel Lin       2012-06-16  132  		return ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  133  
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  134  	INIT_DELAYED_WORK(&data->work, gpio_extcon_work);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  135  
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  136  	/*
b51b387020ee1c drivers/extcon/extcon-gpio.c Moritz Fischer 2015-12-23  137  	 * Request the interrupt of gpio to detect whether external connector
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  138  	 * is attached or detached.
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  139  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  140  	ret = devm_request_any_context_irq(dev, irq,
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  141  					gpio_irq_handler, irq_flags,
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  142  					pdev->name, data);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  143  	if (ret < 0)
d92c2f12f8a940 drivers/extcon/extcon-gpio.c Sangjung Woo   2014-04-21  144  		return ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  145  
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  146  	platform_set_drvdata(pdev, data);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  147  	/* Perform initial detection */
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  148  	gpio_extcon_work(&data->work.work);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  149  
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  150  	return 0;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  151  }
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  152  

:::::: The code at line 85 was first introduced by commit
:::::: 8bc4810b435a3338346efd70e94c4d6fd0863635 extcon: gpio: Request reasonable interrupts

:::::: TO: Linus Walleij <linus.walleij@linaro.org>
:::::: CC: Chanwoo Choi <cw00.choi@samsung.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 22959 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [gpio:gpio-descriptors-extcon-cleanup 3/4] drivers/extcon/extcon-gpio.c:85:10: error: 'struct gpio_extcon_data' has no member named 'extcon_id'
@ 2020-11-09 10:32 kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-11-09 10:32 UTC (permalink / raw)
  To: Linus Walleij; +Cc: kbuild-all, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 11215 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-extcon-cleanup
head:   b22cd8b5becaca1b51a7b8f0b8bcbad0b288c41d
commit: 14bdfd10352b4dd77ab778a83b4a3027bc8a040e [3/4] extcon: gpio: Get connector type from device property
config: arc-randconfig-r013-20201109 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/commit/?id=14bdfd10352b4dd77ab778a83b4a3027bc8a040e
        git remote add gpio https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
        git fetch --no-tags gpio gpio-descriptors-extcon-cleanup
        git checkout 14bdfd10352b4dd77ab778a83b4a3027bc8a040e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/extcon/extcon-gpio.c: In function 'gpio_extcon_probe':
>> drivers/extcon/extcon-gpio.c:85:10: error: 'struct gpio_extcon_data' has no member named 'extcon_id'
      85 |  if (data->extcon_id > EXTCON_NONE)
         |          ^~

vim +85 drivers/extcon/extcon-gpio.c

be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   63  
44f34fd4a7f804 drivers/extcon/extcon-gpio.c Bill Pemberton 2012-11-19   64  static int gpio_extcon_probe(struct platform_device *pdev)
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   65  {
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   66  	struct gpio_extcon_data *data;
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   67  	struct device *dev = &pdev->dev;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   68  	unsigned long irq_flags;
b42a6fcaf32b17 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   69  	u32 debounce_usecs;
14bdfd10352b4d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   70  	u32 connector_type;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   71  	int irq;
1073514b11c221 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-08-29   72  	int ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   73  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   74  	data = devm_kzalloc(dev, sizeof(struct gpio_extcon_data), GFP_KERNEL);
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   75  	if (!data)
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   76  		return -ENOMEM;
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   77  
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   78  	/*
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   79  	 * FIXME: extcon_id represents the unique identifier of external
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   80  	 * connectors such as EXTCON_USB, EXTCON_DISP_HDMI and so on. extcon_id
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   81  	 * is necessary to register the extcon device. But, it's not yet
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   82  	 * developed to get the extcon id from device-tree or others.
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   83  	 * On later, it have to be solved.
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   84  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  @85  	if (data->extcon_id > EXTCON_NONE)
a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   86  		return -EINVAL;
60cd62d4f7d681 drivers/extcon/extcon-gpio.c Chanwoo Choi   2014-04-21   87  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   88  	data->gpiod = devm_gpiod_get(dev, "extcon", GPIOD_IN);
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   89  	if (IS_ERR(data->gpiod))
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   90  		return PTR_ERR(data->gpiod);
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   91  	irq = gpiod_to_irq(data->gpiod);
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   92  	if (irq <= 0)
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   93  		return irq;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   94  
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   95  	/*
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   96  	 * It is unlikely that this is an acknowledged interrupt that goes
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   97  	 * away after handling, what we are looking for are falling edges
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   98  	 * if the signal is active low, and rising edges if the signal is
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   99  	 * active high.
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  100  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  101  	if (gpiod_is_active_low(data->gpiod))
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  102  		irq_flags = IRQF_TRIGGER_FALLING;
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  103  	else
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  104  		irq_flags = IRQF_TRIGGER_RISING;
4288d9b8edcec7 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-11-22  105  
14bdfd10352b4d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  106  	ret = device_property_read_u32(dev, "extcon-connector-types", &connector_type);
14bdfd10352b4d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  107  	if (ret || !connector_type) {
14bdfd10352b4d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  108  		dev_err(dev, "illegal cable type or undefined cable type\n");
14bdfd10352b4d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  109  		return -EINVAL;
14bdfd10352b4d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  110  	}
14bdfd10352b4d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  111  	data->connector_type[0] = connector_type;
14bdfd10352b4d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  112  	data->connector_type[1] = EXTCON_NONE;
14bdfd10352b4d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  113  
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  114  	/* Allocate the memory of extcon devie and register extcon device */
14bdfd10352b4d drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  115  	data->edev = devm_extcon_dev_allocate(dev, data->connector_type);
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  116  	if (IS_ERR(data->edev)) {
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  117  		dev_err(dev, "failed to allocate extcon device\n");
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  118  		return -ENOMEM;
338de0ca682ca9 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-09-10  119  	}
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  120  
b42a6fcaf32b17 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  121  	ret = device_property_read_u32(dev, "input-debounce", &debounce_usecs);
b42a6fcaf32b17 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  122  	if (ret || !debounce_usecs) {
b42a6fcaf32b17 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  123  		dev_err(dev, "illegal debounce value, set to 20 ms\n");
b42a6fcaf32b17 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  124  		debounce_usecs = 20000;
b42a6fcaf32b17 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  125  	}
b42a6fcaf32b17 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  126  	ret = gpiod_set_debounce(data->gpiod, debounce_usecs);
b42a6fcaf32b17 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  127  	if (ret)
b42a6fcaf32b17 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  128  		data->debounce_jiffies = msecs_to_jiffies(debounce_usecs * 1000);
b42a6fcaf32b17 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  129  
d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  130  	ret = devm_extcon_dev_register(dev, data->edev);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  131  	if (ret < 0)
01eaf2458773b2 drivers/extcon/extcon_gpio.c Axel Lin       2012-06-16  132  		return ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  133  
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  134  	INIT_DELAYED_WORK(&data->work, gpio_extcon_work);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  135  
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  136  	/*
b51b387020ee1c drivers/extcon/extcon-gpio.c Moritz Fischer 2015-12-23  137  	 * Request the interrupt of gpio to detect whether external connector
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  138  	 * is attached or detached.
de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  139  	 */
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  140  	ret = devm_request_any_context_irq(dev, irq,
8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  141  					gpio_irq_handler, irq_flags,
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  142  					pdev->name, data);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  143  	if (ret < 0)
d92c2f12f8a940 drivers/extcon/extcon-gpio.c Sangjung Woo   2014-04-21  144  		return ret;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  145  
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  146  	platform_set_drvdata(pdev, data);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  147  	/* Perform initial detection */
60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  148  	gpio_extcon_work(&data->work.work);
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  149  
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  150  	return 0;
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  151  }
be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  152  

:::::: The code at line 85 was first introduced by commit
:::::: 8bc4810b435a3338346efd70e94c4d6fd0863635 extcon: gpio: Request reasonable interrupts

:::::: TO: Linus Walleij <linus.walleij@linaro.org>
:::::: CC: Chanwoo Choi <cw00.choi@samsung.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33953 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-09 10:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 19:51 [gpio:gpio-descriptors-extcon-cleanup 3/4] drivers/extcon/extcon-gpio.c:85:10: error: 'struct gpio_extcon_data' has no member named 'extcon_id' kbuild test robot
2020-04-16  0:51 kbuild test robot
2020-06-27  5:38 kernel test robot
2020-11-09 10:32 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).