Re: [PATCH v3 3/8] gpio: gpio-rz: GPIO driver for Renesas RZ series

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

 



On Thu, Jan 19, 2017 at 10:36 AM, Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:
> On Thu, Jan 19, 2017 at 10:27 AM, Linus Walleij
> <linus.walleij@xxxxxxxxxx> wrote:
>> On Wed, Jan 18, 2017 at 3:06 PM, Geert Uytterhoeven
>> <geert@xxxxxxxxxxxxxx> wrote:
>>> On Wed, Jan 18, 2017 at 2:58 PM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>>>>> +       gpio_chip->request = rz_gpio_request;
>>>>> +       gpio_chip->free = rz_gpio_free;
>>>>> +       gpio_chip->label = dev_name(&pdev->dev);
>>>>> +       gpio_chip->parent = &pdev->dev;
>>>>> +       gpio_chip->owner = THIS_MODULE;
>>>>> +       gpio_chip->base = -1;
>>>>> +       gpio_chip->ngpio = ret == 0 ? args.args[2] : RZ_GPIOS_PER_PORT;
>>>>
>>>> bgpio_init() will have already set this up to 16 (RZ_GPIOS_PER_PORT)
>>>> as we pass width 2 bytes.
>>>
>>> Note that some banks have less than 16 GPIOs, cfr. the last value of the
>>> gpio-ranges tuple being less than 16.
>>
>> Aha OK then it is fine to override this default value calculate from
>> the register size.
>>
>> But for that case we should use the standard DT property
>> ngpios described in
>> Documentation/devicetree/bindings/gpio/gpio.txt
>> It is for exactly this purpose.
>
> IC.
>
> Note that gpio-rcar uses the same method, switching to "ngpios" would
> break backwards compatibility.

Can we support both?

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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux