Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp837466pxb; Thu, 12 Nov 2020 18:55:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCmA+VYjJ+1kPsdnpQewZXJuPmOoRRXBbV4B8W0Odc5xLjCq5j1oQeFQuIc2yBFs+gReG9 X-Received: by 2002:a50:ab15:: with SMTP id s21mr399376edc.88.1605236102154; Thu, 12 Nov 2020 18:55:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605236102; cv=none; d=google.com; s=arc-20160816; b=itCpII9LrV06jK68/fgznsCRxm8EZsaxxjZBmZdXmlUwQXinHxrA23jJEmkcOS1sgV YH1e6AARupNOC5OUa7mjIfgRzwYQt1EOsTg4Ez8ixzT3T96IH98cmuTVvrR9IUQ2NDPt 0jI9cPvBcu/ldliUGgUaFw67RtZqDle3Q0X7YM7UrZCOHJPcAq+srvnG4AspksdD8Mcj 3nIecydgDVO/V/X4lXuAxCwycba02oIREnL43JaxQGGJkAFRMTMDpbwSAPH10fer6OJY /kMi+yT2/HvpI6Kx4KxTmE/ya33pyu6mHyuY9LFtBwyogOFk6Oz/zBr0RbsrxsAEuW81 kpNA== 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=3cwAkVJBaIm0bznlfwjriii/zWOpkkEBNl8Hcg94gY4=; b=yz+BwF+Lk7wc6voy9PBpgvQJSXxB22/DX1kkISVf1d3X3T55enVm9n0Gjj9NSTYfPt 9R9vkw+3EHYaKSNAPwJm88/8vo1r4EAC498eSilCBjyJTaDj4+9LzAS8tJol/VNV4dUr +em554d5cp3wy6cF9IAZycj/5sWzmTCxn0nsIW/c+RXLht26Blg1+enIKEQZqI8+v3Y5 JkcQE7TF1bUWgmsPyHPFuYCr70fC76zeq1yuerIUZbg6KmvJa12OILLSmsY9chXOx+7z Br0RjeKzJlOGImWw4KPaqVWc3UYBuwh+yfl5Q06xbDzFUTZ4nz6rDUBzLhHrVu2bcoV9 17yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LVeWta6I; 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 bs5si5418619edb.369.2020.11.12.18.54.38; Thu, 12 Nov 2020 18:55:02 -0800 (PST) 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=LVeWta6I; 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 S1726275AbgKMCxT (ORCPT + 99 others); Thu, 12 Nov 2020 21:53:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbgKMCxT (ORCPT ); Thu, 12 Nov 2020 21:53:19 -0500 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94089C0613D1; Thu, 12 Nov 2020 18:53:14 -0800 (PST) Received: by mail-ej1-x643.google.com with SMTP id f23so11212705ejk.2; Thu, 12 Nov 2020 18:53:14 -0800 (PST) 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=3cwAkVJBaIm0bznlfwjriii/zWOpkkEBNl8Hcg94gY4=; b=LVeWta6Is4i/DIVjF7fVSteM02AKOLjbgTUgQOh3rXCaXqBHwWjsWI6I8dZMq/FCGV sA3Hxribgehpa0rXUmpgdLDqd4Y8tIDCzdfLg8cqA8K/kedlkygn7/UYTYrtiRjF3snC QgD8g38520PD/dEvWcEmnnO59vvOcZN1avvTSefiSD8bO2UQmWiVpSlrSsBIzi5NlhVQ y0xVN7ITB8XqtBdjQeEKX4Q9dfOB4NZw8CBafG8i31sgH4fF0lQmAVIIO43z5ZLG9qNp XtW+NypoyR1efvywDQN+DvEcPv3oRe6WjgchE8D9hkDsskpXB1IvBPZacWwOYHX6lKqa IegA== 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=3cwAkVJBaIm0bznlfwjriii/zWOpkkEBNl8Hcg94gY4=; b=dTM7SCfjIBNrdTWpPa2lKyyhjKUc7wKXfITMyPFMivZsYIva8pyL1+kHt8Gtx0D+X1 8F1TR+LOGc1KSzWja2Jh90iO/PLBYOKB+Db94uyDbpV+x46ZMMQcVU+y7d7mNAGd1DHA 7IvlFQdQCBSOeQpuEjtfvjD6s4n2mndjJk3VH481CUtqjVHkGASqmuLWGb/WfG/xiKtF JKxaiPuDEphptt4TR1A8xR0Sv+cecEz4W6dqsV836e7REvqwdMkZlsfb4+6zRcDoOnA6 dm4klsqi/nznZn/LV9BXwOQV1HFb9IC70Xm7aq3Ezqz6eOYeErnk234ZWPZ6sJNLGTWq PPbw== X-Gm-Message-State: AOAM533swMuySWMy46ebJV0J6+h4fLxSlcqXRn+Ea4ZKQV/RpDBoPtn9 FSCnFIgP84WP73kRoYqYwDo= X-Received: by 2002:a17:906:d8b3:: with SMTP id qc19mr20063ejb.222.1605235993343; Thu, 12 Nov 2020 18:53:13 -0800 (PST) Received: from skbuf ([188.25.2.177]) by smtp.gmail.com with ESMTPSA id rp28sm2824347ejb.77.2020.11.12.18.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 18:53:12 -0800 (PST) Date: Fri, 13 Nov 2020 04:53:11 +0200 From: Vladimir Oltean To: Christian Eggers Cc: Jakub Kicinski , Andrew Lunn , Richard Cochran , Rob Herring , Vivien Didelot , "David S . Miller" , Kurt Kanzenbach , George McCollister , Marek Vasut , Helmut Grohne , Paul Barker , Codrin Ciubotariu , Tristram Ha , Woojung Huh , Microchip Linux Driver Support , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 10/11] net: dsa: microchip: ksz9477: add Pulse Per Second (PPS) support Message-ID: <20201113025311.jpkplhmacjz6lkc5@skbuf> References: <20201112153537.22383-1-ceggers@arri.de> <20201112153537.22383-11-ceggers@arri.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201112153537.22383-11-ceggers@arri.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 12, 2020 at 04:35:36PM +0100, 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; > } Richard, do you think we can clarify the intended usage of PTP_CLK_REQ_PPS in the documentation? It doesn't appear to be written anywhere that PTP_ENABLE_PPS is supposed to enable event generation for the drivers/pps subsystem. You would sort of have to know before you could find out...