Messages in this thread | | | Date | Tue, 8 Sep 2015 16:49:04 +0300 | Subject | Re: [PATCH v3] Documentation: add Device tree bindings for hwmon/nct7802 | From | Constantine Shulyupin <> |
| |
> Sure, but why do you need _raw_ register values? > > Why can you not encode this in the DT in a manner that describes what is > connected to this device, then have the kernel figure out any particular > values that need to be poked into registers? > > That'll be easier to read, and it's far more likely people will get > things correct in a dts. > > Mark.
Theoretically it is possible to use function store_temp_type https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/hwmon/nct7802.c#n87 to set sensors types. With ABI codes: 3 - thermal diode 4 - thermistor
But: - Sensor type could be also voltage and is mapped to in_input attributes. Generic code would be over complicated. - For low level programmers and PCB engineers is much more comfortable and error safe to works with datasheets, registers and bits than with fancy "human readable" configuration. - Mapping between raw bits and ABI is not intuitive. More simple and directed configuration is preferable.
-- Thanks Constantine
| |