All of lore.kernel.org
 help / color / mirror / Atom feed
From: fabio.estevam@freescale.com (Fabio Estevam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: mx5/mx51_babbage: Use gpio_request_one when possible
Date: Thu, 28 Apr 2011 13:03:26 -0300	[thread overview]
Message-ID: <4DB98FCE.8090706@freescale.com> (raw)
In-Reply-To: <20110428075500.GM31131@pengutronix.de>

Hi Uwe,

On 4/28/2011 4:55 AM, Uwe Kleine-K?nig wrote:
...
  
>>  	/* Set USBH1_STP to GPIO and toggle it */
>>  	mxc_iomux_v3_setup_pad(usbh1stp_gpio);
> This cannot go into the global list of pins to mux?

This pin alternates its mode(GPIO and USB STP), so I think we can leave it defined here.
> 
>> -	ret = gpio_request(BABBAGE_USBH1_STP, "usbh1_stp");
>> +	ret = gpio_request_one(BABBAGE_USBH1_STP,
>> +					GPIOF_OUT_INIT_LOW, "usbh1_stp");
>>  
>>  	if (ret) {
>>  		pr_debug("failed to get MX51_PAD_USBH1_STP__GPIO_1_27: %d\n", ret);
>>  		return ret;
>>  	}
>> -	gpio_direction_output(BABBAGE_USBH1_STP, 0);
>>  	gpio_set_value(BABBAGE_USBH1_STP, 1);
>>  	msleep(100);
> Why is the sleep between set_value(1) and free? I would have expected it
> between request_one(INIT_LOW) and set_value(1)?

Agreed. I haven?t changed the logic on this patch. Will send a third patch for fixing this.

Thanks,

Fabio Estevam

  reply	other threads:[~2011-04-28 16:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28  0:44 [PATCH 1/2] ARM: mx5/mx51_babbage: Move GPIO initialization for USB PHY Reset line to commom place Fabio Estevam
2011-04-28  0:44 ` [PATCH 2/2] ARM: mx5/mx51_babbage: Use gpio_request_one when possible Fabio Estevam
2011-04-28  7:55   ` Uwe Kleine-König
2011-04-28 16:03     ` Fabio Estevam [this message]
2011-04-28  7:51 ` [PATCH 1/2] ARM: mx5/mx51_babbage: Move GPIO initialization for USB PHY Reset line to commom place Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DB98FCE.8090706@freescale.com \
    --to=fabio.estevam@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.