[DO NOT APPLY PATCH v8 14/15] pinctrl: renesas: rzg2l-poeg: output-disable request from GPT on dead time error

Biju posted 15 patches 1 week, 3 days ago
[DO NOT APPLY PATCH v8 14/15] pinctrl: renesas: rzg2l-poeg: output-disable request from GPT on dead time error
Posted by Biju 1 week, 3 days ago
From: Biju Das <biju.das.jz@bp.renesas.com>

Add support for output disable request from gpt, when dead time
error occurred.

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

diff --git a/drivers/pinctrl/renesas/poeg/rzg2l-poeg.c b/drivers/pinctrl/renesas/poeg/rzg2l-poeg.c
index f66f69c5b1f7..d59e18832adf 100644
--- a/drivers/pinctrl/renesas/poeg/rzg2l-poeg.c
+++ b/drivers/pinctrl/renesas/poeg/rzg2l-poeg.c
@@ -92,6 +92,9 @@ 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)
@@ -353,6 +356,9 @@ 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_EXT_PIN_CTRL:
 		rzg2l_poeg_write(chip, POEGG_PIDE);
 		break;
@@ -360,6 +366,19 @@ static int rzg2l_poeg_probe(struct platform_device *pdev)
 		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 ed3e08f10834..5edf719c155d 100644
--- a/include/linux/pinctrl/rzg2l-poeg.h
+++ b/include/linux/pinctrl/rzg2l-poeg.h
@@ -9,6 +9,7 @@
 #define RZG2L_POEG_GPT_CFG_IRQ_CMD			2
 #define RZG2L_POEG_GPT_FAULT_CLR_CMD			3
 
+#define RZG2L_GPT_DTEF	0
 #define RZG2L_GPT_OABHF	1
 #define RZG2L_GPT_OABLF	2
 
-- 
2.43.0
Re: [DO NOT APPLY PATCH v8 14/15] pinctrl: renesas: rzg2l-poeg: output-disable request from GPT on dead time error
Posted by kernel test robot 1 week, 1 day ago
Hi Biju,

kernel test robot noticed the following build errors:

[auto build test ERROR on geert-renesas-drivers/renesas-pinctrl]
[also build test ERROR on linusw-pinctrl/devel linusw-pinctrl/for-next geert-renesas-devel/next linus/master v6.18-rc6 next-20251121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Biju/dt-bindings-pwm-rzg2l-gpt-Document-renesas-poegs-property/20251122-001415
base:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git renesas-pinctrl
patch link:    https://lore.kernel.org/r/20251121160842.371922-15-biju.das.jz%40bp.renesas.com
patch subject: [DO NOT APPLY PATCH v8 14/15] pinctrl: renesas: rzg2l-poeg: output-disable request from GPT on dead time error
config: loongarch-randconfig-002-20251123 (https://download.01.org/0day-ci/archive/20251123/202511231456.D6amN8I5-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251123/202511231456.D6amN8I5-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511231456.D6amN8I5-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pinctrl/renesas/poeg/rzg2l-poeg.c:97:3: error: call to undeclared function 'rzg2l_gpt_poeg_disable_req_deadtime_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      97 |                 rzg2l_gpt_poeg_disable_req_deadtime_error(chip->gpt_dev, chip->index, true);
         |                 ^
   drivers/pinctrl/renesas/poeg/rzg2l-poeg.c:97:3: note: did you mean 'rzg2l_gpt_poeg_disable_req_deadtime_err'?
   include/linux/pwm/rzg2l-gpt.h:38:19: note: 'rzg2l_gpt_poeg_disable_req_deadtime_err' declared here
      38 | static inline int rzg2l_gpt_poeg_disable_req_deadtime_err(void *gpt_device, u8 grp, bool on)
         |                   ^
   1 error generated.


vim +/rzg2l_gpt_poeg_disable_req_deadtime_error +97 drivers/pinctrl/renesas/poeg/rzg2l-poeg.c

    87	
    88	static void rzg2l_poeg_config_irq(struct rzg2l_poeg_chip *chip)
    89	{
    90		if (test_bit(RZG2L_GPT_OABHF, chip->gpt_irq))
    91			rzg2l_gpt_poeg_disable_req_both_high(chip->gpt_dev, chip->index, true);
    92	
    93		if (test_bit(RZG2L_GPT_OABLF, chip->gpt_irq))
    94			rzg2l_gpt_poeg_disable_req_both_low(chip->gpt_dev, chip->index, true);
    95	
    96		if (test_bit(RZG2L_GPT_DTEF, chip->gpt_irq))
  > 97			rzg2l_gpt_poeg_disable_req_deadtime_error(chip->gpt_dev, chip->index, true);
    98	}
    99	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki