Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3222910pxb; Sun, 26 Sep 2021 08:41:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrKpC7xZL7CTojcoZClL4C7xBpyyjG9Cod4wdEhE/OPcomTGchY6RLo2jUepiQuyL9dIA2 X-Received: by 2002:a17:90b:4c52:: with SMTP id np18mr14007879pjb.157.1632670866921; Sun, 26 Sep 2021 08:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632670866; cv=none; d=google.com; s=arc-20160816; b=r6Gg72eEiT/zLJtEbafx520wKUUoNLlWWF8xJKd6Slps0U8sHYlggK/NEI+LGH00HG EnUKI+QlOML2xBxVSwwz1ZFPB7cdC2IjEr5jN6Ul44aTfe83A0phxJi9X5HepgW8EohI EVJTm/CjT94JX9cGGDpby4dMso/93zS7Fo0KJfuLrYJb/iKcFcM4RoqSwBzVv+X++5kP 1DTp7GBWl5ic/sMBescBCq+5VrnhwnmUsFrubNb5JxG2sTV1DmsvpHmrFUqzkV6AgkNO 6Bm2waO7QKppMMzXLp9/GyVIeUf4sbnOdmxkToeO0aOKXrGA/G20QwXVitl4RHFkq13f LiFg== 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:message-id:subject:cc:to:from:date; bh=OqlouEnKzTnyvfj8dhY+VHfpM6BvYUZZgW3/gg2hoQI=; b=ByETtY44W13QQ0xpTknZk640XnOgn+EqStRFQfJc+wcPaE3FymoQoxBg6wdy9aZ0v5 gNzgPqdcknb9guOO1em3jWKZVIfU3dfKYRM74CJXkOAF4LwrLwiz6gOOueni98dUpmk6 5F1OpRn/mVrmwpEQgkPD1TvvAvxhqY823+YxEonu0+r2w95L1MRBA7rul6APWajLLwF0 GvnF7Lc+xuyKrFyBfwOf0l7mLHPzXAwCw+wjDZeZLbXmPrrOXr4LtcBCsmWXoEoqAvVZ SObaiPcE/DNiroTw4WPKz39m7u0BC3Md5Q30ts/iDzyKj95kZWEyTvVLyq+tBpwRkO29 H/4w== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si17470403pll.155.2021.09.26.08.40.53; Sun, 26 Sep 2021 08:41: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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232038AbhIZPkd (ORCPT + 99 others); Sun, 26 Sep 2021 11:40:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:42296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232009AbhIZPkc (ORCPT ); Sun, 26 Sep 2021 11:40:32 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 39F0A60F9C; Sun, 26 Sep 2021 15:38:53 +0000 (UTC) Date: Sun, 26 Sep 2021 16:42:42 +0100 From: Jonathan Cameron To: Dipen Patel Cc: , , , , , , , , , , Subject: Re: [RFC 02/11] drivers: Add HTE subsystem Message-ID: <20210926164242.7447c0e2@jic23-huawei> In-Reply-To: <91744e4f-b1b8-399a-b521-aba0215a5dc4@nvidia.com> References: <20210625235532.19575-1-dipenp@nvidia.com> <20210625235532.19575-3-dipenp@nvidia.com> <20210704211525.4efb6ba0@jic23-huawei> <52ecf0a6-07a6-ec43-4b1e-fb341ad969b6@nvidia.com> <20210801171304.6e8d70d9@jic23-huawei> <91744e4f-b1b8-399a-b521-aba0215a5dc4@nvidia.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Sep 2021 22:43:02 -0700 Dipen Patel wrote: > Hi Jonathan, > > I got some time to implement RFC version 2 while doing so I have a follow up comment > > inline regarding clock source comment of yours. > > Best Regards, > > Dipen Patel > ... > >>>> +/** > >>>> + * struct hte_clk_info - Clock source info that HTE provider uses. > >>>> + * The provider uses hardware clock as a source to timestamp real time. This > >>>> + * structure presents the clock information to consumers. > >>>> + * > >>>> + * @hz: Clock rate in HZ, for example 1KHz clock = 1000. > >>>> + * @type: Clock type. CLOCK_* types. > >>> So this is something we got a it wrong in IIO. It's much better to define > >>> a subset of clocks that can be potentially used. There are some that make > >>> absolutely no sense and consumers really don't want to have to deal with them. > >> Is there anything I have to change here? > > Yes - specify which clocks would make sense. You might not need to explicitly > > allow only those, but that might also be worthwhile. Otherwise, the chances are > > you'll end up with a bunch of special purpose code in consumers on the basis > > they might get CLOCK_TAI or similar and have to deal with it. > > As for exactly which clocks do make sense, that's one which may take some figuring > > out. Probably REALTIME, MONOTONIC and BOOTTIME depending on whether you care > > what happens when the time of the system gets adjusted, or whether it carries > > on measuring time across suspend. Very application dependent but there are some > > you can definitely rule out. Don't repeat my mistake of leaving it vague > > (which incidentally was a follow up to picking a silly clock to use for timestamps > > before we allowed it to be configured). > > I believe your comment is under assumption that providers have choice in selecting > > clock source to timestamp in turns clients have it as well. For now, the provider > > I have implemented has single clock source and hence I only implemented get_clock* > > hook that provider implement and client can retrieve that information. I guess I can > > always implement set_clock* hook as well for the future providers which support > > multiple clock sources. Please let me if I missed your point. I'll be honest I can't really remember :( too many sleeps. Sorry - if it is still relevant perhaps it'll come back to me on v2. Thanks, Jonathan