[usb:usb-testing 20/25] drivers/usb/misc/onboard_usb_dev.c:329:15: error: implicit declaration of function 'i2c_smbus_write_block_data'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head:   9a03b9a88e4a44e358e3638736286442ae262497
commit: 7b5e970ff0e58f9239226fe81c77d5b98d744986 [20/25] usb: misc: onboard_usb_dev: add Microchip usb5744 SMBus programming support
config: arc-randconfig-001-20240824 (https://download.01.org/0day-ci/archive/20240824/202408242231.WOLALxi9-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240824/202408242231.WOLALxi9-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/202408242231.WOLALxi9-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/usb/misc/onboard_usb_dev.c: In function 'onboard_dev_5744_i2c_init':
>> drivers/usb/misc/onboard_usb_dev.c:329:15: error: implicit declaration of function 'i2c_smbus_write_block_data' [-Werror=implicit-function-declaration]
     329 |         ret = i2c_smbus_write_block_data(client, 0, sizeof(wr_buf), wr_buf);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/usb/misc/onboard_usb_dev.c:333:15: error: implicit declaration of function 'i2c_smbus_write_word_data' [-Werror=implicit-function-declaration]
     333 |         ret = i2c_smbus_write_word_data(client, USB5744_CMD_CREG_ACCESS,
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/i2c_smbus_write_block_data +329 drivers/usb/misc/onboard_usb_dev.c

   311	
   312	static int onboard_dev_5744_i2c_init(struct i2c_client *client)
   313	{
   314		struct device *dev = &client->dev;
   315		int ret;
   316	
   317		/*
   318		 * Set BYPASS_UDC_SUSPEND bit to ensure MCU is always enabled
   319		 * and ready to respond to SMBus runtime commands.
   320		 * The command writes 5 bytes to memory and single data byte in
   321		 * configuration register.
   322		 */
   323		char wr_buf[7] = {USB5744_CREG_MEM_ADDR, 5,
   324				  USB5744_CREG_WRITE, 1,
   325				  USB5744_CREG_RUNTIMEFLAGS2,
   326				  USB5744_CREG_RUNTIMEFLAGS2_LSB,
   327				  USB5744_CREG_BYPASS_UDC_SUSPEND};
   328	
 > 329		ret = i2c_smbus_write_block_data(client, 0, sizeof(wr_buf), wr_buf);
   330		if (ret)
   331			return dev_err_probe(dev, ret, "BYPASS_UDC_SUSPEND bit configuration failed\n");
   332	
 > 333		ret = i2c_smbus_write_word_data(client, USB5744_CMD_CREG_ACCESS,
   334						USB5744_CMD_CREG_ACCESS_LSB);
   335		if (ret)
   336			return dev_err_probe(dev, ret, "Configuration Register Access Command failed\n");
   337	
   338		/* Send SMBus command to boot hub. */
   339		ret = i2c_smbus_write_word_data(client, USB5744_CMD_ATTACH,
   340						USB5744_CMD_ATTACH_LSB);
   341		if (ret < 0)
   342			return dev_err_probe(dev, ret, "USB Attach with SMBus command failed\n");
   343	
   344		return ret;
   345	}
   346	

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux