On Tue, Nov 4, 2014 at 5:12 PM, Rojhalat Ibrahim <imr@xxxxxxxxxxx> wrote: > Introduce new functions gpiod_set_array & gpiod_set_raw_array to the consumer > interface which allow setting multiple outputs with just one function call. > Also add an optional set_multiple function to the driver interface. Without an > implementation of that function in the chip driver outputs are set > sequentially. > > Implementing the set_multiple function in a chip driver allows for: > - Improved performance for certain use cases. The original motivation for this > was the task of configuring an FPGA. In that specific case, where 9 GPIO > lines have to be set many times, configuration time goes down from 48 s to > 20 s when using the new function. > - Simultaneous glitch-free setting of multiple pins on any kind of parallel > bus attached to GPIOs provided they all reside on the same chip and bank. > > Limitations: > Performance is only improved for normal high-low outputs. Open drain and > open source outputs are always set separately from each other. Those kinds > of outputs could probably be accelerated in a similar way if we could > forgo the error checking when setting GPIO directions. > > Signed-off-by: Rojhalat Ibrahim <imr@xxxxxxxxxxx> > Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx> > Reviewed-by: Mark Brown <broonie@xxxxxxxxxx> OK let's do this. Patch applied! Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html