MFC r349883: owc_gpiobus: small formatting cleanup
MFC r349428,r349433: owc_gpiobus: clean / fix up the driver module things"fdt" is removed from the driver module name as the driver does notrequire FDT and can work very well on hints based system
MFC r349428,r349433: owc_gpiobus: clean / fix up the driver module things"fdt" is removed from the driver module name as the driver does notrequire FDT and can work very well on hints based systems.A module dependency is added for gpiobus. Without that owc cannotresolve symbols in gpiobus if both are loaded as kernel modules.Finally, a driver module module version is added.
show more ...
[ofw] fix errneous checks for OF_finddevice(9) return valueOF_finddevices returns ((phandle_t)-1) in case of failure. Some codein existing drivers checked return value to be equal to 0 orless/equ
[ofw] fix errneous checks for OF_finddevice(9) return valueOF_finddevices returns ((phandle_t)-1) in case of failure. Some codein existing drivers checked return value to be equal to 0 orless/equal to 0 which is also wrong because phandle_t is unsignedtype. Most of these checks were for negative cases that were nevertriggered so trhere was no impact on functionality.Reviewed by: nwhitehornMFC after: 2 weeksDifferential Revision: https://reviews.freebsd.org/D14645
Add inline functions to convert between sbintime_t and decimal time units.Use them in some existing code that is vulnerable to roundoff errors.The existing constant SBT_1NS is a honeypot, luring u
Add inline functions to convert between sbintime_t and decimal time units.Use them in some existing code that is vulnerable to roundoff errors.The existing constant SBT_1NS is a honeypot, luring unsuspecting folks intowriting code such as long_timeout_ns*SBT_1NS to generate the argument for asleep call. The actual value of 1ns in sbt units is ~4.3, leading to alarge roundoff error giving a shorter sleep than expected when multiplyingby the trucated value of 4 in SBT_1NS. (The evil honeypot aspect becomesclear after you waste a whole day figuring out why your sleeps return early.)
ow_temp: Update the temperature visible via the sysctl atomically, ratherthan using it as temporary calculation space.
ow_temp: Correct typo in comment
Don't repeat the the word 'the'(one manual change to fix grammar)Confirmed With: dbApproved by: secteam (not really, but this is a comment typo fix)
dev/ow: Tag an unreachable switch default.Coverity reports an uninitialized "dir" in case the switch defaultswithout hitting any case. Respect the original intent and quell thefalse positive with
dev/ow: Tag an unreachable switch default.Coverity reports an uninitialized "dir" in case the switch defaultswithout hitting any case. Respect the original intent and quell thefalse positive with the relatively new __unreachable() builtin.CID: 1331566
Cleanup unnecessary semicolons from the kernel.Found with devel/coccinelle.
Simply to appease gcc's warnings.
New 1-Wire bus implementation. 1-Wire controller is abstracted, thoughonly gpiobus configured via FDT is supported. Bus enumeration issupported. Devices are created for each device found. 1-Wirete
New 1-Wire bus implementation. 1-Wire controller is abstracted, thoughonly gpiobus configured via FDT is supported. Bus enumeration issupported. Devices are created for each device found. 1-Wiretemperature controllers are supported, but other drivers could bewritten. Temperatures are polled and reported via a sysctl. Errorsare reported via sysctl counters. Mis-wired bus detection is includedfor more trouble shooting. See ow(4), owc(4) and ow_temp(4) fordetails of what's supported and known issues.This has been tested on Raspberry Pi-B, Pi2 and Beagle Bone Blackwith up to 7 devices.Differential Revision: https://reviews.freebsd.org/D2956Relnotes: yesMFC after: 2 weeksReviewed by: loos@ (with many insightful comments)