Page MenuHomeFreeBSD

[gpioths] add kernel modules and correct few issues
Needs ReviewPublic

Authored by mizhka on Jan 20 2017, 6:27 AM.

Details

Summary

Hi,

This patch adds kernel module for gpioths driver to avoid change of kernel configuration (thanks to @joel for idea).
Also it fixes following issues:

  • typo in comment: no more -> no less (thanks to @rpokala)
  • stop callout in function gpioths_detach() (issue found during kldunload testing)
  • add critical_enter/exits to avoid preemption (thanks to Maxim Logunov, <spitty.pnz at gmail.com>)

ToDo:

  • man page
  • find way how to set hints without kernel conf change
Test Plan

Tested on Onion Omega.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

mizhka retitled this revision from to [gpioths] add kernel modules and correct few issues.
mizhka updated this object.
mizhka edited the test plan for this revision. (Show Details)
mizhka added reviewers: adrian, rpokala, joel.
mizhka set the repository for this revision to rS FreeBSD src repository - subversion.
mizhka added subscribers: rpokala, joel.
sys/dev/gpio/gpioths.c
216

Was removal of DELAY(1); intentional?

373

How were they removed?

sys/modules/gpio/gpioths/Makefile
32

There seems to be a preference for using ${SRCTOP} rather than ${.CURDIR}. So:

.PATH: ${SRCTOP}/sys/dev/gpio

37

Similarly:

CFLAGS+= -I. -I${SRCTOP}/sys/dev/gpio