LKML Archive on
 help / color / Atom feed
From: Matti Vaittinen <>
To: Mark Brown <>
Subject: Re: [RFC v2] regmap: regmap-irq: Add main status register support
Date: Tue, 18 Dec 2018 10:58:03 +0200
Message-ID: <20181218085803.GD2477@localhost.localdomain> (raw)
In-Reply-To: <>

On Mon, Dec 17, 2018 at 05:32:44PM +0000, Mark Brown wrote:
> On Fri, Dec 14, 2018 at 04:08:12PM +0200, Matti Vaittinen wrote:
> > This is draft for approach proposed by Mark here:
> >
> > Pretty untested and diff is done against tree where the level active IRQ
> > support for regmap-irq was added. So please consider this just as a RFC
> > introducing the concept. I will format correct and better tested patch if
> > this is the preferred way to go.
> Hrm, so the parsing code is indeed quite complicated.  I suspect it
> could be simplified if instead of trying to allocate just what's used it
> was a bit more wasteful and allocated the biggest arrays we might need
> but I'm not sure how much that'd really help so yeah, doing it the other
> way around might be better.

It might get a little bit simpler but not much I think. And the driver
interface could be a little bit simpler if we drop the support for
giving the "main bit mapping" as an array and only support giving the
main bits in the struct regmap_irqs. Then the num_main_status_bits,
num_main_regs and sub_reg_offsets could be made internal to regmap-irq.

OTOH dropping num_main_regs would add up one more thing requiring
dynamic allocation as we could not compute the number of main register
bits in advance.

I will proceed with the RFC v1 approach. Nothing prevents us from
implementing the v2 later if there is use-cases for that. But it will
take a while before I get this thing tested and user for it.
Additionally I guess we do need a bui-in from Lee as most of this kind
of devices with many sub blocks are likely to be represented as MFD
devices. I guess I should have included him in the recipient list for
the RFCs :/

Thanks for all the support this far!

	Matti Vaittinen

Matti Vaittinen
ROHM Semiconductors

~~~ "I don't think so," said Rene Descartes.  Just then, he vanished ~~~

      reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 14:08 Matti Vaittinen
2018-12-17 17:32 ` Mark Brown
2018-12-18  8:58   ` Matti Vaittinen [this message]

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181218085803.GD2477@localhost.localdomain \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox