GPIO active low push pull output glitches?

Anyone implementing active low push pull having problems with glitches, i.e. the signal going low and back up again upon initialization. Would be interested in hearing from anyone successfully using the le_gpio* routines or direct interface to Linux sysfs. Thanks.

It has default state when reset.

I remember I have tried to change the default state of GPIO23(i.e. MDM_GPIO_10) of WP77 FW R9 in yocto/kernel/drivers/gpio/sierra_gpio_wake_n.c.

  1. open yocto/kernel/drivers/gpio/sierra_gpio_wake_n.c
  2. go to function wake_n_init(), around line 274, add the following: (Please note that I used 10 to be the gpio number, you need to change this according to your usage)
static int __init wake_n_init(void)

#if 1
gpio_request(10, "sysfs");          //GPIO23 = MDM_GPIO 10
gpio_direction_output(10, 1);   
gpio_set_value(10, 1); 



	return platform_driver_register(&wake_n_driver);
  1. rebuild yocto.cwe and download to module.
  2. the default state of GPIO23 will be output high.
  3. after boot into console, you can use the following to control the GPIO23:

echo 23 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio23/direction
echo 0 > /sys/class/gpio/gpio23/value
echo 1 > /sys/class/gpio/gpio23/value

Thanks for the reply. Is there a reference matching the Linux GPIO numbers to the MDM_GPIO numbers? I am using Linux GPIO21 which appears to be MDM_GPIO 8 from the logging but I want to be sure.

I used dmesg logging to check also.

I remember you can check also in the yocto source


Thanks for the suggestion. Regarding the documentation such as the mangOH schematics and the WP77xx tech reference, I assume the pin labels are the Linux GPIO numbers not MDM_GPIO?

Yes, it is linux gpio

Hi @piinst,
What version of Legato are you running? There was a bug that is fixed in 19.11 where a pulse was observed when calling le_gpioPin*_Activate.

root@swi-mdm9x28-wp:~# legato version