Commit f2d18fea authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Tony Lindgren
Browse files

ARM: OMAP: Switch to gpio_request/free calls



Switch to gpio_request/free calls

Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>

parent e031ab23
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -223,7 +223,8 @@ static struct omap_board_config_kernel fsample_config[] = {

static void __init omap_fsample_init(void)
{
	if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN)))
	if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
		BUG();
	nand_data.dev_ready = nand_dev_ready;

	omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
+8 −7
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ static struct platform_device *h2_devices[] __initdata = {

static void __init h2_init_smc91x(void)
{
	if ((omap_request_gpio(0)) < 0) {
	if (gpio_request(0, "SMC91x irq") < 0) {
		printk("Error requesting gpio 0 for smc91x irq\n");
		return;
	}
@@ -425,8 +425,9 @@ static void __init h2_init(void)

	h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
	h2_nand_resource.end += SZ_4K - 1;
	if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN)))
		h2_nand_data.dev_ready = h2_nand_dev_ready;
	if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
		BUG();
	gpio_direction_input(H2_NAND_RB_GPIO_PIN);

	omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
	omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
@@ -438,10 +439,10 @@ static void __init h2_init(void)
	/* Irda */
#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
	omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A);
	if (!(omap_request_gpio(H2_IRDA_FIRSEL_GPIO_PIN))) {
	if (gpio_request(H2_IRDA_FIRSEL_GPIO_PIN, "IRDA mode") < 0)
		BUG();
	gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0);
	h2_irda_data.transceiver_mode = h2_transceiver_mode;
	}
#endif

	platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
+4 −3
Original line number Diff line number Diff line
@@ -516,7 +516,8 @@ static void __init h3_init(void)

	nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS;
	nand_resource.end += SZ_4K - 1;
	if (!(omap_request_gpio(H3_NAND_RB_GPIO_PIN)))
	if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0)
		BUG();
	nand_data.dev_ready = nand_dev_ready;

	/* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */
@@ -537,7 +538,7 @@ static void __init h3_init(void)
static void __init h3_init_smc91x(void)
{
	omap_cfg_reg(W15_1710_GPIO40);
	if (omap_request_gpio(40) < 0) {
	if (gpio_request(40, "SMC91x irq") < 0) {
		printk("Error requesting gpio 40 for smc91x irq\n");
		return;
	}
+1 −1
Original line number Diff line number Diff line
@@ -301,7 +301,7 @@ static void __init innovator_init_smc91x(void)
			   OMAP1510_FPGA_RST);
		udelay(750);
	} else {
		if ((omap_request_gpio(0)) < 0) {
		if (gpio_request(0, "SMC91x irq") < 0) {
			printk("Error requesting gpio 0 for smc91x irq\n");
			return;
		}
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ static void mipid_dev_init(void)

static void ads7846_dev_init(void)
{
	if (omap_request_gpio(ADS7846_PENDOWN_GPIO) < 0)
	if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0)
		printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
}

Loading