]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: ti: icss-iep: Reject perout generation request
authorMeghana Malladi <m-malladi@ti.com>
Thu, 27 Feb 2025 09:24:41 +0000 (14:54 +0530)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Feb 2025 16:09:02 +0000 (08:09 -0800)
IEP driver supports both perout and pps signal generation
but perout feature is faulty with half-cooked support
due to some missing configuration. Remove perout
support from the driver and reject perout requests with
"not supported" error code.

Fixes: c1e0230eeaab2 ("net: ti: icss-iep: Add IEP driver")
Signed-off-by: Meghana Malladi <m-malladi@ti.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20250227092441.1848419-1-m-malladi@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ti/icssg/icss_iep.c

index 768578c0d9587dd1f86d8d42746e85a686db0627..d59c1744840af2cbd6fc887b87f5e2f84bdde1e7 100644 (file)
@@ -474,26 +474,7 @@ static int icss_iep_perout_enable_hw(struct icss_iep *iep,
 static int icss_iep_perout_enable(struct icss_iep *iep,
                                  struct ptp_perout_request *req, int on)
 {
-       int ret = 0;
-
-       mutex_lock(&iep->ptp_clk_mutex);
-
-       if (iep->pps_enabled) {
-               ret = -EBUSY;
-               goto exit;
-       }
-
-       if (iep->perout_enabled == !!on)
-               goto exit;
-
-       ret = icss_iep_perout_enable_hw(iep, req, on);
-       if (!ret)
-               iep->perout_enabled = !!on;
-
-exit:
-       mutex_unlock(&iep->ptp_clk_mutex);
-
-       return ret;
+       return -EOPNOTSUPP;
 }
 
 static void icss_iep_cap_cmp_work(struct work_struct *work)