diff mbox series

[v2,1/2] dt-bindings: imx335: Mention reset-gpio polarity

Message ID 20240729110437.199428-2-umang.jain@ideasonboard.com
State New
Headers show
Series media: imx335: Fix reset-gpio handling | expand

Commit Message

Umang Jain July 29, 2024, 11:04 a.m. UTC
Mention the reset-gpio polarity in the device tree bindings.
It is GPIO_ACTIVE_LOW according to the datasheet.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
 Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml | 2 ++
 1 file changed, 2 insertions(+)

Comments

Krzysztof Kozlowski July 29, 2024, 2:08 p.m. UTC | #1
On 29/07/2024 13:04, Umang Jain wrote:
> Mention the reset-gpio polarity in the device tree bindings.
> It is GPIO_ACTIVE_LOW according to the datasheet.
> 
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> ---

IdeasOnBoard folks are seasoned developers, although I noticed from time
to time you do not cc all necessary addresses. I wonder why? Something
is missing in internal guideline?

That's not the first case, but pasting same form letter is a bit
annoying, especially considering that *tools tell you to do correct
stuff* and you do not need *person to tell you that*.


<form letter>
Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.

Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline) or work on fork of kernel
(don't, instead use mainline). Just use b4 and everything should be
fine, although remember about `b4 prep --auto-to-cc` if you added new
patches to the patchset.

You missed at least devicetree list (maybe more), so this won't be
tested by automated tooling. Performing review on untested code might be
a waste of time.

Please kindly resend and include all necessary To/Cc entries.
</form letter>

Best regards,
Krzysztof
Laurent Pinchart July 29, 2024, 2:27 p.m. UTC | #2
Hi Umang,

On Mon, Jul 29, 2024 at 05:36:11PM +0530, Umang Jain wrote:
> On 29/07/24 4:40 pm, Laurent Pinchart wrote:
> > On Mon, Jul 29, 2024 at 04:34:36PM +0530, Umang Jain wrote:
> >> Mention the reset-gpio polarity in the device tree bindings.
> >> It is GPIO_ACTIVE_LOW according to the datasheet.
> >>
> >> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> >> ---
> >>   Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml | 2 ++
> >>   1 file changed, 2 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
> >> index 106c36ee966d..fb4c9d42ed1c 100644
> >> --- a/Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
> >> +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
> >> @@ -92,6 +92,8 @@ examples:
> >>               ovdd-supply = <&camera_vddo_1v8>;
> >>               dvdd-supply = <&camera_vddd_1v2>;
> >>   
> >> +            reset-gpios = <&gpio 50 GPIO_ACTIVE_LOW>;
> >> +
> > I think it's good to include this in the example, but it doesn't match
> > the commit message. I was expecting to see a change to the binding
> > rules, not to the example.
> 
> Currently the binding already states reset-gpio as
> 
> ```
>    reset-gpios:
>      description: Reference to the GPIO connected to the XCLR pin, if any.
>      maxItems: 1
> ```
> 
> Pardon my limited knowledge here, do you mean something like :
> 
> ```
>    reset-gpios:
>      description: Reference to the GPIO connected to the XCLR pin 
> (active LOW), if any.
>      maxItems: 1
> ```
> 
> or something else?

No, I meant updating the commit message to something like:

dt-bindings: media: imx335: Add reset-gpios to the DT example

It's easy to get the polarity of GPIOs in the device tree wrong, as
shown by a recently fixed bug in the imx335 driver. To lower the chance
of future mistakes, especially in new bindings that would take the
imx335 binding as a starting point, add the reset-gpios property to the
DT example. This showcases the correct polarity of the XCLR signal for
Sony sensors in the most common case of the signal not being inverted on
the board.

> >>               port {
> >>                   imx335: endpoint {
> >>                       remote-endpoint = <&cam>;
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
index 106c36ee966d..fb4c9d42ed1c 100644
--- a/Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
@@ -92,6 +92,8 @@  examples:
             ovdd-supply = <&camera_vddo_1v8>;
             dvdd-supply = <&camera_vddd_1v2>;
 
+            reset-gpios = <&gpio 50 GPIO_ACTIVE_LOW>;
+
             port {
                 imx335: endpoint {
                     remote-endpoint = <&cam>;