All of lore.kernel.org
 help / color / mirror / Atom feed
* i2c/isa command line tools
@ 2005-05-19  6:25 Jean Delvare
  2005-05-19  6:25 ` Mark Studebaker
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jean Delvare @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

Hi all,

I plan to operate the following changes on isaset and i2cset:
1* Add an optional mask to the byte being written.
2* Remove the 5 second delay.

The idea is that these tools should be usable to fix broken
configurations or tweak the chips above what drivers do.

In that respect we may need i2cget and isaget someday.

While we're at it I guess we could remove the 5 second delay from the
other tools as well (i2cdump, isadump and even i2cdetect). I doubt it
really helps. Who reads and understands the command summary anyway? If
you didn't take care of what you typed, there's no reason you will care
much about what the program says.

Objections?

-- 
Jean "Khali" Delvare
http://khali.linux-fr.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* i2c/isa command line tools
  2005-05-19  6:25 i2c/isa command line tools Jean Delvare
@ 2005-05-19  6:25 ` Mark Studebaker
  2005-05-19  6:25 ` Jean Delvare
  2005-05-19  6:25 ` Jean Delvare
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Studebaker @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

I was thinking, instead, about an option we could add to all the tools
(say -y for "yes") that would skip the warning and the delay.
This would make the tools better for use in scripts.


Jean Delvare wrote:
> Hi all,
> 
> I plan to operate the following changes on isaset and i2cset:
> 1* Add an optional mask to the byte being written.
> 2* Remove the 5 second delay.
> 
> The idea is that these tools should be usable to fix broken
> configurations or tweak the chips above what drivers do.
> 
> In that respect we may need i2cget and isaget someday.
> 
> While we're at it I guess we could remove the 5 second delay from the
> other tools as well (i2cdump, isadump and even i2cdetect). I doubt it
> really helps. Who reads and understands the command summary anyway? If
> you didn't take care of what you typed, there's no reason you will care
> much about what the program says.
> 
> Objections?
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* i2c/isa command line tools
  2005-05-19  6:25 i2c/isa command line tools Jean Delvare
  2005-05-19  6:25 ` Mark Studebaker
@ 2005-05-19  6:25 ` Jean Delvare
  2005-05-19  6:25 ` Jean Delvare
  2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

> I was thinking, instead, about an option we could add to all the tools
> (say -y for "yes") that would skip the warning and the delay.
> This would make the tools better for use in scripts.

I thought of that at first too, but it isn't trivial. Command line
parsing in these tools is tricky and adding such a flag will make things
even more complex. This may be worth the pain if someone really enjoys
the "interactive" mode, but if not, I guess we don't want to keep it.

So what I propose is to surround the "interactive" code in i2cset and
isaset with #ifdef INTERACTIVE/#endif instead of really deleting it.
This allows people who want it to enable that "feature". In case we
later switch to a more advanced command line parsing, we'll propose a
switch instead.

I would also suggest not to print anything on success in non-interactive
mode. Seems that it is a common unix practice to keep quiet when
everything's fine.

The mask is something different which can be implemented in any case.

Thanks.

-- 
Jean "Khali" Delvare
http://khali.linux-fr.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* i2c/isa command line tools
  2005-05-19  6:25 i2c/isa command line tools Jean Delvare
  2005-05-19  6:25 ` Mark Studebaker
  2005-05-19  6:25 ` Jean Delvare
@ 2005-05-19  6:25 ` Jean Delvare
  2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

> > I was thinking, instead, about an option we could add to all the
> > tools(say -y for "yes") that would skip the warning and the delay.
> > This would make the tools better for use in scripts.
> 
> I thought of that at first too, but it isn't trivial. Command line
> parsing in these tools is tricky and adding such a flag will make
> things even more complex. This may be worth the pain if someone really
> enjoys the "interactive" mode, but if not, I guess we don't want to
> keep it.
> 
> So what I propose is to surround the "interactive" code in i2cset and
> isaset with #ifdef INTERACTIVE/#endif instead of really deleting it.
> This allows people who want it to enable that "feature". In case we
> later switch to a more advanced command line parsing, we'll propose a
> switch instead.
> 
> I would also suggest not to print anything on success in
> non-interactive mode. Seems that it is a common unix practice to keep
> quiet when everything's fine.

I gave it a try. Only isaset and isadump were changed so far.
1* Wait for user confirmation instead of the arbitrary 5 sec delay.
2* Can be skipped with -y.

Please test and comment. If it's OK I'll continue with the 3 remaining
tools.

Thanks.

-- 
Jean "Khali" Delvare
http://khali.linux-fr.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-19  6:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:25 i2c/isa command line tools Jean Delvare
2005-05-19  6:25 ` Mark Studebaker
2005-05-19  6:25 ` Jean Delvare
2005-05-19  6:25 ` Jean Delvare

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.