Messages in this thread | | | Date | Mon, 08 Nov 2010 20:34:57 +0900 | From | Yasushi SHOJI <> | Subject | RFC: w1: Thermometer Resolution Configuration |
| |
Hello,
# I miss-spelled lkml address so here is a second try. # sorry about the noise.
I've been playing with an 1 wire device, DS18B20, and I'd like to implement a new feature, which configures the thermometer resolution on the device.
I assume that there is a few ways to do it: kernel param, module param, sysfs, etc. but, I believe a kernel param for just an w1 slave is overkill, and since w1 slave is already using sysfs, I'd like to go with sysfs for the thermometer resolution. I just want to ask you that it'd be ok to go to that direction.
If you are OK with sysfs, I'd also like to ask that it'd be better to use the current entry point, w1_slave, or create another point, say, "configure" or "resolution" for this purpose. using the current entry point is simple but we loose an ability to check the current resolution.
I'm thinking about writing resolution bit (which is 9 to 12 on DS18B20) to that entry point, so it'd be like:
echo 9 > "/sys/devices/w1_bus_master1/28-00000221bf22/resolution echo 12 > "/sys/devices/w1_bus_master1/28-00000221bf22/resolution
it seems that both DS18B20 and DS1822 has this configuration ability, but not DS1820. so we need some way to check the device before we export that entry point. adding an if in w1_therm_add_slave() should do it, i assume.
Anyway, if you have time, would you please tell me if you're ok with above or tell me if you need a proposing patch for comments for the above.
Thank you for your time, -- yashi
| |