[PATCH v7] mfd: mt6360: add pmic mt6360 driver

kbuild test robot lkp at intel.com
Fri Jan 10 02:48:58 PST 2020


Hi Gene,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ljones-mfd/for-mfd-next]
[also build test ERROR on v5.5-rc5 next-20200109]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Gene-Chen/mfd-mt6360-add-pmic-mt6360-driver/20200108-190516
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: openrisc-randconfig-a001-20200110 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.2.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=9.2.0 make.cross ARCH=openrisc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_probe':
   drivers/mfd/mt6360-core.c:350:12: error: 'IRQF_TRIGGER_FALLING' undeclared (first use in this function); did you mean 'IRQD_TRIGGER_MASK'?
     350 |            IRQF_TRIGGER_FALLING, 0,
         |            ^~~~~~~~~~~~~~~~~~~~
         |            IRQD_TRIGGER_MASK
   drivers/mfd/mt6360-core.c:350:12: note: each undeclared identifier is reported only once for each function it appears in
   drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_suspend':
>> drivers/mfd/mt6360-core.c:388:3: error: implicit declaration of function 'enable_irq_wake' [-Werror=implicit-function-declaration]
     388 |   enable_irq_wake(i2c->irq);
         |   ^~~~~~~~~~~~~~~
   drivers/mfd/mt6360-core.c: In function 'mt6360_pmu_resume':
>> drivers/mfd/mt6360-core.c:399:3: error: implicit declaration of function 'disable_irq_wake' [-Werror=implicit-function-declaration]
     399 |   disable_irq_wake(i2c->irq);
         |   ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/enable_irq_wake +388 drivers/mfd/mt6360-core.c

   316	
   317	static int mt6360_pmu_probe(struct i2c_client *client)
   318	{
   319		struct mt6360_pmu_data *mpd;
   320		unsigned int reg_data;
   321		int i, ret;
   322	
   323		mpd = devm_kzalloc(&client->dev, sizeof(*mpd), GFP_KERNEL);
   324		if (!mpd)
   325			return -ENOMEM;
   326	
   327		mpd->dev = &client->dev;
   328		i2c_set_clientdata(client, mpd);
   329	
   330		mpd->regmap = devm_regmap_init_i2c(client, &mt6360_pmu_regmap_config);
   331		if (IS_ERR(mpd->regmap)) {
   332			dev_err(&client->dev, "Failed to register regmap\n");
   333			return PTR_ERR(mpd->regmap);
   334		}
   335	
   336		ret = regmap_read(mpd->regmap, MT6360_PMU_DEV_INFO, &reg_data);
   337		if (ret) {
   338			dev_err(&client->dev, "Device not found\n");
   339			return ret;
   340		}
   341	
   342		mpd->chip_rev = reg_data & CHIP_REV_MASK;
   343		if (mpd->chip_rev != CHIP_VEN_MT6360) {
   344			dev_err(&client->dev, "Device not supported\n");
   345			return -ENODEV;
   346		}
   347	
   348		mt6360_pmu_irq_chip.irq_drv_data = mpd;
   349		ret = devm_regmap_add_irq_chip(&client->dev, mpd->regmap, client->irq,
 > 350					       IRQF_TRIGGER_FALLING, 0,
   351					       &mt6360_pmu_irq_chip, &mpd->irq_data);
   352		if (ret) {
   353			dev_err(&client->dev, "Failed to add Regmap IRQ Chip\n");
   354			return ret;
   355		}
   356	
   357		mpd->i2c[0] = client;
   358		for (i = 1; i < MT6360_SLAVE_MAX; i++) {
   359			mpd->i2c[i] = devm_i2c_new_dummy_device(&client->dev,
   360								client->adapter,
   361								mt6360_slave_addr[i]);
   362			if (IS_ERR(mpd->i2c[i])) {
   363				dev_err(&client->dev,
   364					"Failed to get new dummy I2C device for address 0x%x",
   365					mt6360_slave_addr[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) {
   375			dev_err(&client->dev,
   376				"Failed to register subordinate devices\n");
   377			return ret;
   378		}
   379	
   380		return 0;
   381	}
   382	
   383	static int __maybe_unused mt6360_pmu_suspend(struct device *dev)
   384	{
   385		struct i2c_client *i2c = to_i2c_client(dev);
   386	
   387		if (device_may_wakeup(dev))
 > 388			enable_irq_wake(i2c->irq);
   389	
   390		return 0;
   391	}
   392	
   393	static int __maybe_unused mt6360_pmu_resume(struct device *dev)
   394	{
   395	
   396		struct i2c_client *i2c = to_i2c_client(dev);
   397	
   398		if (device_may_wakeup(dev))
 > 399			disable_irq_wake(i2c->irq);
   400	
   401		return 0;
   402	}
   403	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 25766 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200110/5a02516f/attachment-0001.gz>


More information about the linux-arm-kernel mailing list