Re: [PATCH] mx53_loco: add DA9053 PMIC support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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@xxxxxxxxxx> writes:
> 
> Hi,
> 
>> From: "Ying-Chun Liu (PaulLiu)" <paul.liu@xxxxxxxxxx>

>> +
>> +#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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



[Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Follow linuxarm on Twitter