linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
To: mazziesaccount@gmail.com, matti.vaittinen@fi.rohmeurope.com,
	mikko.mutanen@fi.rohmeurope.com,
	heikki.haikola@fi.rohmeurope.com
Cc: broonie@kernel.org, gregkh@linuxfoundation.org,
	rafael@kernel.org, linux-kernel@vger.kernel.org,
	geert@linux-m68k.org, ckeepax@opensource.cirrus.com
Subject: [PATCH] regmap: regmap-irq: Make irq-type callbak optional
Date: Fri, 4 Jan 2019 12:31:15 +0200	[thread overview]
Message-ID: <20190104103115.GA10043@localhost.localdomain> (raw)

Do not register type setting callback if HW does not support
setting the irq type. IRQ core can then handle cases where
type setting is not supported and no regmap-irq specific handling
is required.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
---
 drivers/base/regmap/regmap-irq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index d2d0014b0d23..a387ee499b5c 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -322,7 +322,6 @@ static const struct irq_chip regmap_irq_chip = {
 	.irq_bus_sync_unlock	= regmap_irq_sync_unlock,
 	.irq_disable		= regmap_irq_disable,
 	.irq_enable		= regmap_irq_enable,
-	.irq_set_type		= regmap_irq_set_type,
 	.irq_set_wake		= regmap_irq_set_wake,
 };
 
@@ -560,6 +559,9 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
 	d->chip = chip;
 	d->irq_base = irq_base;
 
+	if (num_type_reg)
+		d->irq_chip.irq_set_type = regmap_irq_set_type;
+
 	if (chip->irq_reg_stride)
 		d->irq_reg_stride = chip->irq_reg_stride;
 	else
-- 
2.14.3


-- 
Matti Vaittinen
ROHM Semiconductors

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

             reply	other threads:[~2019-01-04 10:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 10:31 Matti Vaittinen [this message]
2019-01-04 11:14 ` [PATCH] regmap: regmap-irq: Make irq-type callbak optional Charles Keepax
2019-01-04 11:32   ` Charles Keepax
2019-01-04 12:14     ` Matti Vaittinen

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=20190104103115.GA10043@localhost.localdomain \
    --to=matti.vaittinen@fi.rohmeurope.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.haikola@fi.rohmeurope.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mazziesaccount@gmail.com \
    --cc=mikko.mutanen@fi.rohmeurope.com \
    --cc=rafael@kernel.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).