[lkml]   [2003]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: w83781d i2c driver updated for 2.5.66 (without sysfs support)
If you rename the files and/or split multivalue files into separate
single value files, or change the format of the contents,
and continue these changes across the 30 or so "chip" drivers of ours,
you will completely blow up our libsensors library, and userspace programs.

If all the patches do is move all the files unchanged from
/proc/sys/dev/sensors/... to /sysfs/... then that change is much much easier
to incorporate in our programs.

While not all drivers conform perfectly to the our standard (link below)
(lm75 temp_os and temp_hyst don't), this is the naming and
data format standard we attempt to follow. This has evolved
over the years. If the chip drivers in the kernel
diverge from this, or even worse diverge from each other haphazardly,
we're going to end up with a mess and no usable userspace tools
for a long long time.

Please consider keeping the file names and contents unchanged.



lm_sensors /proc naming standars for sensors chip drivers:

Greg KH wrote:
> On Wed, Mar 26, 2003 at 08:40:58PM +0100, Jan Dittmer wrote:
> > Martin Schlemmer wrote:
> > >
> > >I did look at the changes needed for sysfs, but this beast have
> > >about 6 ctl_tables, and is hairy in general. I am not sure what
> > >is the best way to do it for the different chips, so here is what
> > >I have until I or somebody else can do the sysfs stuff.
> > >
> > I've just done this with the via686a driver. Saves about 100 lines of code.
> >
> > Comments?
> <snip>
> > +/* following are the sysfs callback functions */
> > +static ssize_t show_in(struct device *dev, char *buf, int nr) {
> > + struct i2c_client *client = to_i2c_client(dev);
> > + struct via686a_data *data = i2c_get_clientdata(client);
> > + via686a_update_client(client);
> > +
> > + return sprintf(buf,"%ld %ld %ld\n",
> > + IN_FROM_REG(data->in_min[nr], nr),
> > + IN_FROM_REG(data->in_max[nr], nr),
> > + IN_FROM_REG(data->in[nr], nr) );
> > +}
> We should really split these multivalue files up into individual files,
> as sysfs is for single value files. Makes parsing easier too.
> Here's a patch for the lm75.c driver that does this.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:34    [W:0.751 / U:0.672 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site