linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: paul.liu@linaro.org (Ying-Chun Liu (PaulLiu))
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mx53_loco: add DA9053 PMIC support
Date: Wed, 18 Jan 2012 02:45:14 +0800	[thread overview]
Message-ID: <4F15C1BA.6090308@linaro.org> (raw)
In-Reply-To: <87fwffmk2p.fsf@lebrac.rtp-net.org>

Thanks all.

I'm preparing another new upload to fix all the problems.

(2012?01?17? 05:08), Arnaud Patard (Rtp) wrote:
> "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org> writes:
> 
> Hi,
> 
>> From: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>

>> +
>> +#define MX53_LOCO_DA9052_IRQ			(6*32 + 11)	/* GPIO7_11 */
> 
> you're aware that there's a IMX_GPIO_NR() macro for defining gpio,
> right ? Moreover, why not putting it with other #defines for gpio in the
> top of the file ?

Thanks. My fault. I'll change to use this macro.

> 
>> diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h
>> index fd9efb0..9fb56eb 100644
>> --- a/arch/arm/plat-mxc/include/mach/irqs.h
>> +++ b/arch/arm/plat-mxc/include/mach/irqs.h
>> @@ -53,7 +53,15 @@
>>  #endif
>>  /* REVISIT: Add IPU irqs on IMX51 */
>>  
>> -#define NR_IRQS			(MXC_IPU_IRQ_START + MX3_IPU_IRQS)
>> +#define MXC_PMIC_IRQ_START	(MXC_IPU_IRQ_START + MX3_IPU_IRQS)
>> +
>> +#ifdef CONFIG_MACH_MX53_LOCO
>> +#define MXC_PMIC_IRQS 32
>> +#else
>> +#define MXC_PMIC_IRQS 0
>> +#endif
> 
> So, each board using a pmic needing some irqs will need to add a
> #ifdef/#define combo ? Can it be made more generic ? How will it work
> with a kernel compiled for several machines, say loco and an other using
> a pmic using more than 32 irqs ?
> 

Sorry. Any possible suggestions?

I'm thinking about using CONFIG_SPARSE_IRQ
and then we can use .nr_irqs in MACHINE_START block so I can acquire
more irqs there.
But I don't know if this is another intrusive way.

Many Thanks,
Paul

  reply	other threads:[~2012-01-17 18:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16 17:10 [PATCH] mx53_loco: add DA9053 PMIC support Ying-Chun Liu (PaulLiu)
2012-01-16 17:10 ` Ying-Chun Liu (PaulLiu)
2012-01-16 19:19   ` Mark Brown
2012-01-16 21:08   ` Arnaud Patard (Rtp)
2012-01-17 18:45     ` Ying-Chun Liu (PaulLiu) [this message]
2012-01-16 23:00   ` Russell King - ARM Linux

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=4F15C1BA.6090308@linaro.org \
    --to=paul.liu@linaro.org \
    --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 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).