linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, alan@linux.intel.com
Subject: Re: [RFC PATCH] tty/serial: atmel_serial: add device tree support
Date: Wed, 12 Oct 2011 17:35:06 +0200	[thread overview]
Message-ID: <4E95B3AA.9040603@atmel.com> (raw)
In-Reply-To: <20111004165226.GA10919@ponder.secretlab.ca>

On 10/04/2011 06:52 PM, Grant Likely :
> On Mon, Oct 03, 2011 at 08:58:48PM -0500, Rob Herring wrote:
>> On 10/03/2011 04:51 AM, Nicolas Ferre wrote:
>>>  static int __devinit atmel_serial_probe(struct platform_device *pdev)
>>>  {
>>>  	struct atmel_uart_port *port;
>>> +	struct device_node *np = pdev->dev.of_node;
>>>  	struct atmel_uart_data *pdata = pdev->dev.platform_data;
>>>  	void *data;
>>>  	int ret;
>>>  
>>>  	BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));
>>>  
>>> -	port = &atmel_ports[pdata->num];
>>> +	if (np) {
>>> +		ret = of_alias_get_id(np, "serial");
>>> +		if (ret < 0)
>>> +			goto err;
>>
>> I'll defer to Grant on this. There aren't any other drivers using this.
>>
> 
> This is the correct thing to do.
> 
> One note however; I prefer driver to *not* require an alias to be
> present.  By all means, use an alias if it is available, but the
> driver should auto-enumerate if it is not.  There is a patch that
> makes of_alias_get_id() do this for you, but it hasn't been mainlined
> yet and it is still a bit in flux.  There will be something that takes
> care of this for you, but be aware that the function name may change.
> 
> In the mean time, this patch is okay.
> 
> Acked-by: Grant Likely <grant.likely@secretlab.ca>

Grant,

I have reworked this atmel_serial device tree support so I did not add
your "Acked-by" to this new series. I repost it right now.
I hope this new implementation will be even better though ;-)

Bye,
-- 
Nicolas Ferre

      reply	other threads:[~2011-10-12 15:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03  9:51 [RFC PATCH] tty/serial: atmel_serial: add device tree support Nicolas Ferre
2011-10-04  1:58 ` Rob Herring
2011-10-04  8:18   ` Nicolas Ferre
2011-10-04 13:08     ` Rob Herring
2011-10-04 16:55       ` Grant Likely
2011-10-11 16:04         ` Nicolas Ferre
2011-10-04 16:52   ` Grant Likely
2011-10-12 15:35     ` Nicolas Ferre [this message]

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=4E95B3AA.9040603@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=alan@linux.intel.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).