Page MenuHomeFreeBSD

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

Authored by mizhka_gmail.com 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
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

mizhka_gmail.com retitled this revision from to [gpioths] add kernel modules and correct few issues.Jan 20 2017, 6:27 AM
mizhka_gmail.com updated this object.
mizhka_gmail.com edited the test plan for this revision. (Show Details)
mizhka_gmail.com added reviewers: adrian, rpokala, joel.
mizhka_gmail.com set the repository for this revision to rS FreeBSD src repository.
mizhka_gmail.com added subscribers: rpokala, joel.
mizhka_gmail.com updated this revision to Diff 24225.
rpokala added inline comments.Jan 20 2017, 10:24 PM
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