Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp552021rwb; Tue, 29 Nov 2022 02:10:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf4W19S7hyry72DYNQb/SzQE72z0w35jlk3oCfrHb4UwH7vHDN7Ks/wlZF+04AtghsJ8gsmx X-Received: by 2002:a17:90a:460f:b0:218:c47f:ed9a with SMTP id w15-20020a17090a460f00b00218c47fed9amr39665056pjg.19.1669716636689; Tue, 29 Nov 2022 02:10:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669716636; cv=none; d=google.com; s=arc-20160816; b=L+wSryVDnl6pvNpiWJvXjeMKOM+Q2OkKAwiIAO5Ca+4s+sFTP+iMi6WeC2HUPg8ZhJ 4kjI1qZW7QbYk9jqcdNGg1EDAjlaLXTGzUzNCN3vk6y81DKrq77W3A52CQchfE7q1MmK xmUdgiKjNanX5UwoYx3ilCwnhfde8hFyBSg03ZYMv54COWiZdOUsPJvspYtxYIgYpVF4 NOGZuEDU3bQuX8swYlNM8JqsCmMyeKqlhVAHjMivxZCYEOBXX74jBnPqdhwau7D11y1B ptrc54LtTdMOV0m0riqcNp7eK71Bltt17d2giig9Z8XaQNRzZa8+SgOwdXpZLGq/RBBb 9UdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=SeWaCg5nHpOFeswP59XQShuGjHZJP1Mmj3HGIOnGpxg=; b=kbofWytsK9ibl2uE83RlcBNIlYyw3wFy4IJZXi+hibX2MYSee7S0CQBX3V2v02ZZ5D Zq8AI/I5zV/VL2tDS1BN6oD6Vsyt5wCb7ddSCJqT6xSIyAS3orx0G2xzsX0r0xviNIyj Ny71FSap5X/qmMqZ6IZ+3j36Dc60EJyJq+Yx1Wh6EsImzRZAEIjjC6xgsNB/VSPmgMPr ct9muyWX1sJS0YkpXU02KxdGAI7IHymo7ZbvzHlywFH0F37QXnnnPhz1pXw/YDDaR2FN akVYgBDpGaKQMRIU8Oz/bRx8jDmOld3zHKYDTDqXQ7+oy06wCd8ZiIh+DJ/BgWSDvdjD NY4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=GJgy661p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k69-20020a628448000000b00574dbc0a46csi9678923pfd.274.2022.11.29.02.10.24; Tue, 29 Nov 2022 02:10:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=GJgy661p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232083AbiK2J5W (ORCPT + 83 others); Tue, 29 Nov 2022 04:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231989AbiK2J5Q (ORCPT ); Tue, 29 Nov 2022 04:57:16 -0500 Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72DD51EC4A for ; Tue, 29 Nov 2022 01:57:12 -0800 (PST) Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-3b56782b3f6so132816087b3.13 for ; Tue, 29 Nov 2022 01:57:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SeWaCg5nHpOFeswP59XQShuGjHZJP1Mmj3HGIOnGpxg=; b=GJgy661p18ExaAuAPAU+YQWqybdzGKFXdy+tHMQLauH69FSF04unrPKykkq0PI+Kci kC78xIqqTDEAwdcbm77iFIz9N+p4GkE85pvkyCIG/HUZ6D+dgtk1vW6SP3kPMf7R/H9+ IlwahEwP2h43i79kY3nD7/Gv6jyNm5Mc7Swcs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SeWaCg5nHpOFeswP59XQShuGjHZJP1Mmj3HGIOnGpxg=; b=DXD2R7m6sTjRk2b/Yv/tBUNg3sTqTWCpvX74yAdm+YNocfaHZPxH7Jq1On2eF+7UQH 4hUKhFJnJ/7muq5sxwAym5W2tBRKovhn8nsSMGPBYmsvyIxQ+JFnTSVsKhCZTwnYe1t7 NEd8Bj6DAm6nt+NAis9ElQuEDNW64ykyE4dWPlswSSAyX71gAXL/1py+qXNF5BiYGbq1 osvBzNj4TcxkuZ3TJwmbqbNufxJUlzsyS+eIIjDQwZDa10QFpO0+Vz4vKeKYnWhVscFX apvh8acTsUITdDk1Ocu11M74t3jj8wf3yP8P2IzfBnsp9d21/3Qpyvdm0kdjXTDQTVW/ BRwg== X-Gm-Message-State: ANoB5pnOSgb10PnQqMx3q5PaUDS6A9F/iQycaqO4W9NvK9Ij/5koNTUv w8MPCu8xZND6JS1qhBPjkwi/EsJ4Qea6/C1JlqfyoQ== X-Received: by 2002:a81:3c2:0:b0:36b:e25d:d506 with SMTP id 185-20020a8103c2000000b0036be25dd506mr43115734ywd.395.1669715831574; Tue, 29 Nov 2022 01:57:11 -0800 (PST) MIME-Version: 1.0 References: <20221128103227.23171-1-arun.ramadoss@microchip.com> <20221128103227.23171-12-arun.ramadoss@microchip.com> In-Reply-To: From: Pavan Chebbi Date: Tue, 29 Nov 2022 15:27:00 +0530 Message-ID: Subject: Re: [Patch net-next v1 11/12] net: dsa: microchip: ptp: add periodic output signal To: Arun Ramadoss Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, Tristram.Ha@microchip.com, richardcochran@gmail.com, ceggers@arri.de Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000009867305ee99035e" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000009867305ee99035e Content-Type: text/plain; charset="UTF-8" On Tue, Nov 29, 2022 at 2:23 PM Pavan Chebbi wrote: > > On Mon, Nov 28, 2022 at 4:05 PM Arun Ramadoss > wrote: > > > +static int ksz_ptp_enable(struct ptp_clock_info *ptp, > > + struct ptp_clock_request *req, int on) > > +{ > > + struct ksz_ptp_data *ptp_data = ptp_caps_to_data(ptp); > > + struct ksz_device *dev = ptp_data_to_ksz_dev(ptp_data); > > + struct ptp_perout_request *request = &req->perout; > > + int ret; > > + > > + switch (req->type) { > > + case PTP_CLK_REQ_PEROUT: > > + if (request->index > ptp->n_per_out) > > + return -EINVAL; > > Should be -EOPNOTSUPP ? I see some other places where -EOPNOTSUPP is > more appropriate. > > > + > > + mutex_lock(&ptp_data->lock); > > + ret = ksz_ptp_enable_perout(dev, request, on); > > + mutex_unlock(&ptp_data->lock); > > + break; > > + default: > > + return -EINVAL; OK I really meant here. > > + } > > + > > + return ret; > > +} > > + > > /* Function is pointer to the do_aux_work in the ptp_clock capability */ > > static long ksz_ptp_do_aux_work(struct ptp_clock_info *ptp) > > { > > @@ -508,6 +823,8 @@ static const struct ptp_clock_info ksz_ptp_caps = { > > .adjfine = ksz_ptp_adjfine, > > .adjtime = ksz_ptp_adjtime, > > .do_aux_work = ksz_ptp_do_aux_work, > > + .enable = ksz_ptp_enable, > > + .n_per_out = 3, > > }; > > --00000000000009867305ee99035e Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQbQYJKoZIhvcNAQcCoIIQXjCCEFoCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3EMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26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