drivers: gpio: add combined drive strength flags and mask

Introduce combined GPIO drive strength flags for GPIO controllers only
supporting either default or alternative drive strength regardless if
the pin is driven to a high or a low level.

Fixes: #30329

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2021-11-07 21:56:20 +01:00 committed by Christopher Friedt
commit 2e8cc9f9b0
9 changed files with 26 additions and 13 deletions

View file

@ -259,6 +259,19 @@ extern "C" {
* use the default drive strength.
*/
#define GPIO_DS_ALT_HIGH (0x1U << GPIO_DS_HIGH_POS)
/** Combined default drive strength.
*/
#define GPIO_DS_DFLT (GPIO_DS_DFLT_LOW | GPIO_DS_DFLT_HIGH)
/** Combined alternative drive strength.
*/
#define GPIO_DS_ALT (GPIO_DS_ALT_LOW | GPIO_DS_ALT_HIGH)
/** @cond INTERNAL_HIDDEN */
#define GPIO_DS_MASK (GPIO_DS_LOW_MASK | GPIO_DS_HIGH_MASK)
/** @endcond */
/** @} */
/** @cond INTERNAL_HIDDEN */