]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: ti: icss-iep: Add phase offset configuration for perout signal
authorMeghana Malladi <m-malladi@ti.com>
Tue, 4 Mar 2025 10:57:53 +0000 (16:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:44 +0000 (10:45 +0200)
commit8b9808b1f64e201eb2416d1794ad5157bc2db660
tree495e2f297df15d3eff51a37e728e5135019285f4
parentd64a7166fd124db099c7ca51d1594a16c6492df3
net: ti: icss-iep: Add phase offset configuration for perout signal

[ Upstream commit 220cb1be647a7ca4e60241405c66f8f612c9b046 ]

icss_iep_perout_enable_hw() is a common function for generating
both pps and perout signals. When enabling pps, the application needs
to only pass enable/disable argument, whereas for perout it supports
different flags to configure the signal.

In case the app passes a valid phase offset value, the signal should
start toggling after that phase offset, else start immediately or
as soon as possible. ICSS_IEP_SYNC_START_REG register take number of
clock cycles to wait before starting the signal after activation time.
Set appropriate value to this register to support phase offset.

Signed-off-by: Meghana Malladi <m-malladi@ti.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20250304105753.1552159-3-m-malladi@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 7349c9e99793 ("net: ti: icss-iep: Fix possible NULL pointer dereference for perout request")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/ti/icssg/icss_iep.c