[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202409101339.74gDdc6n-lkp@intel.com>
Date: Tue, 10 Sep 2024 15:05:34 +0800
From: kernel test robot <lkp@...el.com>
To: Abhash Jha <abhashkumarjha123@...il.com>, linux-iio@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, anshulusr@...il.com, jic23@...nel.org,
lars@...afoo.de, linux-kernel@...r.kernel.org,
Abhash Jha <abhashkumarjha123@...il.com>
Subject: Re: [PATCH 3/4] iio: light: ltr390: Interrupts and threshold event
support
Hi Abhash,
kernel test robot noticed the following build errors:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on next-20240909]
[cannot apply to linus/master v6.11-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Abhash-Jha/iio-light-ltr390-Suspend-and-Resume-support/20240909-193623
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20240909103623.264113-4-abhashkumarjha123%40gmail.com
patch subject: [PATCH 3/4] iio: light: ltr390: Interrupts and threshold event support
config: i386-buildonly-randconfig-002-20240910 (https://download.01.org/0day-ci/archive/20240910/202409101339.74gDdc6n-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240910/202409101339.74gDdc6n-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409101339.74gDdc6n-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/iio/light/ltr390.c: In function 'ltr390_probe':
>> drivers/iio/light/ltr390.c:633:33: error: implicit declaration of function 'irq_get_trigger_type' [-Werror=implicit-function-declaration]
633 | int irq_flags = irq_get_trigger_type(client->irq);
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/irq_get_trigger_type +633 drivers/iio/light/ltr390.c
578
579 static int ltr390_probe(struct i2c_client *client)
580 {
581 struct ltr390_data *data;
582 struct iio_dev *indio_dev;
583 struct device *dev;
584 int ret, part_number;
585
586 dev = &client->dev;
587 indio_dev = devm_iio_device_alloc(dev, sizeof(*data));
588 if (!indio_dev)
589 return -ENOMEM;
590
591 data = iio_priv(indio_dev);
592
593 data->regmap = devm_regmap_init_i2c(client, <r390_regmap_config);
594 if (IS_ERR(data->regmap))
595 return dev_err_probe(dev, PTR_ERR(data->regmap),
596 "regmap initialization failed\n");
597
598 data->client = client;
599 /* default value of integration time from pg: 15 of the datasheet */
600 data->int_time_us = 100000;
601 /* default value of gain from pg: 16 of the datasheet */
602 data->gain = 3;
603 /* default mode for ltr390 is ALS mode */
604 data->mode = LTR390_SET_ALS_MODE;
605
606 mutex_init(&data->lock);
607
608 indio_dev->info = <r390_info;
609 indio_dev->channels = ltr390_channels;
610 indio_dev->num_channels = ARRAY_SIZE(ltr390_channels);
611 indio_dev->name = "ltr390";
612
613 ret = regmap_read(data->regmap, LTR390_PART_ID, &part_number);
614 if (ret)
615 return dev_err_probe(dev, ret,
616 "failed to get sensor's part id\n");
617 /* Lower 4 bits of `part_number` change with hardware revisions */
618 if (part_number >> 4 != LTR390_PART_NUMBER_ID)
619 dev_info(dev, "received invalid product id: 0x%x", part_number);
620 dev_dbg(dev, "LTR390, product id: 0x%x\n", part_number);
621
622 /* reset sensor, chip fails to respond to this, so ignore any errors */
623 regmap_set_bits(data->regmap, LTR390_MAIN_CTRL, LTR390_SW_RESET);
624
625 /* Wait for the registers to reset before proceeding */
626 usleep_range(1000, 2000);
627
628 ret = regmap_set_bits(data->regmap, LTR390_MAIN_CTRL, LTR390_SENSOR_ENABLE);
629 if (ret)
630 return dev_err_probe(dev, ret, "failed to enable the sensor\n");
631
632 if (client->irq) {
> 633 int irq_flags = irq_get_trigger_type(client->irq);
634
635 if (!irq_flags)
636 irq_flags = IRQF_TRIGGER_FALLING;
637
638 ret = devm_request_threaded_irq(&client->dev, client->irq,
639 NULL, ltr390_interrupt_handler,
640 irq_flags | IRQF_ONESHOT,
641 "ltr390_thresh_event", indio_dev);
642 if (ret) {
643 dev_err(&client->dev, "request irq (%d) failed\n", client->irq);
644 return ret;
645 }
646 }
647
648 return devm_iio_device_register(dev, indio_dev);
649 }
650
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists