From: linux@rempel-privat.de (Oleksij Rempel)
To: linux-arm-kernel@lists.infradead.org
Subject: preferable method for pinctrl driver
Date: Mon, 09 Feb 2015 11:41:13 +0100 [thread overview]
Message-ID: <54D88EC9.70409@rempel-privat.de> (raw)
In-Reply-To: <CACRpkdZMX=HSpusLtPREufJpXuHOwH2MCtHrViASDR7Vbu_eMw@mail.gmail.com>
Am 14.11.2014 um 11:01 schrieb Linus Walleij:
> On Fri, Nov 7, 2014 at 11:17 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>
>>> thank you for your previous response. One more question: how pins should
>>> be numbered? Continuous or register offsets can be used?
>>> Documentations for this soc use pin names encoded like this
>>> #NAME_#BANK_#PIN. Register offset can be calculated by ((bank) * 32 +
>>> (pin) * 4)
>>> In this case i need to have extra array to convert pin number to offset,
>>> or use offset as pin number.
>>
>> Never mind, i think i found the answer:
>> This enumeration was arbitrarily chosen, in practice you need to think
>> through your numbering system so that it matches the layout of registers
>> and such things in your driver, or the code may become complicated. You
>> must also consider matching of offsets to the GPIO ranges that may be
>> handled by the pin controller.
>
> Yeah you're right :)
>
> There is some resoning in Documentation/pinctrl.txt but it needs some
> intuition etc.
>
> Yours,
> Linus Walleij
>
What is preferred method of handling gpio_request_enable in pinctrl
driver? My hw provide GPIO as one of mux variants for each controlled
pin. if i see it correctly, pin subsystem will not prevent using one
pin as gpio and request for some other functionality? Should it be
prevented by driver?
Here is my current pinctrl driver, in case it help understand my point:
https://github.com/olerem/linux-2.6/commit/5d8963e24493db445207c29dec00a6a848d8e781
--
Regards,
Oleksij
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150209/d679592d/attachment.sig>
next prev parent reply other threads:[~2015-02-09 10:41 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-10 8:42 preferable method for pinctrl driver Oleksij Rempel
2014-10-13 9:05 ` Linus Walleij
2014-11-07 8:35 ` Oleksij Rempel
2014-11-07 10:17 ` Oleksij Rempel
2014-11-14 10:01 ` Linus Walleij
2015-02-09 10:41 ` Oleksij Rempel [this message]
2015-03-05 8:44 ` Linus Walleij
2015-02-12 11:32 ` [PATCH] pinctrl: Add initial driver data for Alphascale asm9260 Oleksij Rempel
2015-03-06 8:38 ` Linus Walleij
2015-03-27 9:36 ` [PATCH v2 0/2] Add driver and documentation for Alphascale asm9260 pinctrl Oleksij Rempel
2015-03-27 9:36 ` [PATCH v2 1/2] pinctrl: Add driver " Oleksij Rempel
2015-03-27 17:10 ` Paul Bolle
2015-04-05 5:49 ` Oleksij Rempel
2015-04-05 6:16 ` Oleksij Rempel
2015-04-05 6:26 ` [PATCH v3 0/2] Add driver and documentation " Oleksij Rempel
2015-04-05 6:26 ` [PATCH v3 1/2] pinctrl: Add driver " Oleksij Rempel
2015-04-06 7:42 ` Paul Bolle
2015-04-06 8:38 ` Oleksij Rempel
2015-04-06 9:41 ` Paul Bolle
2015-04-06 9:45 ` Oleksij Rempel
2015-04-06 9:04 ` [PATCH v4 0/2] Add driver and documentation " Oleksij Rempel
2015-04-06 9:04 ` [PATCH v4 1/2] pinctrl: Add driver " Oleksij Rempel
2015-05-05 15:12 ` Linus Walleij
2015-05-12 16:25 ` Oleksij Rempel
2015-05-13 11:00 ` Linus Walleij
2015-05-14 7:26 ` Oleksij Rempel
2015-09-09 5:55 ` Oleksij Rempel
2015-09-25 17:14 ` Linus Walleij
2015-04-06 9:04 ` [PATCH v4 2/2] pinctrl: asm9260: add pinctrl add device tree bindings documentation Oleksij Rempel
2015-05-05 14:46 ` Linus Walleij
2015-05-12 16:02 ` Oleksij Rempel
2015-04-22 19:49 ` [PATCH v4 0/2] Add driver and documentation for Alphascale asm9260 pinctrl Oleksij Rempel
2015-05-05 14:41 ` Linus Walleij
[not found] ` <1428215185-14190-1-git-send-email-linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>
2015-04-05 6:26 ` [PATCH v3 2/2] pinctrl: asm9260: add pinctrl add device tree bindings documentation Oleksij Rempel
2015-04-05 6:26 ` Oleksij Rempel
2015-03-27 9:36 ` [PATCH v2 " Oleksij Rempel
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=54D88EC9.70409@rempel-privat.de \
--to=linux@rempel-privat.de \
--cc=linux-arm-kernel@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 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.