# Efficient PS\<-\>PL GPIO

**URL:** <https://discuss.pynq.io/t/efficient-ps-pl-gpio/812>\
**Category:** Support\
**Created:** [December 30, 2019, 9:25pm UTC](https://discuss.pynq.io/t/efficient-ps-pl-gpio/812 "2019-12-30T21:25:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://discuss.pynq.io/u/frank)\
**Post date:** [December 30, 2019, 9:25pm UTC](https://discuss.pynq.io/t/efficient-ps-pl-gpio/812/1 "2019-12-30T21:25:26Z")

</div>

Hi,

I have enabled the EMIO GPIO in my overlay and used it to connect to my PL. Unfortunately the GPIO class forces me to read and write all data one bit (resp. pin) at a time. That is really very unfortunate, and somewhat vexing. I expected to be able to read/write 32 pins at a time. How do I make this work?

Kind regards, Frank

---

<div class="post-metadata">

**Author:** ![PeterOgden](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/peterogden/32/55_2.png) [@PeterOgden](https://discuss.pynq.io/u/PeterOgden)\
**Post date:** [January 2, 2020, 12:12pm UTC](https://discuss.pynq.io/t/efficient-ps-pl-gpio/812/2 "2020-01-02T12:12:18Z")

</div>

This is a limitation of the kernel driver that PYNQ uses to interact with the GPIO pins. There is a newer kernel API that is available in some of the more recent PYNQ images that potentially offers the ability to set multiple pins simultaneously. There is a user-space library called [libgpiod](https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/) that has Python bindings and uses the new kernel API that might be worth looking into.

Peter

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://discuss.pynq.io/u/frank)\
**Post date:** [January 2, 2020, 2:16pm UTC](https://discuss.pynq.io/t/efficient-ps-pl-gpio/812/3 "2020-01-02T14:16:20Z")

</div>

Hi,

thanks for the information!  
That gives me a starting point for looking into this further.

Kind regards, Frank
