[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c752ea76-c8da-c77a-104f-9163230cc08a@ideasonboard.com>
Date: Thu, 18 Jun 2020 17:17:04 +0100
From: Kieran Bingham <kieran.bingham@...asonboard.com>
To: Alex Riesen <alexander.riesen@...itec.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
devel@...verdev.osuosl.org, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH v5 7/9] media: adv748x: only activate DAI if it is
described in device tree
Hi Alex,
On 02/04/2020 19:34, Alex Riesen wrote:
> To avoid setting it up even if the hardware is not actually connected
> to anything physically.
>
> Besides, the bindings explicitly notes that port definitions are
> "optional if they are not connected to anything at the hardware level".
>
> Signed-off-by: Alexander Riesen <alexander.riesen@...itec.com>
> ---
> drivers/media/i2c/adv748x/adv748x-dai.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/media/i2c/adv748x/adv748x-dai.c b/drivers/media/i2c/adv748x/adv748x-dai.c
> index 185f78023e91..f9cc47fa9ad1 100644
> --- a/drivers/media/i2c/adv748x/adv748x-dai.c
> +++ b/drivers/media/i2c/adv748x/adv748x-dai.c
> @@ -216,6 +216,11 @@ int adv748x_dai_init(struct adv748x_dai *dai)
> int ret;
> struct adv748x_state *state = adv748x_dai_to_state(dai);
>
> + if (!state->endpoints[ADV748X_PORT_I2S]) {
> + adv_info(state, "no I2S port, DAI disabled\n");
> + ret = 0;
> + goto fail;
How about just 'return 0'?
> + }
And a blank line here ...
Otherwise,
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
This could also be folded into 5/9 too I guess?, though it is easier to
review the sequential additions, rather than the one-big-feature
addition ;-)
> dai->mclk_name = kasprintf(GFP_KERNEL, "%s.%s-i2s-mclk",
> state->dev->driver->name,
> dev_name(state->dev));
>
--
Regards
--
Kieran
Powered by blists - more mailing lists