From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Erik Gilling <konkers@android.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
linux-tegra@vger.kernel.org, Colin Cross <ccross@google.com>,
linux-arm-kernel@lists.infradead.org,
spi-devel-general@lists.sourceforge.net
Subject: Re: [PATCH] spi: add spi_tegra driver
Date: Thu, 12 Aug 2010 16:24:24 +0100 [thread overview]
Message-ID: <20100812152424.GB31982@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTinKNfPtaYYyUMmdTRewSKiRnTEfaf+pKkx_7jME@mail.gmail.com>
On Wed, Aug 11, 2010 at 05:31:00PM -0700, Erik Gilling wrote:
> >> + if (!request_mem_region(r->start, (r->end - r->start) + 1,
> >> + dev_name(&pdev->dev))) {
> >> + ret = -EBUSY;
> >> + goto err0;
> >> + }
> >
> > I believe the platform bus does this for you already by calling
> > insert_resource() on all the platform bus ranges. See if /proc/iomem
> > is any different with or without this call to verify.
>
> You're right. Didn't realize this
There is a big difference between what the platform bus does and what
drivers do.
The platform bus adds the resources to the resource tree as they stand
without marking them _busy_. This means that they can be sub-divided
and other resources registered within their range.
request_mem_region() adds resources to the resource tree marking them
busy, detecting overlapping resources and indicating whether two
drivers are trying to claim the same resource region. In other words,
it's a preventative measure against two device drivers accessing the
same region.
You're absolutely right to do what you're doing above, please continue
to do so.
next prev parent reply other threads:[~2010-08-12 15:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-30 0:37 [PATCH] spi: add spi_tegra driver Colin Cross
2010-07-30 7:54 ` Thierry Reding
[not found] ` <20100730075443.GA17814-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2010-08-02 18:48 ` Erik Gilling
2010-08-01 6:21 ` Grant Likely
[not found] ` <AANLkTimUm_wj+gyxTa=X+845kLj1sZ9GF+jsmsBwxnLN-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-12 0:31 ` Erik Gilling
2010-08-12 15:24 ` Russell King - ARM Linux [this message]
[not found] ` <20100812152424.GB31982-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2010-08-12 18:44 ` Erik Gilling
[not found] ` <1280450224-25118-1-git-send-email-ccross-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2010-08-12 0:47 ` [PATCH v2] " Erik Gilling
[not found] ` <1281574023-25160-1-git-send-email-konkers-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2010-08-12 19:54 ` Grant Likely
[not found] ` <AANLkTim4nL+Re=qc55CGS+ksq+ACtGe=vqOeGQ3HbQWM-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-25 21:22 ` Erik Gilling
[not found] ` <AANLkTincgapUK5ncs_t3ax=1Kt_56GdR_RVwRqdCm5ge-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-27 19:26 ` Erik Gilling
[not found] ` <AANLkTin4HxVLt=4VH-NQWhB-p_2EpX_yoTcwEOTJP3m_-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-27 20:13 ` Grant Likely
2010-08-25 21:23 ` [PATCH v3] " Erik Gilling
2010-09-01 22:16 ` [PATCH v4] " Erik Gilling
2010-09-01 22:18 ` Erik Gilling
2010-09-02 14:22 ` Grant Likely
[not found] ` <AANLkTimonLa1mUVSHR=QnR48HPtAZ5BW3BsVsg7MWALy-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-10 6:31 ` Grant Likely
[not found] ` <AANLkTini_PA3J+R4gEP4DzFpcAxHhdmDbcXxOtj2h81O-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-11 21:01 ` Erik Gilling
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=20100812152424.GB31982@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=ccross@google.com \
--cc=grant.likely@secretlab.ca \
--cc=konkers@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-tegra@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
/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).