linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Kukjin Kim <kgene.kim@samsung.com>,
	linux-gpio@vger.kernel.org,
	Ian Campbell <ian.campbell@citrix.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Rob Herring <rob.herring@calxeda.com>,
	Russell King <linux@arm.linux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v8 1/7] irqchip: vic: Parse interrupt and resume masks from device tree
Date: Sat, 24 Aug 2013 01:04:44 +0200	[thread overview]
Message-ID: <2159266.zeHHUDxisq@flatron> (raw)
In-Reply-To: <5217DE06.3070005@wwwdotorg.org>

On Friday 23 of August 2013 16:11:18 Stephen Warren wrote:
> On 08/22/2013 05:22 PM, Tomasz Figa wrote:
> > This patch extends vic_of_init to parse valid interrupt sources
> > and resume sources masks from device tree.
> > 
> > If mask values are not specified in device tree, all sources
> > are assumed to be valid, as before this patch.
> 
> Can you explain further why the VIC needs this information up-front?
> Presumably it can accumulate it as devices request interrupts.

It does not need this information just for operation, but this makes the 
hardware description more detailed and allows better sanity checking of 
interrupts being requested.

To clarify, this is a mask of valid interrupt sources of the VIC, where 
set bit indicates that given signal is wired and clear bit that it is not.

> > diff --git a/Documentation/devicetree/bindings/arm/vic.txt
> > b/Documentation/devicetree/bindings/arm/vic.txt
> > 
> > +- valid-mask : Bit mask of valid interrupt sources (defaults to all
> > valid)
> Until a device requests an interrupt, it can be left disabled. Once
> something does request it, it gets enabled. If nothing requests it, it
> never gets enabled. Doesn't the result of that logic end up being the
> same thing as valid-mask represents? The only difference would be if
> some device requests an invalid interrupt source, but then why not just
> fix the interrupt client instead of adding this property to reject the
> request?

This property does not have anything to do with enabling or disabling (aka 
unmasking/masking) of interrupts. It just lists valid interrupt signals of 
given VIC.

> > +- wakeup-mask : Bit mask of interrupt sources that can wake up the
> > system +  (defaults to all allowed)
> 
> Shouldn't drivers for end-devices request interrupts, and then set wake
> enable on those interrupts, which would then trickle up the IRQ chain to
> tell the VIC which interrupts to enable wakeup on?

This is the same as previous property. It does not have anything to do 
with requesting particular signal to wake up the system, but rather 
indicating that particular signal _can_ be requested to do so.

Again, this is not strictly needed for correct operation, but this way you 
wouldn't get any sanity check over wake up signals being requested.

Best regards,
Tomasz

  reply	other threads:[~2013-08-23 23:04 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21 21:21 [PATCH v7 0/7] Initial Device Tree support for S3C64xx Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 1/7] ARM: common: vic: Parse interrupt and resume masks from device tree Tomasz Figa
2013-08-21 23:19   ` Linus Walleij
2013-08-22  7:57     ` Tomasz Figa
2013-08-22 23:22   ` [PATCH v8 1/7] irqchip: " Tomasz Figa
2013-08-23 18:12     ` Linus Walleij
2013-08-23 22:11     ` Stephen Warren
2013-08-23 23:04       ` Tomasz Figa [this message]
2013-08-23 23:19         ` Stephen Warren
2013-08-23 23:33           ` Tomasz Figa
2013-08-24 15:25         ` Rob Herring
2013-08-24 15:31           ` Tomasz Figa
2013-08-24 16:35             ` Rob Herring
2013-08-24 16:57               ` Tomasz Figa
2013-08-23 23:54     ` [PATCH v9 " Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 2/7] ARM: s3c64xx: Bypass legacy initialization when booting with DT Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 3/7] gpio: samsung: Skip initialization if device tree is present Tomasz Figa
2013-08-21 23:21   ` Linus Walleij
2013-08-22  8:06     ` Tomasz Figa
2013-08-22  9:48       ` Mark Brown
2013-08-22  9:59       ` Kukjin Kim
2013-08-22 23:19         ` Tomasz Figa
2013-08-23 18:11         ` Linus Walleij
2013-08-25 17:21           ` Kukjin Kim
2013-08-22  9:45     ` Kukjin Kim
2013-08-21 21:21 ` [PATCH v7 4/7] ARM: s3c64xx: Add board file for boot using Device Tree Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 5/7] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs Tomasz Figa
2013-08-22 23:24   ` [PATCH v8 " Tomasz Figa
2013-08-23 23:56     ` [PATCH v9 " Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 6/7] ARM: dts: Add dts file for S3C6410-based Mini6410 board Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 7/7] ARM: dts: Add dts file for S3C6410-based SMDK6410 board Tomasz Figa
2013-08-25 17:31 ` [PATCH v7 0/7] Initial Device Tree support for S3C64xx Kukjin Kim

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=2159266.zeHHUDxisq@flatron \
    --to=tomasz.figa@gmail.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ian.campbell@citrix.com \
    --cc=kgene.kim@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=olof@lixom.net \
    --cc=pawel.moll@arm.com \
    --cc=rob.herring@calxeda.com \
    --cc=swarren@wwwdotorg.org \
    --cc=tglx@linutronix.de \
    /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).