Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2377528pxy; Tue, 3 Aug 2021 05:09:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/YHzD9Kkpf/ENmvGmSTojpvl8njVP0ZM9vvIW3L0t+JvhUEzvx+VZVlL+1/C3J+T1/SK0 X-Received: by 2002:a05:6402:c81:: with SMTP id cm1mr25614266edb.355.1627992583682; Tue, 03 Aug 2021 05:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627992583; cv=none; d=google.com; s=arc-20160816; b=XTwWBOWe1T8YlVKP7qqfUzHhwHZV4APGq3AFWU1qeQpFfsHdCJ+pE0rv8F7NcrPceZ BB2uuKvImkSruRzc4xbpAVEGHkK+M5Ug4+cZgXrd1QaOzw8eUo2LM6+n2yTHHpEdhvaX 7VfPnjJPQa/S4Xxm1+Ii0MYG0+BspDi6E4JiXn4pk0nOdex6jFA+ZZOd6zQO/aqCQG2x L3SGK3xzYFsLolIz3iqkbNeT7VRVCVQgUbj/TA/rmQLpB8Xncy6aCTxnjYQi4TEoX997 qjB8SEivHNY1DKltCU9xrwNVpV4LG9waYM3IgoF8PuuQ2IY0RX0sDWSpE/T+3hyU+ELW SDpQ== 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=v7akesCPV2znBVRN41Z1QYwIOg8zDhI3rATd9/DVG5U=; b=lGaa8bNjmuXb10dUAkWW6i4v2UCcxUJdbnw4p4Teb6R6q6aKBJU2s3GqJRhvh6/Wzg powecDUyuCePB2Nh8PysXPaNkJGudvSQCXpdgJHrhYjEA4pNj5JOx1HaVDCquB++8kVx ksee+8VKOfF+HdeCEEvLgmEQ5Z4nBcaewe8rpZh1YjZk5sYimUSoxnSDEg5MnLvNIB+V hoicQoc5YBF1SN4E+y2xA0gdyYjK0TZdBY0MAP02iyRU0T+29uh5ti8jdd4t67vTdsFO 2Rw/iRbVnTt2ywHO5SUwrWkXt4HLfj8SJ/EMyzCLoE166a7G3toIiTLJuqs9q+E0kHeC C/qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="o8GavR/w"; 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 ee43si12246486edb.264.2021.08.03.05.09.20; Tue, 03 Aug 2021 05:09:43 -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="o8GavR/w"; 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 S235895AbhHCMHh (ORCPT + 99 others); Tue, 3 Aug 2021 08:07:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234653AbhHCMHe (ORCPT ); Tue, 3 Aug 2021 08:07:34 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B4D4C061764; Tue, 3 Aug 2021 05:07:21 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id u13-20020a17090abb0db0290177e1d9b3f7so3516726pjr.1; Tue, 03 Aug 2021 05:07:21 -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=v7akesCPV2znBVRN41Z1QYwIOg8zDhI3rATd9/DVG5U=; b=o8GavR/wKut6OKFdeAwWSOFyC1ESFyu/DAQiCFG9l/dutYu1F531OOKdJeA7s2KPz7 JbEioY/tEqy0Id7cqfk3zZaDGNXdFWC433yWC4RkL4nHJq8SyZruCLIz3F23ubYaaf26 ChI3vv2E5dk1w9lDFJfsm1PG9Migr3oCW0eBfGViQ2nGsE2kZvvzd8jBUCPFdWPzHifi UdcdcqDYDYL9PYijUxaM6bcBQuaaK1YN9ZXiR/VN7E9CWV+0/F0j35m2rwMDUfJWFmt3 5K8Cp5V5VZA1706dhrHyp2HcBVAbej2wFSTBsxiUDYDewE4E62HTVGHzJc5Iapjuidle 0AtQ== 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=v7akesCPV2znBVRN41Z1QYwIOg8zDhI3rATd9/DVG5U=; b=Yieo0gZ4V20QF/cbuSFBkEQL7WwgpI5mrRlcxF4wRo7lHQ2ihYiWv5gOOYJUl8UkRE Cm8neGRtpHV0xi4bPOuX4AV2DxJ2brv1KYyl5jZDUJvajxgHyrfJKko+ahNZpfQlh0Cr 0f7/HtktkKtSR/GEUamrmB3xjC0q1ALRfNX2/3oDn3oM90IJhGCOSVVICQ5pX8I3MxdU r4LzR6kGXhwhfzxBJLr8qc4t3dVlKX3jf2GODAvICpq2wo2AZ07Yud7smNsE9+NxgYI/ DXZYYbSZxQmOrNVdTO5ssXgYjxnc8lrC646Qb7QEFJZx8NWLpPMLXsUEEJnWGLlEtDe5 MCUw== X-Gm-Message-State: AOAM530JdtTkOujYSDYHFZwYqKdrXUJSPIjlBN5vAj33RLmqRPQuDsej Lx9t+hcoLw46q2UIppQpbFQ= X-Received: by 2002:a63:4b0a:: with SMTP id y10mr811974pga.437.1627992441166; Tue, 03 Aug 2021 05:07:21 -0700 (PDT) Received: from localhost.localdomain ([156.146.35.76]) by smtp.gmail.com with ESMTPSA id n35sm7197502pfv.152.2021.08.03.05.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 05:07:20 -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 v14 07/17] counter: Update counter.h comments to reflect sysfs internalization Date: Tue, 3 Aug 2021 21:06:17 +0900 Message-Id: <1ce1988777a86177cbdb001cad49faddfe7660dc.1627990337.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 15f735ef296e..9442e3b91468 100644 --- a/drivers/counter/counter-core.c +++ b/drivers/counter/counter-core.c @@ -41,6 +41,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