From mboxrd@z Thu Jan 1 00:00:00 1970 From: jacopo mondi Date: Fri, 17 Nov 2017 09:14:51 +0000 Subject: Re: [PATCH v1 08/10] media: i2c: ov772x: Remove soc_camera dependencies Message-Id: <20171117091451.GC4668@w540> List-Id: References: <1510743363-25798-1-git-send-email-jacopo+renesas@jmondi.org> <1510743363-25798-9-git-send-email-jacopo+renesas@jmondi.org> <20171117004315.gyc2j6x2orhxulcv@valkosipuli.retiisi.org.uk> In-Reply-To: <20171117004315.gyc2j6x2orhxulcv@valkosipuli.retiisi.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Sakari Ailus Cc: Jacopo Mondi , laurent.pinchart@ideasonboard.com, magnus.damm@gmail.com, geert@glider.be, mchehab@kernel.org, hverkuil@xs4all.nl, linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Hi Sakari! On Fri, Nov 17, 2017 at 02:43:15AM +0200, Sakari Ailus wrote: > Hi Jacopo, > > On Wed, Nov 15, 2017 at 11:56:01AM +0100, Jacopo Mondi wrote: > > [snip] > > +#include > > #include > > #include > > #include > > @@ -25,8 +26,8 @@ > > #include > > > > #include > > -#include > > -#include > > + > > +#include > > Alphabetical order would be nice. ups! > > > #include > > #include > > #include > > @@ -393,7 +394,7 @@ struct ov772x_win_size { > > struct ov772x_priv { > > struct v4l2_subdev subdev; > > struct v4l2_ctrl_handler hdl; > > - struct v4l2_clk *clk; > > + struct clk *clk; > > struct ov772x_camera_info *info; > > const struct ov772x_color_format *cfmt; > > const struct ov772x_win_size *win; > > @@ -550,7 +551,7 @@ static int ov772x_reset(struct i2c_client *client) > > } > > > > /* > > - * soc_camera_ops function > > + * subdev ops > > */ > > > > static int ov772x_s_stream(struct v4l2_subdev *sd, int enable) > > @@ -650,13 +651,36 @@ static int ov772x_s_register(struct v4l2_subdev *sd, > > } > > #endif > > > > +static int ov772x_power_on(struct ov772x_priv *priv) > > +{ > > + int ret; > > + > > + if (priv->info->platform_enable) { > > + ret = priv->info->platform_enable(); > > + if (ret) > > + return ret; > > What does this do, enable the regulator? Well, it depends on what function the platform code stores in 'platform_enable' pointer, doesn't it? As you can see in [05/10] of this series, for Migo-R it's not about a regulator, but switching between the two available video inputs (OV7725 and TW9910) toggling their 'enable' pins. Thanks j