Hi Ulrich,

What should I do with this? I dropped it for now.

I'm just going ahead and post the pull request without this patch as I
don't want this to be a blocker.

Regards,

        Hans

On 09/15/2016 06:42 PM, Laurent Pinchart wrote:
> 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.to...@codethink.co.uk>.
>>
>> Signed-off-by: Ulrich Hecht <ulrich.hecht+rene...@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)
> 

Reply via email to