All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Timur Tabi <timur@codeaurora.org>
Cc: Andy Gross <andy.gross@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linux-gpio@vger.kernel.org
Subject: Re: Sparse GPIO maps with pinctrl-msm.c?
Date: Fri, 16 Jun 2017 10:44:38 -0700	[thread overview]
Message-ID: <20170616174438.GC17640@tuxbook> (raw)
In-Reply-To: <c32b0c54-652c-69ce-4bbc-a24e443afbf2@codeaurora.org>

On Fri 16 Jun 09:26 PDT 2017, Timur Tabi wrote:

> On 6/16/17 11:21 AM, Andy Gross wrote:
> 
> > > 1) Approved by the XPU
> > 
> > How do you know what this is?  And this changes based on the TZ load.
> 
> An ACPI property in the TLMM node that lists the approved GPIOs by number.
> It currently looks like this:
> 
> Name (_DSD, Package ()
> {
> 	ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> 	Package ()
> 	{
> 		// Expose only the qdss_tracedata pins as GPIOs,
> 		// numbered sequentially, so that "gpio X" maps
> 		// to qdss_tracedata[X].  These can be used as
> 		// generic GPIOs.

But what does this actually mean?

I assume that on this platform the qdss_tracedata is an alternative
pinmux function (configured by someone else). Which normally means that
the pins are routed to some internal hardware block.

Or are you just running these in gpio-function and then have some
software to decode the data? Where is this piece of software?

> 		Package (2) {"gpios", Package ()
> 			{116, 117, 118, 119, 120, 121, 122, 123,
> 			 124, 125, 126, 127, 128, 129, 130, 131,
> 			 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
> 			 90, 50, 36, 37, 38, 39}}

Does these pins make up some sort of communication bus? Or is it 32
individual states? Does it really make sense to expose these as 32
"random" GPIOs - which on some platforms will be sequential in your
made-up GPIO controller and on others be scattered.

> 	}
> })
> 
> I'm not crazy about it, but it's a compromise that allows some GPIOs to be
> exposed without a lot of coding.  One idea we're debating is forgetting
> about pinctrl-msm altogether and rewrite the driver from scratch as a pure
> GPIO driver.  I'm hoping to avoid having to do that.
> 

I think that it would be nice to come up with a solution that works for
the other users of pinctrl-msm as well.

Regards,
Bjorn

  reply	other threads:[~2017-06-16 17:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 23:35 Sparse GPIO maps with pinctrl-msm.c? Timur Tabi
2017-06-14 18:59 ` Timur Tabi
2017-06-16 15:07 ` Stephen Boyd
2017-06-16 15:15   ` Timur Tabi
2017-06-16 15:41     ` Stephen Boyd
2017-06-16 15:49       ` Timur Tabi
2017-06-16 16:06         ` Bjorn Andersson
2017-06-16 16:17           ` Timur Tabi
2017-06-16 16:21             ` Andy Gross
2017-06-16 16:26               ` Timur Tabi
2017-06-16 17:44                 ` Bjorn Andersson [this message]
2017-06-16 18:10                   ` Timur Tabi
2017-06-16 18:50                     ` Bjorn Andersson
2017-06-16 19:07                       ` Timur Tabi
2017-06-29  4:59                         ` Bjorn Andersson
2017-06-20 23:10                   ` Timur Tabi
2017-06-16 15:55     ` Bjorn Andersson
2017-06-16 16:07       ` Timur Tabi
2017-06-16 16:35         ` Bjorn Andersson
2017-06-16 18:42           ` Timur Tabi

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=20170616174438.GC17640@tuxbook \
    --to=bjorn.andersson@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=timur@codeaurora.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.