[EXTERNAL] [PATCH 2/3] net: ti: icss-iep: Enable compare events

Sunil Kovvuri Goutham sgoutham at marvell.com
Thu May 30 22:12:10 PDT 2024



>-----Original Message-----
>From: Diogo Ivo <diogo.ivo at siemens.com>
>Sent: Wednesday, May 29, 2024 9:35 PM
>To: MD Danish Anwar <danishanwar at ti.com>; Roger Quadros
><rogerq at kernel.org>; David S. Miller <davem at davemloft.net>; Eric Dumazet
><edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>; Paolo Abeni
><pabeni at redhat.com>; Richard Cochran <richardcochran at gmail.com>;
>Nishanth Menon <nm at ti.com>; Vignesh Raghavendra <vigneshr at ti.com>;
>Tero Kristo <kristo at kernel.org>; Rob Herring <robh at kernel.org>; Krzysztof
>Kozlowski <krzk+dt at kernel.org>; Conor Dooley <conor+dt at kernel.org>; Jan
>Kiszka <jan.kiszka at siemens.com>
>Cc: linux-arm-kernel at lists.infradead.org; netdev at vger.kernel.org; linux-
>kernel at vger.kernel.org; devicetree at vger.kernel.org; Diogo Ivo
><diogo.ivo at siemens.com>
>Subject: [EXTERNAL] [PATCH 2/3] net: ti: icss-iep: Enable compare events
>
>The IEP module supports compare events, in which a value is written to a
>hardware register and when the IEP counter reaches the written value an
>interrupt is generated. Add handling for this interrupt in order to support PPS
>events.
>
>Signed-off-by: Diogo Ivo <diogo.ivo at siemens.com>
>---
> 	iep = devm_kzalloc(dev, sizeof(*iep), GFP_KERNEL);
> 	if (!iep)
>@@ -827,6 +883,21 @@ static int icss_iep_probe(struct platform_device
>*pdev)
> 	if (IS_ERR(iep->base))
> 		return -ENODEV;
>
>+	iep->cap_cmp_irq = platform_get_irq_byname_optional(pdev,
>"iep_cap_cmp");
>+	if (iep->cap_cmp_irq < 0) {
>+		if (iep->cap_cmp_irq == -EPROBE_DEFER)
>+			return iep->cap_cmp_irq;

This info is coming from DT, is PROBE_DIFFER error return value possible ?

>+		iep->cap_cmp_irq = 0;
>+	} else {
>+		ret = devm_request_irq(dev, iep->cap_cmp_irq,
>+				       icss_iep_cap_cmp_irq,
>IRQF_TRIGGER_HIGH,
>+				       "iep_cap_cmp", iep);
>+		if (ret)
>+			return dev_err_probe(iep->dev, ret,
>+					     "Request irq failed for cap_cmp\n");

Can't this driver live without this feature ?

>+		INIT_WORK(&iep->work, icss_iep_cap_cmp_work);
>+	}
>+



More information about the linux-arm-kernel mailing list