Re: [PATCH v4 2/2] serial: sc16is7xx: hardware reset chip if reset-gpios is defined in DT

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

 




On 6/14/24 04:47, Andy Shevchenko wrote:
On Thu, Jun 13, 2024 at 10:26 AM Hui Wang <hui.wang@xxxxxxxxxxxxx> wrote:

Some boards connect a GPIO to the reset pin, and the reset pin needs
to be setup correctly before accessing the chip.
set up
Got it.
Add a function to handle the chip reset. If the reset-gpios is defined
in the DT, do hardware reset through this GPIO, othwerwise do software
otherwise
Got it.
reset as before.
...

+               /* The minimum reset pulse width is 3 us. */
+               usleep_range(5, 10);
Simply use fsleep() and it will take care of the sane API to be called.
OK, Thanks.

+               gpiod_set_value_cansleep(reset_gpio, 0); /* Deassert GPIO */




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux