Return-path: Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:58157 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762371AbdLSLs4 (ORCPT ); Tue, 19 Dec 2017 06:48:56 -0500 Message-ID: <1513684129.7538.11.camel@pengutronix.de> Subject: Re: [PATCH v2 5/8] media: v4l2-mediabus: convert flags to enums and document them From: Philipp Zabel To: Mauro Carvalho Chehab , Linux Media Mailing List Cc: Mauro Carvalho Chehab , Lars-Peter Clausen , Guennadi Liakhovetski , Mats Randgaard , Niklas =?ISO-8859-1?Q?S=F6derlund?= , Steve Longerbeam , Greg Kroah-Hartman , Hans Verkuil , Bhumika Goyal , Sakari Ailus , Julia Lawall , Fabio Estevam , Janusz Krzysztofik , Markus Elfring , Laurent Pinchart , "Gustavo A. R. Silva" , Petr Cvek , Rob Herring , Pravin Shedge , Sebastian Reichel , Tomasz Figa , linux-renesas-soc@vger.kernel.org, devel@driverdev.osuosl.org Date: Tue, 19 Dec 2017 12:48:49 +0100 In-Reply-To: <3c5e8bd156d0481410f7cc2352670fc65a99d756.1513682135.git.mchehab@s-opensource.com> References: <3c5e8bd156d0481410f7cc2352670fc65a99d756.1513682135.git.mchehab@s-opensource.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: On Tue, 2017-12-19 at 09:18 -0200, 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. > > That's very confusing, and counter-intuitive. So, split them > into two sets of flags, inside an enum. > > This way, it becomes clearer that there are two separate sets > of flags. It also makes easier if CSI1, CSP, CSI3, etc. would > need a different set of flags. > > As a side effect, enums can be documented via kernel-docs, > so there will be an improvement at flags documentation. > > Unfortunately, soc_camera and pxa_camera do a mess with > the flags, using either one set of flags without proper > checks about the type. That could be fixed, but, as both drivers > are obsolete and in the process of cleanings, I opted to just > keep the behavior, using an unsigned int inside those two > drivers. > > Acked-by: Hans Verkuil > Signed-off-by: Mauro Carvalho Chehab For imx-media, Acked-by: Philipp Zabel thanks Philipp