i2c: sh_mobile: Use platform_get_irq_optional() to get the interrupt
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tue, 21 Dec 2021 17:53:21 +0000 (17:53 +0000)
committerWolfram Sang <wsa@kernel.org>
Mon, 3 Jan 2022 09:17:24 +0000 (10:17 +0100)
commitaab799e44ce3953ac56c42721742c9cd9208b2f4
treefa60f980db23152b06dc5c40a948a4ced2a3c3e4
parentc3b2f911ac11892b672df7829becf28d3a830073
i2c: sh_mobile: Use platform_get_irq_optional() to get the interrupt

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_optional() for DT users only.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-sh_mobile.c