Re: [PATCH v2 2/2] iio: health: max30100: Add pulse-width configuration via DT
From: kernel test robot
Date: Fri Oct 10 2025 - 12:25:24 EST
Hi Shrikant,
kernel test robot noticed the following build errors:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on robh/for-next v6.17]
[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/Shrikant-Raskar/dt-bindings-iio-max30100-Add-pulse-width-property/20251010-102537
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20251008031737.7321-3-raskar.shree97%40gmail.com
patch subject: [PATCH v2 2/2] iio: health: max30100: Add pulse-width configuration via DT
config: csky-randconfig-001-20251010 (https://download.01.org/0day-ci/archive/20251011/202510110029.epOLovuF-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251011/202510110029.epOLovuF-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510110029.epOLovuF-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
drivers/iio/health/max30100.c: In function 'max30100_chip_init':
>> drivers/iio/health/max30100.c:352:34: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
352 | FIELD_PREP(MAX30100_REG_SPO2_CONFIG_PW_MASK, pulse_width));
| ^~~~~~~~~~
vim +/FIELD_PREP +352 drivers/iio/health/max30100.c
327
328 static int max30100_chip_init(struct max30100_data *data)
329 {
330 int ret;
331 int pulse_width;
332 /* set default pulse-width-us to 1600us */
333 unsigned int pulse_us = 1600;
334 struct device *dev = &data->client->dev;
335
336 /* setup LED current settings */
337 ret = max30100_led_init(data);
338 if (ret)
339 return ret;
340
341 /* Read pulse-width-us from DT */
342 device_property_read_u32(dev, "maxim,pulse-width-us", &pulse_us);
343
344 pulse_width = max30100_get_pulse_width(pulse_us);
345 if (pulse_width < 0)
346 return dev_err_probe(dev, pulse_width, "invalid pulse-width %uus\n", pulse_us);
347
348 /* enable hi-res SPO2 readings at 100Hz */
349 ret = regmap_write(data->regmap, MAX30100_REG_SPO2_CONFIG,
350 MAX30100_REG_SPO2_CONFIG_HI_RES_EN |
351 MAX30100_REG_SPO2_CONFIG_100HZ |
> 352 FIELD_PREP(MAX30100_REG_SPO2_CONFIG_PW_MASK, pulse_width));
353 if (ret)
354 return ret;
355
356 /* enable SPO2 mode */
357 ret = regmap_update_bits(data->regmap, MAX30100_REG_MODE_CONFIG,
358 MAX30100_REG_MODE_CONFIG_MODE_MASK,
359 MAX30100_REG_MODE_CONFIG_MODE_HR_EN |
360 MAX30100_REG_MODE_CONFIG_MODE_SPO2_EN);
361 if (ret)
362 return ret;
363
364 /* enable FIFO interrupt */
365 return regmap_update_bits(data->regmap, MAX30100_REG_INT_ENABLE,
366 MAX30100_REG_INT_ENABLE_MASK,
367 MAX30100_REG_INT_ENABLE_FIFO_EN
368 << MAX30100_REG_INT_ENABLE_MASK_SHIFT);
369 }
370
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki