[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211150741.PhNf4uq8-lkp@intel.com>
Date: Tue, 15 Nov 2022 07:12:36 +0800
From: kernel test robot <lkp@...el.com>
To: Martin Botka <martin.botka@...ainline.org>, martin.botka1@...il.com
Cc: oe-kbuild-all@...ts.linux.dev,
~postmarketos/upstreaming@...ts.sr.ht,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...ainline.org>,
Marijn Suijten <marijn.suijten@...ainline.org>,
Jami Kettunen <jamipkettunen@...ainline.org>,
Paul Bouchara <paul.bouchara@...ainline.org>,
Yenda <jtrmal@...il.com>,
Martin Botka <martin.botka@...ainline.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] regulator: axp20x: Add support for AXP1530 variant
Hi Martin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on broonie-regulator/for-next]
[also build test ERROR on linus/master v6.1-rc5 next-20221114]
[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/Martin-Botka/regulator-axp20x-Add-support-for-AXP1530-variant/20221115-002644
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
patch link: https://lore.kernel.org/r/20221114162459.1802174-1-martin.botka%40somainline.org
patch subject: [PATCH 1/1] regulator: axp20x: Add support for AXP1530 variant
config: arc-randconfig-r043-20221114
compiler: arceb-elf-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/7f0eb274b33943549c38a0eb160748d3754ad1e7
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Martin-Botka/regulator-axp20x-Add-support-for-AXP1530-variant/20221115-002644
git checkout 7f0eb274b33943549c38a0eb160748d3754ad1e7
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/regulator/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> drivers/regulator/axp20x-regulator.c:1021:25: error: 'AXP1530_DCDC1' undeclared here (not in a function); did you mean 'AXP813_DCDC1'?
1021 | AXP_DESC_RANGES(AXP1530, DCDC1, "dcdc1", "vin1", axp1530_dcdc1_ranges,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:345:10: note: in definition of macro 'AXP_DESC_RANGES'
345 | [_family##_##_id] = { \
| ^~~~~~~
>> drivers/regulator/axp20x-regulator.c:1021:25: error: array index in initializer not of integer type
1021 | AXP_DESC_RANGES(AXP1530, DCDC1, "dcdc1", "vin1", axp1530_dcdc1_ranges,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:345:10: note: in definition of macro 'AXP_DESC_RANGES'
345 | [_family##_##_id] = { \
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:1021:25: note: (near initialization for 'axp1530_regulators')
1021 | AXP_DESC_RANGES(AXP1530, DCDC1, "dcdc1", "vin1", axp1530_dcdc1_ranges,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:345:10: note: in definition of macro 'AXP_DESC_RANGES'
345 | [_family##_##_id] = { \
| ^~~~~~~
>> drivers/regulator/axp20x-regulator.c:1022:47: error: 'AXP1530_DCDC1_CONRTOL' undeclared here (not in a function)
1022 | 0x6B, AXP1530_DCDC1_CONRTOL, 0x7f, AXP1530_OUTPUT_CONTROL,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/regulator/axp20x-regulator.c:354:36: note: in definition of macro 'AXP_DESC_RANGES'
354 | .vsel_reg = (_vreg), \
| ^~~~~
>> drivers/regulator/axp20x-regulator.c:1022:76: error: 'AXP1530_OUTPUT_CONTROL' undeclared here (not in a function)
1022 | 0x6B, AXP1530_DCDC1_CONRTOL, 0x7f, AXP1530_OUTPUT_CONTROL,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/axp20x-regulator.c:356:36: note: in definition of macro 'AXP_DESC_RANGES'
356 | .enable_reg = (_ereg), \
| ^~~~~
>> drivers/regulator/axp20x-regulator.c:1024:25: error: 'AXP1530_DCDC2' undeclared here (not in a function); did you mean 'AXP813_DCDC2'?
1024 | AXP_DESC_RANGES(AXP1530, DCDC2, "dcdc2", "vin2", axp1530_dcdc2_ranges,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:345:10: note: in definition of macro 'AXP_DESC_RANGES'
345 | [_family##_##_id] = { \
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:1024:25: error: array index in initializer not of integer type
1024 | AXP_DESC_RANGES(AXP1530, DCDC2, "dcdc2", "vin2", axp1530_dcdc2_ranges,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:345:10: note: in definition of macro 'AXP_DESC_RANGES'
345 | [_family##_##_id] = { \
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:1024:25: note: (near initialization for 'axp1530_regulators')
1024 | AXP_DESC_RANGES(AXP1530, DCDC2, "dcdc2", "vin2", axp1530_dcdc2_ranges,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:345:10: note: in definition of macro 'AXP_DESC_RANGES'
345 | [_family##_##_id] = { \
| ^~~~~~~
>> drivers/regulator/axp20x-regulator.c:1025:47: error: 'AXP1530_DCDC2_CONRTOL' undeclared here (not in a function)
1025 | 0x58, AXP1530_DCDC2_CONRTOL, 0x7f, AXP1530_OUTPUT_CONTROL,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/regulator/axp20x-regulator.c:354:36: note: in definition of macro 'AXP_DESC_RANGES'
354 | .vsel_reg = (_vreg), \
| ^~~~~
>> drivers/regulator/axp20x-regulator.c:1027:25: error: 'AXP1530_DCDC3' undeclared here (not in a function); did you mean 'AXP813_DCDC3'?
1027 | AXP_DESC_RANGES(AXP1530, DCDC3, "dcdc3", "vin3", axp1530_dcdc3_ranges,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:345:10: note: in definition of macro 'AXP_DESC_RANGES'
345 | [_family##_##_id] = { \
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:1027:25: error: array index in initializer not of integer type
1027 | AXP_DESC_RANGES(AXP1530, DCDC3, "dcdc3", "vin3", axp1530_dcdc3_ranges,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:345:10: note: in definition of macro 'AXP_DESC_RANGES'
345 | [_family##_##_id] = { \
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:1027:25: note: (near initialization for 'axp1530_regulators')
1027 | AXP_DESC_RANGES(AXP1530, DCDC3, "dcdc3", "vin3", axp1530_dcdc3_ranges,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:345:10: note: in definition of macro 'AXP_DESC_RANGES'
345 | [_family##_##_id] = { \
| ^~~~~~~
>> drivers/regulator/axp20x-regulator.c:1028:47: error: 'AXP1530_DCDC3_CONRTOL' undeclared here (not in a function)
1028 | 0x58, AXP1530_DCDC3_CONRTOL, 0x7f, AXP1530_OUTPUT_CONTROL,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/regulator/axp20x-regulator.c:354:36: note: in definition of macro 'AXP_DESC_RANGES'
354 | .vsel_reg = (_vreg), \
| ^~~~~
>> drivers/regulator/axp20x-regulator.c:1030:18: error: 'AXP1530_LDO1' undeclared here (not in a function); did you mean 'AXP813_FLDO1'?
1030 | AXP_DESC(AXP1530, LDO1, "ldo1", "ldo1in", 500, 3500, 100,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:297:10: note: in definition of macro 'AXP_DESC'
297 | [_family##_##_id] = { \
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:1030:18: error: array index in initializer not of integer type
1030 | AXP_DESC(AXP1530, LDO1, "ldo1", "ldo1in", 500, 3500, 100,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:297:10: note: in definition of macro 'AXP_DESC'
297 | [_family##_##_id] = { \
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:1030:18: note: (near initialization for 'axp1530_regulators')
1030 | AXP_DESC(AXP1530, LDO1, "ldo1", "ldo1in", 500, 3500, 100,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:297:10: note: in definition of macro 'AXP_DESC'
297 | [_family##_##_id] = { \
| ^~~~~~~
>> drivers/regulator/axp20x-regulator.c:1031:41: error: 'AXP1530_ALDO1_CONRTOL' undeclared here (not in a function)
1031 | AXP1530_ALDO1_CONRTOL, 0x1f, AXP1530_OUTPUT_CONTROL,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/regulator/axp20x-regulator.c:308:36: note: in definition of macro 'AXP_DESC'
308 | .vsel_reg = (_vreg), \
| ^~~~~
>> drivers/regulator/axp20x-regulator.c:1033:18: error: 'AXP1530_LDO2' undeclared here (not in a function); did you mean 'AXP813_FLDO2'?
1033 | AXP_DESC(AXP1530, LDO2, "ldo2", "ldo2in", 500, 3500, 100,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:297:10: note: in definition of macro 'AXP_DESC'
297 | [_family##_##_id] = { \
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:1033:18: error: array index in initializer not of integer type
1033 | AXP_DESC(AXP1530, LDO2, "ldo2", "ldo2in", 500, 3500, 100,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:297:10: note: in definition of macro 'AXP_DESC'
297 | [_family##_##_id] = { \
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:1033:18: note: (near initialization for 'axp1530_regulators')
1033 | AXP_DESC(AXP1530, LDO2, "ldo2", "ldo2in", 500, 3500, 100,
| ^~~~~~~
drivers/regulator/axp20x-regulator.c:297:10: note: in definition of macro 'AXP_DESC'
297 | [_family##_##_id] = { \
| ^~~~~~~
>> drivers/regulator/axp20x-regulator.c:1034:41: error: 'AXP1530_DLDO1_CONRTOL' undeclared here (not in a function)
1034 | AXP1530_DLDO1_CONRTOL, 0x1f, AXP1530_OUTPUT_CONTROL,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/regulator/axp20x-regulator.c:308:36: note: in definition of macro 'AXP_DESC'
308 | .vsel_reg = (_vreg), \
| ^~~~~
drivers/regulator/axp20x-regulator.c: In function 'axp20x_set_dcdc_freq':
>> drivers/regulator/axp20x-regulator.c:1077:14: error: 'AXP1530_ID' undeclared (first use in this function); did you mean 'AXP152_ID'?
1077 | case AXP1530_ID:
| ^~~~~~~~~~
| AXP152_ID
drivers/regulator/axp20x-regulator.c:1077:14: note: each undeclared identifier is reported only once for each function it appears in
drivers/regulator/axp20x-regulator.c: In function 'axp20x_regulator_probe':
drivers/regulator/axp20x-regulator.c:1295:22: error: 'AXP1530_ID' undeclared (first use in this function); did you mean 'AXP152_ID'?
1295 | case AXP1530_ID:
| ^~~~~~~~~~
| AXP152_ID
>> drivers/regulator/axp20x-regulator.c:1297:31: error: 'AXP1530_REG_ID_MAX' undeclared (first use in this function); did you mean 'AXP813_REG_ID_MAX'?
1297 | nregulators = AXP1530_REG_ID_MAX;
| ^~~~~~~~~~~~~~~~~~
| AXP813_REG_ID_MAX
vim +1021 drivers/regulator/axp20x-regulator.c
1019
1020 static const struct regulator_desc axp1530_regulators[] = {
> 1021 AXP_DESC_RANGES(AXP1530, DCDC1, "dcdc1", "vin1", axp1530_dcdc1_ranges,
> 1022 0x6B, AXP1530_DCDC1_CONRTOL, 0x7f, AXP1530_OUTPUT_CONTROL,
1023 BIT(0)),
> 1024 AXP_DESC_RANGES(AXP1530, DCDC2, "dcdc2", "vin2", axp1530_dcdc2_ranges,
> 1025 0x58, AXP1530_DCDC2_CONRTOL, 0x7f, AXP1530_OUTPUT_CONTROL,
1026 BIT(1)),
> 1027 AXP_DESC_RANGES(AXP1530, DCDC3, "dcdc3", "vin3", axp1530_dcdc3_ranges,
> 1028 0x58, AXP1530_DCDC3_CONRTOL, 0x7f, AXP1530_OUTPUT_CONTROL,
1029 BIT(2)),
> 1030 AXP_DESC(AXP1530, LDO1, "ldo1", "ldo1in", 500, 3500, 100,
> 1031 AXP1530_ALDO1_CONRTOL, 0x1f, AXP1530_OUTPUT_CONTROL,
1032 BIT(3)),
> 1033 AXP_DESC(AXP1530, LDO2, "ldo2", "ldo2in", 500, 3500, 100,
> 1034 AXP1530_DLDO1_CONRTOL, 0x1f, AXP1530_OUTPUT_CONTROL,
1035 BIT(4)),
1036 };
1037
1038 static int axp20x_set_dcdc_freq(struct platform_device *pdev, u32 dcdcfreq)
1039 {
1040 struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent);
1041 unsigned int reg = AXP20X_DCDC_FREQ;
1042 u32 min, max, def, step;
1043
1044 switch (axp20x->variant) {
1045 case AXP202_ID:
1046 case AXP209_ID:
1047 min = 750;
1048 max = 1875;
1049 def = 1500;
1050 step = 75;
1051 break;
1052 case AXP803_ID:
1053 case AXP813_ID:
1054 /*
1055 * AXP803/AXP813 DCDC work frequency setting has the same
1056 * range and step as AXP22X, but at a different register.
1057 * (See include/linux/mfd/axp20x.h)
1058 */
1059 reg = AXP803_DCDC_FREQ_CTRL;
1060 fallthrough; /* to the check below */
1061 case AXP806_ID:
1062 /*
1063 * AXP806 also have DCDC work frequency setting register at a
1064 * different position.
1065 */
1066 if (axp20x->variant == AXP806_ID)
1067 reg = AXP806_DCDC_FREQ_CTRL;
1068 fallthrough;
1069 case AXP221_ID:
1070 case AXP223_ID:
1071 case AXP809_ID:
1072 min = 1800;
1073 max = 4050;
1074 def = 3000;
1075 step = 150;
1076 break;
> 1077 case AXP1530_ID:
1078 /*
1079 * Do not set the DCDC frequency on AXP1530
1080 */
1081 return 0;
1082 break;
1083 default:
1084 dev_err(&pdev->dev,
1085 "Setting DCDC frequency for unsupported AXP variant\n");
1086 return -EINVAL;
1087 }
1088
1089 if (dcdcfreq == 0)
1090 dcdcfreq = def;
1091
1092 if (dcdcfreq < min) {
1093 dcdcfreq = min;
1094 dev_warn(&pdev->dev, "DCDC frequency too low. Set to %ukHz\n",
1095 min);
1096 }
1097
1098 if (dcdcfreq > max) {
1099 dcdcfreq = max;
1100 dev_warn(&pdev->dev, "DCDC frequency too high. Set to %ukHz\n",
1101 max);
1102 }
1103
1104 dcdcfreq = (dcdcfreq - min) / step;
1105
1106 return regmap_update_bits(axp20x->regmap, reg,
1107 AXP20X_FREQ_DCDC_MASK, dcdcfreq);
1108 }
1109
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (147134 bytes)
Powered by blists - more mailing lists