From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52E96373BFE for ; Sun, 15 Mar 2026 16:58:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773593900; cv=none; b=XTAqr8MeMHclJGRqmpZqHXSLeyXUdAmE0T3f55vXAeLi7SrANvr78KdGguoSCORtss1PYoRzNcRCR3Xs1yJEi/a+EwfSrdwlawpfisq43qANnTIE9Jy7m3ckGiCmodICl23tdVTGeyWloE0HswvPFqX8o4l6atuSsAVLqcFtFjM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773593900; c=relaxed/simple; bh=Np5aopo+fQ4TiHQg163XJ0Nh6UEBJpbECFtSCPpujfE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sH8RiBx7er37xlX7kUmd234+pxZDOU25ZlILnwn1n4AnVUA93oqJKbnToe7i1MO294Zy5DHSRpsa5v16PEQwodClx/kW35zQ0a0BOKdXVRSmafDNbkoaqYkLQi9qskG4JuUyFCmwDlfDF7Pyy8DLogIxpFTjFXQX20yVGIEFdUo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1w1on1-0001Ny-MY; Sun, 15 Mar 2026 17:58:07 +0100 Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w1omz-000Qvv-2Q; Sun, 15 Mar 2026 17:58:05 +0100 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1w1omz-00000003eYg-2iJF; Sun, 15 Mar 2026 17:58:05 +0100 Date: Sun, 15 Mar 2026 17:58:05 +0100 From: Oleksij Rempel To: Carlo Szelinsky Cc: kory.maincent@bootlin.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: pse-pd: add LED trigger support Message-ID: References: <20260314235916.2391678-1-github@szelinsky.de> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260314235916.2391678-1-github@szelinsky.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Hi Carlo, On Sun, Mar 15, 2026 at 12:59:16AM +0100, Carlo Szelinsky wrote: > Add LED trigger registration and polling into the PSE core subsystem. > Per-PI "delivering" and "enabled" triggers are registered for each PSE > controller, with a configurable poll interval via the DT property > "led-poll-interval-ms". Nice work. However, this needs an architectural shift. Since the hardware lacks interrupts, we need a core polling mechanism. However, the PSE core already has an event notification framework. The new polling should integrate with it instead of being LED-specific. Please consider this approach: - Add a generic polling loop in the PSE core. It should simulate the IRQ handler pse_isr() by detecting state changes and pushing standard events into the existing ntf_fifo to be processed by pse_send_ntf_worker() - Do not poll inside the LED code. The core state tracker should trigger LED events as a reaction to state changes. - Please add a define for the default polling interval. Include a comment explaining why this specific value is chosen. @Köry, How should we decide when to enable polling? Should we check if no IRQ is registered? Or add a flag if the controller lacks IRQ support? @Carlo, What controller are you using? Best Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |