* [PATCH v2 1/3] bus: moxtet: Mark the irq as shared
[not found] <20231128213536.3764212-1-sjoerd@collabora.com>
@ 2023-11-28 21:35 ` Sjoerd Simons
2023-12-07 14:43 ` Marek Behún
2023-11-28 21:35 ` [PATCH v2 2/3] bus: moxtet: Add spi device table Sjoerd Simons
2023-11-28 21:35 ` [PATCH v2 3/3] arm64: dts: armada-3720-turris-mox: set irq type for RTC Sjoerd Simons
2 siblings, 1 reply; 6+ messages in thread
From: Sjoerd Simons @ 2023-11-28 21:35 UTC (permalink / raw)
To: Marek Behún; +Cc: Pali Rohár, kernel, stable, linux-kernel
The Turris Mox shares the moxtet IRQ with various devices on the board,
so mark the IRQ as shared in the driver as well.
Without this loading the module will fail with:
genirq: Flags mismatch irq 40. 00002002 (moxtet) vs. 00002080 (mcp7940x)
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Cc: stable@vger.kernel.org # v6.2+
---
(no changes since v1)
drivers/bus/moxtet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/moxtet.c b/drivers/bus/moxtet.c
index 5eb0fe73ddc4..48c18f95660a 100644
--- a/drivers/bus/moxtet.c
+++ b/drivers/bus/moxtet.c
@@ -755,7 +755,7 @@ static int moxtet_irq_setup(struct moxtet *moxtet)
moxtet->irq.masked = ~0;
ret = request_threaded_irq(moxtet->dev_irq, NULL, moxtet_irq_thread_fn,
- IRQF_ONESHOT, "moxtet", moxtet);
+ IRQF_SHARED | IRQF_ONESHOT, "moxtet", moxtet);
if (ret < 0)
goto err_free;
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] bus: moxtet: Add spi device table
[not found] <20231128213536.3764212-1-sjoerd@collabora.com>
2023-11-28 21:35 ` [PATCH v2 1/3] bus: moxtet: Mark the irq as shared Sjoerd Simons
@ 2023-11-28 21:35 ` Sjoerd Simons
2023-12-07 14:43 ` Marek Behún
2023-11-28 21:35 ` [PATCH v2 3/3] arm64: dts: armada-3720-turris-mox: set irq type for RTC Sjoerd Simons
2 siblings, 1 reply; 6+ messages in thread
From: Sjoerd Simons @ 2023-11-28 21:35 UTC (permalink / raw)
To: Marek Behún; +Cc: Pali Rohár, kernel, stable, linux-kernel
The moxtet module fails to auto-load on. Add a SPI id table to
allow it to do so.
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Cc: stable@vger.kernel.org
---
(no changes since v1)
drivers/bus/moxtet.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/bus/moxtet.c b/drivers/bus/moxtet.c
index 48c18f95660a..e384fbc6c1d9 100644
--- a/drivers/bus/moxtet.c
+++ b/drivers/bus/moxtet.c
@@ -830,6 +830,12 @@ static void moxtet_remove(struct spi_device *spi)
mutex_destroy(&moxtet->lock);
}
+static const struct spi_device_id moxtet_spi_ids[] = {
+ { "moxtet" },
+ { },
+};
+MODULE_DEVICE_TABLE(spi, moxtet_spi_ids);
+
static const struct of_device_id moxtet_dt_ids[] = {
{ .compatible = "cznic,moxtet" },
{},
@@ -841,6 +847,7 @@ static struct spi_driver moxtet_spi_driver = {
.name = "moxtet",
.of_match_table = moxtet_dt_ids,
},
+ .id_table = moxtet_spi_ids,
.probe = moxtet_probe,
.remove = moxtet_remove,
};
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] arm64: dts: armada-3720-turris-mox: set irq type for RTC
[not found] <20231128213536.3764212-1-sjoerd@collabora.com>
2023-11-28 21:35 ` [PATCH v2 1/3] bus: moxtet: Mark the irq as shared Sjoerd Simons
2023-11-28 21:35 ` [PATCH v2 2/3] bus: moxtet: Add spi device table Sjoerd Simons
@ 2023-11-28 21:35 ` Sjoerd Simons
2023-12-07 14:43 ` Marek Behún
2 siblings, 1 reply; 6+ messages in thread
From: Sjoerd Simons @ 2023-11-28 21:35 UTC (permalink / raw)
To: Marek Behún
Cc: Pali Rohár, kernel, stable, Andrew Lunn, Conor Dooley,
Gregory Clement, Krzysztof Kozlowski, Rob Herring,
Sebastian Hesselbarth, devicetree, linux-arm-kernel, linux-kernel
The rtc on the mox shares its interrupt line with the moxtet bus. Set
the interrupt type to be consistent between both devices. This ensures
correct setup of the interrupt line regardless of probing order.
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Cc: stable@vger.kernel.org # v6.2+
Fixes: 21aad8ba615e ("arm64: dts: armada-3720-turris-mox: Add missing interrupt for RTC")
---
(no changes since v1)
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
index 9eab2bb22134..805ef2d79b40 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
@@ -130,7 +130,7 @@ rtc@6f {
compatible = "microchip,mcp7940x";
reg = <0x6f>;
interrupt-parent = <&gpiosb>;
- interrupts = <5 0>; /* GPIO2_5 */
+ interrupts = <5 IRQ_TYPE_EDGE_FALLING>; /* GPIO2_5 */
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/3] bus: moxtet: Mark the irq as shared
2023-11-28 21:35 ` [PATCH v2 1/3] bus: moxtet: Mark the irq as shared Sjoerd Simons
@ 2023-12-07 14:43 ` Marek Behún
0 siblings, 0 replies; 6+ messages in thread
From: Marek Behún @ 2023-12-07 14:43 UTC (permalink / raw)
To: Sjoerd Simons; +Cc: kernel, stable, linux-kernel
On Tue, 28 Nov 2023 22:35:04 +0100
Sjoerd Simons <sjoerd@collabora.com> wrote:
> The Turris Mox shares the moxtet IRQ with various devices on the board,
> so mark the IRQ as shared in the driver as well.
>
> Without this loading the module will fail with:
> genirq: Flags mismatch irq 40. 00002002 (moxtet) vs. 00002080 (mcp7940x)
>
> Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
> Cc: stable@vger.kernel.org # v6.2+
> ---
>
> (no changes since v1)
>
> drivers/bus/moxtet.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/moxtet.c b/drivers/bus/moxtet.c
> index 5eb0fe73ddc4..48c18f95660a 100644
> --- a/drivers/bus/moxtet.c
> +++ b/drivers/bus/moxtet.c
> @@ -755,7 +755,7 @@ static int moxtet_irq_setup(struct moxtet *moxtet)
> moxtet->irq.masked = ~0;
>
> ret = request_threaded_irq(moxtet->dev_irq, NULL, moxtet_irq_thread_fn,
> - IRQF_ONESHOT, "moxtet", moxtet);
> + IRQF_SHARED | IRQF_ONESHOT, "moxtet", moxtet);
> if (ret < 0)
> goto err_free;
>
Reviewed-by: Marek Behún <kabel@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/3] bus: moxtet: Add spi device table
2023-11-28 21:35 ` [PATCH v2 2/3] bus: moxtet: Add spi device table Sjoerd Simons
@ 2023-12-07 14:43 ` Marek Behún
0 siblings, 0 replies; 6+ messages in thread
From: Marek Behún @ 2023-12-07 14:43 UTC (permalink / raw)
To: Sjoerd Simons; +Cc: kernel, stable, linux-kernel
On Tue, 28 Nov 2023 22:35:05 +0100
Sjoerd Simons <sjoerd@collabora.com> wrote:
> The moxtet module fails to auto-load on. Add a SPI id table to
> allow it to do so.
>
> Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
> Cc: stable@vger.kernel.org
>
> ---
>
> (no changes since v1)
>
> drivers/bus/moxtet.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/bus/moxtet.c b/drivers/bus/moxtet.c
> index 48c18f95660a..e384fbc6c1d9 100644
> --- a/drivers/bus/moxtet.c
> +++ b/drivers/bus/moxtet.c
> @@ -830,6 +830,12 @@ static void moxtet_remove(struct spi_device *spi)
> mutex_destroy(&moxtet->lock);
> }
>
> +static const struct spi_device_id moxtet_spi_ids[] = {
> + { "moxtet" },
> + { },
> +};
> +MODULE_DEVICE_TABLE(spi, moxtet_spi_ids);
> +
> static const struct of_device_id moxtet_dt_ids[] = {
> { .compatible = "cznic,moxtet" },
> {},
> @@ -841,6 +847,7 @@ static struct spi_driver moxtet_spi_driver = {
> .name = "moxtet",
> .of_match_table = moxtet_dt_ids,
> },
> + .id_table = moxtet_spi_ids,
> .probe = moxtet_probe,
> .remove = moxtet_remove,
> };
Reviewed-by: Marek Behún <kabel@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 3/3] arm64: dts: armada-3720-turris-mox: set irq type for RTC
2023-11-28 21:35 ` [PATCH v2 3/3] arm64: dts: armada-3720-turris-mox: set irq type for RTC Sjoerd Simons
@ 2023-12-07 14:43 ` Marek Behún
0 siblings, 0 replies; 6+ messages in thread
From: Marek Behún @ 2023-12-07 14:43 UTC (permalink / raw)
To: Sjoerd Simons
Cc: kernel, stable, Andrew Lunn, Conor Dooley, Gregory Clement,
Krzysztof Kozlowski, Rob Herring, Sebastian Hesselbarth,
devicetree, linux-arm-kernel, linux-kernel
On Tue, 28 Nov 2023 22:35:06 +0100
Sjoerd Simons <sjoerd@collabora.com> wrote:
> The rtc on the mox shares its interrupt line with the moxtet bus. Set
> the interrupt type to be consistent between both devices. This ensures
> correct setup of the interrupt line regardless of probing order.
>
> Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
> Cc: stable@vger.kernel.org # v6.2+
> Fixes: 21aad8ba615e ("arm64: dts: armada-3720-turris-mox: Add missing interrupt for RTC")
>
> ---
>
> (no changes since v1)
>
> arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> index 9eab2bb22134..805ef2d79b40 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> @@ -130,7 +130,7 @@ rtc@6f {
> compatible = "microchip,mcp7940x";
> reg = <0x6f>;
> interrupt-parent = <&gpiosb>;
> - interrupts = <5 0>; /* GPIO2_5 */
> + interrupts = <5 IRQ_TYPE_EDGE_FALLING>; /* GPIO2_5 */
> };
> };
>
Reviewed-by: Marek Behún <kabel@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-07 14:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231128213536.3764212-1-sjoerd@collabora.com>
2023-11-28 21:35 ` [PATCH v2 1/3] bus: moxtet: Mark the irq as shared Sjoerd Simons
2023-12-07 14:43 ` Marek Behún
2023-11-28 21:35 ` [PATCH v2 2/3] bus: moxtet: Add spi device table Sjoerd Simons
2023-12-07 14:43 ` Marek Behún
2023-11-28 21:35 ` [PATCH v2 3/3] arm64: dts: armada-3720-turris-mox: set irq type for RTC Sjoerd Simons
2023-12-07 14:43 ` Marek Behún
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox