Indeed - gpio_line_set_values() could pass the bits field direct to the kernel unaltered in the linevals->bits. The kernel ignores any bits where the mask bit is not set or any bits beyond the number of lines requested.I did scratch my head over the logic operations in function gpio_line_set_values. It seems to turn everything on or everything off. In fact, that's what it does on my system. You might not have noticed if you only had one LED.
As written, that parameter should be called value, not bits - it applies that value to all lines set in the mask. To be fair, that is what the func docs say:
Code:
* @param bits gpio value to write (0 - LO, 1 - HI) to set bit in linereq->bits for bits specified in mask.
Statistics: Posted by warthog618 — Tue Sep 17, 2024 6:34 am