Re: [PATCH] media: imx335: Fix reset-gpio handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux