All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: "J, KEERTHY" <j-keerthy@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"ldewangan@nvidia.com" <ldewangan@nvidia.com>,
	"sameo@linux.intel.com" <sameo@linux.intel.com>,
	"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
	"swarren@nvidia.com" <swarren@nvidia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"gg@slimlogic.co.uk" <gg@slimlogic.co.uk>
Subject: Re: [PATCH v2 1/4] MFD: Palmas: Check if interrupts property exists and then only request irq
Date: Tue, 18 Jun 2013 11:08:15 -0600	[thread overview]
Message-ID: <51C093FF.6000204@wwwdotorg.org> (raw)
In-Reply-To: <DC88CAD03C0052499C1907B327FC63229EC563@DBDE04.ent.ti.com>

On 06/18/2013 10:54 AM, J, KEERTHY wrote:
> Hi Stephen,
> 
>> -----Original Message-----
>> From: Stephen Warren [mailto:swarren@wwwdotorg.org]
>> Sent: Tuesday, June 18, 2013 9:22 PM
>> To: J, KEERTHY
>> Cc: linux-omap@vger.kernel.org; broonie@kernel.org;
>> ldewangan@nvidia.com; sameo@linux.intel.com; grant.likely@secretlab.ca;
>> swarren@nvidia.com; linux-kernel@vger.kernel.org; linux-
>> doc@vger.kernel.org; gg@slimlogic.co.uk
>> Subject: Re: [PATCH v2 1/4] MFD: Palmas: Check if interrupts property
>> exists and then only request irq
>>
>> On 06/18/2013 04:01 AM, J Keerthy wrote:
>>> Check if interrupts property exists and then only request irq.
>>> On some boards INT line might not be connected to a valid irq line on
>>> the application processor. Hence keeping a check before requesting
>>> irq.
>>
>> When there is no interrupts property, surely i2c->irq == 0, which is an
>> invalid IRQ, and hence there's no need to check this before copying the
>> value?
> 
> The intent here is NOT to request irq with 0 or Invalid IRQ.

Sure.

> The board File will not populate the interrupts entry if the INT line is not
> Connected.

Do you mean the interrupts DT property won't be present if there is no
interrupt. If so, sure.

> Hence the patch checks for the 'interrupts' property.

That shouldn't be necessary; IIRC, the I2C core has already parsed the
interrupts property if there was one, and if there wasn't, it has set
i2c->irq to some invalid value already.

So, you simply need to check the value in i2c->irq, and don't need to
look at the DT at all.

  reply	other threads:[~2013-06-18 17:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 10:01 [PATCH v2 0/4] MFD: Palmas: Add TPS659038 PMIC support on Palmas J Keerthy
2013-06-18 10:01 ` J Keerthy
2013-06-18 10:01 ` [PATCH v2 1/4] MFD: Palmas: Check if interrupts property exists and then only request irq J Keerthy
2013-06-18 10:01   ` J Keerthy
2013-06-18 15:51   ` Stephen Warren
2013-06-18 16:54     ` J, KEERTHY
2013-06-18 17:08       ` Stephen Warren [this message]
2013-06-18 17:19         ` J, KEERTHY
2013-06-18 17:22           ` Stephen Warren
2013-06-18 17:33             ` J, KEERTHY
2013-06-18 19:11               ` Stephen Warren
2013-06-19  1:28                 ` J, KEERTHY
2013-06-18 18:07             ` Mark Brown

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=51C093FF.6000204@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=broonie@kernel.org \
    --cc=gg@slimlogic.co.uk \
    --cc=grant.likely@secretlab.ca \
    --cc=j-keerthy@ti.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=swarren@nvidia.com \
    /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.