[PATCH v3 1/2] mfd: add irq domain support for max8997 interrupts

Thomas Abraham thomas.abraham at linaro.org
Tue Mar 13 19:15:24 EST 2012


On 13 March 2012 11:35, Thomas Abraham <thomas.abraham at linaro.org> wrote:
> On 13 March 2012 08:58, Grant Likely <grant.likely at secretlab.ca> wrote:
>> On Thu, 23 Feb 2012 18:08:07 +0530, Thomas Abraham <thomas.abraham at linaro.org> wrote:
>>> Add irq domain support for max8997 interrupts. The reverse mapping method
>>> used is linear mapping since the sub-drivers of max8997 such as regulator
>>> and charger drivers can use the max8997 irq_domain to get the linux irq
>>> number for max8997 interrupts. All uses of irq_base in platform data and
>>> max8997 driver private data are removed.
>>>
>>> Cc: Grant Likely <grant.likely at secretlab.ca>
>>> Cc: MyungJoo Ham <myungjoo.ham at samsung.com>
>>> Signed-off-by: Thomas Abraham <thomas.abraham at linaro.org>
>>> ---
>>>  arch/arm/mach-exynos/mach-nuri.c    |    4 --
>>>  arch/arm/mach-exynos/mach-origen.c  |    1 -
>>>  drivers/mfd/max8997-irq.c           |   60 ++++++++++++++++++++--------------
>>>  drivers/mfd/max8997.c               |    1 -
>>>  include/linux/mfd/max8997-private.h |    4 ++-
>>>  include/linux/mfd/max8997.h         |    1 -
>>>  6 files changed, 38 insertions(+), 33 deletions(-)

[...]

>>
>> Hahaha.  The max8997_irqs table is kind of overdone when the group and mask values
>> can be arithmetically derived from the hwirq number..
>
> Yes, I agree. Each group could have maximum of 8 interrupts. Then,
> data->hwirq % 8 will be the group number and data->hwirq & 7 would be

Typo here. group number = data->hwirq >> 3 and mask = data->hwirq & 7.

Thanks,
Thomas.


More information about the devicetree-discuss mailing list