Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4071427imm; Sat, 21 Jul 2018 09:27:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe7w1CqmpR5GmVcXu8gf25ItkQ7nOSQKwgEjvu1sQVzNeftT4v2hbVYrrZTVGPv3W0SUlRX X-Received: by 2002:a62:1b07:: with SMTP id b7-v6mr6644098pfb.70.1532190442200; Sat, 21 Jul 2018 09:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532190442; cv=none; d=google.com; s=arc-20160816; b=iY/a/uWTkAI5HzRT07h4/pLLFjsEsJDlbNXnAehCd78kh3b/AJR5NShTfnVZIgFeEz 5/2m6Sxnp92Z48tEKxRGqX4TY3qxh3XAlTJ+yin1SQc8WNr3Iia8BVf8DncBPM6sKFFr 5PZsDv/Gx91xHCYbmXWBfurx3trxZt5ooeFbRpngoxIju/np9P5Al5SKi8Q098/vC0aX LGyvzII0Np0yx0krajK9I9Spna8bwhcvL4qenEFwcMNpHsPrNC15grDeZpEX3RTvFbXS wiKLVabmK1Y2Y/zsJByX2PbXLXpGtOzleydQj7KDfBo4T7kkLFkOK/aCvmrrA8wweFUv XSdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=rvJGNyqbxXUdov3UpMvLUnDCSV18eeMuFAPnt8IuKeA=; b=S0PlgEBTJWkrNqWcIhihBcFWKrcpNBxjqx4rWVRmpb4BbM3x76xIYZI6KiHYxYP69q i673cxub8rrNYx7AdTxPzwUHZQFmmWpuq2g99TmZk2YAGvlNkQVOnQQfem/Wo5bGIGzz OWldetrtwxDaBXcucERYWx5+C3PWAmiKxsuJdOnNDUHzfepkstrDykelWedO+ovUg1Td 6HvU7hPmfQQ+GhY96FTOtAACtiIy6kMricN0yp23CIF0tw1Z91u72MPvwyr+50vUhKIL xuyrA9NsXC1TOxLMuuZGbZrcV/frNOJOya2DXZ0O9JyDeuj1Cuz4VlNQBzuuLMbc8e2y M1lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uoNdj5tQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 16-v6si4185747pfy.169.2018.07.21.09.27.07; Sat, 21 Jul 2018 09:27:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uoNdj5tQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728080AbeGURTf (ORCPT + 99 others); Sat, 21 Jul 2018 13:19:35 -0400 Received: from mail-yb0-f193.google.com ([209.85.213.193]:44891 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727813AbeGURTf (ORCPT ); Sat, 21 Jul 2018 13:19:35 -0400 Received: by mail-yb0-f193.google.com with SMTP id l16-v6so5775992ybk.11; Sat, 21 Jul 2018 09:26:18 -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:user-agent; bh=rvJGNyqbxXUdov3UpMvLUnDCSV18eeMuFAPnt8IuKeA=; b=uoNdj5tQK1IKdLs3SNdGPO3oPjAYKIJZUW6n6EwcqvTTz2QOF0XOU58tJS1JAW7Rz4 ou4h1YmMkG2IlCWPYRbfuTvEKq70TiO8qgcSsmsXJyPNqcsWx5V/Fi2A2YU+C+w33W87 EwjOHLTA9scAX+hw/6jgtmhC9gFZHVPi5HZNKhj45JU9blE7UmN1bZAd3Zh3c4LFXm3J 9mnPV2DrgpjeIC3hpLOwBcVlT25cU+73bTlRwkp8+BpfJ4r7fwpCZsqpnB2+bD6Np9y2 ysfyxGx9ngU2tUlVggqfBm66C9/SLD8iWSgnqwyklwekVmXiJocAFC2sJdXBF4kdNvNX NQeA== 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:user-agent; bh=rvJGNyqbxXUdov3UpMvLUnDCSV18eeMuFAPnt8IuKeA=; b=PHLKMnueJXwvfKriJ9rLwwOSVccOSBrnmDPhPp8Kwvn7sD3wHo5JTbbhZHfEUUBPCS 9ro+VP2bRbLAdVkhVqfPZ3HkniYFWK7woYu1W1Wi04lO6N+RzTzry0RJVrKFmG4kx7E3 cIl3WZeIzoEUYWI/3rwGQ1Fg32+ygTP22udPiRaDHYYy0Odmb3ASGAAL+CpNwctzcP/O Za+IB3o0xJrrPuU79M51XNTLcbx6/GlkhQmKUpAsRI4QHv5bklHI/rESRGv7iEub1OXz KisYV6GapUKPcvPACxrjc7jwS+y6FKUP/n+ZEZtBLZaRE8yP7F9pBJ3p4h5m6svnNb/5 BOEQ== X-Gm-Message-State: AOUpUlE4pyA+qFTaK4GMpQ34riNfyxAChPvfIxjkR7Cf7Wca+Cfib4w6 V0c0TM6x+QyZirkdSKMkCLg= X-Received: by 2002:a25:6546:: with SMTP id z67-v6mr3292900ybb.453.1532190378201; Sat, 21 Jul 2018 09:26:18 -0700 (PDT) Received: from sophia ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id q127-v6sm4966244ywq.83.2018.07.21.09.26.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jul 2018 09:26:17 -0700 (PDT) Date: Sat, 21 Jul 2018 12:26:10 -0400 From: William Breathitt Gray To: Andrew Morton Cc: gregkh@linuxfoundation.org, jic23@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, fabrice.gasnier@st.com, benjamin.gaignard@st.com, robh+dt@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, mark.rutland@arm.com Subject: Re: [PATCH v7 01/10] counter: Introduce the Generic Counter interface Message-ID: <20180721162610.GA15622@sophia> References: <51b75b2b4495d4ad7ed173d91a726379bdae2353.1529607879.git.vilhelm.gray@gmail.com> <20180717204954.4b5e371603d0b40b2aaabbb8@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180717204954.4b5e371603d0b40b2aaabbb8@linux-foundation.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 17, 2018 at 08:49:54PM -0700, Andrew Morton wrote: >On Thu, 21 Jun 2018 17:07:08 -0400 William Breathitt Gray wrote: > >> This patch introduces the Generic Counter interface for supporting >> counter devices. >> > >+EXPORT_SYMBOL(count_direction_str); >+EXPORT_SYMBOL(count_mode_str); >+EXPORT_SYMBOL(counter_signal_enum_read); >+EXPORT_SYMBOL(counter_signal_enum_write); >+EXPORT_SYMBOL(counter_signal_enum_available_read); >+EXPORT_SYMBOL(counter_count_enum_read); >+EXPORT_SYMBOL(counter_count_enum_write); >+EXPORT_SYMBOL(counter_count_enum_available_read); >+EXPORT_SYMBOL(counter_device_enum_read); >+EXPORT_SYMBOL(counter_device_enum_write); >+EXPORT_SYMBOL(counter_device_enum_available_read); >+EXPORT_SYMBOL(signal_read_value_set); >+EXPORT_SYMBOL(count_read_value_set); >+EXPORT_SYMBOL(count_write_value_get); >+EXPORT_SYMBOL(counter_register); >+EXPORT_SYMBOL(counter_unregister); >+EXPORT_SYMBOL(devm_counter_register); >+EXPORT_SYMBOL(devm_counter_unregister); > >The naming is a bit chaotic. Most of the symbols start with counter_, >which is good. But a handful do not. I can prefix these exported symbols with "counter_" to help make it clear they all belong to the Generic Counter API. I'll keep the devm_* symbols the same to match the naming convention in the other subsystems I see (watchdog, IIO, GPIO, etc.). > >Also, symbols called signal_* make my head spin - Linux already has a >firmly ingrained notion of what a signal is, and this ain't it ;) >Although the kernel tends to use sig_ for signals-as-an-IPC-thing. > >Also, many many drivers deal with signals-as-an-electrical-thing - is >it appropriate for this particular driver to take that namespace? In the context of the Generic Counter paradigm, a "Signal" is an abstraction for the stream of data that is fed to the counter device for evaluation (triggering updates for the readable "Count"). In many cases a "Signal" correlates with a physical electrical line (for example the A and B electrical lines for a quadrature encoder), but this isn't a hard requirement as the paradigm permits more abstract data streams. I decided on "Signal" to match the naming convention that appears in the datasheets of many counter devices, but "Line" may be a decent alternative name we could use to indicate a counter device input data stream. I'd like to get some other opinions as well before I make a naming change to "Signal" -- whether to stay with "Signal," switch to "Line," or rename to something else. For what it's worth, I think it's unlikely for a counter device driver author to confuse a Counter Signal with the Linux OS signal within the context of the Generic Counter paradigm and their respective counter device datasheet. William Breathitt Gray