From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Cc: hans.verkuil@cisco.com, niklas.soderlund@ragnatech.se,
linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
magnus.damm@gmail.com, william.towle@codethink.co.uk
Subject: Re: [PATCH v8 1/2] media: adv7604: automatic "default-input" selection
Date: Thu, 15 Sep 2016 19:42:53 +0300 [thread overview]
Message-ID: <1962610.tCZYpFzJAm@avalon> (raw)
In-Reply-To: <20160915132408.20776-2-ulrich.hecht+renesas@gmail.com>
Hi Ulrich,
Thank you for the patch.
On Thursday 15 Sep 2016 15:24:07 Ulrich Hecht wrote:
> Fall back to input 0 if "default-input" property is not present.
>
> Additionally, documentation in commit bf9c82278c34 ("[media]
> media: adv7604: ability to read default input port from DT") states
> that the "default-input" property should reside directly in the node
> for adv7612.
Actually it doesn't. The DT bindings specifies "default-input" as an endpoint
property, even though the example sets it in the device node. That's
inconsistent so the DT bindings document should be fixed. I believe the
property should be set in the device node, it doesn't make much sense to have
different default inputs per port.
> Hence, also adjust the parsing to make the implementation
> consistent with this.
>
> Based on patch by William Towle <william.towle@codethink.co.uk>.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
> drivers/media/i2c/adv7604.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
> index 4003831..055c9df 100644
> --- a/drivers/media/i2c/adv7604.c
> +++ b/drivers/media/i2c/adv7604.c
> @@ -3077,10 +3077,13 @@ static int adv76xx_parse_dt(struct adv76xx_state
> *state) if (!of_property_read_u32(endpoint, "default-input", &v))
> state->pdata.default_input = v;
> else
> - state->pdata.default_input = -1;
> + state->pdata.default_input = 0;
>
> of_node_put(endpoint);
>
> + if (!of_property_read_u32(np, "default-input", &v))
> + state->pdata.default_input = v;
> +
> flags = bus_cfg.bus.parallel.flags;
>
> if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2016-09-15 16:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-15 13:24 [PATCH v8 0/2] rcar-vin EDID control ioctls Ulrich Hecht
2016-09-15 13:24 ` [PATCH v8 1/2] media: adv7604: automatic "default-input" selection Ulrich Hecht
2016-09-15 16:42 ` Laurent Pinchart [this message]
2016-09-16 8:44 ` Hans Verkuil
2016-09-15 13:24 ` [PATCH v8 2/2] rcar-vin: implement EDID control ioctls Ulrich Hecht
2016-09-15 13:59 ` Niklas Söderlund
2016-09-15 14:02 ` Hans Verkuil
2016-09-15 15:22 ` Hans Verkuil
2016-09-15 16:47 ` Laurent Pinchart
2016-09-15 17:01 ` Hans Verkuil
2016-09-15 17:28 ` Niklas Söderlund
2016-09-15 17:34 ` Laurent Pinchart
2016-09-15 13:25 ` [PATCH v8 0/2] rcar-vin " Hans Verkuil
2016-09-15 13:38 ` Ulrich Hecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1962610.tCZYpFzJAm@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=niklas.soderlund@ragnatech.se \
--cc=ulrich.hecht+renesas@gmail.com \
--cc=william.towle@codethink.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox