All of lore.kernel.org
 help / color / mirror / Atom feed
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] mfd: max8925: request resource region
Date: Wed, 9 May 2012 15:13:16 +0100	[thread overview]
Message-ID: <20120509141316.GS3955@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <201205091243.13206.arnd@arndb.de>

On Wed, May 09, 2012 at 12:43:13PM +0000, Arnd Bergmann wrote:
> On Tuesday 08 May 2012, Mark Brown wrote:

> > The trick is allocating a bit for that flag, though I was thinking
> > earlier on we might be able to get away with carving it out of the bus
> > specific bits since I think anything using this wouldn't normally be
> > using resources for anything else except interrupts.  It does mean that
> > the resource type doesn't do the right thing though.

> Right, or we could try to kill IORESOURCE_BUS, which is hardly used
> anywhere and the users either get it wrong (bfin net2272), use it
> only in one file (acpi, broadcom-pci) or only for printing the
> contents (pnp).

Yeah, I looked at that - PCMCIA seems to be the major sticking point and
the usage there appeared totally sane, though it's possible that if I
stare at it hard enough I might convince myself that it only needs seven
bits and we can steal one.

> > That feels complicated with the subtraction there, but modulo that this
> > is roughly what's happening now.  We would I think want this to work for
> > non-regmap users too, it's not yet clear that every device with
> > registers is going to fit into regmap (though it's looking more likely
> > as things go on).

> I think the subtraction in some form is needed if you want to register
> the resources, to guarantee that they are non-conflicting. Registering
> them has the advantage that we can print them in a similar way to what
> we do for /proc/{ioports,iomem}.

It does result in the really odd situation that the number that gets
stored in the resource is the register number plus an offset.  If
anything I'd expect that the resources would be defined so you had to
add the parent base address with the child resource being the offset
within the parent resource.  Though to be honest the parent resource is
almost always going to be numbered from zero so it's not going to make
much difference most of the time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120509/759ff3cc/attachment.sig>

  reply	other threads:[~2012-05-09 14:13 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07  3:10 [PATCH 1/2] mfd: max8925: request resource region Haojian Zhuang
2012-05-07  3:10 ` [PATCH 2/2] ARM: mmp: add io head file Haojian Zhuang
2012-05-07  9:23   ` Arnd Bergmann
2012-05-07  7:58 ` [PATCH 1/2] mfd: max8925: request resource region Russell King - ARM Linux
2012-05-07  8:18   ` Haojian Zhuang
2012-05-07  8:59     ` Russell King - ARM Linux
2012-05-07  9:01   ` Mark Brown
2012-05-07  9:08     ` Russell King - ARM Linux
2012-05-07  9:47       ` Mark Brown
2012-05-07 10:14         ` Arnd Bergmann
2012-05-07 10:23           ` Haojian Zhuang
2012-05-07 11:21             ` Arnd Bergmann
2012-05-07 11:29               ` Mark Brown
     [not found]                 ` <201205071319.48768.arnd@arndb.de>
2012-05-07 14:02                   ` Samuel Ortiz
2012-05-07 14:15                   ` Mark Brown
2012-05-07 15:15                     ` Arnd Bergmann
2012-05-07 15:28                       ` Mark Brown
2012-05-07 10:37           ` Mark Brown
     [not found]             ` <201205071314.51886.arnd@arndb.de>
2012-05-07 14:06               ` Mark Brown
2012-05-07 15:09                 ` Arnd Bergmann
2012-05-07 15:17                   ` Mark Brown
2012-05-07 19:26                     ` Arnd Bergmann
2012-05-07 19:58                       ` Mark Brown
2012-05-08  8:17                       ` Mark Brown
2012-05-08 14:44                         ` Arnd Bergmann
2012-05-08 15:31                           ` Mark Brown
2012-05-09 12:43                             ` Arnd Bergmann
2012-05-09 14:13                               ` Mark Brown [this message]
2012-05-09 14:19                                 ` Arnd Bergmann
2012-05-09 14:42                                   ` Mark Brown
2012-05-09 15:03                                     ` Arnd Bergmann
2012-05-09 15:28                                       ` Mark Brown
2012-05-09 16:27                                         ` Arnd Bergmann
2012-05-09 16:18                                 ` Russell King - ARM Linux
2012-05-09 16:30                                   ` Mark Brown
2012-05-09 16:07                               ` Russell King - ARM Linux
2012-05-09 16:26                                 ` Arnd Bergmann
2012-05-09 16:27                                   ` Russell King - ARM Linux
2012-05-07 18:57             ` Russell King - ARM Linux
2012-05-07 19:27               ` Mark Brown
2012-05-07  8:12 ` Samuel Ortiz

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=20120509141316.GS3955@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.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.