Re: [PATCH v3 06/11] serial: sc16is7xx: fix bug when first setting GPIO direction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 25 May 2023 14:10:27 +0300
andy.shevchenko@xxxxxxxxx wrote:

> Thu, May 25, 2023 at 12:03:20AM -0400, Hugo Villeneuve kirjoitti:
> > From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
> > 
> > When we want to configure a pin as an output pin with a value of logic
> > 0, we end up as having a value of logic 1 on the output pin. Setting a
> > logic 0 a second time (or more) after that will correctly output a
> > logic 0 on the output pin.
> > 
> > By default, all GPIO pins are configured as inputs. When we enter
> > c16is7xx_gpio_direction_output() for the first time, we first set the
> 
> Missing 's'.

Fixed.

> > desired value in IOSTATE, and then we configure the pin as an output.
> > The datasheet states that writing to IOSTATE register will trigger a
> > transfer of the value to the I/O pin configured as output, so if the
> > pin is configured as an input, nothing will be transferred.
> > 
> > Therefore, set the direction first in IODIR, and then set the desired
> > value in IOSTATE.
> > 
> > This is what is done in NXP application note AN10587.
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 
> 



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux