linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6 - sysfs sensor nameing inconsistency
@ 2003-07-15 18:14 Andrey Borzenkov
  2003-07-15 20:18 ` Greg KH
  0 siblings, 1 reply; 15+ messages in thread
From: Andrey Borzenkov @ 2003-07-15 18:14 UTC (permalink / raw)
  To: linux-kernel

In 2.4 all sensor chip got a subdirectory with name derived from type_name - a 
single word describing sensor, like

adm1021.c:              type_name = "max1617";
adm1021.c:              type_name = "max1617a";
adm1021.c:              type_name = "adm1021";
adm1021.c:              type_name = "adm1023";
adm1021.c:              type_name = "thmc10";
adm1021.c:              type_name = "lm84";
adm1021.c:              type_name = "gl523sm";
adm1021.c:              type_name = "mc1066";
...

etc. All user-level configuration (sensors, gkrellm) have been using these 
names to match available sensors and configuration data.

In 2.6 sensors appear under /sysfs, type_name no more used and the only 
identification available is .../name, but it seems to be arbitrary chosen 
like

- single word ("it87") - lm87.c
- "name chip" or "name subclient" - most others (lm78.c, wd83781d.c etc)
- completely arbitrary shiny description - "Generic LM85", "National LM85-B" 
etc in lm85.c

This means, any user program accessing sensors need incompatible changes and 
comfiuration cannot be shared between 2.4 and 2.6 without serious redesign 
and/or some translation layer.

If there are serious reasons to keep current names in "name" - what about 
adding extra type_name property that will hold type_name compatible with 2.4, 
at least for those drivers that are also available there. This would allow 
easily reuse existing sensors configuration.

TIA

-andrey

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: 2.6 - sysfs sensor nameing inconsistency
@ 2003-07-27  4:42 Margit Schubert-While
  0 siblings, 0 replies; 15+ messages in thread
From: Margit Schubert-While @ 2003-07-27  4:42 UTC (permalink / raw)
  To: linux-kernel

 > Attached is patch against 2.6.0-test1 that adds type_name to all in-tree
 > sensors; it sets it to the same values as corr. 2.4 senors and (in one case)
 > changes client name to match that of 2.4.

Well, it certainly doesn't with the lm85.c  :-)
Hint - names are in lib/chips.h in sensors package :-)

Although, I will be working over lm85.c in the next week or so.

 > +static const char *type_name = "";
 > +static ssize_t show_type_name(struct device *dev, char *buf)
 > +{
 > + return sprintf(buf, "%s\n", type_name);
 > +}
 > +static DEVICE_ATTR(type_name, S_IRUGO, show_type_name, NULL);

 > - const char *type_name = "";

 > + device_create_file(&new_client->dev, &dev_attr_type_name);



Margit 


^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: 2.6 - sysfs sensor nameing inconsistency
@ 2003-07-27  6:23 Andrey Borzenkov
  0 siblings, 0 replies; 15+ messages in thread
From: Andrey Borzenkov @ 2003-07-27  6:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Margit Schubert-While

>> Attached is patch against 2.6.0-test1 that adds type_name to all in-tree
>> sensors; it sets it to the same values as corr. 2.4 senors and (in one 
case)
>> changes client name to match that of 2.4.
>
> Well, it certainly doesn't with the lm85.c  :-)
> Hint - names are in lib/chips.h in sensors package :-)

It was my fault I should not start changing names, sorry. Sometimes this 
happens.

If this patch is accepted it is OK though, we may change other names to be 
more user-friendly as well.

-andrey

Please Cc me I am not on lkml



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

end of thread, other threads:[~2003-11-02 18:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-15 18:14 2.6 - sysfs sensor nameing inconsistency Andrey Borzenkov
2003-07-15 20:18 ` Greg KH
2003-07-26 18:00   ` Andrey Borzenkov
2003-08-15 20:51     ` Greg KH
2003-08-16 15:38       ` Andrey Borzenkov
2003-08-16 16:50         ` Greg KH
2003-08-18 16:49           ` Andrey Borzenkov
2003-08-18 21:31             ` Greg KH
2003-08-19 19:19           ` Andrey Borzenkov
2003-08-19 19:45             ` Greg KH
2003-08-31 16:25               ` Andrey Borzenkov
2003-09-22 22:29                 ` Greg KH
2003-11-02 18:50                   ` Andrey Borzenkov
2003-07-27  4:42 Margit Schubert-While
2003-07-27  6:23 Andrey Borzenkov

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).