Re: [PATCH i2c-tools v2] i2cdetect: add messages for errors during bus listing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2023-06-14 at 23:31 +0200, Wolfram Sang wrote:

> Hmm, I wonder if a simple "Is it mounted?" isn't enough?

It depends on the sophistication and mental state you want to require
from i2cdetect users. Some i2cdetect users might not know or currently
remember the exact commands needed to fix their issues. Personally, I
haven't memorised how to mount these directories, so I would need to go
look up the documentation. Others might go ask mailing lists, search
engines or AI assistants if they are online. So as I said on the Debian
ARM list, since the issues all have very simple solutions, I added the
commands to fix them instead of pointers to documentation about each
error, or expecting users to know about them. Given that the RPi has
lead to a large influx of users with potentially little Linux
experience doing GPIO stuff, this patch could reduce support requests.

https://lists.debian.org/msgid-search/8e2bfcf0375433acec188bbbf11fa9117076fe6b.camel@xxxxxxxxxx

Please don't merge this just yet though; thinking about this more
and reading the Debian thread a bit more, I think I want to send
a v3 patch that also tells users that pass the wrong i2c bus number
to run `i2cdetect -l` to find the right bus.

https://lists.debian.org/msgid-search/e496b7d9-e047-43df-9fe3-f65bdc37bf93@xxxxxxxxxxxxxxxx
https://lists.debian.org/msgid-search/E1poJwd-0002Go-RM@xxxxxxxxxxxx


> If there are no devices_present here, then we fail without printing
> something? Is this intended?

There wouldn't be a failure, just exit without printing any busses and
without printing any error messages. Perhaps it should a print no
busses found error message in that case instead?

> Yes, for rare cases this could mean that loading "i2c-dev" does not
> solve the problem, but using i2ctools without i2c-dev is going to fail
> at some point anyhow, so IMHO we can complain about this early?

Sure, but that wouldn't necessarily be very user-friendly.

If there are no i2c busses present in the other i2c directories (which
IIRC are always present), then there are no i2c busses on the system
and so loading i2c-dev will not make i2cdetect print any busses, so
loading i2c-dev is pointless, so we don't ask the user to do that,
because it would be frustrating to be asked to do something that will
then not mean any change in the situation, aka zero devices output.

-- 
bye,
pabs

https://bonedaddy.net/pabs3/

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux