Lines Matching defs:asd
144 struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
147 u32 code = asd->supported_codes[0];
163 for (i = 0; asd->supported_codes[i]; i++) {
164 if (asd->supported_codes[i] == format->format.code) {
165 code = asd->supported_codes[i];
212 struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
213 const u32 *supported_codes = asd->supported_codes;
336 int ipu6_isys_subdev_init(struct ipu6_isys_subdev *asd,
346 v4l2_subdev_init(&asd->sd, ops);
348 asd->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
351 asd->sd.owner = THIS_MODULE;
352 asd->sd.dev = &asd->isys->adev->auxdev.dev;
353 asd->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
354 asd->sd.internal_ops = &ipu6_isys_subdev_internal_ops;
356 asd->pad = devm_kcalloc(&asd->isys->adev->auxdev.dev, num_pads,
357 sizeof(*asd->pad), GFP_KERNEL);
358 if (!asd->pad)
362 asd->pad[i].flags = MEDIA_PAD_FL_SINK |
366 asd->pad[i].flags = MEDIA_PAD_FL_SOURCE;
368 ret = media_entity_pads_init(&asd->sd.entity, num_pads, asd->pad);
372 if (asd->ctrl_init) {
373 ret = v4l2_ctrl_handler_init(&asd->ctrl_handler, nr_ctrls);
377 asd->ctrl_init(&asd->sd);
378 if (asd->ctrl_handler.error) {
379 ret = asd->ctrl_handler.error;
383 asd->sd.ctrl_handler = &asd->ctrl_handler;
386 asd->source = -1;
391 v4l2_ctrl_handler_free(&asd->ctrl_handler);
394 media_entity_cleanup(&asd->sd.entity);
399 void ipu6_isys_subdev_cleanup(struct ipu6_isys_subdev *asd)
401 media_entity_cleanup(&asd->sd.entity);
402 v4l2_ctrl_handler_free(&asd->ctrl_handler);