Re: Stuck creating sysfs hooks for a driver..
From: Greg KH
Date: Thu Feb 16 2006 - 11:39:18 EST
On Thu, Feb 16, 2006 at 05:03:45PM +0530, Kaiwan N Billimoria wrote:
> One thing i'd like to point out though, Greg: the LM70 is an
> SPI/Microwire based system and not i2c; so straight away, the i2c
> interface by itself will not be used...; also, the specific board
> (LM70CILD-3, which i've written the 2.4 driver for & am now porting to
> 2.6), comes with a built-in parport interface..so that's what the driver
> takes into account of course..
That's fine, you do not have to be a i2c driver to use the hwmon
interface. There are other drivers in the drivers/hwmon/ directory
today that are not i2c drivers. It is not a requirement at all.
> Also it's a relatively simple temperature sensor - it does not seem to
> support hysteresis temperature, i/p voltages, etc. I'm saying all this
> as the sysfs interface i envision is just a simple read-only hook: the
> o/p value (after a little userspace massaging) is the temperature in
> Celsius correct to 0.25 degrees. So it looks to me that this particular
> driver necessitates a kind-of "custom" entry under /sys/class/hwmon with
> it's own userspace support. Do I move ahead in this direction?
No. Use the same names for your files as is described in the document.
If you can't provide all of the different files, that's fine, just
provide what you can. The userspace tools will handle this properly.
This also keeps you from having to write custom userspace tools for
every individual program that wants to know this information.
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/