From patchwork Sun Jul 22 22:49:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Breathitt Gray X-Patchwork-Id: 10539439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04318157A for ; Sun, 22 Jul 2018 22:50:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3CC428434 for ; Sun, 22 Jul 2018 22:50:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D86162845C; Sun, 22 Jul 2018 22:50:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8398628434 for ; Sun, 22 Jul 2018 22:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ID+q/YCDY1zJ9oUFF+Qq9KVkZRbEySB4eM6o0PmZ9Ms=; b=lbr VZCwVB9A5OHcxJlcrMn6tcXvma9U51kZMW6NOt8gI25N+stJoGfoQcbJOvWy6wJ0BtCT+l1Nlt2bA xz6/xhGVJfRbcUW3BKO7NE/cVl0a23lGtXQ9bBuakwaDK4q2cms+Zk96fCCLwDNevFp8cjzDiBHcp /kREfQUCXKLEgBh6yxxvS6IRgY4rOPdw96B+vZZGH6nHzcHThzJOIp1TSFbdBED1dG2wQ5PQxUM1M afamtovYEbXy7apc6ALjjerhHsqgltXWwkGsiBhrd/8zM3CKoBFkHxFBi2XCt4w516YTaubDcVlzE HIB9mQzgZLb00XMnARAJ8ezb636jlzA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhNB6-0005Lx-AN; Sun, 22 Jul 2018 22:50:12 +0000 Received: from mail-yb0-x242.google.com ([2607:f8b0:4002:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhNB2-00046I-N0 for linux-arm-kernel@lists.infradead.org; Sun, 22 Jul 2018 22:50:10 +0000 Received: by mail-yb0-x242.google.com with SMTP id h127-v6so6591125ybg.12 for ; Sun, 22 Jul 2018 15:49:57 -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; bh=A7C+IQtUBjQpU57XgReRLYs7kX27lQ6UC81xs0vzL7c=; b=YMh2kNRRFvozIUoU3NO2ZmrumteG88E0kMVRj+X23JL4CIWwCwt3Bl8+QhavEFiY8k gU56wGMAvyhplOR/T02fxLyRC3VV5h7QFPQAHd8cixh3ZMaz2Irkmz0TEvOkEJyIgIJ6 CdFifX7kLyU1KLLSnw0G+cMdZTxT4nUO7GTk7JwU6uY/bTI1Q3AVwAaC5H0RlEl1JcPW JEJmNnpD6jV8Wz0RlGvUoYRTr030jCyY3AtRdVb5VnauOe4hCLWIcYihS9x3Acswkzp2 DVGYNIpHy0c6bbJ57Ed+iDGTEXmLNAiWKJdq+z+a4wRzj5r2pIBpnGeCGBPSz3Zxsctg nfkw== 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; bh=A7C+IQtUBjQpU57XgReRLYs7kX27lQ6UC81xs0vzL7c=; b=s+IINesA6gAcnIBHnEtqrk/mmB553sSsWKFD7Oe7TTlOVITAhQT3yDxMvbGQnMAdYB K3nv0xODujuuIvX8B+9I8MR1OYgCnCtdJVOShQHRZExpA/8wxZgMGteAieyN+pSweHmU DHQq53an2h0KQ7libVg43pUs/xiDaIr3sN1ZHuGcPehm5XCk+j8pRusiR1FPqE5XDBkE FQ1OKz3fZbIz8NwopGdwxImOQwAugo6l3tFsE31mJLvnr8FkWkj7DXgqhBiuW+QNhcOb usB/mmcyOqXEubcnnw5QLi+5hTeIIzwAlyLjVJeT0nAlQL79kATo/NryQCQqCIX3JFul ZziQ== X-Gm-Message-State: AOUpUlEJ5ih1o9xNqAatQEwFnzOd7syv7mt5eLNDf3ICPWLpSaPjdq6Q FoS7fgS91pMtSYd2Z3sW/WU= X-Google-Smtp-Source: AAOMgpcRXf6dNhGXgJf5dNlKCFopBOYYZcA52PQEPLFIKy062Qv1RrzyPtYXySUikrD9Abv8TNL7fA== X-Received: by 2002:a25:6f84:: with SMTP id k126-v6mr5591015ybc.419.1532299796331; Sun, 22 Jul 2018 15:49:56 -0700 (PDT) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id h3-v6sm3587167ywd.47.2018.07.22.15.49.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jul 2018 15:49:55 -0700 (PDT) From: William Breathitt Gray To: gregkh@linuxfoundation.org Subject: [PATCH v9 00/11] Introduce the Counter subsystem Date: Sun, 22 Jul 2018 18:49:49 -0400 Message-Id: X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180722_155008_758592_CB74641F X-CRM114-Status: GOOD ( 12.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, lars@metafoo.de, benjamin.gaignard@st.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray , jic23@kernel.org, pmeerw@pmeerw.net, knaack.h@gmx.de, akpm@linux-foundation.org, fabrice.gasnier@st.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Changes in v9: - Prefix exported symbols with "counter_" to make counter namespace explicit and clear - Replace scnprintf and snprintf lines with sprintf in 104-quad-8.c since we're dealing with sysfs files This revision is functionally identical to the last; changes in this version were made to improve code clarity. Andrew Morton suggested improving the names of the exported symbols to clean up the Counter subsytem namespace. This revision adds a "counter_" prefix to the exported symbols to keep the namespace tidy and these symbols as clearly part of the Counter subsystem. Andrew Morton also brought up a good point that the Generic Counter "signal" terminology could conflict with the existing established use of the term in other areas of the Linux kernel. I've changed the major exported symbols in counter.h that used the "signal_" naming covention to now use a "counter_signal_" naming convention in order to help prevent this confusion; I've made similar changes to symbols in counter.c as well. If this naming still causes trouble, we can consider alternative names for this component. William Breathitt Gray Benjamin Gaignard (2): counter: Add STM32 Timer quadrature encoder dt-bindings: counter: Document stm32 quadrature encoder Fabrice Gasnier (2): counter: stm32-lptimer: add counter device dt-bindings: counter: Adjust dt-bindings for STM32 lptimer move William Breathitt Gray (7): counter: Introduce the Generic Counter interface counter: Documentation: Add Generic Counter sysfs documentation docs: Add Generic Counter interface documentation iio: 104-quad-8: Update license boilerplate counter: 104-quad-8: Add Generic Counter interface support counter: 104-quad-8: Documentation: Add Generic Counter sysfs documentation iio: counter: Add deprecation markings for IIO Counter attributes Documentation/ABI/testing/sysfs-bus-counter | 230 +++ .../ABI/testing/sysfs-bus-counter-104-quad-8 | 36 + Documentation/ABI/testing/sysfs-bus-iio | 8 + .../testing/sysfs-bus-iio-counter-104-quad-8 | 16 + .../{iio => }/counter/stm32-lptimer-cnt.txt | 0 .../bindings/counter/stm32-timer-cnt.txt | 31 + .../devicetree/bindings/mfd/stm32-lptimer.txt | 2 +- .../devicetree/bindings/mfd/stm32-timers.txt | 7 + Documentation/driver-api/generic-counter.rst | 342 ++++ Documentation/driver-api/index.rst | 1 + MAINTAINERS | 15 +- drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/{iio => }/counter/104-quad-8.c | 782 +++++++- drivers/counter/Kconfig | 51 + drivers/{iio => }/counter/Makefile | 5 +- drivers/counter/counter.c | 1567 +++++++++++++++++ drivers/{iio => }/counter/stm32-lptimer-cnt.c | 361 +++- drivers/counter/stm32-timer-cnt.c | 390 ++++ drivers/iio/Kconfig | 1 - drivers/iio/Makefile | 1 - drivers/iio/counter/Kconfig | 34 - include/linux/counter.h | 510 ++++++ include/linux/counter_enum.h | 45 + 24 files changed, 4352 insertions(+), 86 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-counter create mode 100644 Documentation/ABI/testing/sysfs-bus-counter-104-quad-8 rename Documentation/devicetree/bindings/{iio => }/counter/stm32-lptimer-cnt.txt (100%) create mode 100644 Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt create mode 100644 Documentation/driver-api/generic-counter.rst rename drivers/{iio => }/counter/104-quad-8.c (44%) create mode 100644 drivers/counter/Kconfig rename drivers/{iio => }/counter/Makefile (46%) create mode 100644 drivers/counter/counter.c rename drivers/{iio => }/counter/stm32-lptimer-cnt.c (48%) create mode 100644 drivers/counter/stm32-timer-cnt.c delete mode 100644 drivers/iio/counter/Kconfig create mode 100644 include/linux/counter.h create mode 100644 include/linux/counter_enum.h