All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Brandt <chris.brandt@renesas.com>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH v3 3/8] gpio: gpio-rz: GPIO driver for Renesas RZ series
Date: Thu, 19 Jan 2017 10:36:21 +0100	[thread overview]
Message-ID: <CAMuHMdXvzG5gDhY3zhtd1db1jnj1Kd=wxvAU8ZwYYUKwPcXqqw@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdYLrojYdgcKe=Eh2vQ5O+WJBuiUt2_kXyY0qJ35fR1jEQ@mail.gmail.com>

Hi Linus,

On Thu, Jan 19, 2017 at 10:27 AM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> On Wed, Jan 18, 2017 at 3:06 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> On Wed, Jan 18, 2017 at 2:58 PM, Linus Walleij <linus.walleij@linaro.org> 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.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2017-01-19  9:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 12:12 [PATCH v3 0/8] Renesas RZ PFC and GPIO driver Jacopo Mondi
2017-01-16 12:12 ` [PATCH v3 1/8] pinctrl: sh-pfc: Add r7s72100 PFC driver Jacopo Mondi
2017-01-26 17:14   ` Wolfram Sang
2017-01-16 12:12 ` [PATCH v3 2/8] pinctrl: sh-pfc: r7s72100: Configure I/O mode Jacopo Mondi
2017-01-16 12:12 ` [PATCH v3 3/8] gpio: gpio-rz: GPIO driver for Renesas RZ series Jacopo Mondi
2017-01-18 13:58   ` Linus Walleij
2017-01-18 14:06     ` Geert Uytterhoeven
2017-01-19  9:27       ` Linus Walleij
2017-01-19  9:36         ` Geert Uytterhoeven [this message]
2017-01-19  9:38           ` Linus Walleij
2017-01-19  9:48             ` Geert Uytterhoeven
2017-01-18 15:40     ` jacopo mondi
2017-01-16 12:12 ` [PATCH v3 4/8] arm: dts: r7s72100: GPIO and PFC device nodes Jacopo Mondi
2017-01-16 12:12 ` [PATCH v3 5/8] arm: dts: r7s72100-genmai: SCIF2 PINCTRL configuration Jacopo Mondi
2017-01-16 12:12 ` [PATCH v3 6/8] arm: dts: r7s72100-genmai: LED1 and LED2 support Jacopo Mondi
2017-01-16 12:12 ` [PATCH v3 7/8] arm: dts: r7s72100-genmai:Add ethernet PFC node Jacopo Mondi
2017-01-16 12:12 ` [PATCH v3 8/8] arm: dts: r7s72100-genmai: Add pinctrl for RSPI Jacopo Mondi

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='CAMuHMdXvzG5gDhY3zhtd1db1jnj1Kd=wxvAU8ZwYYUKwPcXqqw@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=chris.brandt@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=jacopo+renesas@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.