From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Stach Subject: Re: [PATCH 1/3] i2c: mxs: always end a transfer with a proper STOP Date: Mon, 15 Apr 2013 09:50:57 +0200 Message-ID: <1366012257.4122.2.camel@weser.hi.pengutronix.de> References: <1363261750-26645-1-git-send-email-l.stach@pengutronix.de> <20130408172147.GB6865@the-dreams.de> <1365492362.4131.9.camel@weser.hi.pengutronix.de> <20130409083252.GA3624@the-dreams.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130409083252.GA3624-z923LK4zBo2bacvFa/9K2g@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Wolfram Sang Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Marek Vasut , "Ben Dooks (embedded platforms)" , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= List-Id: linux-i2c@vger.kernel.org Hi Wolfram, Am Dienstag, den 09.04.2013, 10:32 +0200 schrieb Wolfram Sang: > Hi, > > > A restart transfer is when you just repeat the START condition, without > > putting the device address on the bus again. > > Well, never heard this term before. Where did you get it from? > > > In the MXS driver we put the device address on the bus for every > > transaction we get handed in from the i2c core, so there is never a > > situation where we just repeat the start condition without sending out > > the device address. Before this patch we would not match every > > transaction, but only the last in the list of pending ones, with a STOP > > condition, which is a violation of the spec. > > I still don't get it. You can drop a STOP if you replace it with > a repeated start. In fact, this is crucial in multi-master setups, > otherwise another master could break into your transfer containing > multilple messages. So, if MXS does the right thing on sending START > (doing a correct start sequence), we should not send STOP. If it needs > the STOP to create a correct START, then be it. But then, I'd wonder why > it worked so far... > Ok, I looked this up again and got a nice explanation by Uwe and it seems I based this patch on a wrong interpretation of the spec on my side. I'll resend without this one. Regards, Lucas -- Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |