Re: [PATCH v5 3/3] omap3: beaglexm: fix power on of DVI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Nishanth Menon <nm@xxxxxx> [110111 15:54]:
> Tony Lindgren had written, on 01/11/2011 05:23 PM, the following:
> [..]
> >>-
> >>-	gpio_request(gpio + 1, "EHCI_nOC");
> >>-	gpio_direction_input(gpio + 1);
> >>+	if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) {
> >>+		gpio_request(gpio + 1, "EHCI_nOC");
> >>+		gpio_direction_input(gpio + 1);
> >>+	}
> >
> >The return value for gpio_request must be checked.
> Ack.
> we can go down two paths:
> a) I can redo this patch as in v6.patch (attached)

Yes let's do that, one comment below though..

> OR
> b) we take this patch and do another one cleaning the function up -
> gpio-check.patch

That can be done later.
 
> +	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
> +		r = gpio_request(gpio + 1, "nDVI_PWR_EN");
> +		if (!r) {
> +			r = gpio_direction_output(gpio + 1, 0);
> +			if (r)
> +				gpio_free(gpio + 1);
> +		}
> +		if (r)
> +			pr_err("%s: unable to configure nDVI_PWR_EN\n",
> +				__func__);
> +		r = gpio_request(gpio + 2, "DVI_LDO_EN");
> +		if (!r) {
> +			r = gpio_direction_output(gpio + 2, 1);
> +			if (r)
> +				gpio_free(gpio + 1);
> +		}
> +		if (r)
> +			pr_err("%s: unable to configure DVI_LDO_EN\n",
> +				__func__);
> +	}
> +

Should the second gpio_free be gpio + 2 instead of gpio + 1?

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux