Set default state of gpio WP7702

Hi,

I’m using a Mangoh Yellow with a WP7702 chip. I want to change the default state of a GPIO: GPIO_24.

I think I need to make some modifications in some Yocto .dts files but I have no idea which file should I modify.

So my question is: what are the files to modify?

Thanks you,
Jeremy

I used to set the default state 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(), add the following: (Please note that I used 11 to be the gpio number for GPIO24)

static int __init wake_n_init(void)
{

#if 1
gpio_request(11, "sysfs");          //GPIO24 = MDM_GPIO 11
gpio_direction_output(11, 1);   
gpio_set_value(11, 1); 

gpio_free(11); 

#endif


	return platform_driver_register(&wake_n_driver);
}