From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA8D9C433DF for ; Tue, 20 Oct 2020 08:50:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86B03222C8 for ; Tue, 20 Oct 2020 08:50:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392156AbgJTIuN (ORCPT ); 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: devicetree@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