From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA74874055; Mon, 29 Jul 2024 10:22:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722248532; cv=none; b=r4hEdYbLJP2uBHkxY1K3zgtxqPzRClr4DfsNAggihWXGkC9NOZQuTJ7P2hs/ENpjZ8xgl4ZlsvrlrHFuD/lAKUulCUo6duURB7KvD7Veohbu4M9bw/LMbAF/nelmxvhxKUVHd9lG+QrR/fePADXhSBacSDYqHmhzmGt02BVWPzM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722248532; c=relaxed/simple; bh=T/+I5gioquNPAl2GPXRSBKGt8H1nP3eq4MMZh0WDOm0=; h=Content-Type:MIME-Version:In-Reply-To:References:Subject:From:Cc: To:Date:Message-ID; b=De5Zm0yVhhsVzZ30NxodknmxSeMykYgC5tysadtJlDx+eDDNAEBKr+OMLPfU8Aey/chiEWwc/ehw2DB70vjld8olFQe8PKRlObTqa8CFqFfCkPnktPJGLM6z/Z+vd+KUpUSH2rStDn8uYCg3yD7RmFaFKDcWhOHLzd5R3z3aETk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=G9rHyDzx; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="G9rHyDzx" Received: from pendragon.ideasonboard.com (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B013145A; Mon, 29 Jul 2024 12:21:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1722248482; bh=T/+I5gioquNPAl2GPXRSBKGt8H1nP3eq4MMZh0WDOm0=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=G9rHyDzxEH4D8CEfFEDs7pLMHsxBnd2wjoSz0lcS/Vz4KONSObU3WZkeDgCnDlD/l XzYq1u44uw38W1rywRIIxHurHJlCsDUpWlICQOudPtqMR0B2YpXmNsxlwW/hAlPN1B 7DdPtegNFGvkvlX0QqYSsDBgia9rxsFfSYsCGOqY= Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20240729060535.3227-1-umang.jain@ideasonboard.com> <2dc31ed8-ad83-4051-8de3-6efaf1538714@ideasonboard.com> Subject: Re: [PATCH] media: imx335: Fix reset-gpio handling From: Kieran Bingham Cc: linux-media@vger.kernel.org, open list , Tommaso Merciai To: Sakari Ailus , Umang Jain Date: Mon, 29 Jul 2024 11:22:06 +0100 Message-ID: <172224852603.392292.14437094530843053506@ping.linuxembedded.co.uk> User-Agent: alot/0.10 Quoting Sakari Ailus (2024-07-29 09:54:01) > Hi Umang, >=20 > On Mon, Jul 29, 2024 at 02:19:32PM +0530, Umang Jain wrote: > > Hi Sakari > >=20 > > On 29/07/24 1:11 pm, Sakari Ailus wrote: > > > Hi Umang, > > >=20 > > > Thanks for the patch. > > >=20 > > > 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? > >=20 > > This initialization matches the physical line status, which is low in t= his > > case. >=20 > Documentation/driver-api/gpio/consumer.rst: >=20 > * GPIOD_OUT_LOW to initialize the GPIO as output with a value of = 0. >=20 > ... >=20 > 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`). >=20 Yes, I think this patch should also update/fix the call in imx335_parse_hw_config() /* Request optional reset pin */ imx335->reset_gpio =3D 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 > --=20 > Sakari Ailus