All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
To: "Janusz Użycki" <j.uzycki-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Subject: Re: [PATCH 2/2] i2c-mxs: fixed PIO NACK error instead of timeout
Date: Tue, 9 Sep 2014 20:59:26 +0200	[thread overview]
Message-ID: <201409092059.26410.marex@denx.de> (raw)
In-Reply-To: <540F1734.6090700-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>

On Tuesday, September 09, 2014 at 05:05:24 PM, Janusz Użycki wrote:

[...]

> >> If it is too fast a slave has possibility to inform by setting SCL low.
> > 
> > Do you mean clock stretching ?
> 
> Yes, I didn't notice it is the same.

OK

> >> However I haven't seen any driver which supports the method.
> >> 
> >>>> |Checking CTRL1_NO_SLAVE_ACK_IRQ |bit for SELECT command will increase
> >>>> 
> >>>> code size only
> >>>> without special profit. Current PIO implementation also gathers all
> >>>> errors together and reads them on the end by
> >>>> mxs_i2c_pio_check_error_state(). Probably
> >>>> mxs_i2c_pio_check_error_state() call or
> >>>> enabling interrupt masks for PIO could be better than
> >>>> direct |CTRL1_NO_SLAVE_ACK_IRQ |bit checking for clear code.
> >>>> It also could support multimaster for PIO (MASTER_LOSS).
> >>> 
> >>> Actually, the PIO is explicitly IRQ-less and is used only for
> >>> transferring very short amounts of data.
> >> 
> >> Yes but error service could be more common probably.
> > 
> > Feel free to prepare a patch please!
> 
> On the moment the fix is enough for me. I did need i2cdetect to work.

You should be really careful here. Please note that the I2C is not a PnP bus and 
probing the I2C might have adverse effect on various devices attached to the 
bus.

> I looked on 2.6.35 FSL BSP. There both DMA and PIO mode use status
> interrupt and cmd_complete. It was changed to speed up?

Yes, esp. in short transfers.

Best regards,
Marek Vasut

  parent reply	other threads:[~2014-09-09 18:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 18:04 [PATCH 1/2] i2c-mxs: debug error message: second SELECT -> READ Janusz Użycki
     [not found] ` <540DEFA6.9030600-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-08 18:06   ` [PATCH 2/2] i2c-mxs: fixed PIO NACK error instead of timeout Janusz Użycki
     [not found]     ` <540DF014.5000508-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-08 18:33       ` Marek Vasut
     [not found]         ` <201409082033.58959.marex-ynQEQJNshbs@public.gmane.org>
2014-09-09  9:27           ` Janusz Użycki
     [not found]             ` <540EC808.6060407-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-09 12:48               ` Marek Vasut
     [not found]                 ` <201409091448.40115.marex-ynQEQJNshbs@public.gmane.org>
2014-09-09 13:10                   ` Janusz Użycki
     [not found]                     ` <540EFC41.9070106-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-09 13:59                       ` Marek Vasut
     [not found]                         ` <201409091559.24900.marex-ynQEQJNshbs@public.gmane.org>
2014-09-09 15:05                           ` Janusz Użycki
     [not found]                             ` <540F1734.6090700-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-09 18:59                               ` Marek Vasut [this message]
2014-09-08 18:14   ` [PATCH 1/2] i2c-mxs: debug error message: second SELECT -> READ Marek Vasut
     [not found]     ` <201409082014.07749.marex-ynQEQJNshbs@public.gmane.org>
2014-09-09  8:16       ` [PATCH 1/2] i2c-mxs: fixed error message in pio transfer Janusz Użycki
     [not found]         ` <540EB762.8090509-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-09 12:36           ` Marek Vasut

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=201409092059.26410.marex@denx.de \
    --to=marex-ynqeqjnshbs@public.gmane.org \
    --cc=j.uzycki-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /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.