From: Oleksij Rempel <o.rempel@pengutronix.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Ian Dannapel <iansdannapel@gmail.com>,
linux@rempel-privat.de, Erik.Schumacher@iris-sensing.com,
shawnguo@kernel.org, s.hauer@pengutronix.de,
linux-kernel@vger.kernel.org,
Michael.Glembotzki@iris-sensing.com, linux-imx@nxp.com,
kernel@pengutronix.de, festevam@gmail.com,
linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: imx: remove unnecessary delay at startup
Date: Tue, 15 Mar 2022 06:59:35 +0100 [thread overview]
Message-ID: <20220315055935.GB14588@pengutronix.de> (raw)
In-Reply-To: <20220314101337.4x2cu3nvg2vg7ulh@pengutronix.de>
On Mon, Mar 14, 2022 at 11:13:37AM +0100, Uwe Kleine-König wrote:
> Hello,
>
> On Mon, Mar 14, 2022 at 10:59:18AM +0100, Ian Dannapel wrote:
> > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> > index 3576b63a6c03..019dda5301df 100644
> > --- a/drivers/i2c/busses/i2c-imx.c
> > +++ b/drivers/i2c/busses/i2c-imx.c
> > @@ -602,12 +602,6 @@ static int i2c_imx_start(struct imx_i2c_struct *i2c_imx, bool atomic)
> > imx_i2c_write_reg(i2c_imx->hwdata->i2sr_clr_opcode, i2c_imx, IMX_I2C_I2SR);
> > imx_i2c_write_reg(i2c_imx->hwdata->i2cr_ien_opcode, i2c_imx, IMX_I2C_I2CR);
> >
> > - /* Wait controller to be stable */
> > - if (atomic)
> > - udelay(50);
> > - else
> > - usleep_range(50, 150);
> > -
> > /* Start I2C transaction */
> > temp = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2CR);
> > temp |= I2CR_MSTA;
>
> This contradicts statements made in
> 43309f3b521302bb66c4c9e66704dd3675e4d725.
>
> Maybe the sleep/delay should be done conditionally on the busy bit?
Maybe. I do not see what exact problem is this sleep addressing. How
exact the can get stable? Is it addressing some clock issue or wading
until something happening on the bus?
Regards,
Oleskij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
WARNING: multiple messages have this Message-ID (diff)
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Ian Dannapel <iansdannapel@gmail.com>,
linux@rempel-privat.de, Erik.Schumacher@iris-sensing.com,
shawnguo@kernel.org, s.hauer@pengutronix.de,
linux-kernel@vger.kernel.org,
Michael.Glembotzki@iris-sensing.com, linux-imx@nxp.com,
kernel@pengutronix.de, festevam@gmail.com,
linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: imx: remove unnecessary delay at startup
Date: Tue, 15 Mar 2022 06:59:35 +0100 [thread overview]
Message-ID: <20220315055935.GB14588@pengutronix.de> (raw)
In-Reply-To: <20220314101337.4x2cu3nvg2vg7ulh@pengutronix.de>
On Mon, Mar 14, 2022 at 11:13:37AM +0100, Uwe Kleine-König wrote:
> Hello,
>
> On Mon, Mar 14, 2022 at 10:59:18AM +0100, Ian Dannapel wrote:
> > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> > index 3576b63a6c03..019dda5301df 100644
> > --- a/drivers/i2c/busses/i2c-imx.c
> > +++ b/drivers/i2c/busses/i2c-imx.c
> > @@ -602,12 +602,6 @@ static int i2c_imx_start(struct imx_i2c_struct *i2c_imx, bool atomic)
> > imx_i2c_write_reg(i2c_imx->hwdata->i2sr_clr_opcode, i2c_imx, IMX_I2C_I2SR);
> > imx_i2c_write_reg(i2c_imx->hwdata->i2cr_ien_opcode, i2c_imx, IMX_I2C_I2CR);
> >
> > - /* Wait controller to be stable */
> > - if (atomic)
> > - udelay(50);
> > - else
> > - usleep_range(50, 150);
> > -
> > /* Start I2C transaction */
> > temp = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2CR);
> > temp |= I2CR_MSTA;
>
> This contradicts statements made in
> 43309f3b521302bb66c4c9e66704dd3675e4d725.
>
> Maybe the sleep/delay should be done conditionally on the busy bit?
Maybe. I do not see what exact problem is this sleep addressing. How
exact the can get stable? Is it addressing some clock issue or wading
until something happening on the bus?
Regards,
Oleskij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-03-15 5:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 9:59 [PATCH] i2c: imx: remove unnecessary delay at startup Ian Dannapel
2022-03-14 9:59 ` Ian Dannapel
2022-03-14 10:13 ` Uwe Kleine-König
2022-03-14 10:13 ` Uwe Kleine-König
2022-03-15 5:59 ` Oleksij Rempel [this message]
2022-03-15 5:59 ` Oleksij Rempel
2022-03-15 7:44 ` Wolfram Sang
2022-03-15 7:44 ` Wolfram Sang
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=20220315055935.GB14588@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=Erik.Schumacher@iris-sensing.com \
--cc=Michael.Glembotzki@iris-sensing.com \
--cc=festevam@gmail.com \
--cc=iansdannapel@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.