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 ERROR on peter.chen-usb/ci-for-usb-next]
[also build test ERROR 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: x86_64-randconfig-x001-201616 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/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:10: 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:9: 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:10: 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:9: 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: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
      pdata.usb_charger_det = imx_usb_charger_det;
                            ^
   drivers/usb/chipidea/ci_hdrc_imx.c:333:36: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
       pdata.usb_charger_secondary_det =
                                       ^
   cc1: some warnings being treated as errors

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

   241			clk_disable_unprepare(data->clk_ipg);
   242		} else {
   243			clk_disable_unprepare(data->clk);
   244		}
   245	}
   246	
 > 247	static enum usb_charger_type imx_usb_charger_det(struct ci_hdrc *ci)
   248	{
   249		struct device *dev = ci->dev->parent;
   250		struct ci_hdrc_imx_data *data = dev_get_drvdata(dev);
   251		struct imx_usbmisc_data *mdata = data->usbmisc_data;
 > 252		int ret = UNKNOWN_TYPE;
   253	
 > 254		if (!mdata || !ci->gadget.charger)
 > 255			return ret;
   256	
   257		if (ci->vbus_active)
 > 258			ret = imx_usbmisc_charger_det(mdata);
   259	
   260		return ret;
   261	}
   262	
   263	static enum usb_charger_type imx_usb_charger_secondary_det(struct ci_hdrc *ci)
   264	{
   265		struct device *dev = ci->dev->parent;
   266		struct ci_hdrc_imx_data *data = dev_get_drvdata(dev);
   267		struct imx_usbmisc_data *mdata = data->usbmisc_data;
   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