On 05/18/2009 11:37 AM, Andre Prendel wrote: > Having a closer look at the datasheet > > http://focus.ti.com/docs/prod/folders/print/tmp411.html > > , I've seen two ways to reset the history. > > 1. Writing any value to the history registers (0x30-0x37). That should > reset all these registers. I've attached a patch (delta) doing this. Hans, > could you please test this one. echo "1"> .../temp_reset_history > should reset the history for tempX_lowest (0xFFF0) and tempX_highest (0x0000). > > 2. SOFTWARE RESET > > Writing the first e-mail I meant this command in my question. You can > find it in datasheet under SOFTWARE RESET. This command restores the > power-on values to all registers (including limits etc.). > > I'd prefer 1. for reseting the history. That's what I'd expect from > temp_reset_history. > Ack, I think 1 is much better too. > BTW, what about write-only attributes? I've seen a reset functionality > in the fscpos driver (so I did it like that). show_temp_reset always > returns 1. Using WO attributes could make more sense, but in > sysfs-interface I can only see RO and RW. > The fscpos driver is an old obsolete driver, so not the best place to look for inspiration. I think that using 0200 as rights for something like temp_reset_history makes perfect sense. I've tested you're latest patch and temp_reset_history works as advertised. If you fix the mode for the temp_reset_history, and do a new patch adding docs, then I think this is good to go to Jean's tree for merging into 2.6.31. Jean do you agree? Regards, Hans