linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Liu Kimriver/刘金河" <kimriver.liu@siengine.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	"jarkko.nikula@linux.intel.com" <jarkko.nikula@linux.intel.com>,
	"andriy.shevchenko@linux.intel.com"
	<andriy.shevchenko@linux.intel.com>,
	"mika.westerberg@linux.intel.com"
	<mika.westerberg@linux.intel.com>,
	"jsd@semihalf.com" <jsd@semihalf.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andy Shevchenko <andy@kernel.org>
Subject: RE: [PATCH v11] i2c: designware: fix controller is holding SCL low while ENABLE bit is disabled
Date: Fri, 13 Sep 2024 09:32:11 +0000	[thread overview]
Message-ID: <cf1272474d3342e88798edc77365b420@siengine.com> (raw)
In-Reply-To: <lon3lijqcb5zpylqfni4xecjxbv6tlfn4kmyn3zwfkhajyiamw@g72c4r7fo2c6>

HI,
 Thank you for taking the time to review the patch and considering it.
 Thanks a bunch!

------------------------------------------
 Best Regards
 Kimriver Liu

> -----Original Message-----
> From: Andi Shyti <andi.shyti@kernel.org> 
> Sent: 2024年9月13日 16:53
> To: Liu Kimriver/刘金河 <kimriver.liu@siengine.com>
> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>; jarkko.nikula@linux.intel.com; andriy.shevchenko@linux.intel.com; mika.westerberg@linux.intel.com; jsd@semihalf.com; linux-i2c@vger.kernel.org; linux-> kernel@vger.kernel.org; Andy Shevchenko <andy@kernel.org>
> Subject: Re: [PATCH v11] i2c: designware: fix controller is holding SCL low while ENABLE bit is disabled

> Hi Kimriver,

> please, don't send v12 anymore, I will take care of these little notes from Andy.

> You did a great job at following up on all the reviews, thanks!

> Andi

> On Fri, Sep 13, 2024 at 08:31:18AM GMT, Liu Kimriver/刘金河 wrote:
> > Hi Andy
>>   
>>    Subject:  [PATCH v11] i2c: designware: fix controller is holding SCL low while ENABLE bit is disabled
>>    I will change the subject to:
>>    Subject:  [PATCH v11] i2c: designware: fix controller is holding SCL 
>>  low while the ENABLE bit is disabled
>>  
> > >-----Original Message-----
>>  >From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > >Sent: 2024年9月13日 15:41
> > >To: Liu Kimriver/刘金河 <kimriver.liu@siengine.com>
> > >Cc: jarkko.nikula@linux.intel.com; andriy.shevchenko@linux.intel.com; 
> > >mika.westerberg@linux.intel.com; jsd@semihalf.com; 
> > >andi.shyti@kernel.org; linux-i2c@vger.kernel.org; 
> > >linux-kernel@vger.kernel.org; Andy >Shevchenko <andy@kernel.org>
>> >Subject: Re: [PATCH v11] i2c: designware: fix controller is holding 
>> >SCL low while ENABLE bit is disabled
>> 
>> >On Fri, Sep 13, 2024 at 6:35 AM Kimriver Liu <kimriver.liu@siengine.com> wrote:
> >>>
> >>> It was observed that issuing the ABORT bit (IC_ENABLE[1]) will not 
> >>>work when IC_ENABLE is already disabled.
> >>>
> >>> Check if the ENABLE bit (IC_ENABLE[0]) is disabled when the 
> >>> controller is holding SCL low. If the ENABLE bit is disabled, the 
> >>> software needs to enable it before trying to issue the ABORT bit. 
> >>> otherwise, the controller ignores any write to ABORT bit.
> >>>
> >>>These kernel logs show up whenever an I2C transaction is attempted 
> >>> after this failure.
> >>> i2c_designware e95e0000.i2c: timeout waiting for bus ready 
> >>> i2c_designware e95e0000.i2c: timeout in disabling adapter
> >>>
> >>> The patch fixes the issue where the controller cannot be disabled 
> >>> while SCL is held low if the ENABLE bit is already disabled.
> >>
> >>...
> >>
> >>> +                       /*Set ENABLE bit before setting ABORT*/
> >
> >       /* Set ENABLE bit before setting ABORT */
> >
> >>Missing spaces
> >>
> >>...
>> 
>> >> +/*
>> >> + * This function waits controller idling before disabling I2C
>> 
>> >waits for controller
>> 
>>  + * This function waits for controller idling before disabling I2C
>> 
>> >> + * When the controller is not in the IDLE state,
> >>> + * MST_ACTIVITY bit (IC_STATUS[5]) is set.
> >>> + * Values:
> >>> + * 0x1 (ACTIVE): Controller not idle
>> >> + * 0x0 (IDLE): Controller is idle
>> >> + * The function is called after returning the end of the current 
>> >> + transfer
>> >> + * Returns:
>> 
>> >> + * False when controller is in IDLE state.
>> >> + * True when controller is in ACTIVE state.
>> 
> >>Yeah, I know that this is a copy of what I suggested, but if we going 
> >>to amend, these should be with definite article
>> 
>> > * False when the controller is in the IDLE state.
>> > * True when the controller is in the ACTIVE state.
>> 
>>  
>> 
>> >> + */
>> 
>> >...
>> 
>> >> +       return regmap_read_poll_timeout(dev->map, DW_IC_STATUS, status,
>> >> +                                      !(status & DW_IC_STATUS_MASTER_ACTIVITY),
>> >> +                                      1100, 20000) != 0;
>> 
>> >You broke the indentation again.
>> 
>> it has been indented and aligned from the web:
>> https://lore.kernel.org/all/4ebc4e8882a52620cbca30f1bf25650cbc3723fb.1
>> 726197817.git.kimriver.liu@siengine.com/
>> 
>> Thanks!
>> 
>> >--
 ------------------------------------------
 Best Regards
 Kimriver Liu

  reply	other threads:[~2024-09-13  9:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13  3:31 [PATCH v11] i2c: designware: fix controller is holding SCL low while ENABLE bit is disabled Kimriver Liu
2024-09-13  7:40 ` Andy Shevchenko
2024-09-13  8:31   ` Liu Kimriver/刘金河
2024-09-13  8:52     ` Andi Shyti
2024-09-13  9:32       ` Liu Kimriver/刘金河 [this message]
2024-09-20  8:52 ` Andi Shyti
2024-09-20  9:41   ` Liu Kimriver/刘金河

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=cf1272474d3342e88798edc77365b420@siengine.com \
    --to=kimriver.liu@siengine.com \
    --cc=andi.shyti@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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;
as well as URLs for NNTP newsgroup(s).