[PATCH V2 4/5] regulator: bq257xx: Add bq257xx boost regulator driver

kernel test robot lkp at intel.com
Sun Jun 22 07:11:55 PDT 2025


Hi Chris,

kernel test robot noticed the following build errors:

[auto build test ERROR on lee-mfd/for-mfd-next]
[also build test ERROR on lee-mfd/for-mfd-fixes broonie-regulator/for-next sre-power-supply/for-next linus/master v6.16-rc2 next-20250620]
[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/Chris-Morgan/dt-bindings-mfd-ti-bq25703a-Add-TI-BQ25703A-Charger/20250622-020443
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
patch link:    https://lore.kernel.org/r/20250621180119.163423-5-macroalpha82%40gmail.com
patch subject: [PATCH V2 4/5] regulator: bq257xx: Add bq257xx boost regulator driver
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20250622/202506222132.hzKC0iLG-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250622/202506222132.hzKC0iLG-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506222132.hzKC0iLG-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/regulator/bq257xx-regulator.c:33:9: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      33 |         return FIELD_GET(BQ25703_OTG_CUR_MASK, reg) * BQ25703_OTG_CUR_STEP_UA;
         |                ^
>> drivers/regulator/bq257xx-regulator.c:56:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      56 |                             FIELD_PREP(BQ25703_OTG_CUR_MASK, reg));
         |                             ^
   2 errors generated.


vim +/FIELD_GET +33 drivers/regulator/bq257xx-regulator.c

    23	
    24	static int bq25703_vbus_get_cur_limit(struct regulator_dev *rdev)
    25	{
    26		struct bq257xx_reg_data *pdata = rdev_get_drvdata(rdev);
    27		int ret;
    28		unsigned int reg;
    29	
    30		ret = regmap_read(pdata->bq->regmap, BQ25703_OTG_CURRENT, &reg);
    31		if (ret)
    32			return ret;
  > 33		return FIELD_GET(BQ25703_OTG_CUR_MASK, reg) * BQ25703_OTG_CUR_STEP_UA;
    34	}
    35	
    36	/*
    37	 * Check if the minimum current and maximum current requested are
    38	 * sane values, then set the register accordingly.
    39	 */
    40	static int bq25703_vbus_set_cur_limit(struct regulator_dev *rdev,
    41					      int min_uA, int max_uA)
    42	{
    43		struct bq257xx_reg_data *pdata = rdev_get_drvdata(rdev);
    44		unsigned int reg;
    45	
    46		if ((min_uA > BQ25703_OTG_CUR_MAX_UA) || (max_uA < 0))
    47			return -EINVAL;
    48	
    49		reg = (max_uA / BQ25703_OTG_CUR_STEP_UA);
    50	
    51		/* Catch rounding errors since our step is 50000uA. */
    52		if ((reg * BQ25703_OTG_CUR_STEP_UA) < min_uA)
    53			return -EINVAL;
    54	
    55		return regmap_write(pdata->bq->regmap, BQ25703_OTG_CURRENT,
  > 56				    FIELD_PREP(BQ25703_OTG_CUR_MASK, reg));
    57	}
    58	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the Linux-rockchip mailing list