| DS2413GPIO(4) | Device Drivers Manual | DS2413GPIO(4) |
ds2413gpio —
Driver for Maxim DS2413 1-Wire GPIO chip
ds2413gpio* at onewire?
options DS2413GPIO_EXTRA_FAMILYID 0x55
The ds2413gpio driver provides a 1-Wire to
GPIO bridge with a gpio(4) bus
at the far end using the DS2413 chip.
The DS2413 uses inverted logic for the input and output of the pins. A 1 read from the pin means that the pin is at logic 0 and a 0 read means logic 1. Likewise, writing a 0 to a pin will provide energy to the pin and a 1 will remove energy from the pin.
The driver will match the official family ID of the DS2413 chip as well as the commonly found clone family ID of 0x85. A kernel can be compiled with DS2413GPIO_EXTRA_FAMILYID to include an additional family ID that will also match.
The following sysctl(3) variables are provided:
hw.ds2413gpio0.debugDS2413GPIO_DEBUG,
this node will appear and can be used to set the debugging level.The ds2413gpio driver first appeared in
NetBSD 12.0.
The ds2413gpio driver was written by
Brad Spencer
<brad@anduin.eldar.org>.
It is not possible to tell if a pin is literally a input or output pin as both aspects are active at the same time. The driver will disallow setting a value on a pin that is set to GPIO_PIN_INPUT and will report the latched setting on a pin read instead of the pin value for pins that are set to GPIO_PIN_OUTPUT. The driver will also set a pin to supply no energy on the pin when it is set to GPIO_PIN_INPUT. This should present a situation that is more consistent with expectations at the cost of not being able to have a pin be both input and output at the same time.
| October 15, 2026 | NetBSD 11.99 |