Re: [PATCH v6 7/7] media: platform: rcar_drif: Add DRIF support

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

 



Hi Ramesh,

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Ramesh-Shanmugasundaram/Add-V4L2-SDR-DRIF-MAX2175-driver/20170531-231937
base:   git://linuxtv.org/media_tree.git master
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm64 

All errors (new ones prefixed by >>):

   drivers/media//platform/rcar_drif.c: In function 'rcar_drif_notify_bound':
>> drivers/media//platform/rcar_drif.c:1110:23: error: 'union <anonymous>' has no member named 'fwnode'
     if (sdr->ep.asd.match.fwnode.fwnode !=
                          ^
   drivers/media//platform/rcar_drif.c: In function 'rcar_drif_parse_subdevs':
   drivers/media//platform/rcar_drif.c:1232:19: error: 'union <anonymous>' has no member named 'fwnode'
     sdr->ep.asd.match.fwnode.fwnode = fwnode;
                      ^
>> drivers/media//platform/rcar_drif.c:1233:27: error: 'V4L2_ASYNC_MATCH_FWNODE' undeclared (first use in this function)
     sdr->ep.asd.match_type = V4L2_ASYNC_MATCH_FWNODE;
                              ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/media//platform/rcar_drif.c:1233:27: note: each undeclared identifier is reported only once for each function it appears in

vim +/V4L2_ASYNC_MATCH_FWNODE +1233 drivers/media//platform/rcar_drif.c

  1104					   struct v4l2_subdev *subdev,
  1105					   struct v4l2_async_subdev *asd)
  1106	{
  1107		struct rcar_drif_sdr *sdr =
  1108			container_of(notifier, struct rcar_drif_sdr, notifier);
  1109	
> 1110		if (sdr->ep.asd.match.fwnode.fwnode !=
  1111		    of_fwnode_handle(subdev->dev->of_node)) {
  1112			rdrif_err(sdr, "subdev %s cannot bind\n", subdev->name);
  1113			return -EINVAL;
  1114		}
  1115	
  1116		v4l2_set_subdev_hostdata(subdev, sdr);
  1117		sdr->ep.subdev = subdev;
  1118		rdrif_dbg(sdr, "bound asd %s\n", subdev->name);
  1119	
  1120		return 0;
  1121	}
  1122	
  1123	/* Sub-device unbind callback */
  1124	static void rcar_drif_notify_unbind(struct v4l2_async_notifier *notifier,
  1125					   struct v4l2_subdev *subdev,
  1126					   struct v4l2_async_subdev *asd)
  1127	{
  1128		struct rcar_drif_sdr *sdr =
  1129			container_of(notifier, struct rcar_drif_sdr, notifier);
  1130	
  1131		if (sdr->ep.subdev != subdev) {
  1132			rdrif_err(sdr, "subdev %s is not bound\n", subdev->name);
  1133			return;
  1134		}
  1135	
  1136		/* Free ctrl handler if initialized */
  1137		v4l2_ctrl_handler_free(&sdr->ctrl_hdl);
  1138		sdr->v4l2_dev.ctrl_handler = NULL;
  1139		sdr->ep.subdev = NULL;
  1140	
  1141		rcar_drif_sdr_unregister(sdr);
  1142		rdrif_dbg(sdr, "unbind asd %s\n", subdev->name);
  1143	}
  1144	
  1145	/* Sub-device registered notification callback */
  1146	static int rcar_drif_notify_complete(struct v4l2_async_notifier *notifier)
  1147	{
  1148		struct rcar_drif_sdr *sdr =
  1149			container_of(notifier, struct rcar_drif_sdr, notifier);
  1150		int ret;
  1151	
  1152		/*
  1153		 * The subdev tested at this point uses 4 controls. Using 10 as a worst
  1154		 * case scenario hint. When less controls are needed there will be some
  1155		 * unused memory and when more controls are needed the framework uses
  1156		 * hash to manage controls within this number.
  1157		 */
  1158		ret = v4l2_ctrl_handler_init(&sdr->ctrl_hdl, 10);
  1159		if (ret)
  1160			return -ENOMEM;
  1161	
  1162		sdr->v4l2_dev.ctrl_handler = &sdr->ctrl_hdl;
  1163		ret = v4l2_device_register_subdev_nodes(&sdr->v4l2_dev);
  1164		if (ret) {
  1165			rdrif_err(sdr, "failed: register subdev nodes ret %d\n", ret);
  1166			goto error;
  1167		}
  1168	
  1169		ret = v4l2_ctrl_add_handler(&sdr->ctrl_hdl,
  1170					    sdr->ep.subdev->ctrl_handler, NULL);
  1171		if (ret) {
  1172			rdrif_err(sdr, "failed: ctrl add hdlr ret %d\n", ret);
  1173			goto error;
  1174		}
  1175	
  1176		ret = rcar_drif_sdr_register(sdr);
  1177		if (ret)
  1178			goto error;
  1179	
  1180		return ret;
  1181	
  1182	error:
  1183		v4l2_ctrl_handler_free(&sdr->ctrl_hdl);
  1184	
  1185		return ret;
  1186	}
  1187	
  1188	/* Read endpoint properties */
  1189	static void rcar_drif_get_ep_properties(struct rcar_drif_sdr *sdr,
  1190						struct fwnode_handle *fwnode)
  1191	{
  1192		u32 val;
  1193	
  1194		/* Set the I2S defaults for SIRMDR1*/
  1195		sdr->mdr1 = RCAR_DRIF_SIRMDR1_SYNCMD_LR | RCAR_DRIF_SIRMDR1_MSB_FIRST |
  1196			RCAR_DRIF_SIRMDR1_DTDL_1 | RCAR_DRIF_SIRMDR1_SYNCDL_0;
  1197	
  1198		/* Parse sync polarity from endpoint */
  1199		if (!fwnode_property_read_u32(fwnode, "sync-active", &val))
  1200			sdr->mdr1 |= val ? RCAR_DRIF_SIRMDR1_SYNCAC_POL_HIGH :
  1201				RCAR_DRIF_SIRMDR1_SYNCAC_POL_LOW;
  1202		else
  1203			sdr->mdr1 |= RCAR_DRIF_SIRMDR1_SYNCAC_POL_HIGH; /* default */
  1204	
  1205		dev_dbg(sdr->dev, "mdr1 0x%08x\n", sdr->mdr1);
  1206	}
  1207	
  1208	/* Parse sub-devs (tuner) to find a matching device */
  1209	static int rcar_drif_parse_subdevs(struct rcar_drif_sdr *sdr)
  1210	{
  1211		struct v4l2_async_notifier *notifier = &sdr->notifier;
  1212		struct fwnode_handle *fwnode, *ep;
  1213	
  1214		notifier->subdevs = devm_kzalloc(sdr->dev, sizeof(*notifier->subdevs),
  1215						 GFP_KERNEL);
  1216		if (!notifier->subdevs)
  1217			return -ENOMEM;
  1218	
  1219		ep = fwnode_graph_get_next_endpoint(of_fwnode_handle(sdr->dev->of_node),
  1220						    NULL);
  1221		if (!ep)
  1222			return 0;
  1223	
  1224		notifier->subdevs[notifier->num_subdevs] = &sdr->ep.asd;
  1225		fwnode = fwnode_graph_get_remote_port_parent(ep);
  1226		if (!fwnode) {
  1227			dev_warn(sdr->dev, "bad remote port parent\n");
  1228			fwnode_handle_put(ep);
  1229			return -EINVAL;
  1230		}
  1231	
  1232		sdr->ep.asd.match.fwnode.fwnode = fwnode;
> 1233		sdr->ep.asd.match_type = V4L2_ASYNC_MATCH_FWNODE;
  1234		notifier->num_subdevs++;
  1235	
  1236		/* Get the endpoint properties */

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux