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

@ -203,7 +203,7 @@ static int gpio_pca953x_config(const struct device *dev, gpio_pin_t pin,
* Until something more general is available reject any
* attempt to set a non-default drive strength.
*/
if ((flags & (GPIO_DS_ALT_LOW | GPIO_DS_ALT_HIGH)) != 0) {
if ((flags & GPIO_DS_ALT) != 0) {
return -ENOTSUP;
}