Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4343070pxu; Tue, 20 Oct 2020 14:45:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxQ7UaImKE99wMGCS2QkrRI8DJfe9EbPcacAQccQDqrh9M0Xr9inb6P2LPDcEx+hy2JCak X-Received: by 2002:a17:907:10ce:: with SMTP id rv14mr177894ejb.547.1603230306578; Tue, 20 Oct 2020 14:45:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603230306; cv=none; d=google.com; s=arc-20160816; b=fHA8XH5I41cM3Br8HGq8/cw9w7556LY3WpZ8wejNH9gYQUD4bKaKoOvHZJzAa3ubFQ ICQu7pE8j36LahSuBgDpjBe8VmOGGHpvfwzW8F3s5n+sr4sfYh/qxI5L9Wq70lMRpKbo isyIdNUcTZ2czEPO3+lgX+oXHxxONXL4eV8i5YGkjTlbcgrpAx/U1//gpsgukPMwJyxL BvMuC2p7R+W4u9ieQLCw/MlCITyFnVXwfybAsAJOoWshm7s1w6POSSS9oK9Ct5OLgaQD VT+VTgy7uHoBa6TOPXtay6QJpcPL0eCnsDf1QbXoE3rYio5JUz/wSyVmHBrGgwGgrHiX iJIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from; bh=WkB/w/kmQd6IFxF/wHH5dz+HvQmNvt51iMXE801h8Q0=; b=z3p62ZFShosWDNWUibvD4W2jPdVibQVSieerYnsFogDy1GwvupFGpS+hioyDUvTeQt 749PUAXMSiewJHpgrTPbob5zDDpvXW60izn4H7Cpsln9/q6La6v2YpVX5a0/h9Y8Knv+ ivwIqEHUZ6Y4CEabEtehGX57/HeJfNMmOQeXUAX0CgIxaUo+JyNR5YEk1dJL2XWwGYu9 cwyfbNNxmkyITN9h5luxt32GsPiaGY5C8GtQZWOyH/cb/S8lbARkpznPzk3Mx/2V5YvK 3CmLC2tDyhWBjC72iZ6MkWGYfqmXUhPxRFbCGf8I35O9ZnD4h9dFFWGCyxUCGLj/xgDp iehA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd12si2387382ejb.745.2020.10.20.14.44.43; Tue, 20 Oct 2020 14:45:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392163AbgJTIuN (ORCPT + 99 others); Tue, 20 Oct 2020 04:50:13 -0400 Received: from mailout02.rmx.de ([62.245.148.41]:49571 "EHLO mailout02.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392124AbgJTIuN (ORCPT ); Tue, 20 Oct 2020 04:50:13 -0400 Received: from kdin02.retarus.com (kdin02.dmz1.retloc [172.19.17.49]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout02.rmx.de (Postfix) with ESMTPS id 4CFnPr18QDzNrNK; Tue, 20 Oct 2020 10:50:08 +0200 (CEST) Received: from mta.arri.de (unknown [217.111.95.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by kdin02.retarus.com (Postfix) with ESMTPS id 4CFnPW3FF1z2TS9Z; Tue, 20 Oct 2020 10:49:51 +0200 (CEST) Received: from n95hx1g2.localnet (192.168.54.97) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 20 Oct 2020 10:38:45 +0200 From: Christian Eggers To: Vladimir Oltean CC: Florian Fainelli , Andrew Lunn , Vivien Didelot , Jakub Kicinski , Rob Herring , Helmut Grohne , Paul Barker , Codrin Ciubotariu , George McCollister , Marek Vasut , Tristram Ha , "David S . Miller" , Woojung Huh , Microchip Linux Driver Support , , , Subject: Re: [RFC PATCH net-next 8/9] net: dsa: microchip: ksz9477: add Pulse Per Second (PPS) support Date: Tue, 20 Oct 2020 10:38:44 +0200 Message-ID: <7715832.IkuprK9oYb@n95hx1g2> Organization: Arnold & Richter Cine Technik GmbH & Co. Betriebs KG In-Reply-To: <20201019174617.uf7andznyij75mpd@skbuf> References: <20201019172435.4416-1-ceggers@arri.de> <20201019172435.4416-9-ceggers@arri.de> <20201019174617.uf7andznyij75mpd@skbuf> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Originating-IP: [192.168.54.97] X-RMX-ID: 20201020-104955-4CFnPW3FF1z2TS9Z-0@kdin02 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, 19 October 2020, 19:46:17 CEST, Vladimir Oltean wrote: > On Mon, Oct 19, 2020 at 07:24:34PM +0200, Christian Eggers wrote: > > static int ksz9477_ptp_enable(struct ptp_clock_info *ptp, struct > > ptp_clock_request *req, int on) { > > > > - return -ENOTTY; > > + struct ksz_device *dev = container_of(ptp, struct ksz_device, ptp_caps); > > + int ret; > > + > > + switch (req->type) { > > + case PTP_CLK_REQ_PPS: > > + mutex_lock(&dev->ptp_mutex); > > + ret = ksz9477_ptp_enable_pps(dev, on); > > + mutex_unlock(&dev->ptp_mutex); > > + return ret; > > + default: > > + return -EINVAL; > > + } > > + > > + return 0; > > > > } > > Nope, this is not what you're looking for. Please implement > PTP_CLK_REQ_PEROUT. Are you sure? I have implemented both (see patch 9/9). I cannot see that the PTP_ENABLE_PPS(2) ioctls are translated into PTP_CLK_REQ_PEROUT. PTP_CLK_REQ_PEROUT is also called in pps_enable_store(). regards Christian