From: Kevin Hilman <khilman@deeprootsystems.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 5/8] OMAP: omap_device: add usecounting
Date: Wed, 18 Nov 2009 06:33:04 -0800 [thread overview]
Message-ID: <87tywrewdb.fsf@deeprootsystems.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0911180349590.25515@utopia.booyaka.com> (Paul Walmsley's message of "Wed\, 18 Nov 2009 03\:51\:10 -0700 \(MST\)")
Paul Walmsley <paul@pwsan.com> writes:
> Hello Kevin,
>
> On Tue, 17 Nov 2009, Kevin Hilman wrote:
>
>> Add use counters to omap_device to enable multiple potential users of
>> an omap_device. This is needed if ever there are multiple users or
>> multiple instances of a driver with a single omap_device.
>>
>> Without usecounting, with multiple users, the first one to call idle
>> may forcibly idle the device while other users are still active.
>
> Could you please send along an example of the use case for this?
The current use case is the serial driver (not yet ready for posting.)
While there is only a single driver bound to the omap_device, there
are effectivily multiple instances of the driver. One for initial
init/probe requriring and early _enable, followed by _idle in the
late_init hook. Another when the actual serial driver gets started
and the inactivity timers etc. start firing. These usages overlap
slightly and the easiest way I saw to handle this was with
usecounting.
> I would prefer not to add usecounting at this layer unless it is
> absolutely necessary, since only one driver should be bound to a
> device at a time.
What about mulitple instances of the same driver?
Or, what about drivers like i2c which might do _enable/_idle on a
per-transfer basis and there might be multiple transfers pending at
any given time.
We already have use-counting in the clock framework for this same
purpose. I'm essentially proposing the usecounting for the same reason,
but it also need to protect enable/idle parts of hwmod as well.
Maybe usecounting at the hwmod level is more appropriate since that's
where the problem lies. I'm fine with that.
Kevin
next prev parent reply other threads:[~2009-11-18 14:33 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 1:05 [PATCH 0/8] omap_hwmod/omap_device prep work Kevin Hilman
2009-11-18 1:05 ` [PATCH 1/8] OMAP3: clock: add clockdomains for UART1 & 2 Kevin Hilman
2009-11-18 1:05 ` [PATCH 2/8] OMAP: hwmod: warn on missing clockdomain Kevin Hilman
2009-11-18 1:05 ` [PATCH 3/8] OMAP3 hwmod: Add automatic OCP_SYSCONFIG AUTOIDLE handling Kevin Hilman
2009-11-18 1:05 ` [PATCH 4/8] OMAP: omap_device: deactivate latency typo Kevin Hilman
2009-11-18 1:05 ` [PATCH 5/8] OMAP: omap_device: add usecounting Kevin Hilman
2009-11-18 1:05 ` [PATCH 6/8] OMAP: omap_device: use read_persistent_clock() instead of getnstimeofday() Kevin Hilman
2009-11-18 1:05 ` [PATCH 7/8] OMAP: omap_device: warn about expected latencies only if non-zero Kevin Hilman
2009-11-18 1:05 ` [PATCH 8/8] OMAP: omap_device: use UINT_MAX for default wakeup latency limit Kevin Hilman
2009-11-18 10:57 ` Paul Walmsley
2009-11-18 11:19 ` [PATCH 7/8] OMAP: omap_device: warn about expected latencies only if non-zero Paul Walmsley
2009-11-19 19:08 ` Kevin Hilman
2009-11-18 11:00 ` [PATCH 6/8] OMAP: omap_device: use read_persistent_clock() instead of getnstimeofday() Paul Walmsley
2009-11-18 10:51 ` [PATCH 5/8] OMAP: omap_device: add usecounting Paul Walmsley
2009-11-18 14:33 ` Kevin Hilman [this message]
2009-11-24 18:13 ` Kevin Hilman
2009-11-18 10:54 ` [PATCH 4/8] OMAP: omap_device: deactivate latency typo Paul Walmsley
2009-11-18 14:39 ` Kevin Hilman
2009-11-18 8:45 ` [PATCH 3/8] OMAP3 hwmod: Add automatic OCP_SYSCONFIG AUTOIDLE handling Vimal Singh
2009-11-18 10:01 ` Paul Walmsley
2009-11-18 18:37 ` Kevin Hilman
2009-11-18 19:02 ` Paul Walmsley
2009-11-18 10:55 ` Paul Walmsley
2009-11-18 11:07 ` [PATCH 2/8] OMAP: hwmod: warn on missing clockdomain Paul Walmsley
2009-11-18 15:03 ` Kevin Hilman
2009-12-03 12:11 ` Paul Walmsley
2009-11-18 10:58 ` [PATCH 1/8] OMAP3: clock: add clockdomains for UART1 & 2 Paul Walmsley
2009-12-18 2:32 ` Paul Walmsley
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=87tywrewdb.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
/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.