linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Jean Delvare <jdelvare@suse.de>,
	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Subject: Re: [i2c-tools PATCH v2] i2ctransfer: add new tool
Date: Mon, 13 Mar 2017 13:28:59 +0100	[thread overview]
Message-ID: <20170313122859.GA1439@katana> (raw)
In-Reply-To: <20170313120725.43uy64azuixdt5qz@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]


> > > > +.RI [ data ]
> > > > +.RI [ desc
> > > > +.RI [ data ]]
> > > 
> > > You could join the previous two lines.
> > 
> > Try it. You will miss some spaces, then.
> 
> It works fine with quoting:
> 
> 	.RI [ "desc " [ data "]] ..."
> 
> . But ok, it's at least arguable if this is better than your solution.

I prefer my solution ;)

> > I wonder: will another I2C master start a transfer on a repeated start?
> > Need to investigate.
> 
> I'd say it must not. It should have logic to detect bus busy and delay
> any transfers until the bus becomes idle. With a repeated start the bus
> doesn't become idle between two transfers.

I totally agree. However, I think I'll try to stress-test a little when
I use my scope next time. Just to have some real world experiences...

> ah, ok. BTW, I like tools that clean up after themselves. This way
> debugging is much easier if you look for lost memory. And yes, this
> doesn't matter much for short-living programs like i2c-tools, but I like
> being consistent here and also do the cleanup for this this type of
> program.

I see this point. And I see that the program became quite more complex
which makes future modifications more error prone. Your exit path
consolidation suggestion was a good example for that. But anayway, the
cleanup is there now, hope you'll all be happy :)


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2017-03-13 12:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 14:29 [i2c-tools PATCH v2] i2ctransfer: add new tool Wolfram Sang
2017-03-06 15:33 ` Geert Uytterhoeven
2017-03-06 17:26   ` Wolfram Sang
2017-03-06 19:50 ` Uwe Kleine-König
2017-03-13 11:01   ` Wolfram Sang
2017-03-13 12:07     ` Uwe Kleine-König
2017-03-13 12:28       ` Wolfram Sang [this message]

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=20170313122859.GA1439@katana \
    --to=wsa@the-dreams.de \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=jdelvare@suse.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wsa+renesas@sang-engineering.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).