On Mon 2017-10-09 07:19:10, Mauro Carvalho Chehab wrote: > There is a mess with media bus flags: there are two sets of > flags, one used by parallel and ITU-R BT.656 outputs, > and another one for CSI2. > > Depending on the type, the same bit has different meanings. > > @@ -86,11 +125,22 @@ enum v4l2_mbus_type { > /** > * struct v4l2_mbus_config - media bus configuration > * @type: in: interface type > - * @flags: in / out: configuration flags, depending on @type > + * @pb_flags: in / out: configuration flags, if @type is > + * %V4L2_MBUS_PARALLEL or %V4L2_MBUS_BT656. > + * @csi2_flags: in / out: configuration flags, if @type is > + * %V4L2_MBUS_CSI2. > + * @flag: access flags, no matter the @type. > + * Used just to avoid needing to rewrite the logic inside > + * soc_camera and pxa_camera drivers. Don't use on newer > + * drivers! > */ > struct v4l2_mbus_config { > enum v4l2_mbus_type type; > - unsigned int flags; > + union { > + enum v4l2_mbus_parallel_and_bt656_flags pb_flags; > + enum v4l2_mbus_csi2_flags csi2_flags; > + unsigned int flag; > + }; > }; > > static inline void v4l2_fill_pix_format(struct v4l2_pix_format > *pix_fmt, The flags->flag conversion is quite subtle, and "flag" is confusing because there is more than one inside. What about something like __legacy_flags? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Attachment:
signature.asc
Description: Digital signature