Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751297AbeACQZO (ORCPT + 1 other); Wed, 3 Jan 2018 11:25:14 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46339 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbeACQYt (ORCPT ); Wed, 3 Jan 2018 11:24:49 -0500 Date: Wed, 3 Jan 2018 17:24:43 +0100 From: jacopo mondi To: Laurent Pinchart Cc: Jacopo Mondi , magnus.damm@gmail.com, geert@glider.be, mchehab@kernel.org, hverkuil@xs4all.nl, robh+dt@kernel.org, mark.rutland@arm.com, linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-sh@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 9/9] media: i2c: tw9910: Remove soc_camera dependencies Message-ID: <20180103162443.GE9493@w540> References: <1514469681-15602-1-git-send-email-jacopo+renesas@jmondi.org> <1514469681-15602-10-git-send-email-jacopo+renesas@jmondi.org> <3834014.tgMKCuKOQE@avalon> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3834014.tgMKCuKOQE@avalon> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Laurent, On Tue, Jan 02, 2018 at 05:50:38PM +0200, Laurent Pinchart wrote: > Hi Jacopo, > > Thank you for the patch. > > On Thursday, 28 December 2017 16:01:21 EET Jacopo Mondi wrote: > > - priv->clk = v4l2_clk_get(&client->dev, "mclk"); > > - if (IS_ERR(priv->clk)) > > + priv->clk = clk_get(&client->dev, "mclk"); > > The clock signal is called XTI (see page 60 of http://www.tecworth.com/ > administrator/upload/200956419240864.pdf). You should add a clock alias as for > the ov7725. I don't think Migo-R board code should provide any alias for XTI clock, as the clock is generated by an on-board oscillator and not from the SoC. Also, changing the name in the driver seems safe, as `git grep tw9910 arch/` returns that only mach-ecovec uses TW9910 (Migo-R apart) and it seems like also in that case the clock comes from an oscillator and it is not provided by the SoC. > > > + if (PTR_ERR(priv->clk) == -ENOENT) { > > + priv->clk = NULL; > > + } else if (IS_ERR(priv->clk)) { > > + dev_err(&client->dev, "Unable to get mclk clock\n"); > > return PTR_ERR(priv->clk); > > + } > > + > > + priv->pdn_gpio = gpiod_get_optional(&client->dev, "pdn", > > + GPIOD_OUT_HIGH); > > + if (IS_ERR(priv->pdn_gpio)) { > > + dev_info(&client->dev, "Unable to get GPIO \"pdn\""); > > + ret = PTR_ERR(priv->pdn_gpio); > > + goto error_clk_put; > > + } > > > > ret = tw9910_video_probe(client); > > if (ret < 0) > > - v4l2_clk_put(priv->clk); > > + goto error_gpio_put; > > + > > + ret = v4l2_async_register_subdev(&priv->subdev); > > + if (ret) > > + goto error_gpio_put; > > + > > + return ret; > > + > > +error_gpio_put: > > + if (priv->pdn_gpio) > > + gpiod_put(priv->pdn_gpio); > > +error_clk_put: > > + clk_put(priv->clk); > > > > return ret; > > } > > [snip] > > With these small issues fixed, and the comments to ov7725 that apply to tw9910 > addressed, > > Reviewed-by: Laurent Pinchart Thanks j > > -- > Regards, > > Laurent Pinchart >