All of lore.kernel.org
 help / color / mirror / Atom feed
From: syin@broadcom.com (Sherman Yin)
To: linux-arm-kernel@lists.infradead.org
Subject: pinctrl: pinctrl-single vs custom driver
Date: Fri, 7 Mar 2014 16:49:40 -0800	[thread overview]
Message-ID: <531A6924.8080009@broadcom.com> (raw)
In-Reply-To: <CACRpkdYhCDpKxkMxcHHLyp2mTf8-3mhioZkNqQACHcKjL+3erQ@mail.gmail.com>

>> Like the bcm281xx, in this SoC, each pin is also controlled by 1 register,
>> so pinctrl-single should work.
>
> One other deciding factor is what kind of information you have available
> on these pin registers and what format they are in. If your system is
> well documented and not delivered in some register map description
> format you should typically open code the hardware information in the
> driver.

The info available is similar to the bcm281xx pinctrl driver - basically 
just what is available in the binding documentation.  Although that is 
still not 100% clear, it is still much better than just numerical 
register values.


>> Is this efficiency enough to warrant using pinctrl-single over a "normal"
>> pinctrl driver in this case?
>
> So I would say that this code execution is likely not on the time-critical
> path?

Pins are typically changed on suspend/resume to save power, so I don't 
think it is time-critical.  Also, I could cache the pin values (provided 
we can assure that all software change pins via my driver) to save a few 
messages should timing/messaging congestion become a concern.  I won't 
implement the cache unless we really run into timing problems without it.

> Also take the debuggability and understandability of the code as a
> very important factor. Which driver will be easiest for a developer to
> cope with, and which will be easiest to use when debugging the
> system?

Okay.  The new driver will be similar to the bcm281xx one and will not 
be based on pinctrl-single, so that code is a bit easier to understand 
and the device tree nodes will be more readable.

Thanks for your input, Linus!

Regards,
Sherman

      reply	other threads:[~2014-03-08  0:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25  2:24 pinctrl: pinctrl-single vs custom driver Sherman Yin
2014-03-05  1:31 ` Linus Walleij
2014-03-08  0:49   ` Sherman Yin [this message]

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=531A6924.8080009@broadcom.com \
    --to=syin@broadcom.com \
    --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.