[DO NOT APPLY PATCH v7 08/10] pinctrl: renesas: rzg2l-poeg: output-disable request from GPT on dead time error

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

 



This patch adds support for output-disable requests from GPT,
when dead time error occurs.

Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
---
 drivers/pinctrl/renesas/poeg/rzg2l-poeg.c | 18 ++++++++++++++++++
 include/linux/pinctrl/rzg2l-poeg.h        |  1 +
 2 files changed, 19 insertions(+)

diff --git a/drivers/pinctrl/renesas/poeg/rzg2l-poeg.c b/drivers/pinctrl/renesas/poeg/rzg2l-poeg.c
index b66d717d6bf4..7576f756af3c 100644
--- a/drivers/pinctrl/renesas/poeg/rzg2l-poeg.c
+++ b/drivers/pinctrl/renesas/poeg/rzg2l-poeg.c
@@ -92,6 +92,8 @@ static void rzg2l_poeg_config_irq(struct rzg2l_poeg_chip *chip)
 	if (test_bit(RZG2L_GPT_OABLF, chip->gpt_irq))
 		rzg2l_gpt_poeg_disable_req_both_low(chip->gpt_dev, chip->index, true);
 
+	if (test_bit(RZG2L_GPT_DTEF, chip->gpt_irq))
+		rzg2l_gpt_poeg_disable_req_deadtime_error(chip->gpt_dev, chip->index, true);
 }
 
 static irqreturn_t rzg2l_poeg_irq(int irq, void *ptr)
@@ -356,10 +358,26 @@ static int rzg2l_poeg_probe(struct platform_device *pdev)
 		case POEG_GPT_BOTH_LOW:
 			assign_bit(RZG2L_GPT_OABLF, chip->gpt_irq, true);
 			break;
+		case POEG_GPT_DEAD_TIME:
+			assign_bit(RZG2L_GPT_DTEF, chip->gpt_irq, true);
+			break;
 		case POEG_GPT_BOTH_HIGH_LOW:
 			assign_bit(RZG2L_GPT_OABHF, chip->gpt_irq, true);
 			assign_bit(RZG2L_GPT_OABLF, chip->gpt_irq, true);
 			break;
+		case POEG_GPT_BOTH_HIGH_DEAD_TIME:
+			assign_bit(RZG2L_GPT_OABHF, chip->gpt_irq, true);
+			assign_bit(RZG2L_GPT_DTEF, chip->gpt_irq, true);
+			break;
+		case POEG_GPT_BOTH_LOW_DEAD_TIME:
+			assign_bit(RZG2L_GPT_OABLF, chip->gpt_irq, true);
+			assign_bit(RZG2L_GPT_DTEF, chip->gpt_irq, true);
+			break;
+		case POEG_GPT_ALL:
+			assign_bit(RZG2L_GPT_OABHF, chip->gpt_irq, true);
+			assign_bit(RZG2L_GPT_OABLF, chip->gpt_irq, true);
+			assign_bit(RZG2L_GPT_DTEF, chip->gpt_irq, true);
+			break;
 		default:
 			ret = -EINVAL;
 			goto err_pm;
diff --git a/include/linux/pinctrl/rzg2l-poeg.h b/include/linux/pinctrl/rzg2l-poeg.h
index e1e0ba5b47a1..5441de7f3751 100644
--- a/include/linux/pinctrl/rzg2l-poeg.h
+++ b/include/linux/pinctrl/rzg2l-poeg.h
@@ -4,6 +4,7 @@
 
 #include <linux/types.h>
 
+#define RZG2L_GPT_DTEF	0
 #define RZG2L_GPT_OABHF	1
 #define RZG2L_GPT_OABLF	2
 
-- 
2.25.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux