Messages in this thread | | | From | Evgeniy Polyakov <> | Subject | Re: [PATCH v3 2/5] w1_therm: adding sysfs entry to check device power | Date | Wed, 29 Apr 2020 18:18:14 +0300 |
| |
Hi
29.04.2020, 16:47, "Greg KH" <greg@kroah.com>:
>> +What: /sys/bus/w1/devices/.../w1_slave >> +Date: Apr 2020 >> +Contact: Akira Shimahara <akira215corp@gmail.com> >> +Description: >> + (RW) return the temperature in 1/1000 degC. >> + *read*: return 2 lines with the hexa output data sent on the >> + bus, return the CRC check and temperature in 1/1000 degC > > the w1_slave file returns a temperature??? > > And sysfs is 1 value-per-file, not multiple lines.
It was 'content crc' previously, and probably a good idea would be to add just one file with 'content'
> And as this is a temperature, what's wrong with the iio interface that > handles temperature already? Don't go making up new userspace apis when > we already have good ones today :)
What is that? w1 always had a sysfs files for its contents whether it is converted temperature or raw bytes data, there is also netlink interface which is there since the day one.
>> + *write* : >> + * `0` : save the 2 or 3 bytes to the device EEPROM >> + (i.e. TH, TL and config register) >> + * `9..12` : set the device resolution in RAM >> + (if supported) > > I don't understand these write values, how do they match up to a > temperature readin?
You kind of writing to device about how to convert its raw content into readable content, which will eventually become a temperature
| |