Пример #1
0
static void sdp4430_picodlp_init(void)
{
	int r;
	const struct gpio picodlp_gpios[] = {
		{DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
			"DLP POWER ON"},
		{sdp4430_picodlp_pdata.emu_done_gpio, GPIOF_IN,
			"DLP EMU DONE"},
		{sdp4430_picodlp_pdata.pwrgood_gpio, GPIOF_OUT_INIT_LOW,
			"DLP PWRGOOD"},
	};

	r = gpio_request_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios));
	if (r)
		pr_err("Cannot request PicoDLP GPIOs, error %d\n", r);
}
Пример #2
0
static int colibri_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
	int ret;

	ret = gpio_request_array(colibri_pcmcia_gpios,
				ARRAY_SIZE(colibri_pcmcia_gpios));
	if (ret)
		goto err1;

	skt->socket.pci_irq = gpio_to_irq(colibri_pcmcia_gpios[READY].gpio);
	skt->stat[SOC_STAT_CD].irq = gpio_to_irq(colibri_pcmcia_gpios[DETECT].gpio);
	skt->stat[SOC_STAT_CD].name = "PCMCIA CD";

err1:
	return ret;
}
static void kona_display_gpio_init(void)
{
	int i;

	for (i = 0; i < ARRAY_SIZE(display_gpios); i++)
		display_gpios[i].gpio =
			omap_muxtbl_get_gpio_by_name(display_gpios[i].label);

	gpio_request_array(display_gpios, ARRAY_SIZE(display_gpios));

#ifdef CONFIG_OMAP4_DSS_HDMI
	kona_hdmi_device.hpd_gpio =
		omap_muxtbl_get_gpio_by_name("HDMI_HPD");
	kona_hdmi_mux_init();
#endif
}
Пример #4
0
/*
 * Functions
 */
int board_early_init_f(void)
{
	/* IO0 clock at 480MHz */
	mx28_set_ioclk(MXC_IOCLK0, 480000);
	/* IO1 clock at 480MHz */
	mx28_set_ioclk(MXC_IOCLK1, 480000);

	/* SSP0 clock at 96MHz */
	mx28_set_sspclk(MXC_SSPCLK0, 96000, 0);
	/* SSP2 clock at 96MHz */
	mx28_set_sspclk(MXC_SSPCLK2, 96000, 0);

	gpio_request_array(tx28_gpios, ARRAY_SIZE(tx28_gpios));
	mxs_iomux_setup_multiple_pads(tx28_pads, ARRAY_SIZE(tx28_pads));
	return 0;
}
Пример #5
0
static int dsi_j_qxga_8_9_gpio_get(void)
{
	int err;

	if (gpio_requested)
		return 0;

	err = gpio_request_array(panel_init_gpios, ARRAY_SIZE(panel_init_gpios));
	if(err) {
		pr_err("gpio array request failed\n");
		return err;
	}

	gpio_requested = true;

	return 0;
}
static void __init espresso10_tsp_gpio_init(void)
{
	int i;

	for (i = 0; i < ARRAY_SIZE(tsp_gpios); i++)
		tsp_gpios[i].gpio =
			omap_muxtbl_get_gpio_by_name(tsp_gpios[i].label);
	gpio_request_array(tsp_gpios, ARRAY_SIZE(tsp_gpios));

	espresso_i2c3_boardinfo[0].irq =
				gpio_to_irq(tsp_gpios[GPIO_TOUCH_nINT].gpio);

	espresso10_ts_pdata.gpio_en = tsp_gpios[GPIO_TOUCH_EN].gpio;
	espresso10_ts_pdata.gpio_irq = tsp_gpios[GPIO_TOUCH_nINT].gpio;
	espresso10_ts_pdata.gpio_scl = tsp_gpios[GPIO_TOUCH_SCL].gpio;
	espresso10_ts_pdata.gpio_sda = tsp_gpios[GPIO_TOUCH_SDA].gpio;
}
Пример #7
0
static int baseband2_init(void)
{
	int ret;

	ret = gpio_request_array(modem2_gpios, ARRAY_SIZE(modem2_gpios));
	if (ret)
		return ret;

	/* enable pull-up for MDM2_REQ2 */
	tegra_pinmux_set_pullupdown(TEGRA_PINGROUP_GPIO_PV1,
				    TEGRA_PUPD_PULL_UP);

	/* export GPIO for user space access through sysfs */
	gpio_export(MDM2_PWR_ON, false);

	return 0;
}
Пример #8
0
static void __init omap4_ehci_ohci_init(void)
{

{
	int ret;
	struct clk *phy_ref_clk;

	if (!board_has_usb_host()) {
		printk("EHCI usb host deliberately not installed\n");
		return;
	}

	/* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
	phy_ref_clk = clk_get(NULL, "auxclk3_ck");
	if (IS_ERR(phy_ref_clk)) {
		pr_err("Cannot request auxclk3\n");
		return;
	}
	clk_set_rate(phy_ref_clk, 19200000);
	clk_enable(phy_ref_clk);


	/* disable external boost / Reset External PHY */
	ret = gpio_request_array(bowser_ehci_gpios,
				 ARRAY_SIZE(bowser_ehci_gpios));
	if (ret) {
		pr_err("Unable to initialize EHCI power/reset\n");
		return;
	}

#ifdef USB_EXT_PWR_EN
	gpio_export(USB_EXT_PWR_EN, 0);
#endif
	gpio_export(USB_NRESET, 0);
	gpio_set_value(USB_NRESET, 1);

	usbhs_init(&usbhs_bdata);

#ifdef USB_EXT_PWR_EN
	/* enable power to external Boost for VBUS */
	gpio_set_value(USB_EXT_PWR_EN, 1);
#endif
}
	return;

}
static void __init spi_modem_cfg_gpio(void)
{
	int i;

	for (i = 0; i < ARRAY_SIZE(spi_gpios); i++)
		spi_gpios[i].gpio =
			omap_muxtbl_get_gpio_by_name(spi_gpios[i].label);
	gpio_request_array(spi_gpios, ARRAY_SIZE(spi_gpios));

	spi_modem_data.gpio_ipc_mrdy = spi_gpios[GPIO_AP_CP_MRDY].gpio;
	spi_modem_data.gpio_ipc_srdy = spi_gpios[GPIO_AP_CP_SRDY].gpio;
	spi_modem_data.gpio_ipc_sub_mrdy = spi_gpios[GPIO_AP_CP_SUB_MRDY].gpio;
	spi_modem_data.gpio_ipc_sub_srdy = spi_gpios[GPIO_AP_CP_SUB_SRDY].gpio;

	pr_info("[SPI] %s done\n", __func__);

}
Пример #10
0
static void __init am3517_evm_display_init(void)
{
	int r;

	omap_mux_init_gpio(LCD_PANEL_PWR, OMAP_PIN_INPUT_PULLUP);
	omap_mux_init_gpio(LCD_PANEL_BKLIGHT_PWR, OMAP_PIN_INPUT_PULLDOWN);
	omap_mux_init_gpio(LCD_PANEL_PWM, OMAP_PIN_INPUT_PULLDOWN);

	r = gpio_request_array(am3517_evm_dss_gpios,
			       ARRAY_SIZE(am3517_evm_dss_gpios));
	if (r) {
		printk(KERN_ERR "failed to get DSS panel control GPIOs\n");
		return;
	}

	printk(KERN_INFO "Display initialized successfully\n");
}
static void __init umts_modem_cfg_gpio(void)
{
	int i;
	for (i = 0; i < ARRAY_SIZE(modem_gpios); i++)
		modem_gpios[i].gpio =
			omap_muxtbl_get_gpio_by_name(modem_gpios[i].label);
	gpio_request_array(modem_gpios, ARRAY_SIZE(modem_gpios));

	umts_modem_data.gpio_cp_on = modem_gpios[GPIO_CP_ON].gpio;
	umts_modem_data.gpio_reset_req_n = modem_gpios[GPIO_RESET_REQ].gpio;
	umts_modem_data.gpio_cp_reset = modem_gpios[GPIO_CP_RST].gpio;
	umts_modem_data.gpio_pda_active = modem_gpios[GPIO_PDA_ACTIVE].gpio;
	umts_modem_data.gpio_phone_active = modem_gpios[GPIO_PHONE_ACTIVE].gpio;
	umts_modem_data.gpio_cp_dump_int = modem_gpios[GPIO_CP_DUMP_INT].gpio;

	pr_debug("umts_modem_cfg_gpio done\n");
}
static void __init palau_tsp_gpio_init(void)
{
	int i, n = ARRAY_SIZE(tsp_gpios);

	/* To do not request a TOUCH_EN gpio at above rev.1 boards */
	n = (system_rev < 1) ? n : n - 1;

	for (i = 0; i < n; i++)
		tsp_gpios[i].gpio =
			omap_muxtbl_get_gpio_by_name(tsp_gpios[i].label);

	if (gpio_request_array(tsp_gpios, n) < 0)
		pr_err("tsp: gpio_request failed.");

	palau_i2c3_boardinfo[0].irq =
				gpio_to_irq(tsp_gpios[GPIO_TOUCH_nINT].gpio);
}
Пример #13
0
static void __init ldp_display_init(void)
{
	int r;

	static struct gpio gpios[] __initdata = {
		{LCD_PANEL_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "LCD RESET"},
		{LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "LCD QVGA"},
	};

	r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
	if (r) {
		pr_err("Cannot request LCD GPIOs, error %d\n", r);
		return;
	}

	omap_display_init(&ldp_dss_data);
}
Пример #14
0
static void __init omap3_beagle_init_rev(void)
{
	int ret;
	u16 beagle_rev = 0;

	omap_mux_init_gpio(171, OMAP_PIN_INPUT_PULLUP);
	omap_mux_init_gpio(172, OMAP_PIN_INPUT_PULLUP);
	omap_mux_init_gpio(173, OMAP_PIN_INPUT_PULLUP);

	ret = gpio_request_array(omap3_beagle_rev_gpios,
				 ARRAY_SIZE(omap3_beagle_rev_gpios));
	if (ret < 0) {
		printk(KERN_ERR "Unable to get revision detection GPIO pins\n");
		omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
		return;
	}

	beagle_rev = gpio_get_value(171) | (gpio_get_value(172) << 1)
			| (gpio_get_value(173) << 2);

	gpio_free_array(omap3_beagle_rev_gpios,
			ARRAY_SIZE(omap3_beagle_rev_gpios));

	switch (beagle_rev) {
	case 7:
		printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");
		omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX;
		break;
	case 6:
		printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
		omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3;
		break;
	case 5:
		printk(KERN_INFO "OMAP3 Beagle Rev: C4\n");
		omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
		break;
	case 0:
		printk(KERN_INFO "OMAP3 Beagle Rev: xM\n");
		omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
		break;
	default:
		printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
		omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
	}
}
Пример #15
0
static void __init edb7211_init_late(void)
{
	gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios));

	platform_device_register(&edb7211_flash_pdev);
	platform_device_register_data(&platform_bus, "platform-lcd", 0,
				      &edb7211_lcd_power_pdata,
				      sizeof(edb7211_lcd_power_pdata));
	platform_device_register_data(&platform_bus, "generic-bl", 0,
				      &edb7211_lcd_backlight_pdata,
				      sizeof(edb7211_lcd_backlight_pdata));
	platform_device_register_simple("video-clps711x", 0, NULL, 0);
	platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource,
					ARRAY_SIZE(edb7211_cs8900_resource));
	platform_device_register_data(&platform_bus, "i2c-gpio", 0,
				      &edb7211_i2c_pdata,
				      sizeof(edb7211_i2c_pdata));
}
Пример #16
0
static int rdu2_enable_front_panel_usb(void)
{
	int ret;

	if (!of_machine_is_compatible("zii,imx6q-zii-rdu2") &&
	    !of_machine_is_compatible("zii,imx6qp-zii-rdu2"))
		return 0;

	ret = gpio_request_array(rdu2_front_panel_usb_gpios,
				 ARRAY_SIZE(rdu2_front_panel_usb_gpios));
	if (ret) {
		pr_err("Failed to request RDU2 front panel USB gpios: %s\n",
		       strerror(-ret));

	}

	return ret;
}
Пример #17
0
static void __init kona_tsp_gpio_init(void)
{
	int i, n = ARRAY_SIZE(tsp_gpios);

	for (i = 0; i < n; i++)
		tsp_gpios[i].gpio =
			omap_muxtbl_get_gpio_by_name(tsp_gpios[i].label);

	if (gpio_request_array(tsp_gpios, n) < 0)
		pr_err("tsp: gpio_request failed.");

	kona_i2c3_boardinfo[0].irq =
				gpio_to_irq(tsp_gpios[GPIO_TOUCH_nINT].gpio);

	kona_ts_pdata.gpio_irq = tsp_gpios[GPIO_TOUCH_nINT].gpio;
	kona_ts_pdata.gpio_scl = tsp_gpios[GPIO_TOUCH_SCL].gpio;
	kona_ts_pdata.gpio_sda = tsp_gpios[GPIO_TOUCH_SDA].gpio;
}
Пример #18
0
void __init smdk_machine_init(void)
{
    /* Configure the LEDs (even if we have no LED support)*/

    int ret = gpio_request_array(smdk_led_gpios,
                                 ARRAY_SIZE(smdk_led_gpios));
    if (!WARN_ON(ret < 0))
        gpio_free_array(smdk_led_gpios, ARRAY_SIZE(smdk_led_gpios));

    if (machine_is_smdk2443())
        smdk_nand_info.twrph0 = 50;

    s3c_nand_set_platdata(&smdk_nand_info);

    platform_add_devices(smdk_devs, ARRAY_SIZE(smdk_devs));

    s3c_pm_init();
}
Пример #19
0
void __init omap4_panda_display_init(void)
{
	gpio_request_array(panda_hdmi_gpios_hpd, ARRAY_SIZE(panda_hdmi_gpios_hpd));
	omap_display_init(&omap4_panda_dss_data);

	/*
	 * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
	 * later have external pull up on the HDMI I2C lines
	 */
	if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
		omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
	else
		omap_hdmi_init(0);

	omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
	omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
	omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
}
static void __init omap4_ehci_ohci_init(void)
{

{
	int ret;
	struct clk *phy_ref_clk;

	if( board_has_wan() ) {

		/* disable external boost / Reset External PHY */
		ret = gpio_request_array(bowser_ehci_gpios,
					 ARRAY_SIZE(bowser_ehci_gpios));
		if (ret) {
			pr_err("Unable to initialize EHCI power/reset\n");
			return;
		}

		printk("USB PHY external auxclk3 is turned ON for a WAN board or a Bowser5\n");

		/* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
		phy_ref_clk = clk_get(NULL, "auxclk3_ck");
		if (IS_ERR(phy_ref_clk)) {
			pr_err("Cannot request auxclk3\n");
			return;
		}
		clk_set_rate(phy_ref_clk, 19200000);
		clk_enable(phy_ref_clk);


		gpio_export(USB_EXT_PWR_EN, 0);
		gpio_set_value(WAN_USB_RESUME_GPIO, 0);

		usbhs_init(&usbhs_bdata);

		/* enable power to external Boost for VBUS */
		gpio_set_value(USB_EXT_PWR_EN, 1);
	}
	else {
		printk("USB PHY external auxclk3 is not turned ON \n");
	}
}
	return;

}
static void __init sprd_modem_cfg_gpio(void)
{
	int i;

	for (i = 0; i < ARRAY_SIZE(modem_gpios); i++)
		modem_gpios[i].gpio =
			omap_muxtbl_get_gpio_by_name(modem_gpios[i].label);
	gpio_request_array(modem_gpios, ARRAY_SIZE(modem_gpios));

	mdmctl_data.gpio_phone_on = modem_gpios[GPIO_PHONE_ON].gpio;
	mdmctl_data.gpio_phone_active = modem_gpios[GPIO_PHONE_ACTIVE].gpio;
	mdmctl_data.gpio_pda_active = modem_gpios[GPIO_PDA_ACTIVE].gpio;
	mdmctl_data.gpio_cp_dump_int = modem_gpios[GPIO_CP_DUMP_INT].gpio;
	mdmctl_data.gpio_ap_cp_int2 = modem_gpios[GPIO_AP_CP_INT2].gpio;

	uart_sel = omap_muxtbl_get_gpio_by_name("UART_SEL");

	pr_debug("[MODEM_IF] %s done\n", __func__);
}
Пример #22
0
static int baseband2_init(void)
{
	int ret;

	tegra_pinmux_set_tristate(TEGRA_PINGROUP_GPIO_X1_AUD, TEGRA_TRI_NORMAL);

	ret = gpio_request_array(modem2_gpios, ARRAY_SIZE(modem2_gpios));
	if (ret)
		return ret;

	/* enable pull-down for MDM2_COLD_BOOT */
	tegra_pinmux_set_pullupdown(TEGRA_PINGROUP_KB_ROW4,
				    TEGRA_PUPD_PULL_DOWN);

	/* export GPIO for user space access through sysfs */
	gpio_export(MDM2_RST, false);

	return 0;
}
static int cam_gpio_init(void)
{
	int i;

	for (i = 0; i < ARRAY_SIZE(cam_gpios); i++) {
		cam_gpios[i].gpio = get_gpio_by_name(cam_gpios[i].label);
		if (cam_gpios[i].gpio  == -1) {
			pr_err("%s : failed to get gpio(name: %s)\n",
				__func__, cam_gpios[i].label);
			return -EINVAL;
		}
	}
	if (gpio_request_array(cam_gpios, ARRAY_SIZE(cam_gpios)) < 0) {
		pr_err("%s : gpio request error\n", __func__);
		return -EINVAL;
	}

	return 0;
}
Пример #24
0
static int baseband_init(void)
{
	int ret;

	ret = gpio_request_array(modem_gpios, ARRAY_SIZE(modem_gpios));
	if (ret) {
		pr_warn("%s:gpio request failed\n", __func__);
		return ret;
	}

	/* enable pull-down for MDM_COLD_BOOT */
	tegra_pinmux_set_pullupdown(TEGRA_PINGROUP_ULPI_DATA4,
				    TEGRA_PUPD_PULL_DOWN);

	/* export GPIO for user space access through sysfs */
	gpio_export(MDM_RST, false);

	return 0;
}
__init static int is_nitrogen6w(void)
{
	int ret = gpio_request_array(n6w_wl1271_gpios,
			ARRAY_SIZE(n6w_wl1271_gpios));
	if (ret) {
		printk(KERN_ERR "%s gpio_request_array failed("
				"%d) for n6w_wl1271_gpios\n", __func__, ret);
		return ret;
	}
	ret = gpio_get_value(N6_WL1271_WL_IRQ);
	if (ret <= 0) {
		/* Sabrelite, not nitrogen6w */
		gpio_free(N6_WL1271_WL_IRQ);
		gpio_free(N6_WL1271_WL_EN);
		gpio_free(N6_WL1271_BT_EN);
		ret = 0;
	}
	return ret;
}
Пример #26
0
static void __init rx51_init_tsc2005(void)
{
	int r;

	omap_mux_init_gpio(RX51_TSC2005_RESET_GPIO, OMAP_PIN_OUTPUT);
	omap_mux_init_gpio(RX51_TSC2005_IRQ_GPIO, OMAP_PIN_INPUT_PULLUP);

	r = gpio_request_array(rx51_tsc2005_gpios,
			       ARRAY_SIZE(rx51_tsc2005_gpios));
	if (r < 0) {
		printk(KERN_ERR "tsc2005 board initialization failed\n");
		tsc2005_pdata.esd_timeout_ms = 0;
		return;
	}

	tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
	rx51_peripherals_spi_board_info[RX51_SPI_TSC2005].irq =
				gpio_to_irq(RX51_TSC2005_IRQ_GPIO);
}
Пример #27
0
static void __init sdp2430_display_init(void)
{
	int r;

	static struct gpio gpios[] __initdata = {
		{ SDP2430_LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
			"LCD reset" },
		{ SDP2430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW,
			"LCD Backlight" },
	};

	r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
	if (r) {
		pr_err("Cannot request LCD GPIOs, error %d\n", r);
		return;
	}

	omap_display_init(&sdp2430_dss_data);
}
static int __devinit collie_bat_probe(struct ucb1x00_dev *dev)
{
	int ret;

	if (!machine_is_collie())
		return -ENODEV;

	ucb = dev->ucb;

	ret = gpio_request_array(collie_batt_gpios,
				 ARRAY_SIZE(collie_batt_gpios));
	if (ret)
		return ret;

	mutex_init(&collie_bat_main.work_lock);

	INIT_WORK(&bat_work, collie_bat_work);

	ret = power_supply_register(&dev->ucb->dev, &collie_bat_main.psy);
	if (ret)
		goto err_psy_reg_main;
	ret = power_supply_register(&dev->ucb->dev, &collie_bat_bu.psy);
	if (ret)
		goto err_psy_reg_bu;

	ret = request_irq(gpio_to_irq(COLLIE_GPIO_CO),
				collie_bat_gpio_isr,
				IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
				"main full", &collie_bat_main);
	if (!ret) {
		schedule_work(&bat_work);
		return 0;
	}
	power_supply_unregister(&collie_bat_bu.psy);
err_psy_reg_bu:
	power_supply_unregister(&collie_bat_main.psy);
err_psy_reg_main:

	/*                                  */
	cancel_work_sync(&bat_work);
	gpio_free_array(collie_batt_gpios, ARRAY_SIZE(collie_batt_gpios));
	return ret;
}
static u32 __init get_hw_rev(void)
{
	int ret, i;
	u32 hw_rev = 0;

	ret = gpio_request_array(hw_rev_gpios, ARRAY_SIZE(hw_rev_gpios));
	for (i=0; i < ARRAY_SIZE(hw_rev_gpios); i++)
		s3c_gpio_setpull(hw_rev_gpios[i].gpio, S3C_GPIO_PULL_NONE);

	udelay(9);

	BUG_ON(ret);
	for (i = 0; i < ARRAY_SIZE(hw_rev_gpios); i++)
		hw_rev |= gpio_get_value(hw_rev_gpios[i].gpio) << i;

	pr_debug("[Modem] Board Revision Value : (0x%x).\n", hw_rev);

	return hw_rev;
}
Пример #30
0
static int __devinit qi_lb60_probe(struct platform_device *pdev)
{
	struct snd_soc_card *card = &qi_lb60;
	int ret;

	ret = gpio_request_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios));
	if (ret)
		return ret;

	card->dev = &pdev->dev;

	ret = snd_soc_register_card(card);
	if (ret) {
		dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
			ret);
		gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios));
	}
	return ret;
}