> From: Sven-Volker Nowarra <[email protected]> > Date: Sun, 16 Feb 2014 14:43:07 +0100 > > Hi, > > I am currently extending my asmc driver (in kernel) to listen to a > userland utility (asmcctl).
In general we don;t encourage device-specific control utilities in OpenBSD; instead we try to provide generic utilities that work across an entire class of devices. For example bioctl(8) supports several hardware raid devices in a uniform way. And... > I want to be able to e.g. tell the kernel asmc driver to > increase/decrease backlight. Now I need to get this "brightness > integer" from userland (everybody should be able to do this without > privilegdes) to the kernel module. ...for controlling the display backlight the appropriate utility is wsconsctl: $ wsconsctl display.brightness display.brightness=100.00% $ wsconsctl display.brightness=50 display.brightness -> 50.00% To make this work, your driver has to provide the ws_get_param and ws_set_param hooks. An example can be found in sys/dev/acpi/acpitoshiba.c, which hooks up the non-standard ACPI mechanism found on some Toshiba laptops.
