All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@rempel-privat.de (Oleksij Rempel)
To: linux-arm-kernel@lists.infradead.org
Subject: preferable method for pinctrl driver
Date: Fri, 07 Nov 2014 11:17:37 +0100	[thread overview]
Message-ID: <545C9C41.1090300@rempel-privat.de> (raw)
In-Reply-To: <545C846C.6090502@rempel-privat.de>

Am 07.11.2014 um 09:35 schrieb Oleksij Rempel:
> Am 13.10.2014 um 11:05 schrieb Linus Walleij:
>> On Fri, Oct 10, 2014 at 10:42 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>>
>>> Looks like there is at least two pinctrl driver types:
>>> - imx23 which makes function description insight of DT;
>>> - tegra with function descrption in the source code.
>>> which way is preferable?
>>
>> The Tegra way. The driver should know about all groups
>> and functions, the DT should just configure the functions to
>> groups relation.
>>
>> The i.MX driver happened before the DT use for pin controllers
>> was thought through.
>>
>>> Other question, i didn't found exact same HW, do it make sense to merge
>>> this driver with existing one? Are there some similarities with this one?:
>>> http://pastebin.com/hW82Xupq
>>
>> No idea, that's very little HW information. However
>> silicon vendors often du their I/O cell layout themselves
>> so many pin controllers are very unique.
>>
>> Yours,
>> Linus Walleij
> 
> Hi,
> 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.

-- 
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/20141107/9b3e5c31/attachment.sig>

  reply	other threads:[~2014-11-07 10:17 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 [this message]
2014-11-14 10:01       ` Linus Walleij
2015-02-09 10:41         ` Oleksij Rempel
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=545C9C41.1090300@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.