mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muzaffer Kadir <muzafferkadir@mainlining.org>
To: "Ondřej Jirman" <megi@xff.cz>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	git@luigi311.com, pavel@ucw.cz, tomm.merciai@gmail.com,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	phone-devel@vger.kernel.org
Subject: Re: [PATCH] media: i2c: imx258: Add reset-gpio support
Date: Sat, 29 Aug 2026 13:28:31 +0300	[thread overview]
Message-ID: <8ad49542-e88d-4ac0-ab12-ef84382d96d7@mainlining.org> (raw)
In-Reply-To: <ccydtgy5lwhesdlg5mtbxllwfcnzhm3k7g6m5xyyhprwizooof@s7qrku6yvqlk>

Hi Ondřej,

On Fri, 28 Aug 2026 20:16:30 +0200, Ondřej Jirman wrote:
>> @@ -1128,6 +1130,18 @@ static int imx258_power_on(struct device *dev)
>>  	if (ret) {
>>  		dev_err(dev, "failed to enable clock\n");
>>  		regulator_bulk_disable(IMX258_NUM_SUPPLIES, imx258->supplies);
>> +		return ret;
>> +	}
>> +
>> +	if (imx258->reset_gpio) {
>> +		ret = gpiod_set_value_cansleep(imx258->reset_gpio, 0);
>> +		if (ret) {
>> +			dev_err(dev, "failed to deassert reset\n");
>> +			clk_disable_unprepare(imx258->clk);
>> +			regulator_bulk_disable(IMX258_NUM_SUPPLIES, imx258->supplies);
>> +			return ret;
>> +		}
>> +		usleep_range(400, 500);
>>  	}
> 
> There are two times given in the datasheet. min 400 us between reset deassert
> and ID register read over CCI. And minimum time between deassert and stream
> start, which is 12ms.
> 
>   https://xff.cz/dl/tmp/b8efc244280a2b35.png
> 
>   https://xff.cz/dl/tmp/ed9b967a140bd347.png
> 
> I wonder if this driver satisfied the second constraint. That may perhaps depend
> on how userspace uses it.
Thanks for datasheet timings. There is an existing software reset and 12ms wait call
inside imx258_start_streaming function. It should satisfy stream start.
Please correct me if I am wrong.
-- 
Best Regards,

Muzaffer Kadir

  reply	other threads:[~2026-08-29 10:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28 10:51 Muzaffer Kadir via B4 Relay
2026-08-28 12:05 ` Sakari Ailus
2026-08-28 17:22   ` Muzaffer Kadir
2026-08-28 18:16 ` Ondřej Jirman
2026-08-29 10:28   ` Muzaffer Kadir [this message]
2026-08-29 10:33     ` Ondřej Jirman

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=8ad49542-e88d-4ac0-ab12-ef84382d96d7@mainlining.org \
    --to=muzafferkadir@mainlining.org \
    --cc=git@luigi311.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=megi@xff.cz \
    --cc=pavel@ucw.cz \
    --cc=phone-devel@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomm.merciai@gmail.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®