mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: Re: [PATCH 1/5] pinctrl: at91: provide gpio names
Date: Tue, 20 Nov 2012 22:35:38 +0100	[thread overview]
Message-ID: <20121120213538.GM8327@game.jcrosoft.org> (raw)
In-Reply-To: <1353446789-30819-1-git-send-email-plagnioj@jcrosoft.com>

HI,

	wrong ml

	sorry

Best Regards,
J.
On 22:26 Tue 20 Nov     , Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  drivers/pinctrl/pinctrl-at91.c |   15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index b9e2cbd..401fc96 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -1364,9 +1364,10 @@ static int __devinit at91_gpio_probe(struct platform_device *pdev)
>  	struct gpio_chip *chip;
>  	struct pinctrl_gpio_range *range;
>  	int ret = 0;
> -	int irq;
> +	int irq, i;
>  	int alias_idx = of_alias_get_id(np, "gpio");
>  	uint32_t ngpio;
> +	char **names;
>  
>  	BUG_ON(alias_idx >= ARRAY_SIZE(gpio_chips));
>  	if (gpio_chips[alias_idx]) {
> @@ -1436,6 +1437,18 @@ static int __devinit at91_gpio_probe(struct platform_device *pdev)
>  			chip->ngpio = ngpio;
>  	}
>  
> +	names = devm_kzalloc(&pdev->dev, sizeof(char*) * chip->ngpio, GFP_KERNEL);
> +
> +	if (!names) {
> +		ret = -ENOMEM;
> +		goto clk_err;
> +	}
> +
> +	for (i = 0; i < chip->ngpio; i++)
> +		names[i] = kasprintf(GFP_KERNEL, "pio%c%d", alias_idx + 'A', i);
> +
> +	chip->names = (const char*const*)names;
> +
>  	range = &at91_chip->range;
>  	range->name = chip->label;
>  	range->id = alias_idx;
> -- 
> 1.7.10.4
> 

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2012-11-20 21:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20121120212326.GO4398@game.jcrosoft.org>
2012-11-20 21:26 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-20 21:26   ` [PATCH 2/5] pinctrl: at91 add deglitch, debounce, pull down and schmitt trigger mux option support Jean-Christophe PLAGNIOL-VILLARD
2012-11-20 21:26   ` [PATCH 3/5] ARM: at91sam9: add macb pinctrl support Jean-Christophe PLAGNIOL-VILLARD
2012-11-20 21:26   ` [PATCH 4/5] ARM: at91: fix usart/uart namimg in pinctrl Jean-Christophe PLAGNIOL-VILLARD
2012-11-20 21:26   ` [PATCH 5/5] ARM: at91: dt: at91sam9260: split rts and cts pinctrl not Jean-Christophe PLAGNIOL-VILLARD
2012-11-20 21:35   ` Jean-Christophe PLAGNIOL-VILLARD [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=20121120213538.GM8327@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox