From: Scott Wood <scottwood@freescale.com>
To: Laurent Pinchart <laurentp@cse-semaphore.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: RFC: Could cpm2_clk_setup and cpm2_set_pin be exported ?
Date: Thu, 28 Aug 2008 12:14:37 -0500 [thread overview]
Message-ID: <48B6DCFD.4020802@freescale.com> (raw)
In-Reply-To: <200808281907.53607.laurentp@cse-semaphore.com>
Laurent Pinchart wrote:
> On Thursday 28 August 2008, Scott Wood wrote:
>> On Thu, Aug 28, 2008 at 05:57:13PM +0200, Laurent Pinchart wrote:
>>> I'm facing a situation where I need to call cpm2_clk_setup and
>>> cpm2_set_pin from a device driver compiled as a module. Before
>>> submitting a patch to export both functions, I'd like to make
>>> sure there isn't a cleaner way to implement the desired
>>> functionality without calling functions that are supposed to be
>>> used by board setup code.
>> Have you looked at using the GPIO API?
>
> Yes, but the GPIO API doesn't support dedicated pin usage. Basically
> all I can do is configure a pin as a general purpose input or output,
> and set its level when configured as an output. The GPIO API doesn't
> provide any way to access the PAR and SOR registers.
OK, wasn't sure what it was that you needed to set at runtime. Are you
actually switching between dedicated functions dynamically? Why do you
need to do this?
> Beside, the GPIO API won't help configuring clock routing.
Why does the clock routing need to change dynamically?
If it turns out this really does need to happen, we can add some locks
and export the functions, but I'd like to hear more about the use case
first.
-Scott
next prev parent reply other threads:[~2008-08-28 19:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-28 15:57 RFC: Could cpm2_clk_setup and cpm2_set_pin be exported ? Laurent Pinchart
2008-08-28 16:41 ` Scott Wood
2008-08-28 17:07 ` Laurent Pinchart
2008-08-28 17:14 ` Scott Wood [this message]
2008-08-29 8:45 ` Laurent Pinchart
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=48B6DCFD.4020802@freescale.com \
--to=scottwood@freescale.com \
--cc=laurentp@cse-semaphore.com \
--cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).