Re: [PATCH 2/5] usb: chipidea: imx: add usb charger dectection for imx platforms

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

 



Hi Li,

[auto build test WARNING on peter.chen-usb/ci-for-usb-next]
[also build test WARNING on next-20160418]
[cannot apply to v4.6-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Li-Jun/usb-chipidea-Add-usb-charger-detection-support/20160418-161638
base:   https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb ci-for-usb-next
config: xtensa-allyesconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   drivers/usb/chipidea/ci_hdrc_imx.c:247:30: error: return type is an incomplete type
    static enum usb_charger_type imx_usb_charger_det(struct ci_hdrc *ci)
                                 ^
   drivers/usb/chipidea/ci_hdrc_imx.c: In function 'imx_usb_charger_det':
   drivers/usb/chipidea/ci_hdrc_imx.c:252:12: error: 'UNKNOWN_TYPE' undeclared (first use in this function)
     int ret = UNKNOWN_TYPE;
               ^
   drivers/usb/chipidea/ci_hdrc_imx.c:252:12: note: each undeclared identifier is reported only once for each function it appears in
   drivers/usb/chipidea/ci_hdrc_imx.c:254:27: error: 'struct usb_gadget' has no member named 'charger'
     if (!mdata || !ci->gadget.charger)
                              ^
   drivers/usb/chipidea/ci_hdrc_imx.c:255:3: warning: 'return' with a value, in function returning void
      return ret;
      ^
   drivers/usb/chipidea/ci_hdrc_imx.c:258:3: error: invalid use of undefined type 'enum usb_charger_type'
      ret = imx_usbmisc_charger_det(mdata);
      ^
   drivers/usb/chipidea/ci_hdrc_imx.c:260:2: warning: 'return' with a value, in function returning void
     return ret;
     ^
   drivers/usb/chipidea/ci_hdrc_imx.c: At top level:
   drivers/usb/chipidea/ci_hdrc_imx.c:263:30: error: return type is an incomplete type
    static enum usb_charger_type imx_usb_charger_secondary_det(struct ci_hdrc *ci)
                                 ^
   drivers/usb/chipidea/ci_hdrc_imx.c: In function 'imx_usb_charger_secondary_det':
   drivers/usb/chipidea/ci_hdrc_imx.c:268:12: error: 'UNKNOWN_TYPE' undeclared (first use in this function)
     int ret = UNKNOWN_TYPE;
               ^
   drivers/usb/chipidea/ci_hdrc_imx.c:270:27: error: 'struct usb_gadget' has no member named 'charger'
     if (!mdata || !ci->gadget.charger)
                              ^
   drivers/usb/chipidea/ci_hdrc_imx.c:271:3: warning: 'return' with a value, in function returning void
      return ret;
      ^
   drivers/usb/chipidea/ci_hdrc_imx.c:274:3: error: invalid use of undefined type 'enum usb_charger_type'
      ret = imx_usbmisc_charger_secondary_det(mdata);
      ^
   drivers/usb/chipidea/ci_hdrc_imx.c:276:2: warning: 'return' with a value, in function returning void
     return ret;
     ^
   drivers/usb/chipidea/ci_hdrc_imx.c: In function 'ci_hdrc_imx_probe':
>> drivers/usb/chipidea/ci_hdrc_imx.c:330:25: warning: assignment from incompatible pointer type
      pdata.usb_charger_det = imx_usb_charger_det;
                            ^
   drivers/usb/chipidea/ci_hdrc_imx.c:333:36: warning: assignment from incompatible pointer type
       pdata.usb_charger_secondary_det =
                                       ^

vim +330 drivers/usb/chipidea/ci_hdrc_imx.c

   268		int ret = UNKNOWN_TYPE;
   269	
   270		if (!mdata || !ci->gadget.charger)
   271			return ret;
   272	
   273		if (ci->vbus_active)
 > 274			ret = imx_usbmisc_charger_secondary_det(mdata);
   275	
   276		return ret;
   277	}
   278	
   279	static int ci_hdrc_imx_probe(struct platform_device *pdev)
   280	{
   281		struct ci_hdrc_imx_data *data;
   282		struct ci_hdrc_platform_data pdata = {
   283			.name		= dev_name(&pdev->dev),
   284			.capoffset	= DEF_CAPOFFSET,
   285		};
   286		int ret;
   287		const struct of_device_id *of_id;
   288		const struct ci_hdrc_imx_platform_flag *imx_platform_flag;
   289		struct device_node *np = pdev->dev.of_node;
   290	
   291		of_id = of_match_device(ci_hdrc_imx_dt_ids, &pdev->dev);
   292		if (!of_id)
   293			return -ENODEV;
   294	
   295		imx_platform_flag = of_id->data;
   296	
   297		data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
   298		if (!data)
   299			return -ENOMEM;
   300	
   301		platform_set_drvdata(pdev, data);
   302		data->usbmisc_data = usbmisc_get_init_data(&pdev->dev);
   303		if (IS_ERR(data->usbmisc_data))
   304			return PTR_ERR(data->usbmisc_data);
   305	
   306		ret = imx_get_clks(&pdev->dev);
   307		if (ret)
   308			return ret;
   309	
   310		ret = imx_prepare_enable_clks(&pdev->dev);
   311		if (ret)
   312			return ret;
   313	
   314		data->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "fsl,usbphy", 0);
   315		if (IS_ERR(data->phy)) {
   316			ret = PTR_ERR(data->phy);
   317			/* Return -EINVAL if no usbphy is available */
   318			if (ret == -ENODEV)
   319				ret = -EINVAL;
   320			goto err_clk;
   321		}
   322	
   323		pdata.usb_phy = data->phy;
   324		pdata.flags |= imx_platform_flag->flags;
   325		if (pdata.flags & CI_HDRC_SUPPORTS_RUNTIME_PM)
   326			data->supports_runtime_pm = true;
   327	
   328		if (of_find_property(np, "usb-charger-detection", NULL) &&
   329								data->usbmisc_data) {
 > 330			pdata.usb_charger_det = imx_usb_charger_det;
   331			if (imx_platform_flag->flags & CI_HDRC_PULL_DP_FOR_CHARGER) {
   332				pdata.pull_dp_for_charger = true;
   333				pdata.usb_charger_secondary_det =

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


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

  Powered by Linux