gpio(4), error in GPIOREAD

Rocky Hotas <[email protected]> Sat, 16 Jan 2021 11:29:33 +0100
Newsgroups gmane.os.netbsd.documentation
Message-ID <20210116102933.7m63wsmj3j7efszq@delpotro>
Hello!
gpio(4), when dealing with GPIOREAD, states:

``Returns the input pin value in the gpio_pin_op structure''

but then it specifies the structure gpio_req.

In src/sys/sys/gpio.h, in the comments to gpio_pin_op, it is considered
as ``(old API)'' and, if just declared in a test C source file, the
compiler generates an error:

error: storage size of 'mytest' isn't known
 struct gpio_pin_op mytest;
                    ^~~~~~

Instead, it all works fine when using struct gpio_req, also with
ioctl(2).
So, maybe the above sentence should be updated from

``Returns the input pin value in the gpio_pin_op structure''

to

````Returns the input pin value in the gpio_req structure''

Bye!

Rocky