Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static int __init mxc_init_power_key ( void   )  [static]

Power Key initialization.

Definition at line 265 of file mx25_3stack.c.

References MUX_CONFIG_ALT5, mxc_iomux_set_pad(), mxc_request_iomux(), and power_key_int().

      /*Set power key as wakeup resource */
      int irq, ret;

      mxc_request_iomux(MX25_PIN_A25, MUX_CONFIG_ALT5);
      mxc_iomux_set_pad(MX25_PIN_A25, PAD_CTL_DRV_NORMAL);
      gpio_request(IOMUX_TO_GPIO(MX25_PIN_A25), NULL);

      irq = IOMUX_TO_IRQ(MX25_PIN_A25);
      set_irq_type(irq, IRQF_TRIGGER_RISING);
      ret = request_irq(irq, power_key_int, 0, "power_key", 0);
      if (ret)
            pr_info("register on-off key interrupt failed\n");

      return ret;

Generated by  Doxygen 1.6.0   Back to index