stm32 serial:Add SINGLEWIRE PUSHPULL option

This commit is contained in:
David Sidrane 2020-08-04 04:50:03 -07:00 committed by Xiang Xiao
parent 5a76767cd7
commit 749dbce431

@ -1980,7 +1980,9 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
#else
if ((arg & SER_SINGLEWIRE_ENABLED) != 0)
{
uint32_t gpio_val = GPIO_OPENDRAIN;
uint32_t gpio_val = (arg & SER_SINGLEWIRE_PUSHPULL) ==
SER_SINGLEWIRE_PUSHPULL ?
GPIO_PUSHPULL : GPIO_OPENDRAIN;
gpio_val |= ((arg & SER_SINGLEWIRE_PULL_MASK) ==
SER_SINGLEWIRE_PULLUP) ? GPIO_PULLUP
: GPIO_FLOAT;