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

void gpio_sensor_active ( void   ) 

Activate camera sensor

Definition at line 1092 of file mx25_3stack_gpio.c.

Referenced by adv7180_probe(), ioctl_dev_init(), ioctl_s_power(), and mc521da_init().

{
      mxc_request_iomux(MX25_PIN_CSI_D2, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_D3, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_D4, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_D5, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_D6, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_D7, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_D8, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_D9, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_HSYNC, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_MCLK, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_PIXCLK, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_CSI_VSYNC, MUX_CONFIG_FUNC);
      mxc_request_iomux(MX25_PIN_A19, MUX_CONFIG_ALT5); /*CSI_PWDN*/
      mxc_request_iomux(MX25_PIN_A20, MUX_CONFIG_ALT5); /*CMOS_RST*/

      gpio_request(IOMUX_TO_GPIO(MX25_PIN_A19), "a19");
      gpio_request(IOMUX_TO_GPIO(MX25_PIN_A20), "a20");
      gpio_direction_output(IOMUX_TO_GPIO(MX25_PIN_A19), 0); /*CSI_PWDN*/
      gpio_set_value(IOMUX_TO_GPIO(MX25_PIN_A19), 0);
      gpio_direction_output(IOMUX_TO_GPIO(MX25_PIN_A20), 0); /*CMOS_RST*/
      gpio_set_value(IOMUX_TO_GPIO(MX25_PIN_A20), 0);
      mdelay(20);
      gpio_set_value(IOMUX_TO_GPIO(MX25_PIN_A20), 1);

#define CSI_PAD_CTL1 (PAD_CTL_PKE_ENABLE | PAD_CTL_100K_PU)
#define CSI_PAD_CTL2 (PAD_CTL_HYS_SCHMITZ | PAD_CTL_PKE_ENABLE | \
                  PAD_CTL_100K_PU)

      mxc_iomux_set_pad(MX25_PIN_CSI_D2, CSI_PAD_CTL1);
      mxc_iomux_set_pad(MX25_PIN_CSI_D3, CSI_PAD_CTL1);
      mxc_iomux_set_pad(MX25_PIN_CSI_D4, CSI_PAD_CTL2);
      mxc_iomux_set_pad(MX25_PIN_CSI_D5, CSI_PAD_CTL1);
      mxc_iomux_set_pad(MX25_PIN_CSI_D6, CSI_PAD_CTL1);
      mxc_iomux_set_pad(MX25_PIN_CSI_D7, CSI_PAD_CTL2);
      mxc_iomux_set_pad(MX25_PIN_CSI_D8, CSI_PAD_CTL1);
      mxc_iomux_set_pad(MX25_PIN_CSI_D9, CSI_PAD_CTL1);
      mxc_iomux_set_pad(MX25_PIN_CSI_HSYNC, CSI_PAD_CTL1);
      mxc_iomux_set_pad(MX25_PIN_CSI_MCLK, PAD_CTL_PKE_ENABLE |
                    PAD_CTL_PUE_PUD | PAD_CTL_100K_PU | PAD_CTL_SRE_FAST);
      mxc_iomux_set_pad(MX25_PIN_CSI_PIXCLK, CSI_PAD_CTL2);
      mxc_iomux_set_pad(MX25_PIN_CSI_VSYNC, CSI_PAD_CTL1);
}


Generated by  Doxygen 1.6.0   Back to index