gpio: don't allow direction change if there is poll/callback set 56/261656/5
authorAdrian Szyndela <adrian.s@samsung.com>
Thu, 22 Jul 2021 06:53:12 +0000 (08:53 +0200)
committerMateusz Majewski <m.majewski2@samsung.com>
Wed, 11 Aug 2021 10:14:00 +0000 (12:14 +0200)
commit52bd6155f4d074850d0acbe00ddd4ac3880f8050
treef2169fd79bb62e51b6a168154c4c9d5ae265913b
parent49058088391edb9d48240086791225db2f35546d
gpio: don't allow direction change if there is poll/callback set

This was missing. The function that sets the callback
(peripheral_gpio_set_interrupted_cb())
exits with error if the direction is not "in". Therefore,
the callback makes sense only when the direction is "in".
Therefore, we don't want to allow changing the direction if there
is a callback set.

Change-Id: Ib21746ee4c32706a4114a76fbd0f6bd80bc9b787
src/peripheral_gpio.c