Skip to contentSkip to conversation

sensors shows uninteresting chips

DISCUSSION Jean Delvare 3 participants 4 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

Hi all,

The sensors program displays all i2c chips it'll find even the ones that do not have sensors interface. For example, I have a DC10+ capture board, and sensors will display entries for the adv7176 and the saa7110 that live on it. This has no interest and sensors would better keep quiet about them IMHO.

For this reason, I plan to add a command line switch to ignore unknown chips. But I'm wondering if displaying them should still be the default, or if we should hide them by default (thus the switch would show them again). Since I don't see any interest in showing them, I'd opt for the second choice, but sometimes you have reasons I ignore. I remember I once proposed to hide adapters and algorithms by default, without realizing how valuable it was when it comes to helping users in support tickets and on the mailing-list. Maybe there's something similar for unknown chips? Can't think of anything, but maybe one of you will.

Thanks.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#1 lore raw
Quoted 5 lines · Jean Delvare

The sensors program displays all i2c chips it'll find even the ones that do not have sensors interface. For example, I have a DC10+ capture board, and sensors will display entries for the adv7176 and the saa7110 that live on it. This has no interest and sensors would better keep quiet about them IMHO.

I am very impressed with the flexibility of driver-model in 2.6, and urge you to read lk/Documentation/driver-model/. As a long term solution, I propose:

1. Declare class sensors

Any device that is considered to "measure" something, would register itself as a class device. Could be i2c, isa, ipmi, usb, smart. We could remove dependency to i2c where it is really not the actual access to hardware, like in via686a. The class device does not directly export data to sysfs.

2. Declare interface(s) for class sensors

One interface is to put data out via sysfs. You may invent another and code it just once for every device of this class.

Back to your question. A device tree for class sensors would not have those uninteresting i2c chips, and it would contain all other sensor devices (not on any i2c bus).

Signature · 1 line
  Ky?sti M?lkki  <[email protected]>  +358 50 462 8786
#2 lore raw
In reply to Jean Delvare
Quoted 2 lines

It tells us we forgot to add support to 'sensors' so that's one reason to leave it the way it is.

Isn't the missing output enough to make you realize you forgot it? We don't add new chips that often, and I'm sure people will remind us if we forget.

On the other hand, more and more people have video stuff on their i2c busses these days, that sensors will display as unknown chips. So I still pretend we should at least provide a way to hide them, and should I be the one to decide, I would make it the default.

That default could be reverted later if we are ever able to select chips by class in 2.6, as Ky?sti mentioned.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#3 lore raw
In reply to Jean Delvare

It tells us we forgot to add support to 'sensors' so that's one reason to leave it the way it is.

Quoted 24 lines · Jean Delvare

Hi all,

The sensors program displays all i2c chips it'll find even the ones that do not have sensors interface. For example, I have a DC10+ capture board, and sensors will display entries for the adv7176 and the saa7110 that live on it. This has no interest and sensors would better keep quiet about them IMHO.

For this reason, I plan to add a command line switch to ignore unknown chips. But I'm wondering if displaying them should still be the default, or if we should hide them by default (thus the switch would show them again). Since I don't see any interest in showing them, I'd opt for the second choice, but sometimes you have reasons I ignore. I remember I once proposed to hide adapters and algorithms by default, without realizing how valuable it was when it comes to helping users in support tickets and on the mailing-list. Maybe there's something similar for unknown chips? Can't think of anything, but maybe one of you will.

Thanks.

--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/