Repository navigation
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (16.7%) is below the target coverage (60.0%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #71 +/- ##
=======================================
+ Coverage 27.2% 27.6% +0.4%
=======================================
Files 96 96
Lines 11834 9481 -2353
=======================================
- Hits 3220 2613 -607
+ Misses 8479 6733 -1746
Partials 135 135 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| func (d *driverGPIO) Prerequisites() []string { | ||
| return []string{"ioctl-gpio"} | ||
| return nil |
There was a problem hiding this comment.
If there's really some dependency on ioctl-gpio we could move it to the After() below...!?
There was a problem hiding this comment.
good question. I think moving into After is the right call.
Includes new unit test that are conditionally compiled on linux. Mock in case of no chip available.
|
feedback on this issue would be appreciated. |
The ioctl-gpio driver was declared a prerequisite of the sysfs-gpio driver. But since on older Linux kernels (earlier than 5.10) the GPIO v2 interface is not yet available. Therefore, the ioctl-gpio driver is not available for such systems. To still support the sysfs access for those make the ioctl-gpio driver independent of the sysfs-gpio driver. Note: the ioctl-gpio driver is still attempted to load.
23180a3 to
3d495b0
Compare
The ioctl-gpio driver was declared a prerequisite of the sysfs-gpio driver. But since on older Linux kernels (earlier than 5.10) the GPIO v2 interface is not yet available. Therefore, the ioctl-gpio driver is not available for such systems. To still support the sysfs access for those make the ioctl-gpio driver independent of the sysfs-gpio driver.
Note: the ioctl-gpio driver is still attempted to load.
This renders #39 (implemented in #59) a bit more backwards compatabile.
Background: we're using periph.io on our embedded Linux with kernel 5.4.193. It was all working fine until we recently upgraded the
hostpackage from 3.8.2 to 3.8.5. Suddenly nothing was working anymore. We noticed the error is in the initialization of the ioctl-gpio driver which uses the GPIO v2 interface, which is not yet available on our kernel. Since we only use the sysfs-gpio driver we removed the dependency on ioctl-gpio and all was working fine again. Therefore, I guess more people would want to have backwards compatibility (in particular since the change was introduced in 3.8.2 -> 3.8.3 which is supposed to be non-breaking, I guess).