Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3390021pxu; Mon, 19 Oct 2020 10:51:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw759tkjdkRITyA1+Og9VloYZImAZ1LAMYpGYv/IF4QiSHW/0yw5OdmdScrASLmRCEMWKIh X-Received: by 2002:a17:906:234d:: with SMTP id m13mr1023520eja.497.1603129861328; Mon, 19 Oct 2020 10:51:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603129861; cv=none; d=google.com; s=arc-20160816; b=Zb3SW1JtxtdIIhit9HX7SLc9tUDmWcD0P5qe1xptehJXLljLkS1g89V8kzdrCtU52H zpD7wgm1He+2I71R9FRN/sSNENNDBNQyrox9ocyXIH6OI2ObrUywJh5mviYTBX6V4ngQ DoIFmzhNRmMKmTiE1FUzAavFTp4WiPZf6kzKsKwnR5hmf+VF5opCidpCX+0J2BfT7nKV VfSejNU69CCNgL7dU7MxXrhWH8y0raZnFn1qsNXZezCvacklqJzzMEXmi9qIrR0OfJvS 396eA2/gskNdyj9aEMbB/RPHCSZCaZ8J1HQbB5/rPAMUpfPI3efvkTlt9uQD2w8zZAG5 8lOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tuz0iMfzR0PaX63JhJ+Y+JYTOZifsMKunZ+jRj1PPWc=; b=BaC3rtZKJHQbVRlcj4KbsGwWiPAsJfY4HS6YJkVok3XedrJQ/ckPif2f6xMFJOxAek Pg3PZvZzpA5A/BKrAoG1SqDPOxnzwMeC7teojYH+PzYf+kCMK5ACH5rOrAbVpNFl75TK JxfXoPj0sc4r6ARdmFALeWVxS08YEMkFM4tHr378nMTL7NEuPBN7O3qdmN37DtjJ+OuY YjcLYCmSbh7c/5vPqKHBMTVNOgOdaKef2dOwdjmoWN0uRAHIXsS03Sq8h/S7yeRG6+Hy h0wDwjSGDLDVZYUAl12RGpBPk02Px8QzJQ5EBh2r5jpS+VMkKg5845v+SsUJVLdLEG+N uNLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AiD2naRA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc17si435178ejb.555.2020.10.19.10.50.38; Mon, 19 Oct 2020 10:51:01 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AiD2naRA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729448AbgJSRqW (ORCPT + 99 others); Mon, 19 Oct 2020 13:46:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726389AbgJSRqV (ORCPT ); Mon, 19 Oct 2020 13:46:21 -0400 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 374E2C0613CE; Mon, 19 Oct 2020 10:46:21 -0700 (PDT) Received: by mail-ed1-x544.google.com with SMTP id t20so156525edr.11; Mon, 19 Oct 2020 10:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tuz0iMfzR0PaX63JhJ+Y+JYTOZifsMKunZ+jRj1PPWc=; b=AiD2naRA+g265roabohxoxhWaPF+PUikrxTN9dxYfmlUhRi/5GaI+LYzDX7MeO+Yk/ py8Bcn+taOtG+xHZCMiy0fir7t+JMxVRRAo/BkoePskQeOGeWs8qodBhY3DUukunOZ7L aOuEV/NbdRG7dGSJeGzEWgitlgBlCOfWUae9KZSSBIwkuZ1PW4+K6vZw6A3ObYFAyJt1 zAsoQnbNz0Gd+tKTIujijvlKt+pklUIkXW4jYWpbubVYtBVMKkorrXWat/0kS54OjZS8 Ns2i+0Itn7gZlrMBijyJWR1BepIMC1WvFQgAmqqMPUF7Mj1hzk8iTJtsfli5LfREUMTn 36lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tuz0iMfzR0PaX63JhJ+Y+JYTOZifsMKunZ+jRj1PPWc=; b=rAwznMvhfi6vixnt7aB5G0IPP9OsjW9TFqirclCMI0uoMqGdBS0PKtzOK61JolFPNJ 7+UNWKsdxPUWD3+zyY1uqQr4vjzxfDQHXDJv//FSUsEBS1zVd1pNydpm8pV/Y/ihG1oo 5s2wMt9MSVw9C3OeeSrFyqS6SAQ1AgLLoYFnVPOpqm3HH+KlgZAEIx6+rsEdBEjKu1SF 3W7Jd/1TxS0k8GD0Q3Oo4Cg2BANXzFkbCSC8Z/mgKz3OURqawdYv5DWwBTUVyzFmJRxD bk7h7t4ePkVgOST5xmy3sqoavBTteUAcvzFq36gSoQYJGVdYbdzbOfsKJtPhkhRBu32E PWWw== X-Gm-Message-State: AOAM532g3Mu23hg3tWqztEixCTH+9iY9xV6bPeOhq7N+MLajN2LV+3ap w0fZsJiESorhsjO9f8l5wMw= X-Received: by 2002:a50:bf0d:: with SMTP id f13mr988697edk.48.1603129579912; Mon, 19 Oct 2020 10:46:19 -0700 (PDT) Received: from skbuf ([188.26.174.215]) by smtp.gmail.com with ESMTPSA id j24sm896755ejf.21.2020.10.19.10.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 10:46:19 -0700 (PDT) Date: Mon, 19 Oct 2020 20:46:17 +0300 From: Vladimir Oltean To: Christian Eggers 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 , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH net-next 8/9] net: dsa: microchip: ksz9477: add Pulse Per Second (PPS) support Message-ID: <20201019174617.uf7andznyij75mpd@skbuf> References: <20201019172435.4416-1-ceggers@arri.de> <20201019172435.4416-9-ceggers@arri.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201019172435.4416-9-ceggers@arri.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.