Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp500488rwb; Tue, 29 Nov 2022 01:18:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf4t7fSSMnqKFylA2CHEb7nUr7JiF1dZTHDm6ftUtm3ui/Zi/sE/W9ErIRswltKVXJXCJ7cA X-Received: by 2002:a63:1b52:0:b0:476:cba9:eba4 with SMTP id b18-20020a631b52000000b00476cba9eba4mr34652997pgm.350.1669713500662; Tue, 29 Nov 2022 01:18:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669713500; cv=none; d=google.com; s=arc-20160816; b=pzUhIV4tyRXyo8fF9YphgZRphgnPKYl9DO/0QQ0loC7CnXwAPcYX0IZOUMugJ5lrHq dWYFrdNcsvxKSuplYbLUAgh4teq5/lo804xvfpfJRHewsPHjU9oIa56r5Ws/hDVsKr37 ymZoFGjzfxOVOdZ1rSz9nvdLpd/pW9ZsQ343yUpShJbOS8ZSSmfqsRDIMLk46wmOmS8v u9gIcZHBr4UsaDz4/E0+wyAJxPPvd6f6fsJUcRJu8/8VdHnmSSD0esD/8wPc019TiPwz iKFXnChiE9zi3Iv5cZ5ie10fU1ZM6hj14+PXbD+SYkz3Ot8K2o4ZGaRxtSNvzAG/g7tw eR/w== 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=7NaR8Wfeg8/Isxdegwpxq0E0Ypft9eV9iDL1LT4QPEU=; b=JFRFOYPsTqrxWgPADD1XMAVpF11QdxbOyjYRDmbzXB+AxoO8LWMlUklXADxhnyK6vQ PB/tFaZFxub6ys1rIWJ9WNTv/odbtSbg7YpBdYDN9UgotKMAeXqhI5jO3rjFMHpiZr6G ZXBDxupj4bTCiyUiXtyREoHCUdRMfB8jthB2jzwH1yXbCvZeYZGWA2cqMp0nKIAyB93G jN4csUp8AwyMdgcVlH6nvfQThO9u3jZVw3ZCJiXs9wcmCXQFMpYziVAWQ//iJmXk9YdC O4InL3DFqEy7+R/OfuUd+mPpjJ9qc15+eIBrmqjD9tYk6nMr8OHX1W0PxX1ocM8URjbQ LQ8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=BNQxIYHE; 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 i18-20020a170902c95200b001884ba97a0fsi16071798pla.567.2022.11.29.01.18.05; Tue, 29 Nov 2022 01:18:20 -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=BNQxIYHE; 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 S231571AbiK2IyV (ORCPT + 83 others); Tue, 29 Nov 2022 03:54:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231567AbiK2IyE (ORCPT ); Tue, 29 Nov 2022 03:54:04 -0500 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 205E94E432 for ; Tue, 29 Nov 2022 00:53:55 -0800 (PST) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-3b56782b3f6so131458317b3.13 for ; Tue, 29 Nov 2022 00:53:55 -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=7NaR8Wfeg8/Isxdegwpxq0E0Ypft9eV9iDL1LT4QPEU=; b=BNQxIYHE8gdUmxDaDVEEv2yJCBlNnIyE11b0t+aDo/RC21YsVEpyIlfLaf+LPhHfeQ DyRsl3QQniG5chXQof7sltbjfMHcMVkDlY5kBHTfR//+FgcTMNTPJQh7GEesPko4DoCS 5X4oaWkzVQOUnuFWfIiN5ct2RCLmlsYTAJ5CM= 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=7NaR8Wfeg8/Isxdegwpxq0E0Ypft9eV9iDL1LT4QPEU=; b=YLVxxDD5AAbctokdtnDRX1dt8b9FvAefa3FfhVetEdSQeE3CGIvkmFQ5+MRrs1V16V A6lKt8XA9Y21WxFKVmIfwdLVwp7covr3Yce5SY4O1s4ah/6UoaIhXbwPCqQP0DyFf3X3 48DVCSf2dl0jYBwKeaeiTq7NOo6unjXD3JuMCRvKkB72mkVU9tzkbsr7FZpVIfpROAnI yHy3QbRQWaO0cXMwA50PGN902yXDxoZo5yHbCLFq9rEV+fxDL5iexEzevfUVheVMSRQn isvDDLvhE2sp/Wqylf7mAwTGK6xRBwV6FnFlbRih96kSPB3u68eAiPsIuUN6yw9FsdKw Vegw== X-Gm-Message-State: ANoB5pkkvQ6/8Gk0A/ED/swuzvoGQwcaTOcLO2aY7GvkSHYI53/0RBzq 5h+xw/iBb7rCyzpNnLWo4Frgj5jXaXUtva5PjTJk/A== X-Received: by 2002:a81:6ec6:0:b0:3c7:38d8:798f with SMTP id j189-20020a816ec6000000b003c738d8798fmr9091499ywc.489.1669712034273; Tue, 29 Nov 2022 00:53:54 -0800 (PST) MIME-Version: 1.0 References: <20221128103227.23171-1-arun.ramadoss@microchip.com> <20221128103227.23171-12-arun.ramadoss@microchip.com> In-Reply-To: <20221128103227.23171-12-arun.ramadoss@microchip.com> From: Pavan Chebbi Date: Tue, 29 Nov 2022 14:23:43 +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="000000000000b2c3a205ee982025" 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 --000000000000b2c3a205ee982025 Content-Type: text/plain; charset="UTF-8" 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; > + } > + > + 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, > }; > --000000000000b2c3a205ee982025 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/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZT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