Use correct resolution by compat table. If dtb is not defined use default 9 bit mode.
11 bit detection is called if 9 bit mode is used.
Sysctl resolution variable is added to change resolution in case.
Some sensors didn't pull ACK while reading from nonexistent registers and it caused I2C read error and detect failure, so now detect failure does not cause driver break.
Details
Details
- Reviewers
wma kd loos mw - Commits
- rGda3557899886: lm75: Refactor code to fix io error
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/dev/iicbus/lm75.c | ||
---|---|---|
272 | blank line, remove | |
315–322 | I would invert logic here. If lm75_type_detect fails, use width guessed by fdt compat - that method is the one which we trust the least. If there is no fdt then fail immediately. | |
318 | Anyway, I think it would be much more meaningful to always print number of bits detected. Right now we've got two ways of resolving that number (plus sysctl to change it) so the user should always know what had been set automatically. |