From: kbuild test robot <lkp@intel.com>
To: Gene Chen <gene.chen.richtek@gmail.com>
Cc: gene_chen@richtek.com, kbuild-all@lists.01.org,
Wilma.Wu@mediatek.com, linux-kernel@vger.kernel.org,
cy_huang@richtek.com, linux-mediatek@lists.infradead.org,
matthias.bgg@gmail.com, lee.jones@linaro.org,
linux-arm-kernel@lists.infradead.org, shufan_lee@richtek.com
Subject: Re: [PATCH v5] mfd: mt6360: add pmic mt6360 driver
Date: Mon, 4 Nov 2019 03:56:54 +0800 [thread overview]
Message-ID: <201911040305.n5lPz3iF%lkp@intel.com> (raw)
In-Reply-To: <20191103174343.14285-1-gene.chen.richtek@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 8570 bytes --]
Hi Gene,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on 7d194c2100ad2a6dded545887d02754948ca5241]
url: https://github.com/0day-ci/linux/commits/Gene-Chen/mfd-mt6360-add-pmic-mt6360-driver/20191104-014602
base: 7d194c2100ad2a6dded545887d02754948ca5241
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/mfd/mt6360-core.c:298:2: error: implicit declaration of function 'OF_MFD_CELL' [-Werror=implicit-function-declaration]
OF_MFD_CELL("mt6360_adc", mt6360_adc_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:298:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
drivers/mfd/mt6360-core.c:298:2: note: (near initialization for 'mt6360_devs[0].name')
drivers/mfd/mt6360-core.c:298:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:298:2: note: (near initialization for 'mt6360_devs[0].name')
drivers/mfd/mt6360-core.c:300:2: error: initializer element is not constant
OF_MFD_CELL("mt6360_chg", mt6360_chg_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:300:2: note: (near initialization for 'mt6360_devs[0].id')
drivers/mfd/mt6360-core.c:302:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_led", mt6360_led_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:302:2: note: (near initialization for 'mt6360_devs[0].usage_count')
drivers/mfd/mt6360-core.c:302:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:302:2: note: (near initialization for 'mt6360_devs[0].usage_count')
drivers/mfd/mt6360-core.c:304:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_pmic", mt6360_pmic_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:304:2: note: (near initialization for 'mt6360_devs[0].enable')
drivers/mfd/mt6360-core.c:304:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:304:2: note: (near initialization for 'mt6360_devs[0].enable')
drivers/mfd/mt6360-core.c:306:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_ldo", mt6360_ldo_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:306:2: note: (near initialization for 'mt6360_devs[0].disable')
drivers/mfd/mt6360-core.c:306:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:306:2: note: (near initialization for 'mt6360_devs[0].disable')
drivers/mfd/mt6360-core.c:308:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_tcpc", NULL,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:308:2: note: (near initialization for 'mt6360_devs[0].suspend')
drivers/mfd/mt6360-core.c:308:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:308:2: note: (near initialization for 'mt6360_devs[0].suspend')
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_probe':
drivers/mfd/mt6360-core.c:352:12: error: 'IRQF_TRIGGER_FALLING' undeclared (first use in this function); did you mean 'IRQD_TRIGGER_MASK'?
IRQF_TRIGGER_FALLING, 0,
^~~~~~~~~~~~~~~~~~~~
IRQD_TRIGGER_MASK
drivers/mfd/mt6360-core.c:352:12: note: each undeclared identifier is reported only once for each function it appears in
drivers/mfd/mt6360-core.c:352:12: warning: passing argument 4 of 'devm_regmap_add_irq_chip' makes integer from pointer without a cast [-Wint-conversion]
In file included from include/linux/mfd/mt6360.h:9:0,
from drivers/mfd/mt6360-core.c:15:
include/linux/regmap.h:1270:5: note: expected 'int' but argument is of type 'const struct mfd_cell *'
int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq,
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_suspend':
>> drivers/mfd/mt6360-core.c:392:3: error: implicit declaration of function 'enable_irq_wake'; did you mean 'local_irq_save'? [-Werror=implicit-function-declaration]
enable_irq_wake(i2c->irq);
^~~~~~~~~~~~~~~
local_irq_save
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_resume':
drivers/mfd/mt6360-core.c:403:3: error: implicit declaration of function 'disable_irq_wake'; did you mean 'local_irq_save'? [-Werror=implicit-function-declaration]
disable_irq_wake(i2c->irq);
^~~~~~~~~~~~~~~~
local_irq_save
cc1: some warnings being treated as errors
vim +/OF_MFD_CELL +298 drivers/mfd/mt6360-core.c
296
297 static const struct mfd_cell mt6360_devs[] = {
> 298 OF_MFD_CELL("mt6360_adc", mt6360_adc_resources,
299 NULL, 0, 0, "mediatek,mt6360_adc"),
300 OF_MFD_CELL("mt6360_chg", mt6360_chg_resources,
301 NULL, 0, 0, "mediatek,mt6360_chg"),
302 OF_MFD_CELL("mt6360_led", mt6360_led_resources,
303 NULL, 0, 0, "mediatek,mt6360_led"),
304 OF_MFD_CELL("mt6360_pmic", mt6360_pmic_resources,
305 NULL, 0, 0, "mediatek,mt6360_pmic"),
306 OF_MFD_CELL("mt6360_ldo", mt6360_ldo_resources,
307 NULL, 0, 0, "mediatek,mt6360_ldo"),
308 OF_MFD_CELL("mt6360_tcpc", NULL,
309 NULL, 0, 0, "mediatek,mt6360_tcpc"),
310 };
311
312 static const unsigned short mt6360_slave_addr[MT6360_SLAVE_MAX] = {
313 MT6360_PMU_SLAVEID,
314 MT6360_PMIC_SLAVEID,
315 MT6360_LDO_SLAVEID,
316 MT6360_TCPC_SLAVEID,
317 };
318
319 static int mt6360_pmu_probe(struct i2c_client *client)
320 {
321 struct mt6360_pmu_data *mpd;
322 unsigned int reg_data = 0;
323 int i, ret;
324
325 mpd = devm_kzalloc(&client->dev, sizeof(*mpd), GFP_KERNEL);
326 if (!mpd)
327 return -ENOMEM;
328
329 mpd->dev = &client->dev;
330 i2c_set_clientdata(client, mpd);
331
332 mpd->regmap = devm_regmap_init_i2c(client, &mt6360_pmu_regmap_config);
333 if (IS_ERR(mpd->regmap)) {
334 dev_err(&client->dev, "Failed to register regmap\n");
335 return PTR_ERR(mpd->regmap);
336 }
337
338 ret = regmap_read(mpd->regmap, MT6360_PMU_DEV_INFO, ®_data);
339 if (ret < 0) {
340 dev_err(&client->dev, "Device not found\n");
341 return ret;
342 }
343
344 mpd->chip_rev = reg_data & CHIP_REV_MASK;
345 if (mpd->chip_rev != CHIP_VEN_MT6360) {
346 dev_err(&client->dev, "Device not supported\n");
347 return -ENODEV;
348 }
349
350 mt6360_pmu_irq_chip.irq_drv_data = mpd;
351 ret = devm_regmap_add_irq_chip(&client->dev, mpd->regmap, client->irq,
> 352 IRQF_TRIGGER_FALLING, 0,
353 &mt6360_pmu_irq_chip, &mpd->irq_data);
354 if (ret < 0) {
355 dev_err(&client->dev, "Failed to add Regmap IRQ Chip\n");
356 return ret;
357 }
358
359 mpd->i2c[0] = client;
360 for (i = 1; i < MT6360_SLAVE_MAX; i++) {
361 mpd->i2c[i] = devm_i2c_new_dummy_device(&client->dev,
362 client->adapter,
363 mt6360_slave_addr[i]);
364 if (IS_ERR(mpd->i2c[i])) {
365 dev_err(&client->dev, "new i2c dev [%d] fail\n", i);
366 return PTR_ERR(mpd->i2c[i]);
367 }
368 i2c_set_clientdata(mpd->i2c[i], mpd);
369 }
370
371 ret = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_AUTO,
372 mt6360_devs, ARRAY_SIZE(mt6360_devs), NULL,
373 0, regmap_irq_get_domain(mpd->irq_data));
374 if (ret < 0) {
375 dev_err(&client->dev, "mfd add cells fail\n");
376 return ret;
377 }
378
379 return 0;
380 }
381
382 static int mt6360_pmu_remove(struct i2c_client *client)
383 {
384 return 0;
385 }
386
387 static int __maybe_unused mt6360_pmu_suspend(struct device *dev)
388 {
389 struct i2c_client *i2c = to_i2c_client(dev);
390
391 if (device_may_wakeup(dev))
> 392 enable_irq_wake(i2c->irq);
393
394 return 0;
395 }
396
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 50142 bytes --]
[-- Attachment #3: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Gene Chen <gene.chen.richtek@gmail.com>
Cc: gene_chen@richtek.com, kbuild-all@lists.01.org,
Wilma.Wu@mediatek.com, linux-kernel@vger.kernel.org,
cy_huang@richtek.com, linux-mediatek@lists.infradead.org,
matthias.bgg@gmail.com, lee.jones@linaro.org,
linux-arm-kernel@lists.infradead.org, shufan_lee@richtek.com
Subject: Re: [PATCH v5] mfd: mt6360: add pmic mt6360 driver
Date: Mon, 4 Nov 2019 03:56:54 +0800 [thread overview]
Message-ID: <201911040305.n5lPz3iF%lkp@intel.com> (raw)
In-Reply-To: <20191103174343.14285-1-gene.chen.richtek@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 8570 bytes --]
Hi Gene,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on 7d194c2100ad2a6dded545887d02754948ca5241]
url: https://github.com/0day-ci/linux/commits/Gene-Chen/mfd-mt6360-add-pmic-mt6360-driver/20191104-014602
base: 7d194c2100ad2a6dded545887d02754948ca5241
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/mfd/mt6360-core.c:298:2: error: implicit declaration of function 'OF_MFD_CELL' [-Werror=implicit-function-declaration]
OF_MFD_CELL("mt6360_adc", mt6360_adc_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:298:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
drivers/mfd/mt6360-core.c:298:2: note: (near initialization for 'mt6360_devs[0].name')
drivers/mfd/mt6360-core.c:298:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:298:2: note: (near initialization for 'mt6360_devs[0].name')
drivers/mfd/mt6360-core.c:300:2: error: initializer element is not constant
OF_MFD_CELL("mt6360_chg", mt6360_chg_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:300:2: note: (near initialization for 'mt6360_devs[0].id')
drivers/mfd/mt6360-core.c:302:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_led", mt6360_led_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:302:2: note: (near initialization for 'mt6360_devs[0].usage_count')
drivers/mfd/mt6360-core.c:302:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:302:2: note: (near initialization for 'mt6360_devs[0].usage_count')
drivers/mfd/mt6360-core.c:304:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_pmic", mt6360_pmic_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:304:2: note: (near initialization for 'mt6360_devs[0].enable')
drivers/mfd/mt6360-core.c:304:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:304:2: note: (near initialization for 'mt6360_devs[0].enable')
drivers/mfd/mt6360-core.c:306:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_ldo", mt6360_ldo_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:306:2: note: (near initialization for 'mt6360_devs[0].disable')
drivers/mfd/mt6360-core.c:306:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:306:2: note: (near initialization for 'mt6360_devs[0].disable')
drivers/mfd/mt6360-core.c:308:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_tcpc", NULL,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:308:2: note: (near initialization for 'mt6360_devs[0].suspend')
drivers/mfd/mt6360-core.c:308:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:308:2: note: (near initialization for 'mt6360_devs[0].suspend')
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_probe':
drivers/mfd/mt6360-core.c:352:12: error: 'IRQF_TRIGGER_FALLING' undeclared (first use in this function); did you mean 'IRQD_TRIGGER_MASK'?
IRQF_TRIGGER_FALLING, 0,
^~~~~~~~~~~~~~~~~~~~
IRQD_TRIGGER_MASK
drivers/mfd/mt6360-core.c:352:12: note: each undeclared identifier is reported only once for each function it appears in
drivers/mfd/mt6360-core.c:352:12: warning: passing argument 4 of 'devm_regmap_add_irq_chip' makes integer from pointer without a cast [-Wint-conversion]
In file included from include/linux/mfd/mt6360.h:9:0,
from drivers/mfd/mt6360-core.c:15:
include/linux/regmap.h:1270:5: note: expected 'int' but argument is of type 'const struct mfd_cell *'
int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq,
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_suspend':
>> drivers/mfd/mt6360-core.c:392:3: error: implicit declaration of function 'enable_irq_wake'; did you mean 'local_irq_save'? [-Werror=implicit-function-declaration]
enable_irq_wake(i2c->irq);
^~~~~~~~~~~~~~~
local_irq_save
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_resume':
drivers/mfd/mt6360-core.c:403:3: error: implicit declaration of function 'disable_irq_wake'; did you mean 'local_irq_save'? [-Werror=implicit-function-declaration]
disable_irq_wake(i2c->irq);
^~~~~~~~~~~~~~~~
local_irq_save
cc1: some warnings being treated as errors
vim +/OF_MFD_CELL +298 drivers/mfd/mt6360-core.c
296
297 static const struct mfd_cell mt6360_devs[] = {
> 298 OF_MFD_CELL("mt6360_adc", mt6360_adc_resources,
299 NULL, 0, 0, "mediatek,mt6360_adc"),
300 OF_MFD_CELL("mt6360_chg", mt6360_chg_resources,
301 NULL, 0, 0, "mediatek,mt6360_chg"),
302 OF_MFD_CELL("mt6360_led", mt6360_led_resources,
303 NULL, 0, 0, "mediatek,mt6360_led"),
304 OF_MFD_CELL("mt6360_pmic", mt6360_pmic_resources,
305 NULL, 0, 0, "mediatek,mt6360_pmic"),
306 OF_MFD_CELL("mt6360_ldo", mt6360_ldo_resources,
307 NULL, 0, 0, "mediatek,mt6360_ldo"),
308 OF_MFD_CELL("mt6360_tcpc", NULL,
309 NULL, 0, 0, "mediatek,mt6360_tcpc"),
310 };
311
312 static const unsigned short mt6360_slave_addr[MT6360_SLAVE_MAX] = {
313 MT6360_PMU_SLAVEID,
314 MT6360_PMIC_SLAVEID,
315 MT6360_LDO_SLAVEID,
316 MT6360_TCPC_SLAVEID,
317 };
318
319 static int mt6360_pmu_probe(struct i2c_client *client)
320 {
321 struct mt6360_pmu_data *mpd;
322 unsigned int reg_data = 0;
323 int i, ret;
324
325 mpd = devm_kzalloc(&client->dev, sizeof(*mpd), GFP_KERNEL);
326 if (!mpd)
327 return -ENOMEM;
328
329 mpd->dev = &client->dev;
330 i2c_set_clientdata(client, mpd);
331
332 mpd->regmap = devm_regmap_init_i2c(client, &mt6360_pmu_regmap_config);
333 if (IS_ERR(mpd->regmap)) {
334 dev_err(&client->dev, "Failed to register regmap\n");
335 return PTR_ERR(mpd->regmap);
336 }
337
338 ret = regmap_read(mpd->regmap, MT6360_PMU_DEV_INFO, ®_data);
339 if (ret < 0) {
340 dev_err(&client->dev, "Device not found\n");
341 return ret;
342 }
343
344 mpd->chip_rev = reg_data & CHIP_REV_MASK;
345 if (mpd->chip_rev != CHIP_VEN_MT6360) {
346 dev_err(&client->dev, "Device not supported\n");
347 return -ENODEV;
348 }
349
350 mt6360_pmu_irq_chip.irq_drv_data = mpd;
351 ret = devm_regmap_add_irq_chip(&client->dev, mpd->regmap, client->irq,
> 352 IRQF_TRIGGER_FALLING, 0,
353 &mt6360_pmu_irq_chip, &mpd->irq_data);
354 if (ret < 0) {
355 dev_err(&client->dev, "Failed to add Regmap IRQ Chip\n");
356 return ret;
357 }
358
359 mpd->i2c[0] = client;
360 for (i = 1; i < MT6360_SLAVE_MAX; i++) {
361 mpd->i2c[i] = devm_i2c_new_dummy_device(&client->dev,
362 client->adapter,
363 mt6360_slave_addr[i]);
364 if (IS_ERR(mpd->i2c[i])) {
365 dev_err(&client->dev, "new i2c dev [%d] fail\n", i);
366 return PTR_ERR(mpd->i2c[i]);
367 }
368 i2c_set_clientdata(mpd->i2c[i], mpd);
369 }
370
371 ret = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_AUTO,
372 mt6360_devs, ARRAY_SIZE(mt6360_devs), NULL,
373 0, regmap_irq_get_domain(mpd->irq_data));
374 if (ret < 0) {
375 dev_err(&client->dev, "mfd add cells fail\n");
376 return ret;
377 }
378
379 return 0;
380 }
381
382 static int mt6360_pmu_remove(struct i2c_client *client)
383 {
384 return 0;
385 }
386
387 static int __maybe_unused mt6360_pmu_suspend(struct device *dev)
388 {
389 struct i2c_client *i2c = to_i2c_client(dev);
390
391 if (device_may_wakeup(dev))
> 392 enable_irq_wake(i2c->irq);
393
394 return 0;
395 }
396
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 50142 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v5] mfd: mt6360: add pmic mt6360 driver
Date: Mon, 04 Nov 2019 03:56:54 +0800 [thread overview]
Message-ID: <201911040305.n5lPz3iF%lkp@intel.com> (raw)
In-Reply-To: <20191103174343.14285-1-gene.chen.richtek@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 8757 bytes --]
Hi Gene,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on 7d194c2100ad2a6dded545887d02754948ca5241]
url: https://github.com/0day-ci/linux/commits/Gene-Chen/mfd-mt6360-add-pmic-mt6360-driver/20191104-014602
base: 7d194c2100ad2a6dded545887d02754948ca5241
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/mfd/mt6360-core.c:298:2: error: implicit declaration of function 'OF_MFD_CELL' [-Werror=implicit-function-declaration]
OF_MFD_CELL("mt6360_adc", mt6360_adc_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:298:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
drivers/mfd/mt6360-core.c:298:2: note: (near initialization for 'mt6360_devs[0].name')
drivers/mfd/mt6360-core.c:298:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:298:2: note: (near initialization for 'mt6360_devs[0].name')
drivers/mfd/mt6360-core.c:300:2: error: initializer element is not constant
OF_MFD_CELL("mt6360_chg", mt6360_chg_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:300:2: note: (near initialization for 'mt6360_devs[0].id')
drivers/mfd/mt6360-core.c:302:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_led", mt6360_led_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:302:2: note: (near initialization for 'mt6360_devs[0].usage_count')
drivers/mfd/mt6360-core.c:302:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:302:2: note: (near initialization for 'mt6360_devs[0].usage_count')
drivers/mfd/mt6360-core.c:304:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_pmic", mt6360_pmic_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:304:2: note: (near initialization for 'mt6360_devs[0].enable')
drivers/mfd/mt6360-core.c:304:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:304:2: note: (near initialization for 'mt6360_devs[0].enable')
drivers/mfd/mt6360-core.c:306:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_ldo", mt6360_ldo_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:306:2: note: (near initialization for 'mt6360_devs[0].disable')
drivers/mfd/mt6360-core.c:306:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:306:2: note: (near initialization for 'mt6360_devs[0].disable')
drivers/mfd/mt6360-core.c:308:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_tcpc", NULL,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:308:2: note: (near initialization for 'mt6360_devs[0].suspend')
drivers/mfd/mt6360-core.c:308:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:308:2: note: (near initialization for 'mt6360_devs[0].suspend')
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_probe':
drivers/mfd/mt6360-core.c:352:12: error: 'IRQF_TRIGGER_FALLING' undeclared (first use in this function); did you mean 'IRQD_TRIGGER_MASK'?
IRQF_TRIGGER_FALLING, 0,
^~~~~~~~~~~~~~~~~~~~
IRQD_TRIGGER_MASK
drivers/mfd/mt6360-core.c:352:12: note: each undeclared identifier is reported only once for each function it appears in
drivers/mfd/mt6360-core.c:352:12: warning: passing argument 4 of 'devm_regmap_add_irq_chip' makes integer from pointer without a cast [-Wint-conversion]
In file included from include/linux/mfd/mt6360.h:9:0,
from drivers/mfd/mt6360-core.c:15:
include/linux/regmap.h:1270:5: note: expected 'int' but argument is of type 'const struct mfd_cell *'
int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq,
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_suspend':
>> drivers/mfd/mt6360-core.c:392:3: error: implicit declaration of function 'enable_irq_wake'; did you mean 'local_irq_save'? [-Werror=implicit-function-declaration]
enable_irq_wake(i2c->irq);
^~~~~~~~~~~~~~~
local_irq_save
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_resume':
drivers/mfd/mt6360-core.c:403:3: error: implicit declaration of function 'disable_irq_wake'; did you mean 'local_irq_save'? [-Werror=implicit-function-declaration]
disable_irq_wake(i2c->irq);
^~~~~~~~~~~~~~~~
local_irq_save
cc1: some warnings being treated as errors
vim +/OF_MFD_CELL +298 drivers/mfd/mt6360-core.c
296
297 static const struct mfd_cell mt6360_devs[] = {
> 298 OF_MFD_CELL("mt6360_adc", mt6360_adc_resources,
299 NULL, 0, 0, "mediatek,mt6360_adc"),
300 OF_MFD_CELL("mt6360_chg", mt6360_chg_resources,
301 NULL, 0, 0, "mediatek,mt6360_chg"),
302 OF_MFD_CELL("mt6360_led", mt6360_led_resources,
303 NULL, 0, 0, "mediatek,mt6360_led"),
304 OF_MFD_CELL("mt6360_pmic", mt6360_pmic_resources,
305 NULL, 0, 0, "mediatek,mt6360_pmic"),
306 OF_MFD_CELL("mt6360_ldo", mt6360_ldo_resources,
307 NULL, 0, 0, "mediatek,mt6360_ldo"),
308 OF_MFD_CELL("mt6360_tcpc", NULL,
309 NULL, 0, 0, "mediatek,mt6360_tcpc"),
310 };
311
312 static const unsigned short mt6360_slave_addr[MT6360_SLAVE_MAX] = {
313 MT6360_PMU_SLAVEID,
314 MT6360_PMIC_SLAVEID,
315 MT6360_LDO_SLAVEID,
316 MT6360_TCPC_SLAVEID,
317 };
318
319 static int mt6360_pmu_probe(struct i2c_client *client)
320 {
321 struct mt6360_pmu_data *mpd;
322 unsigned int reg_data = 0;
323 int i, ret;
324
325 mpd = devm_kzalloc(&client->dev, sizeof(*mpd), GFP_KERNEL);
326 if (!mpd)
327 return -ENOMEM;
328
329 mpd->dev = &client->dev;
330 i2c_set_clientdata(client, mpd);
331
332 mpd->regmap = devm_regmap_init_i2c(client, &mt6360_pmu_regmap_config);
333 if (IS_ERR(mpd->regmap)) {
334 dev_err(&client->dev, "Failed to register regmap\n");
335 return PTR_ERR(mpd->regmap);
336 }
337
338 ret = regmap_read(mpd->regmap, MT6360_PMU_DEV_INFO, ®_data);
339 if (ret < 0) {
340 dev_err(&client->dev, "Device not found\n");
341 return ret;
342 }
343
344 mpd->chip_rev = reg_data & CHIP_REV_MASK;
345 if (mpd->chip_rev != CHIP_VEN_MT6360) {
346 dev_err(&client->dev, "Device not supported\n");
347 return -ENODEV;
348 }
349
350 mt6360_pmu_irq_chip.irq_drv_data = mpd;
351 ret = devm_regmap_add_irq_chip(&client->dev, mpd->regmap, client->irq,
> 352 IRQF_TRIGGER_FALLING, 0,
353 &mt6360_pmu_irq_chip, &mpd->irq_data);
354 if (ret < 0) {
355 dev_err(&client->dev, "Failed to add Regmap IRQ Chip\n");
356 return ret;
357 }
358
359 mpd->i2c[0] = client;
360 for (i = 1; i < MT6360_SLAVE_MAX; i++) {
361 mpd->i2c[i] = devm_i2c_new_dummy_device(&client->dev,
362 client->adapter,
363 mt6360_slave_addr[i]);
364 if (IS_ERR(mpd->i2c[i])) {
365 dev_err(&client->dev, "new i2c dev [%d] fail\n", i);
366 return PTR_ERR(mpd->i2c[i]);
367 }
368 i2c_set_clientdata(mpd->i2c[i], mpd);
369 }
370
371 ret = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_AUTO,
372 mt6360_devs, ARRAY_SIZE(mt6360_devs), NULL,
373 0, regmap_irq_get_domain(mpd->irq_data));
374 if (ret < 0) {
375 dev_err(&client->dev, "mfd add cells fail\n");
376 return ret;
377 }
378
379 return 0;
380 }
381
382 static int mt6360_pmu_remove(struct i2c_client *client)
383 {
384 return 0;
385 }
386
387 static int __maybe_unused mt6360_pmu_suspend(struct device *dev)
388 {
389 struct i2c_client *i2c = to_i2c_client(dev);
390
391 if (device_may_wakeup(dev))
> 392 enable_irq_wake(i2c->irq);
393
394 return 0;
395 }
396
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 50142 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Gene Chen <gene.chen.richtek@gmail.com>
Cc: kbuild-all@lists.01.org, lee.jones@linaro.org,
matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
gene_chen@richtek.com, Wilma.Wu@mediatek.com,
shufan_lee@richtek.com, cy_huang@richtek.com
Subject: Re: [PATCH v5] mfd: mt6360: add pmic mt6360 driver
Date: Mon, 4 Nov 2019 03:56:54 +0800 [thread overview]
Message-ID: <201911040305.n5lPz3iF%lkp@intel.com> (raw)
In-Reply-To: <20191103174343.14285-1-gene.chen.richtek@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 8570 bytes --]
Hi Gene,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on 7d194c2100ad2a6dded545887d02754948ca5241]
url: https://github.com/0day-ci/linux/commits/Gene-Chen/mfd-mt6360-add-pmic-mt6360-driver/20191104-014602
base: 7d194c2100ad2a6dded545887d02754948ca5241
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/mfd/mt6360-core.c:298:2: error: implicit declaration of function 'OF_MFD_CELL' [-Werror=implicit-function-declaration]
OF_MFD_CELL("mt6360_adc", mt6360_adc_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:298:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
drivers/mfd/mt6360-core.c:298:2: note: (near initialization for 'mt6360_devs[0].name')
drivers/mfd/mt6360-core.c:298:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:298:2: note: (near initialization for 'mt6360_devs[0].name')
drivers/mfd/mt6360-core.c:300:2: error: initializer element is not constant
OF_MFD_CELL("mt6360_chg", mt6360_chg_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:300:2: note: (near initialization for 'mt6360_devs[0].id')
drivers/mfd/mt6360-core.c:302:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_led", mt6360_led_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:302:2: note: (near initialization for 'mt6360_devs[0].usage_count')
drivers/mfd/mt6360-core.c:302:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:302:2: note: (near initialization for 'mt6360_devs[0].usage_count')
drivers/mfd/mt6360-core.c:304:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_pmic", mt6360_pmic_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:304:2: note: (near initialization for 'mt6360_devs[0].enable')
drivers/mfd/mt6360-core.c:304:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:304:2: note: (near initialization for 'mt6360_devs[0].enable')
drivers/mfd/mt6360-core.c:306:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_ldo", mt6360_ldo_resources,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:306:2: note: (near initialization for 'mt6360_devs[0].disable')
drivers/mfd/mt6360-core.c:306:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:306:2: note: (near initialization for 'mt6360_devs[0].disable')
drivers/mfd/mt6360-core.c:308:2: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
OF_MFD_CELL("mt6360_tcpc", NULL,
^~~~~~~~~~~
drivers/mfd/mt6360-core.c:308:2: note: (near initialization for 'mt6360_devs[0].suspend')
drivers/mfd/mt6360-core.c:308:2: error: initializer element is not constant
drivers/mfd/mt6360-core.c:308:2: note: (near initialization for 'mt6360_devs[0].suspend')
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_probe':
drivers/mfd/mt6360-core.c:352:12: error: 'IRQF_TRIGGER_FALLING' undeclared (first use in this function); did you mean 'IRQD_TRIGGER_MASK'?
IRQF_TRIGGER_FALLING, 0,
^~~~~~~~~~~~~~~~~~~~
IRQD_TRIGGER_MASK
drivers/mfd/mt6360-core.c:352:12: note: each undeclared identifier is reported only once for each function it appears in
drivers/mfd/mt6360-core.c:352:12: warning: passing argument 4 of 'devm_regmap_add_irq_chip' makes integer from pointer without a cast [-Wint-conversion]
In file included from include/linux/mfd/mt6360.h:9:0,
from drivers/mfd/mt6360-core.c:15:
include/linux/regmap.h:1270:5: note: expected 'int' but argument is of type 'const struct mfd_cell *'
int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq,
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_suspend':
>> drivers/mfd/mt6360-core.c:392:3: error: implicit declaration of function 'enable_irq_wake'; did you mean 'local_irq_save'? [-Werror=implicit-function-declaration]
enable_irq_wake(i2c->irq);
^~~~~~~~~~~~~~~
local_irq_save
drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_resume':
drivers/mfd/mt6360-core.c:403:3: error: implicit declaration of function 'disable_irq_wake'; did you mean 'local_irq_save'? [-Werror=implicit-function-declaration]
disable_irq_wake(i2c->irq);
^~~~~~~~~~~~~~~~
local_irq_save
cc1: some warnings being treated as errors
vim +/OF_MFD_CELL +298 drivers/mfd/mt6360-core.c
296
297 static const struct mfd_cell mt6360_devs[] = {
> 298 OF_MFD_CELL("mt6360_adc", mt6360_adc_resources,
299 NULL, 0, 0, "mediatek,mt6360_adc"),
300 OF_MFD_CELL("mt6360_chg", mt6360_chg_resources,
301 NULL, 0, 0, "mediatek,mt6360_chg"),
302 OF_MFD_CELL("mt6360_led", mt6360_led_resources,
303 NULL, 0, 0, "mediatek,mt6360_led"),
304 OF_MFD_CELL("mt6360_pmic", mt6360_pmic_resources,
305 NULL, 0, 0, "mediatek,mt6360_pmic"),
306 OF_MFD_CELL("mt6360_ldo", mt6360_ldo_resources,
307 NULL, 0, 0, "mediatek,mt6360_ldo"),
308 OF_MFD_CELL("mt6360_tcpc", NULL,
309 NULL, 0, 0, "mediatek,mt6360_tcpc"),
310 };
311
312 static const unsigned short mt6360_slave_addr[MT6360_SLAVE_MAX] = {
313 MT6360_PMU_SLAVEID,
314 MT6360_PMIC_SLAVEID,
315 MT6360_LDO_SLAVEID,
316 MT6360_TCPC_SLAVEID,
317 };
318
319 static int mt6360_pmu_probe(struct i2c_client *client)
320 {
321 struct mt6360_pmu_data *mpd;
322 unsigned int reg_data = 0;
323 int i, ret;
324
325 mpd = devm_kzalloc(&client->dev, sizeof(*mpd), GFP_KERNEL);
326 if (!mpd)
327 return -ENOMEM;
328
329 mpd->dev = &client->dev;
330 i2c_set_clientdata(client, mpd);
331
332 mpd->regmap = devm_regmap_init_i2c(client, &mt6360_pmu_regmap_config);
333 if (IS_ERR(mpd->regmap)) {
334 dev_err(&client->dev, "Failed to register regmap\n");
335 return PTR_ERR(mpd->regmap);
336 }
337
338 ret = regmap_read(mpd->regmap, MT6360_PMU_DEV_INFO, ®_data);
339 if (ret < 0) {
340 dev_err(&client->dev, "Device not found\n");
341 return ret;
342 }
343
344 mpd->chip_rev = reg_data & CHIP_REV_MASK;
345 if (mpd->chip_rev != CHIP_VEN_MT6360) {
346 dev_err(&client->dev, "Device not supported\n");
347 return -ENODEV;
348 }
349
350 mt6360_pmu_irq_chip.irq_drv_data = mpd;
351 ret = devm_regmap_add_irq_chip(&client->dev, mpd->regmap, client->irq,
> 352 IRQF_TRIGGER_FALLING, 0,
353 &mt6360_pmu_irq_chip, &mpd->irq_data);
354 if (ret < 0) {
355 dev_err(&client->dev, "Failed to add Regmap IRQ Chip\n");
356 return ret;
357 }
358
359 mpd->i2c[0] = client;
360 for (i = 1; i < MT6360_SLAVE_MAX; i++) {
361 mpd->i2c[i] = devm_i2c_new_dummy_device(&client->dev,
362 client->adapter,
363 mt6360_slave_addr[i]);
364 if (IS_ERR(mpd->i2c[i])) {
365 dev_err(&client->dev, "new i2c dev [%d] fail\n", i);
366 return PTR_ERR(mpd->i2c[i]);
367 }
368 i2c_set_clientdata(mpd->i2c[i], mpd);
369 }
370
371 ret = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_AUTO,
372 mt6360_devs, ARRAY_SIZE(mt6360_devs), NULL,
373 0, regmap_irq_get_domain(mpd->irq_data));
374 if (ret < 0) {
375 dev_err(&client->dev, "mfd add cells fail\n");
376 return ret;
377 }
378
379 return 0;
380 }
381
382 static int mt6360_pmu_remove(struct i2c_client *client)
383 {
384 return 0;
385 }
386
387 static int __maybe_unused mt6360_pmu_suspend(struct device *dev)
388 {
389 struct i2c_client *i2c = to_i2c_client(dev);
390
391 if (device_may_wakeup(dev))
> 392 enable_irq_wake(i2c->irq);
393
394 return 0;
395 }
396
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 50142 bytes --]
next prev parent reply other threads:[~2019-11-03 19:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-03 17:43 [PATCH v5] mfd: mt6360: add pmic mt6360 driver Gene Chen
2019-11-03 17:43 ` Gene Chen
2019-11-03 17:43 ` Gene Chen
2019-11-03 19:53 ` kbuild test robot
2019-11-03 19:53 ` kbuild test robot
2019-11-03 19:53 ` kbuild test robot
2019-11-03 19:56 ` kbuild test robot [this message]
2019-11-03 19:56 ` kbuild test robot
2019-11-03 19:56 ` kbuild test robot
2019-11-03 19:56 ` kbuild test robot
2019-12-16 11:57 ` Lee Jones
2019-12-16 11:57 ` Lee Jones
2019-12-16 11:57 ` Lee Jones
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=201911040305.n5lPz3iF%lkp@intel.com \
--to=lkp@intel.com \
--cc=Wilma.Wu@mediatek.com \
--cc=cy_huang@richtek.com \
--cc=gene.chen.richtek@gmail.com \
--cc=gene_chen@richtek.com \
--cc=kbuild-all@lists.01.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=shufan_lee@richtek.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.