Re: Question about ASPEED GPIO value/direction set order

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

 



Hi Nikita,

On Tue, 2025-03-11 at 15:40 +0300, Nikita Shubin wrote:
> Hi Joel and Andrew !
> 
> I am observing "strange" behaviour when pin direction is set AFTER
> the
> value itself:
> 
> ```
> aspeed_gpio_dir_out:
> 
> __aspeed_gpio_set(gc, offset, val);
> gpio->config->llops->reg_bit_set(gpio, offset, reg_dir, 1);
> ```
> 
> Is this as intended ?

Yes; you tend to set the value only when using the GPIO for output, and
by setting the value before setting the direction, we avoid the
potential value glitch which occurs under the opposite order.

Andrew






[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux