public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Abhash Jha <abhashkumarjha123@gmail.com>, linux-iio@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	anshulusr@gmail.com, jic23@kernel.org, lars@metafoo.de,
	linux-kernel@vger.kernel.org,
	Abhash Jha <abhashkumarjha123@gmail.com>
Subject: Re: [PATCH 3/4] iio: light: ltr390: Interrupts and threshold event support
Date: Tue, 10 Sep 2024 07:58:03 +0800	[thread overview]
Message-ID: <202409100717.2rKMS0oi-lkp@intel.com> (raw)
In-Reply-To: <20240909103623.264113-4-abhashkumarjha123@gmail.com>

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: x86_64-buildonly-randconfig-003-20240910 (https://download.01.org/0day-ci/archive/20240910/202409100717.2rKMS0oi-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240910/202409100717.2rKMS0oi-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409100717.2rKMS0oi-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/iio/light/ltr390.c:633:19: error: call to undeclared function 'irq_get_trigger_type'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     633 |                 int irq_flags = irq_get_trigger_type(client->irq);
         |                                 ^
   1 error generated.


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, &ltr390_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 = &ltr390_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

  reply	other threads:[~2024-09-09 23:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 10:36 [PATCH 0/4] Threshold event and Sampling freq support for LTR390 Abhash Jha
2024-09-09 10:36 ` [PATCH 1/4] iio: light: ltr390: Added configurable sampling frequency support Abhash Jha
2024-09-09 10:36 ` [PATCH 2/4] iio: light: ltr390: Suspend and Resume support Abhash Jha
2024-09-09 10:36 ` [PATCH 3/4] iio: light: ltr390: Interrupts and threshold event support Abhash Jha
2024-09-09 23:58   ` kernel test robot [this message]
2024-09-10  7:05   ` kernel test robot
2024-09-09 10:36 ` [PATCH 4/4] iio: light: ltr390: Add interrupt persistance support Abhash Jha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202409100717.2rKMS0oi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=abhashkumarjha123@gmail.com \
    --cc=anshulusr@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox