Add a convenience inline function that returns true if the given subdevice is one of the i.MX5/6 IPU-internal subdevices. Signed-off-by: Steve Longerbeam <slongerbeam@xxxxxxxxx> --- drivers/staging/media/imx/imx-media.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/staging/media/imx/imx-media.h b/drivers/staging/media/imx/imx-media.h index d75b3c80101a..c42a2cafb8fb 100644 --- a/drivers/staging/media/imx/imx-media.h +++ b/drivers/staging/media/imx/imx-media.h @@ -282,4 +282,12 @@ void imx_media_capture_device_error(struct imx_media_video_dev *vdev); #define IMX_MEDIA_GRP_ID_IPU_IC_PRPENC BIT(14) #define IMX_MEDIA_GRP_ID_IPU_IC_PRPVF BIT(15) +static inline bool is_ipu_internal_subdev(struct v4l2_subdev *sd) +{ + return sd->grp_id == IMX_MEDIA_GRP_ID_IPU_VDIC || + sd->grp_id == IMX_MEDIA_GRP_ID_IPU_IC_PRP || + sd->grp_id == IMX_MEDIA_GRP_ID_IPU_IC_PRPENC || + sd->grp_id == IMX_MEDIA_GRP_ID_IPU_IC_PRPVF; +} + #endif -- 2.17.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel