AnsweredAssumed Answered

GPIO2_IO23 gpio_request always returns error value EBUSY(16)

Question asked by Dilshad Alam on Jun 25, 2015
Latest reply on Jul 15, 2015 by Dilshad Alam

I am using GPIO_IO23 for WL_RST_PIN pin which is used for Resetting the WLAN chip.

GPIO_IO23 is defined in imxdl-pinfunc.h

#define MX6QDL_PAD_SD4_DAT5__GPIO2_IO13             0x354 0x73c 0x000 0x5 0x0



Defined this pin in my dts file under Hog group.

  hog {

  pinctrl_hog_1: hoggrp-1 {

  fsl,pins = <

MX6QDL_PAD_SD4_DAT5__GPIO2_IO13 0x0f0b0 /* WIFI_ON (reset, active low) */



My Target is based on Wandboard design. So I refered Wandboard DT which has below configuration.

MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x0f0b0 /* WIFI_ON (reset, active low) */

and changed GPIO5_IO02 to GPIO2_IO13.



Used this pin in rfkill node.

wifi-rst-n = <&gpio2 13 0>;




static int wand_rfkill_wifi_probe(struct device *dev,

  struct device_node *np,

  struct wand_rfkill_data *rfkill)



  int ret;

  int wl_rst_n;


  wl_rst_n = of_get_named_gpio(np, "wifi-rst-n", 0);


  if (!gpio_is_valid(wl_rst_n))

  pr_info("Dilshad %s incorrect wifi gpios\n",__func__);


  dev_info(dev, "initialize wifi chip\n");



  ret=gpio_request(wl_rst_n, "wl_rst_n");

  dev_info(dev, "gpio request return value %d\n", ret);

  gpio_direction_output(wl_rst_n, 0);


  gpio_set_value(wl_rst_n, 1);


I got below Kernel logs:

[    0.318338] wandboard-rfkill rfkill.30: initialize wifi chip

[    0.318352] wandboard-rfkill rfkill.30: gpio request return value -16



Error code 16 signifies to BUSY..


Also Let me know what does 0x0f0b0  signifies.


Please tell me if i am missing anything.