NHPOW(4) (Sandpoint)

NHPOW(4) | Kernel Interfaces Manual (Sandpoint) | NHPOW(4)

# NAME

nhpow — driver for the NH-230/231 board control GPIO pins

# SYNOPSIS

nhpow0 at mainbus0
gpio* at nhpow0

# DESCRIPTION

This driver initializes the LEDs and the fan speed during boot and establishes a reboot and power-off hook in the kernel.

nhpow also detects a soft power-off condition, which is triggered by holding the front panel power button pressed for several seconds. This driver can optionally invoke powerd(8) to get a finer control over the system shutdown procedure. It is capable of reporting a power-button-pressed event. Refer to the powerd(8) manual section for more details.

The nhpow driver provides access to its 8 bidirectional GPIO pins through the gpio(4) controller interface. The pins have the following meaning when being written:

Pin | Active level | Function
`0` | high | System power off
`1` | high | Assert system reset to all devices
`2` | low | Status LED
`3` | high | High speed fan
`4` | low | Debug LED 1
`5` | low | Debug LED 2
`6` | low | USB port 1 LED
`7` | low | USB port 2 LED

When reading, the pins have the following meaning:

Pin | Active level | Function
`0` | low | Power button pressed
`1` | low | Reset/install button pressed
`4` | high | H/W version bit 0
`5` | high | H/W version bit 1
`6` | high | H/W version bit 2
`7` | high | H/W version bit 3

nhpow attaches automatically for all NH-230/231 compatible products:

- Allnet 6250
- Allnet 6260
- Encore ENNHD-1000
- Fujitsu-Siemens AMS150
- Fujitsu-Siemens SBLAN2
- Longshine LCS-8311
- Netronix NH-230
- Netronix NH-231
- Planex NAS-01G

# SYSCTL VARIABLES

The following sysctl(3) variables are available:

machdep.nhpow.fan
  Sets the fan speed to high (1) or low (0).

# FILES

/dev/power
  event notify channel to powerd(8).

# SEE ALSO

gpio(4), gpioctl(8), powerd(8), sysctl(8)

# HISTORY

The nhpow driver first appeared in NetBSD 6.0.

# AUTHORS

The nhpow driver was written by Frank Wille.

January 15, 2012 | NetBSD 7.0