diff mbox series

[17/19] media: dt-bindings: ti,ds90ub960: Add "i2c-addr" link property

Message ID 20250110-ub9xx-improvements-v1-17-e0b9a1f644da@ideasonboard.com (mailing list archive)
State New
Headers show
Series media: i2c: ds90ub9xx: Error handling, UB9702 improvements | expand

Commit Message

Tomi Valkeinen Jan. 10, 2025, 9:14 a.m. UTC
From: Jai Luthra <jai.luthra@ideasonboard.com>

The serializer's I2C address on the FPD-Link bus is usually communicated
to the deserializer once the forward-channel is established. But in some
cases it might be necessary to program the serializer (over the
back-channel) before the forward-channel is established.

This can be used e.g. to correct serializer configuration which
otherwise would prevent the FC to be enabled.

Add a new optional property to specify the I2C address of the
serializer.

Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
---
 Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Krzysztof Kozlowski Jan. 11, 2025, 10:31 a.m. UTC | #1
On Fri, Jan 10, 2025 at 11:14:17AM +0200, Tomi Valkeinen wrote:
> From: Jai Luthra <jai.luthra@ideasonboard.com>
> 
> The serializer's I2C address on the FPD-Link bus is usually communicated
> to the deserializer once the forward-channel is established. But in some
> cases it might be necessary to program the serializer (over the
> back-channel) before the forward-channel is established.
> 
> This can be used e.g. to correct serializer configuration which
> otherwise would prevent the FC to be enabled.
> 
> Add a new optional property to specify the I2C address of the
> serializer.
> 
> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> Cc: devicetree@vger.kernel.org
> Cc: Rob Herring <robh@kernel.org>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>

Why only these folks? Why not all of the maintainers?

Anyway, Please drop the autogenerated scripts/get_maintainer.pl CC-entries from
commit msg. There is no single need to store automated output of
get_maintainers.pl in the git log. It can be easily re-created at any
given time, thus its presence in the git history is redundant and
obfuscates the log.

If you need it for your own patch management purposes, keep it under the
--- separator.

> ---
>  Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
> index 0b71e6f911a8..e17b508b6409 100644
> --- a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
> @@ -75,6 +75,13 @@ properties:
>                address on the I2C bus where the deserializer resides are
>                forwarded to the serializer.
>  
> +          i2c-addr:
> +            $ref: /schemas/types.yaml#/definitions/uint32

Why isn't this part of reg, if that's the same device? If that is not
the same device, you are not expected to encode addresses of other
devices in this device. Address of 'foo' is not a property of device
'bar'. Phandles or graphs express relationships between devices.

Best regards,
Krzysztof
Tomi Valkeinen Jan. 14, 2025, 11:50 a.m. UTC | #2
Hi,

On 11/01/2025 12:31, Krzysztof Kozlowski wrote:
> On Fri, Jan 10, 2025 at 11:14:17AM +0200, Tomi Valkeinen wrote:
>> From: Jai Luthra <jai.luthra@ideasonboard.com>
>>
>> The serializer's I2C address on the FPD-Link bus is usually communicated
>> to the deserializer once the forward-channel is established. But in some
>> cases it might be necessary to program the serializer (over the
>> back-channel) before the forward-channel is established.
>>
>> This can be used e.g. to correct serializer configuration which
>> otherwise would prevent the FC to be enabled.
>>
>> Add a new optional property to specify the I2C address of the
>> serializer.
>>
>> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>> Cc: devicetree@vger.kernel.org
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> 
> Why only these folks? Why not all of the maintainers?

The whole series is sent to the media list and maintainers. I thought 
this single patch doesn't warrant sending the whole series to DT list 
and maintainers, so I cc'd them here.

> Anyway, Please drop the autogenerated scripts/get_maintainer.pl CC-entries from
> commit msg. There is no single need to store automated output of
> get_maintainers.pl in the git log. It can be easily re-created at any
> given time, thus its presence in the git history is redundant and
> obfuscates the log.

I think that's a valid point.

> If you need it for your own patch management purposes, keep it under the
> --- separator.

I'm using b4. I don't know how to do that with b4, but I'll look into it.

>> ---
>>   Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
>> index 0b71e6f911a8..e17b508b6409 100644
>> --- a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
>> +++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
>> @@ -75,6 +75,13 @@ properties:
>>                 address on the I2C bus where the deserializer resides are
>>                 forwarded to the serializer.
>>   
>> +          i2c-addr:
>> +            $ref: /schemas/types.yaml#/definitions/uint32
> 
> Why isn't this part of reg, if that's the same device? If that is not
> the same device, you are not expected to encode addresses of other
> devices in this device. Address of 'foo' is not a property of device
> 'bar'. Phandles or graphs express relationships between devices.

With the understanding of the HW I have right now, I would have added 
the i2c address as the address of the serializer node, with reg 
property. I would probably also do a few other changes to the bindings...

But as we already have the current bindings, adding the i2c-addr felt 
like an easy way to keep backwards compatibility and add the address of 
the serializer.

However, thinking about this more, maybe we could just go and add the 
address of the serializer with reg, in the ds90ub953 bindings. It's the 
ub960 driver that needs the address, but it shouldn't be much trouble to 
get that from the ub953's data.

But we need to keep the address optional to keep the backwards 
compatibility. If it's not defined, the ub960 will automatically receive 
the serializer's address when the link goes up (as it is handled now).

  Tomi
Krzysztof Kozlowski Jan. 15, 2025, 8:40 a.m. UTC | #3
On 14/01/2025 12:50, Tomi Valkeinen wrote:
> Hi,
> 
> On 11/01/2025 12:31, Krzysztof Kozlowski wrote:
>> On Fri, Jan 10, 2025 at 11:14:17AM +0200, Tomi Valkeinen wrote:
>>> From: Jai Luthra <jai.luthra@ideasonboard.com>
>>>
>>> The serializer's I2C address on the FPD-Link bus is usually communicated
>>> to the deserializer once the forward-channel is established. But in some
>>> cases it might be necessary to program the serializer (over the
>>> back-channel) before the forward-channel is established.
>>>
>>> This can be used e.g. to correct serializer configuration which
>>> otherwise would prevent the FC to be enabled.
>>>
>>> Add a new optional property to specify the I2C address of the
>>> serializer.
>>>
>>> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
>>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>>> Cc: devicetree@vger.kernel.org
>>> Cc: Rob Herring <robh@kernel.org>
>>> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
>>
>> Why only these folks? Why not all of the maintainers?
> 
> The whole series is sent to the media list and maintainers. I thought 
> this single patch doesn't warrant sending the whole series to DT list 
> and maintainers, so I cc'd them here.


I was wondering why only some of the DT maintainers, not all? My usual
assumption is: you are not using get_maintainers.pl or you are working
on an old kernel.


> 
>> Anyway, Please drop the autogenerated scripts/get_maintainer.pl CC-entries from
>> commit msg. There is no single need to store automated output of
>> get_maintainers.pl in the git log. It can be easily re-created at any
>> given time, thus its presence in the git history is redundant and
>> obfuscates the log.
> 
> I think that's a valid point.
> 
>> If you need it for your own patch management purposes, keep it under the
>> --- separator.
> 
> I'm using b4. I don't know how to do that with b4, but I'll look into it.
> 
>>> ---
>>>   Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
>>> index 0b71e6f911a8..e17b508b6409 100644
>>> --- a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
>>> +++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
>>> @@ -75,6 +75,13 @@ properties:
>>>                 address on the I2C bus where the deserializer resides are
>>>                 forwarded to the serializer.
>>>   
>>> +          i2c-addr:
>>> +            $ref: /schemas/types.yaml#/definitions/uint32
>>
>> Why isn't this part of reg, if that's the same device? If that is not
>> the same device, you are not expected to encode addresses of other
>> devices in this device. Address of 'foo' is not a property of device
>> 'bar'. Phandles or graphs express relationships between devices.
> 
> With the understanding of the HW I have right now, I would have added 
> the i2c address as the address of the serializer node, with reg 
> property. I would probably also do a few other changes to the bindings...
> 
> But as we already have the current bindings, adding the i2c-addr felt 
> like an easy way to keep backwards compatibility and add the address of 
> the serializer.
> 
> However, thinking about this more, maybe we could just go and add the 
> address of the serializer with reg, in the ds90ub953 bindings. It's the 
> ub960 driver that needs the address, but it shouldn't be much trouble to 
> get that from the ub953's data.
> 
> But we need to keep the address optional to keep the backwards 
> compatibility. If it's not defined, the ub960 will automatically receive 
> the serializer's address when the link goes up (as it is handled now).


The 'reg' can grow and should not cause ABI issues, because
implementations should just ignore additional entry.

Best regards,
Krzysztof
Konstantin Ryabitsev Jan. 15, 2025, 3:53 p.m. UTC | #4
On Tue, Jan 14, 2025 at 01:50:08PM +0200, Tomi Valkeinen wrote:
> > If you need it for your own patch management purposes, keep it under the
> > --- separator.
> 
> I'm using b4. I don't know how to do that with b4, but I'll look into it.

You just put them under --- in your git commit message and b4 will preserve
it as-is when it renders the email.

-K
Tomi Valkeinen Jan. 15, 2025, 4:09 p.m. UTC | #5
Hi,

On 15/01/2025 17:53, Konstantin Ryabitsev wrote:
> On Tue, Jan 14, 2025 at 01:50:08PM +0200, Tomi Valkeinen wrote:
>>> If you need it for your own patch management purposes, keep it under the
>>> --- separator.
>>
>> I'm using b4. I don't know how to do that with b4, but I'll look into it.
> 
> You just put them under --- in your git commit message and b4 will preserve
> it as-is when it renders the email.

Alright, thanks!

  Tomi
Krzysztof Kozlowski Jan. 15, 2025, 4:46 p.m. UTC | #6
On 15/01/2025 17:09, Tomi Valkeinen wrote:
> Hi,
> 
> On 15/01/2025 17:53, Konstantin Ryabitsev wrote:
>> On Tue, Jan 14, 2025 at 01:50:08PM +0200, Tomi Valkeinen wrote:
>>>> If you need it for your own patch management purposes, keep it under the
>>>> --- separator.
>>>
>>> I'm using b4. I don't know how to do that with b4, but I'll look into it.
>>
>> You just put them under --- in your git commit message and b4 will preserve
>> it as-is when it renders the email.
> 
> Alright, thanks!
> 
That's exactly what I wrote:

"If you need it for your own patch management purposes, keep it under
the --- separator."

It's nothing related to b4 - it comes from standard git commit and git
send-email.

Best regards,
Krzysztof
Tomi Valkeinen Jan. 15, 2025, 5:14 p.m. UTC | #7
Hi,

On 15/01/2025 18:46, Krzysztof Kozlowski wrote:
> On 15/01/2025 17:09, Tomi Valkeinen wrote:
>> Hi,
>>
>> On 15/01/2025 17:53, Konstantin Ryabitsev wrote:
>>> On Tue, Jan 14, 2025 at 01:50:08PM +0200, Tomi Valkeinen wrote:
>>>>> If you need it for your own patch management purposes, keep it under the
>>>>> --- separator.
>>>>
>>>> I'm using b4. I don't know how to do that with b4, but I'll look into it.
>>>
>>> You just put them under --- in your git commit message and b4 will preserve
>>> it as-is when it renders the email.
>>
>> Alright, thanks!
>>
> That's exactly what I wrote:
> 
> "If you need it for your own patch management purposes, keep it under
> the --- separator."
> 
> It's nothing related to b4 - it comes from standard git commit and git
> send-email.

Yep. For some odd reason I was under the impression that I can't have 
that in a commit message in my local branch, but would have to add the 
---, and the lines after that, to the mail file. And so, as b4 handles 
creating and sending the mails, I wasn't sure how to get in between.

This does make my life a bit easier, so I'm glad this topic came up =).

  Tomi
Tomi Valkeinen Jan. 15, 2025, 5:19 p.m. UTC | #8
Hi,

On 15/01/2025 10:40, Krzysztof Kozlowski wrote:

>>> Why only these folks? Why not all of the maintainers?
>>
>> The whole series is sent to the media list and maintainers. I thought
>> this single patch doesn't warrant sending the whole series to DT list
>> and maintainers, so I cc'd them here.
> 
> 
> I was wondering why only some of the DT maintainers, not all? My usual
> assumption is: you are not using get_maintainers.pl or you are working
> on an old kernel.

It's simpler than that: a copy-paste mistake. I'm not sure how I managed 
to miss Conor there.

Any preference on cc'ing the DT maintainers and the dt-list only for 
this patch (I'll use --- this time, I promise!), or just sending the 
whole series also to DT people?

  Tomi
Krzysztof Kozlowski Jan. 15, 2025, 8:25 p.m. UTC | #9
On 15/01/2025 18:19, Tomi Valkeinen wrote:
> Hi,
> 
> On 15/01/2025 10:40, Krzysztof Kozlowski wrote:
> 
>>>> Why only these folks? Why not all of the maintainers?
>>>
>>> The whole series is sent to the media list and maintainers. I thought
>>> this single patch doesn't warrant sending the whole series to DT list
>>> and maintainers, so I cc'd them here.
>>
>>
>> I was wondering why only some of the DT maintainers, not all? My usual
>> assumption is: you are not using get_maintainers.pl or you are working
>> on an old kernel.
> 
> It's simpler than that: a copy-paste mistake. I'm not sure how I managed 
> to miss Conor there.
> 
> Any preference on cc'ing the DT maintainers and the dt-list only for 
> this patch (I'll use --- this time, I promise!), or just sending the 
> whole series also to DT people?
I think only Rob uses DT list entirely. I use both - DT list and being
directly CC-ed on emails, and I think Conor relies on being Cc-ed
directly. IOW, just cc all maintainers + DT list. Unless you touch
multiple subsystems, there is rarely a point to strip get_maintainers.pl
output from maintainers/reviewers/submitters. Do not confuse in skipping
non-maintainers pointed by Git-fallback (not applicable to b4, I think),
because these should be used carefully.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
index 0b71e6f911a8..e17b508b6409 100644
--- a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
@@ -75,6 +75,13 @@  properties:
               address on the I2C bus where the deserializer resides are
               forwarded to the serializer.
 
+          i2c-addr:
+            $ref: /schemas/types.yaml#/definitions/uint32
+            description:
+              The strap I2C address of the serializer. This is used by the
+              deserializer to internally communicate to the serializer over the
+              FPD-Link back-channel.
+
           ti,rx-mode:
             $ref: /schemas/types.yaml#/definitions/uint32
             enum: