Skip to contentSkip to conversation

drivers: thermal: tsens: Work with old DTBs

PATCH Applied Amit Kucheria 3 participants 6 messages Dec 12, 2019 – Jan 1, 2020 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/1 drivers: thermal: tsens: Work with old DTBs

In order for the old DTBs to continue working, the new interrupt code must not return an error if interrupts are not defined. Don't return an error in case of -ENXIO.

Fixes 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support")
---
 drivers/thermal/qcom/tsens.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/thermal/qcom/tsens.c +3 -0
index 015e7d2015985..0e7cf52369326 100644
@@ -110,6 +110,9 @@ static int tsens_register(struct tsens_priv *priv)
 	irq = platform_get_irq_byname(pdev, "uplow");
 	if (irq < 0) {
 		ret = irq;
+		/* For old DTs with no IRQ defined */
+		if (irq == -ENXIO)
+			ret = 0;
 		goto err_put_device;
 	}
 
Signature · 1 line
2.20.1
Reviewed-by Tested-by on v2 1/1
#2 lore raw
Quoted 7 lines · Amit Kucheria

In order for the old DTBs to continue working, the new interrupt code must not return an error if interrupts are not defined. Don't return an error in case of -ENXIO.

Fixes 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support")
Quoted 21 lines
---
 drivers/thermal/qcom/tsens.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/thermal/qcom/tsens.c +3 -0
index 015e7d2015985..0e7cf52369326 100644
@@ -110,6 +110,9 @@ static int tsens_register(struct tsens_priv *priv)
 	irq = platform_get_irq_byname(pdev, "uplow");
 	if (irq < 0) {
 		ret = irq;
+		/* For old DTs with no IRQ defined */
+		if (irq == -ENXIO)
+			ret = 0;
 		goto err_put_device;
 	}
 
Signature · 1 line
2.20.1
#3 lore raw
In reply to Amit Kucheria
Quoted 7 lines · Amit Kucheria

In order for the old DTBs to continue working, the new interrupt code must not return an error if interrupts are not defined. Don't return an error in case of -ENXIO.

Fixes 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support")

Applied.

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#4 lore raw
Quoted 11 lines · Daniel Lezcano
Quoted 7 lines · Amit Kucheria

In order for the old DTBs to continue working, the new interrupt code must not return an error if interrupts are not defined. Don't return an error in case of -ENXIO.

Fixes 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support")

Applied.

Hi Daniel,

I haven't seen this fix until -rc4. Do you plan to send it?

Regards,
Amit

#5 lore raw
Quoted 12 lines · Amit Kucheria
Quoted 10 lines · Daniel Lezcano
Quoted 7 lines · Amit Kucheria

In order for the old DTBs to continue working, the new interrupt code must not return an error if interrupts are not defined. Don't return an error in case of -ENXIO.

Fixes 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support")
Quoted 5 lines
Quoted 1 line

Applied.

Hi Daniel,

I haven't seen this fix until -rc4. Do you plan to send it?

Hi Amit,

right, I've put it in the thermal/linux-next branch. I'll move it to thermal/fixes and send a PR tomorrow.

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#6 lore raw
Quoted 16 lines · Daniel Lezcano
Quoted 14 lines · Amit Kucheria
Quoted 11 lines · Daniel Lezcano
Quoted 7 lines · Amit Kucheria

In order for the old DTBs to continue working, the new interrupt code must not return an error if interrupts are not defined. Don't return an error in case of -ENXIO.

Fixes 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support")

Applied.

Quoted 8 lines
Quoted 3 lines

Hi Daniel,

I haven't seen this fix until -rc4. Do you plan to send it?

Hi Amit,

right, I've put it in the thermal/linux-next branch. I'll move it to thermal/fixes and send a PR tomorrow.

Thanks.