lkml.org 
[lkml]   [2017]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/8] pinctrl: stm32: use gpio-ranges to declare bank range
From
Date
Hi Linus

On 02/01/2017 04:01 PM, Linus Walleij wrote:
> On Mon, Jan 30, 2017 at 5:29 PM, Alexandre Torgue
> <alexandre.torgue@st.com> wrote:
>> On 01/30/2017 04:19 PM, Linus Walleij wrote:
>
>>>> + if (!of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, 0,
>>>> &args))
>>>> + bank_nr = args.args[1] / STM32_GPIO_PINS_PER_BANK;
>>>> + else {
>>>> + range->name = bank->gpio_chip.label;
>>>> + range->id = bank_nr;
>>>> + range->pin_base = range->id * STM32_GPIO_PINS_PER_BANK;
>>>> + range->base = range->id * STM32_GPIO_PINS_PER_BANK;
>>>> + range->npins = npins;
>>>> + range->gc = &bank->gpio_chip;
>>>> + pinctrl_add_gpio_range(pctl->pctl_dev,
>>>> + &pctl->banks[bank_nr].range);
>>>> + }
>>
>>
>> I Keep the old way to get range in order to keep compatibility with older
>> device tree (if no gpio ranges are defined).
>
> Aha I understand. Sorry for my stupidity.
>
> Go ahead with this!

I saw an issue about this patch. It doesn't seem to be merged, so I will
send a V2 only for this patch.

Regards
Alex


>
> Yours,
> Linus Walleij
>

\
 
 \ /
  Last update: 2017-03-27 12:28    [W:0.090 / U:17.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site