mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Umang Jain <umang.jain@ideasonboard.com>
Cc: linux-media@vger.kernel.org,
	open list <linux-kernel@vger.kernel.org>,
	Tommaso Merciai <tomm.merciai@gmail.com>
Subject: Re: [PATCH] media: imx335: Fix reset-gpio handling
Date: Mon, 29 Jul 2024 11:22:06 +0100	[thread overview]
Message-ID: <172224852603.392292.14437094530843053506@ping.linuxembedded.co.uk> (raw)
In-Reply-To: <ZqdYqaMDWjHrNXPh@kekkonen.localdomain>

Quoting Sakari Ailus (2024-07-29 09:54:01)
> Hi Umang,
> 
> On Mon, Jul 29, 2024 at 02:19:32PM +0530, Umang Jain wrote:
> > Hi Sakari
> > 
> > On 29/07/24 1:11 pm, Sakari Ailus wrote:
> > > Hi Umang,
> > > 
> > > Thanks for the patch.
> > > 
> > > On Mon, Jul 29, 2024 at 11:35:35AM +0530, Umang Jain wrote:
> > > > The imx335 reset-gpio is initialised with GPIO_OUT_LOW during probe.
> > > Should it be initialised to high instead, to enable reset?
> > 
> > This initialization matches the physical line status, which is low in this
> > case.
> 
> Documentation/driver-api/gpio/consumer.rst:
> 
>         * GPIOD_OUT_LOW to initialize the GPIO as output with a value of 0.
> 
> ...
> 
>         Note that the initial value is *logical* and the physical line
>         level depends on whether the line is configured active high or
>         active low (see :ref:`active_low_semantics`).
> 

Yes, I think this patch should also update/fix the call in
imx335_parse_hw_config()

	/* Request optional reset pin */
	imx335->reset_gpio = devm_gpiod_get_optional(imx335->dev, "reset",
-						     GPIOD_OUT_LOW);
+						     GPIOD_OUT_HIGH);

To make sure it starts off in reset until it's set accordingly in
imx335_power_{on,off}()

--
Kieran


> -- 
> Sakari Ailus

  reply	other threads:[~2024-07-29 10:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29  6:05 Umang Jain
2024-07-29  7:41 ` Sakari Ailus
2024-07-29  8:49   ` Umang Jain
2024-07-29  8:54     ` Sakari Ailus
2024-07-29 10:22       ` Kieran Bingham [this message]
2024-07-29  8:12 ` Jacopo Mondi
2024-07-29  8:48   ` Umang Jain
2024-07-29  9:19     ` Jacopo Mondi

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=172224852603.392292.14437094530843053506@ping.linuxembedded.co.uk \
    --to=kieran.bingham@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomm.merciai@gmail.com \
    --cc=umang.jain@ideasonboard.com \
    /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

all inboxes | Powered by JetHome®