[lkml]   [2012]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] gpio: Device tree support for LPC32xx
    Hi Arnd,

    thanks for your further suggestions. I'm integrating them, comments below:

    On 04/03/2012 10:29 AM, Arnd Bergmann wrote:
    >> +- gpio-lines: Number of GPIOs in that subnode/GPIO group
    > While I suggested the gpio-lines property, I'm not sure if it's worth
    > including it when you don't actually use it.

    Right. I'm actually removing it now since for enabling individual GPIO
    lines selectively, it's not flexible enough, anyway: only the first n
    lines of a GPIO "group" could be chosen.

    However, I will keep (and document) the possible status="disabled"
    property to disable whole GPIO groups of LPC32xx, if really necessary.

    Looks like all LPC32xx variants have and will have the same GPIO layout.

    To fix disruptiveness of this patch, I'll make it support both DT and
    non-DT so it doesn't depend on LPC32xx being switched together
    atomically. (Posting below).


    if (pdev->dev.of_node) {
    for_each_child_of_node(pdev->dev.of_node, node) {
    if (of_device_is_available(node)) {
    u32 index;
    struct gpio_chip *chip;
    if (of_property_read_u32(node, "reg", &index) < 0)
    if (index >= ARRAY_SIZE(lpc32xx_gpiochip))
    chip = &lpc32xx_gpiochip[index].chip;
    chip->of_node = of_node_get(node);
    } else {
    for (i = 0; i < ARRAY_SIZE(lpc32xx_gpiochip); i++)

     \ /
      Last update: 2012-04-03 11:15    [W:0.022 / U:6.296 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site