Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2645675pxt; Mon, 9 Aug 2021 05:45:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1bknIsoIrdIMs64XoJChooMhsGlPW2c+Y+sRLJLT2cnLypegVYtlUI7qUl4MimJ16Hp2/ X-Received: by 2002:a17:906:c055:: with SMTP id bm21mr22740390ejb.350.1628513157682; Mon, 09 Aug 2021 05:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628513157; cv=none; d=google.com; s=arc-20160816; b=1HK386fwHz2aIBSjk5Z9hbrLr7u1Cjj3Hvql7hysETZcHivSYisihWqVDFAr08aHnW IRRLyV5vISKsvpBAF0fY7WjHeq9xwuAzwq47s9E6UkJuOcgFImEoo+xjzlNOTsDlz/BZ drGG8xtXcCdiak3LfxxlhlI8i+5KHvlVP9s88RQTpbogKo59dkip88WZFILXSPcc0a9T 2AwdZJXi4CH+MYfM6Em/7j9tiNNrry9HAgAzqWc8irdYdPzZmw1qDn0gPjFHx++8PhsO brNds1qxCd+IUW0P/IvF9l0hnT4lJWHVoXf0fqmYBQvrBCP7pRuAgP1pI0h39s4JwjL4 Bg3w== 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:date:subject:cc:to:from :dkim-signature; bh=06S6aEygv6SQ/wVlttAzgyw3/lRN6L4b7rC8FG/18VY=; b=nDMdKvFqIkYS9yZwDypBmxiIYMyUsf+M4ms5m7jisj03S7KiJh72co1oRyIk/9MCY9 7wun4xCh/9VIhiTSm0LwbA3RvyQtleGf6LJ2HeEOpgdFJ1VTGCwcOZMDTlrFwEjMbf36 BglCX9gKomYxyfOCUIhexk3qbGR/524iDrECdrjHIiaNM/0yQT0u4wygEgKrdepCn7iq 7DRKMH/DYC9t8A6dkxtktNEVNWQ/F6qr85Ywx9Zf2gPtYyKLE7ng0pq34Aqv+3fCn1lg +0ezzZr07dfzNXhWZkG/3pO8tpxxakbRLvr6amVWm/o270CzjhyS9XOo0F4Cej9H1X4V +nJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QRDnXDB7; 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 os14si16987435ejb.696.2021.08.09.05.45.25; Mon, 09 Aug 2021 05:45:57 -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=QRDnXDB7; 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 S235408AbhHIMib (ORCPT + 99 others); Mon, 9 Aug 2021 08:38:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235411AbhHIMi3 (ORCPT ); Mon, 9 Aug 2021 08:38:29 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB96DC061798; Mon, 9 Aug 2021 05:38:09 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id cp15-20020a17090afb8fb029017891959dcbso6483658pjb.2; Mon, 09 Aug 2021 05:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=06S6aEygv6SQ/wVlttAzgyw3/lRN6L4b7rC8FG/18VY=; b=QRDnXDB7jNJLpaBk1hPDvmgVMD20ujOePN48pysCXRff4bV9L2qp7vl7INSyGmSKNn X/ATyJGvpifFgITVsVI4k1o4ZZDS54DGFoxkUnLgHEsEq9yZwNos9x/kfS9jJBZ5GAMX d3wuHJWzwF6ZrljqSd9AlTW7siXSSR4YQMk62OK28ErWgM+toMi+HpKG/5RBcUxwn5CF q9vRe8XN8xG7xpyl+YTlwKHM+RVMqmz0b0T2T2tHBh+hbCwh3EwEUsSBHX+w7btWgx0i d55nhe4dVSA0YKHpJ3ujg5t/J331L0CcbLLHRx6Nt66ye1l0YZDz/wq0u15DO7/0TtnL YClQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=06S6aEygv6SQ/wVlttAzgyw3/lRN6L4b7rC8FG/18VY=; b=mF3DdKUbKm3MbVnjtJ1yanH8Pf1UjUobcrrtydCAc8PJaBEuCOHyJKRHZvS0C31/0n c0oJxXtnPVNAAAtU94M4/S1D62WnGe8lHIw3ehXCV1UIXwirf+y8mwyyCfXdcMXl+8kH RzvaCoitPnCfWNcJbKPahF6T9jt9oUBdKQc1OpuyKI+HlbhiP+73FTyBe/LPFcFNkeLZ GzjCaZfWgyhCYaimD3KOeMGyxhK0uvaHlXeKfOUiir3iwGdy7lHEfd08o0KNyRBuQlpq TyCg02BQCTWJfcQMogZpokdanbvSCO8k9vcIq+L1CE/jZG03mHTKLuZ4ZTRlnthDC9hD Ao8g== X-Gm-Message-State: AOAM531pTD7C7SU5OILGJM9BSAOfs63aR2ASb87ZCOT4wD3ZaGqloPJH SZq8MxYTdYlTEqFuRH8gJsI= X-Received: by 2002:a63:4a41:: with SMTP id j1mr37026pgl.227.1628512689214; Mon, 09 Aug 2021 05:38:09 -0700 (PDT) Received: from localhost.localdomain ([156.146.35.76]) by smtp.gmail.com with ESMTPSA id e35sm22382177pjk.28.2021.08.09.05.38.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Aug 2021 05:38:08 -0700 (PDT) From: William Breathitt Gray To: jic23@kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com, kernel@pengutronix.de, a.fatoum@pengutronix.de, kamel.bouhara@bootlin.com, gwendal@chromium.org, alexandre.belloni@bootlin.com, david@lechnology.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, syednwaris@gmail.com, patrick.havelange@essensium.com, fabrice.gasnier@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, o.rempel@pengutronix.de, jarkko.nikula@linux.intel.com, William Breathitt Gray Subject: [PATCH v15 03/13] counter: Update counter.h comments to reflect sysfs internalization Date: Mon, 9 Aug 2021 21:37:28 +0900 Message-Id: <83d75aa8d88d7ca1b5cc9fbb0249fed61f10ba13.1628511445.git.vilhelm.gray@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Counter subsystem architecture and driver implementations have changed in order to handle Counter sysfs interactions in a more consistent way. This patch updates the Generic Counter interface header file comments to reflect the changes. Signed-off-by: William Breathitt Gray --- drivers/counter/counter-core.c | 3 ++ include/linux/counter.h | 62 ++++++++++++++++------------------ 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/drivers/counter/counter-core.c b/drivers/counter/counter-core.c index c533a6ff12cf..3cda2c47bacb 100644 --- a/drivers/counter/counter-core.c +++ b/drivers/counter/counter-core.c @@ -38,6 +38,9 @@ static struct bus_type counter_bus_type = { * This function registers a Counter to the system. A sysfs "counter" directory * will be created and populated with sysfs attributes correlating with the * Counter Signals, Synapses, and Counts respectively. + * + * RETURNS: + * 0 on success, negative error number on failure. */ int counter_register(struct counter_device *const counter) { diff --git a/include/linux/counter.h b/include/linux/counter.h index b69277f5c4c5..445f22d8bfe2 100644 --- a/include/linux/counter.h +++ b/include/linux/counter.h @@ -188,11 +188,10 @@ struct counter_comp { /** * struct counter_signal - Counter Signal node - * @id: unique ID used to identify signal - * @name: device-specific Signal name; ideally, this should match the name - * as it appears in the datasheet documentation - * @ext: optional array of Counter Signal extensions - * @num_ext: number of Counter Signal extensions specified in @ext + * @id: unique ID used to identify the Signal + * @name: device-specific Signal name + * @ext: optional array of Signal extensions + * @num_ext: number of Signal extensions specified in @ext */ struct counter_signal { int id; @@ -206,7 +205,7 @@ struct counter_signal { * struct counter_synapse - Counter Synapse node * @actions_list: array of available action modes * @num_actions: number of action modes specified in @actions_list - * @signal: pointer to associated signal + * @signal: pointer to the associated Signal */ struct counter_synapse { const enum counter_synapse_action *actions_list; @@ -217,15 +216,14 @@ struct counter_synapse { /** * struct counter_count - Counter Count node - * @id: unique ID used to identify Count - * @name: device-specific Count name; ideally, this should match - * the name as it appears in the datasheet documentation - * @functions_list: array available function modes + * @id: unique ID used to identify the Count + * @name: device-specific Count name + * @functions_list: array of available function modes * @num_functions: number of function modes specified in @functions_list - * @synapses: array of synapses for initialization - * @num_synapses: number of synapses specified in @synapses - * @ext: optional array of Counter Count extensions - * @num_ext: number of Counter Count extensions specified in @ext + * @synapses: array of Synapses for initialization + * @num_synapses: number of Synapses specified in @synapses + * @ext: optional array of Count extensions + * @num_ext: number of Count extensions specified in @ext */ struct counter_count { int id; @@ -243,27 +241,27 @@ struct counter_count { /** * struct counter_ops - Callbacks from driver - * @signal_read: optional read callback for Signal attribute. The read - * level of the respective Signal should be passed back via - * the level parameter. - * @count_read: optional read callback for Count attribute. The read - * value of the respective Count should be passed back via - * the val parameter. - * @count_write: optional write callback for Count attribute. The write - * value for the respective Count is passed in via the val + * @signal_read: optional read callback for Signals. The read level of + * the respective Signal should be passed back via the + * level parameter. + * @count_read: read callback for Counts. The read value of the + * respective Count should be passed back via the value + * parameter. + * @count_write: optional write callback for Counts. The write value for + * the respective Count is passed in via the value * parameter. * @function_read: read callback the Count function modes. The read * function mode of the respective Count should be passed * back via the function parameter. - * @function_write: write callback for Count function modes. The function - * mode to write for the respective Count is passed in via - * the function parameter. - * @action_read: read callback the Synapse action modes. The read action - * mode of the respective Synapse should be passed back via - * the action parameter. - * @action_write: write callback for Synapse action modes. The action mode - * to write for the respective Synapse is passed in via the - * action parameter. + * @function_write: optional write callback for Count function modes. The + * function mode to write for the respective Count is + * passed in via the function parameter. + * @action_read: optional read callback the Synapse action modes. The + * read action mode of the respective Synapse should be + * passed back via the action parameter. + * @action_write: optional write callback for Synapse action modes. The + * action mode to write for the respective Synapse is + * passed in via the action parameter. */ struct counter_ops { int (*signal_read)(struct counter_device *counter, @@ -291,7 +289,7 @@ struct counter_ops { /** * struct counter_device - Counter data structure - * @name: name of the device as it appears in the datasheet + * @name: name of the device * @parent: optional parent device providing the counters * @ops: callbacks from driver * @signals: array of Signals -- 2.32.0