From patchwork Thu Mar 8 23:40:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 883410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zy6Vb5YPdz9s0v for ; Fri, 9 Mar 2018 10:41:59 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751764AbeCHXln (ORCPT ); Thu, 8 Mar 2018 18:41:43 -0500 Received: from mout.gmx.net ([212.227.17.20]:54899 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751613AbeCHXlc (ORCPT ); Thu, 8 Mar 2018 18:41:32 -0500 Received: from latitude ([88.153.6.235]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MC7em-1elJjN1KFs-008qtD; Fri, 09 Mar 2018 00:41:05 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, =?utf-8?q?Jon?= =?utf-8?q?athan_Neusch=C3=A4fer?= , "David S. Miller" , Greg Kroah-Hartman , Mauro Carvalho Chehab , Linus Walleij , Randy Dunlap Subject: [PATCH 1/8] MAINTAINERS: GPIO: Add Documentation/driver-api/gpio/ Date: Fri, 9 Mar 2018 00:40:17 +0100 Message-Id: <20180308234024.24145-2-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180308234024.24145-1-j.neuschaefer@gmx.net> References: <20180308234024.24145-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:Ogh2i7vV+Zkm1enYb+V5gERBV10RaCyzAq29AKm20O+quXsBD/P 7wa8LVxhMzlL+tO9jkzGOeBF+vFJDCFywP+GOAtnJt2DCmINntuGenUFbr7dxF8guuNsE7B I5SRwB04ydOQxABqHk9nePd4dIUIpcylTkUg05otcm7cUor3WUZVc8zrg8FBNujm5lBB1kG xzoBvZGvFnPlfR09raHkA== X-UI-Out-Filterresults: notjunk:1; V01:K0:2hSDu3wEgrY=:StJKNtAli/2KcQ5tIcHyYM MJ4cQsWt64aRlweYqOxa6YRtwM9BAdkMpvGu8gdowAGc79j1cWExxaOo5+hcEjP+mKZt8Aogk 4s3kjPCcirX4dsq/ewN8uzT+1g9nRgmlf08g0JeOcU5zC80t/Yu3htF/AibO20Rq0xuvJqbuQ mX3pIsSaMcZMWcMcf/h2842UCe1rc9GuvMp0x/X5pgo4xXJUh7HrhvER6tHKdF/6afcB/sukZ lBAZoy2yH2pYW8jZPMHSB91ujLeDBrBA3/ac0/nMgh5gRdhcaFPyhQaIfYPfcFnuofMU4pQa9 zm9GUXAtoPZy/HbD9pn3nh5JWULOKa0iDjn+j+I2a1KmHKfcApKTp/byQXe3Ak3umKWf3lzT6 HM/JKtoFmrd7h1QX4cMkQFM02Fgviy1BC9O2wtfu1YoYWrYIZ+VL9SnjEuFP5XI+pA169pcNf TfprYUtnMKrWiecnb52K1MdEBHj/CoWpUxiK6J635otAppPm7Nu7xMlpunByt9w3bZqbP6inY OsgeGCXcrKoFrLuI4PQAmjD8aKLRRTDTol1ZJx8Ht0uw6J9Xte4Dj1k5SPSXojJ0eQRgFq4mo XWxXmisUXlPK2z/YoKDonFpw6B/M5A4mDYGSe3QFk6mM2086J9+zzfTC3oiB1rzaxcf8/dh1A QHWYSxX+p5XiTl9YuibVEN3Z6QbSD5pr09TjBFnq/9wxBzRzNJbrKj0mxnkGPqU7RZNGaticT YWRG2VEBVPEH+gg4g4T7e2BE57tOV4SKwBgoZvU6j9gsmi14/NR4RCNc3BugC18JfJOL4mmYn /gbNoQtFmcc1RD+RyRgvXzh0G8mj/ABrJYkzULJEGahAvPUkVQ= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Steer patches to Documentation/driver-api/gpio/ into the right direction. Signed-off-by: Jonathan Neuschäfer --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index d6a89d31e4a4..313c0907020c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6029,6 +6029,7 @@ L: linux-gpio@vger.kernel.org T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git S: Maintained F: Documentation/devicetree/bindings/gpio/ +F: Documentation/driver-api/gpio/ F: Documentation/gpio/ F: Documentation/ABI/testing/gpio-cdev F: Documentation/ABI/obsolete/sysfs-gpio From patchwork Thu Mar 8 23:40:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 883411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zy6Vj30BPz9shb for ; Fri, 9 Mar 2018 10:42:05 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbeCHXlc (ORCPT ); Thu, 8 Mar 2018 18:41:32 -0500 Received: from mout.gmx.net ([212.227.17.21]:53493 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751574AbeCHXla (ORCPT ); Thu, 8 Mar 2018 18:41:30 -0500 Received: from latitude ([88.153.6.235]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mh9cj-1fFku70I8P-00MNU6; Fri, 09 Mar 2018 00:41:10 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, =?utf-8?q?Jon?= =?utf-8?q?athan_Neusch=C3=A4fer?= , Jonathan Corbet , Mauro Carvalho Chehab , Greg Kroah-Hartman , Linus Walleij , Vinod Koul , Sanyog Kale , Sagar Dharia , Thierry Reding Subject: [PATCH 2/8] Documentation: driver-api: Move gpio.rst to gpio/index.rst Date: Fri, 9 Mar 2018 00:40:18 +0100 Message-Id: <20180308234024.24145-3-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180308234024.24145-1-j.neuschaefer@gmx.net> References: <20180308234024.24145-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:VDAzRHM8LKEcX/zaXEAkD04gHlvpcQUPyGpsUCn0SYmGuU26pg1 gw6jBekiTEZaFSp73vpH73HJafjVYGXz+IzwcPOrLi9hFYVbD77VuzGhuenZ5ZNoCBNWVl/ o5bRlyK175uKqS+OrmOf2Tgw5mUKgxXDSRFidbqTJKxyMEyiZy5sXeeWl6URxH1ekrgtB0u WDIhJedODgwbgtQ8Zwgwg== X-UI-Out-Filterresults: notjunk:1; V01:K0:yRef1sQjel0=:2CamwxpMHr8Uofyx3EiCiO LiZtqKc34knkDqPEbgsdy9uUdbFR73dtl0OEuU4dwr+i/ZLZCA4W7xi/fLk6ToomadERvPqGa ZYPRMLjpIkOuz+eY2IaxBNb+9hMMSd9//0A8KbtIidKXffSmpvfHP1616+Z4B6A9raF6gtko/ CFzoXl9M+vHL5143y8hAdPo7R2SYDGxFwHUTylkET5KWUpph9gmVgpcwr7PS9JVJaS+guinS1 BGE/pL3UEYJzdzp/50PX6jWVCLOjI5zDZi1GUame1kCEfRUgDhEwUk7+yM/9vRDvOf4Ouk+Fu bq04+M8eWe2k4Nd4fJz9UxwweEZXOrGHLgzcLVyaiX/OBQUCS7ozXkkZcDbRbl/eWxKJUGuEn Lsw6ja730fyFs9SGlm4eMF54AdmCh9KemOpTY539fcMMP9JN5ZqXYDWY2IiKBFa4CWN2bU9SC k5P5i/rfLw2nQ1XSi5A3QbQPBVR+rXUE49N1u4rcU3vnhe5f9e6m6BHky1sK+2aRk1lyJg2hJ 4uIAP56pv/6KPjfsD7YEyMSZEw5jxdlTWelNfpnxu9A2LinxPRADgTCT/GmwP16IMULw3+L1I smo8+Emlr0MzvsKw9QDXVJJ7AqbosU4pKGI//JrK6bH2rYfQnn7pf07ZZ2whS3OLLKfGwOYUk OU9V3ZSvXrVwWmixXuWHO5KSriK1X4u7Wzqvu3lco+uVSCyScUrRAJ65Z5mOoQWozxZ0hX2xE UmJ6HFSTaL2rtnGPiVBJrWQ2+iDaZaMSYsNAUgP84AtMR3Ahpfh5YwyAx3XjiE0NTH8TvkYCf t7X2D5Ru3hqTROLM83EAYcRBku/fP0SUGIbhPc7LTfhDv2hI9w= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org To make space for more files in the GPIO section, create a Documentation/driver-api/gpio/ directory. Signed-off-by: Jonathan Neuschäfer --- Documentation/driver-api/{gpio.rst => gpio/index.rst} | 0 Documentation/driver-api/index.rst | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename Documentation/driver-api/{gpio.rst => gpio/index.rst} (100%) diff --git a/Documentation/driver-api/gpio.rst b/Documentation/driver-api/gpio/index.rst similarity index 100% rename from Documentation/driver-api/gpio.rst rename to Documentation/driver-api/gpio/index.rst diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst index 62d056471c0d..9b54fb99d9ca 100644 --- a/Documentation/driver-api/index.rst +++ b/Documentation/driver-api/index.rst @@ -45,7 +45,7 @@ available subsections can be seen below. uio-howto firmware/index pinctl - gpio + gpio/index misc_devices dmaengine/index slimbus From patchwork Thu Mar 8 23:40:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 883409 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zy6Tq4zxSz9skr for ; Fri, 9 Mar 2018 10:41:19 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751145AbeCHXlS (ORCPT ); Thu, 8 Mar 2018 18:41:18 -0500 Received: from mout.gmx.net ([212.227.15.19]:59351 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750857AbeCHXlR (ORCPT ); Thu, 8 Mar 2018 18:41:17 -0500 Received: from latitude ([88.153.6.235]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LyEJp-1eYlBi35zp-015Xnp; Fri, 09 Mar 2018 00:41:11 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, =?utf-8?q?Jon?= =?utf-8?q?athan_Neusch=C3=A4fer?= , Linus Walleij , Jonathan Corbet Subject: [PATCH 3/8] Documentation: gpio: Move introduction to driver-api Date: Fri, 9 Mar 2018 00:40:19 +0100 Message-Id: <20180308234024.24145-4-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180308234024.24145-1-j.neuschaefer@gmx.net> References: <20180308234024.24145-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:TwEs7abHjTdQq9mYXNP744jhC/hLBDAHPYv1kxVTFArKYWY+i8x bauym80iLZfjoMQ1m37yzsqIdi4u8JCIigLla3SW+FHrAWkBPeKJHQfS7C140pnJSszoRZG PzT5lK7vl+MGQh/VoB5UxwiQy7tuSpBJYvHiCf92mPgPiZB69qsflbc7EIQejYh1zJzpYx8 //zOh4jkVbeCPHiI5X08Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:vCb4CZ6r7j4=:wRpNFpHkMDmA1gvVF9JEZo IjB8Nt4cHgEE9Ty2Jn9zlS+4lMuhczVwt6vLECozS4gen2HBxZqRYMQZs4PLiQfDRor428VOt jrL/usHBeFf6yxb73MnePl/j9uNVHz5HCD7J7ahHrWnSod5zg1zslKpZvfcTB7jr3fL/nZUNS DRk1T1TTfn+yQwOvjgPcg7QmUWS51QreP/8LE/Jr14XCD2hzI3D/HXEcX4JyqIEFWlGSn+yQr P6uAgYznIM91h8KmIbvnIDYPunSRbZQ63pnG6qyVwNzwEkaudDdcjb0XuzbYo0EuIjB63Y+oq wfPQdFYB7N4TCAI2hGwQj0uu+S3L9HEFUq+QOrzxKIXVxEtQOfdJDMTKBQnXh+Ksq0Ad4bnbO EYKhSR5fuzwfqyB6W2iNaH3jC2yK/NDuguvUNVg9C1WAhEbFg2130Cw6LCdd9cO1LXsz0wiDR R4YTQqs6IzqqclRXCjbLr1+BGmpT34X3mFRdG3PURwno8vbnkDHti4Lk7YRjK2NfVXnOc/ltC dv6jEPY+qdQrriyaBoqlxI18v3vyavUUdqPGNv4+/FDDIBHAXhuUrYVWmE0o79XdDUqKOjwzl l48hOUUJ/eXuEkzRh83RX3Vx3fJ6QuH1GqbOW6KAXy4DrDyW0Ugk+pYp3+s++oDkNPj/hEPg3 i04Vbeux4e+SAv3FMU3kXc6iy3GWqpNCROQ0EpIrbYrkCLGOGjSYgaco4bsLw+8OEVfZ5ijId 02uEBDBytXtqyqMcHWTNwRssfUuhAJKgoLIKyy9Tz7pnSHnh6jwQUbPmGPkizq0wI/+RMhqMR q0BnMBiB2JikUt42kstYFKVO5v/hDOm19tHKC2KELhLTLwg4y8= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Move gpio/intro.txt to driver-api/gpio/intro.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer --- Documentation/driver-api/gpio/index.rst | 7 +++++++ Documentation/{gpio/gpio.txt => driver-api/gpio/intro.rst} | 9 +++++++-- Documentation/gpio/00-INDEX | 2 -- 3 files changed, 14 insertions(+), 4 deletions(-) rename Documentation/{gpio/gpio.txt => driver-api/gpio/intro.rst} (96%) diff --git a/Documentation/driver-api/gpio/index.rst b/Documentation/driver-api/gpio/index.rst index 6dd4aa647f27..db47d845f473 100644 --- a/Documentation/driver-api/gpio/index.rst +++ b/Documentation/driver-api/gpio/index.rst @@ -2,6 +2,13 @@ General Purpose Input/Output (GPIO) =================================== +Contents: + +.. toctree:: + :maxdepth: 2 + + intro + Core ==== diff --git a/Documentation/gpio/gpio.txt b/Documentation/driver-api/gpio/intro.rst similarity index 96% rename from Documentation/gpio/gpio.txt rename to Documentation/driver-api/gpio/intro.rst index cd9b356e88cd..74591489d0b5 100644 --- a/Documentation/gpio/gpio.txt +++ b/Documentation/driver-api/gpio/intro.rst @@ -1,3 +1,8 @@ +============ +Introduction +============ + + GPIO Interfaces =============== @@ -9,9 +14,9 @@ Due to the history of GPIO interfaces in the kernel, there are two different ways to obtain and use GPIOs: - The descriptor-based interface is the preferred way to manipulate GPIOs, -and is described by all the files in this directory excepted gpio-legacy.txt. + and is described by all the files in this directory excepted gpio-legacy.txt. - The legacy integer-based interface which is considered deprecated (but still -usable for compatibility reasons) is documented in gpio-legacy.txt. + usable for compatibility reasons) is documented in gpio-legacy.txt. The remainder of this document applies to the new descriptor-based interface. gpio-legacy.txt contains the same information applied to the legacy diff --git a/Documentation/gpio/00-INDEX b/Documentation/gpio/00-INDEX index 179beb234f98..52fe0fa6c964 100644 --- a/Documentation/gpio/00-INDEX +++ b/Documentation/gpio/00-INDEX @@ -1,7 +1,5 @@ 00-INDEX - This file -gpio.txt - - Introduction to GPIOs and their kernel interfaces consumer.txt - How to obtain and use GPIOs in a driver driver.txt From patchwork Thu Mar 8 23:40:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 883416 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zy6XZ1vmHz9s0v for ; Fri, 9 Mar 2018 10:43:42 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751235AbeCHXn2 (ORCPT ); Thu, 8 Mar 2018 18:43:28 -0500 Received: from mout.gmx.net ([212.227.17.20]:60081 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750867AbeCHXlS (ORCPT ); Thu, 8 Mar 2018 18:41:18 -0500 Received: from latitude ([88.153.6.235]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LcWSI-1eDdPT0hfC-00jqGR; Fri, 09 Mar 2018 00:41:13 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, =?utf-8?q?Jon?= =?utf-8?q?athan_Neusch=C3=A4fer?= , Linus Walleij , Jonathan Corbet Subject: [PATCH 4/8] Documentation: gpio: Move driver documentation to driver-api Date: Fri, 9 Mar 2018 00:40:20 +0100 Message-Id: <20180308234024.24145-5-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180308234024.24145-1-j.neuschaefer@gmx.net> References: <20180308234024.24145-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:8rS+WcQCZR8DVJdh7hacJ1BYYS9o7/tecm487E7BsyOHpYQyxz4 TPwTzPkF2FYDo1wfTjI5VsXoKoftxKSXpZxWjyKzHU93OhQ8fvr2e65Sh/t3KS3pUSJlIIY Wf9hH0/FhnCtH5HfDudF46ww7GoEHGB2HJFaV+Fy076GT/Wxq9GbKsjBeDIIBkiPKSk9c0w +OstKlOtzsleWnSt0To6w== X-UI-Out-Filterresults: notjunk:1; V01:K0:p6as9tltgjs=:3Z38SPzqAZ3juRNFs98d7a HksJUUhbiyVFhHtYgNPpp4wNGC2a9ZXTBy5uhRZX9g1kb6C+3Wr2gGVLzr6hFrVfFq0ElBPPp PXw1XanPviD6dw33obzJO6QQmcTuCgyI7ZZx59hI37DCBZG6E6znTfStWg/mbZgozdbWdOjDp 3jzYwqaLRnYSA7hTQ2dUBS61o51RYli/6Gp1I/Ee1HUcJPidIuoLMBDtwRH15yRAiMoRQ8q3u eQghNsa10IInkjmNbkvl7YdcABOOP+kuxlOjZk0EoqwmSjrXhBg6Q/UVWILnNS9CnboagWN0D K0bUkgjIjqpfpw13M0FAQLipJSxSkJuMB0geQm88SyCe3fogZx2ODju/dpT19UiIwBv47O53D yA9p3jAKeezRCMlUtH+SFiSJnq35XKThxmhkNSJ6KMBIjnr1GEXuYRPCGp6msgDOQG5xfaRya jdwMDdvsWdyq1my4L2OcTm4pz6Ad9pAlaZNREW7B45QFQrcja28F00TNY3DW3VWyXi+YZfdqc e7uxWRPFpGLpK/k+DeIU/UZfHroA4kdYxwsbGjLc/IBsT+hSbIm5ZwimxTwbGOQp4VtaAV/2v nTH6I7y9KcNqzUE7BYGjsWQa7UTAM9XFyCpS7UNHhRW6+oUSikoRvF1dAfg5CfsE9lgESepmx gbikChIyUwUkqA4iK0yRumrGTK8tVyhWrU5YSs3dP/6YLu64e+8qpsyTSqKV0y3bkTk492Dqp L+KIraqBPU2uN8s0E/XuseAGFvGblPCuxBt9EEDLvVps0Kz8+GZ3+XmtkxW9IiZc9x6moefT+ nUDNst1yDoXGjeMNxMO+DpfvPGhoftQDoZiMoJrM9W6K6Pb8ro= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Move gpio/driver.txt to driver-api/gpio/driver.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer --- .../driver.txt => driver-api/gpio/driver.rst} | 80 +++++++++++----------- Documentation/driver-api/gpio/index.rst | 1 + Documentation/gpio/00-INDEX | 2 - 3 files changed, 42 insertions(+), 41 deletions(-) rename Documentation/{gpio/driver.txt => driver-api/gpio/driver.rst} (93%) diff --git a/Documentation/gpio/driver.txt b/Documentation/driver-api/gpio/driver.rst similarity index 93% rename from Documentation/gpio/driver.txt rename to Documentation/driver-api/gpio/driver.rst index 3392a0fd4c23..505ee906d7d9 100644 --- a/Documentation/gpio/driver.txt +++ b/Documentation/driver-api/gpio/driver.rst @@ -1,3 +1,4 @@ +================================ GPIO Descriptor Driver Interface ================================ @@ -53,9 +54,9 @@ common to each controller of that type: The code implementing a gpio_chip should support multiple instances of the controller, possibly using the driver model. That code will configure each -gpio_chip and issue gpiochip_add[_data]() or devm_gpiochip_add_data(). -Removing a GPIO controller should be rare; use [devm_]gpiochip_remove() when -it is unavoidable. +gpio_chip and issue ``gpiochip_add[_data]()`` or ``devm_gpiochip_add_data()``. +Removing a GPIO controller should be rare; use ``[devm_]gpiochip_remove()`` +when it is unavoidable. Often a gpio_chip is part of an instance-specific structure with states not exposed by the GPIO interfaces, such as addressing, power management, and more. @@ -115,7 +116,7 @@ GPIOs with open drain/source support Open drain (CMOS) or open collector (TTL) means the line is not actively driven high: instead you provide the drain/collector as output, so when the transistor -is not open, it will present a high-impedance (tristate) to the external rail. +is not open, it will present a high-impedance (tristate) to the external rail:: CMOS CONFIGURATION TTL CONFIGURATION @@ -148,19 +149,19 @@ level-shift to the higher VDD. Integrated electronics often have an output driver stage in the form of a CMOS "totem-pole" with one N-MOS and one P-MOS transistor where one of them drives the line high and one of them drives the line low. This is called a push-pull -output. The "totem-pole" looks like so: - - VDD - | - OD ||--+ - +--/ ---o|| P-MOS-FET - | ||--+ -IN --+ +----- out - | ||--+ - +--/ ----|| N-MOS-FET - OS ||--+ - | - GND +output. The "totem-pole" looks like so:: + + VDD + | + OD ||--+ + +--/ ---o|| P-MOS-FET + | ||--+ + IN --+ +----- out + | ||--+ + +--/ ----|| N-MOS-FET + OS ||--+ + | + GND The desired output signal (e.g. coming directly from some GPIO output register) arrives at IN. The switches named "OD" and "OS" are normally closed, creating @@ -219,8 +220,9 @@ systems simultaneously: gpio and irq. RT_FULL: a realtime compliant GPIO driver should not use spinlock_t or any sleepable APIs (like PM runtime) as part of its irq_chip implementation. -- spinlock_t should be replaced with raw_spinlock_t [1]. -- If sleepable APIs have to be used, these can be done from the .irq_bus_lock() + +* spinlock_t should be replaced with raw_spinlock_t [1]. +* If sleepable APIs have to be used, these can be done from the .irq_bus_lock() and .irq_bus_unlock() callbacks, as these are the only slowpath callbacks on an irqchip. Create the callbacks if needed [2]. @@ -232,12 +234,12 @@ GPIO irqchips usually fall in one of two categories: system interrupt controller. This means that the GPIO irqchip handler will be called immediately from the parent irqchip, while holding the IRQs disabled. The GPIO irqchip will then end up calling something like this - sequence in its interrupt handler: + sequence in its interrupt handler:: - static irqreturn_t foo_gpio_irq(int irq, void *data) - chained_irq_enter(...); - generic_handle_irq(...); - chained_irq_exit(...); + static irqreturn_t foo_gpio_irq(int irq, void *data) + chained_irq_enter(...); + generic_handle_irq(...); + chained_irq_exit(...); Chained GPIO irqchips typically can NOT set the .can_sleep flag on struct gpio_chip, as everything happens directly in the callbacks: no @@ -252,7 +254,7 @@ GPIO irqchips usually fall in one of two categories: (for example, see [3]). Know W/A: The generic_handle_irq() is expected to be called with IRQ disabled, so the IRQ core will complain if it is called from an IRQ handler which is - forced to a thread. The "fake?" raw lock can be used to W/A this problem: + forced to a thread. The "fake?" raw lock can be used to W/A this problem:: raw_spinlock_t wa_lock; static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank) @@ -265,11 +267,11 @@ GPIO irqchips usually fall in one of two categories: but chained IRQ handlers are not used. Instead GPIO IRQs dispatching is performed by generic IRQ handler which is configured using request_irq(). The GPIO irqchip will then end up calling something like this sequence in - its interrupt handler: + its interrupt handler:: - static irqreturn_t gpio_rcar_irq_handler(int irq, void *dev_id) - for each detected GPIO IRQ - generic_handle_irq(...); + static irqreturn_t gpio_rcar_irq_handler(int irq, void *dev_id) + for each detected GPIO IRQ + generic_handle_irq(...); RT_FULL: Such kind of handlers will be forced threaded on -RT, as result IRQ core will complain that generic_handle_irq() is called with IRQ enabled and @@ -282,11 +284,11 @@ GPIO irqchips usually fall in one of two categories: in a quick IRQ handler with IRQs disabled. Instead they need to spawn a thread and then mask the parent IRQ line until the interrupt is handled by the driver. The hallmark of this driver is to call something like - this in its interrupt handler: + this in its interrupt handler:: - static irqreturn_t foo_gpio_irq(int irq, void *data) - ... - handle_nested_irq(irq); + static irqreturn_t foo_gpio_irq(int irq, void *data) + ... + handle_nested_irq(irq); The hallmark of threaded GPIO irqchips is that they set the .can_sleep flag on struct gpio_chip to true, indicating that this chip may sleep @@ -359,12 +361,12 @@ below exists. Locking IRQ usage ----------------- Input GPIOs can be used as IRQ signals. When this happens, a driver is requested -to mark the GPIO as being used as an IRQ: +to mark the GPIO as being used as an IRQ:: int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset) This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock -is released: +is released:: void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset) @@ -408,7 +410,7 @@ Sometimes it is useful to allow a GPIO chip driver to request its own GPIO descriptors through the gpiolib API. Using gpio_request() for this purpose does not help since it pins the module to the kernel forever (it calls try_module_get()). A GPIO driver can use the following functions instead -to request and free descriptors without being pinned to the kernel forever. +to request and free descriptors without being pinned to the kernel forever:: struct gpio_desc *gpiochip_request_own_desc(struct gpio_desc *desc, const char *label) @@ -422,6 +424,6 @@ These functions must be used with care since they do not affect module use count. Do not use the functions to request gpio descriptors not owned by the calling driver. -[1] http://www.spinics.net/lists/linux-omap/msg120425.html -[2] https://lkml.org/lkml/2015/9/25/494 -[3] https://lkml.org/lkml/2015/9/25/495 +* [1] http://www.spinics.net/lists/linux-omap/msg120425.html +* [2] https://lkml.org/lkml/2015/9/25/494 +* [3] https://lkml.org/lkml/2015/9/25/495 diff --git a/Documentation/driver-api/gpio/index.rst b/Documentation/driver-api/gpio/index.rst index db47d845f473..e1fbc5408cf6 100644 --- a/Documentation/driver-api/gpio/index.rst +++ b/Documentation/driver-api/gpio/index.rst @@ -8,6 +8,7 @@ Contents: :maxdepth: 2 intro + driver Core ==== diff --git a/Documentation/gpio/00-INDEX b/Documentation/gpio/00-INDEX index 52fe0fa6c964..06c25fb7604c 100644 --- a/Documentation/gpio/00-INDEX +++ b/Documentation/gpio/00-INDEX @@ -2,8 +2,6 @@ - This file consumer.txt - How to obtain and use GPIOs in a driver -driver.txt - - How to write a GPIO driver drivers-on-gpio.txt: - Drivers in other subsystems that can use GPIO to provide more complex functionality. From patchwork Thu Mar 8 23:40:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 883413 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zy6WG3yybz9shn for ; Fri, 9 Mar 2018 10:42:34 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751279AbeCHXlW (ORCPT ); Thu, 8 Mar 2018 18:41:22 -0500 Received: from mout.gmx.net ([212.227.17.20]:49495 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751025AbeCHXlT (ORCPT ); Thu, 8 Mar 2018 18:41:19 -0500 Received: from latitude ([88.153.6.235]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MN748-1f0grK1sDY-006bkX; Fri, 09 Mar 2018 00:41:14 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, =?utf-8?q?Jon?= =?utf-8?q?athan_Neusch=C3=A4fer?= , Linus Walleij , Jonathan Corbet Subject: [PATCH 5/8] Documentation: gpio: Move legacy documentation to driver-api Date: Fri, 9 Mar 2018 00:40:21 +0100 Message-Id: <20180308234024.24145-6-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180308234024.24145-1-j.neuschaefer@gmx.net> References: <20180308234024.24145-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:gspnSzA9A27VIbpY8uNz7e8vPR0f9uFQogzf2gBAmkFGoEoJzmV +uyfENWztKmz8gp8RBpNc2cgMBoI4XbDGrTmVTEncprXXrEag61Chf8aci29amRupZNoJIh UaHFL1B0NPDynP+XdNpZ7WjbvJdhX7I2D8MOYPKOaWTKPC2u7tk7YkEkUpDfSV780/LS5Xe 5wF2gabTb2HeP7v+4u6uQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Rvn0D4sMXIU=:Kx78MZBhuWF/54bDYUhCos 0EFx162DWA919udpY1blwFzwWR3R28UOK371bik8VGPjFDHeqb+KSDL7CPw+ie9K2bCC98nMf zcTrT58k5OF+i/oghkB8nSlRmc5yfYGDBiGMJke4qGc1wJe8pI/SB6mwYKPjd9KtuSc6aSboc THig8QdRKw5fxnq66yhWp8MBORRmDV6RBHS1Ol4nIgi493yFdpZrhnvabPsT3e+/SGCCDxXFW yIfuqdG6MzybmIAQgSQ3bUXgZxE1ZtLT9PLcOSP21SemyuUk2BWTZoucQA49Qr0tdB0l+eKx2 wZf+HEPyAOCFfeFbq1k4xhm9iUwn8oeSuY77bU8SQvRP3wXyUsOiIQQIJrkZB481h+s/zs9YZ 5wMN7UtycMLF3AkSzkHT3QC5XEDn6EYdOmD1Mc4w3uFE9FuvEA6P4IwjMZ6m8+28vSlSLpLT+ aAjTPA3dO8RHOdpQZ3IZ+uluVd0qiHHAavj7yiacgaaHXgTrcki4ox6YX+XRbG6QxVtmuWBAW F5eb8KCWvMYHBppviN9TdeHkYPnIRcxTaGu1e3hFLPdPyq0ruDZa7YsRF5q+R2jUIO0x7EscT Dx0Ieu36Ur3SfcAdTJJCpGY/lfccbsFbSMlx/2IQ439lVZN0CYlmzGN+oMbga6wpPlpM6m1wX CX+ya3hlyMZoYs5rAaZkbY7NLwyBfnXgMaRSnmuKNsATnn6g/0eFE0T6szhubVcus7CEGkjVE pvQU/ar4gNzl0dEZlaXUL6ET2Va6o570ixRvyLjzj0vF+i6y4tYYNstqMHSOwebngQI6RjHny Iga5MzodFto7dzXTDVS6NFpGfqOf3+aQPSqohQb4ZMWNS+92mQ= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Move gpio/gpio-legacy.txt to driver-api/gpio/legacy.rst and make sure it builds cleanly as ReST. Also move the legacy API reference from index.rst to legacy.rst. Signed-off-by: Jonathan Neuschäfer --- Documentation/driver-api/gpio/index.rst | 10 +--- .../gpio-legacy.txt => driver-api/gpio/legacy.rst} | 68 +++++++++++++--------- Documentation/gpio/00-INDEX | 2 - 3 files changed, 41 insertions(+), 39 deletions(-) rename Documentation/{gpio/gpio-legacy.txt => driver-api/gpio/legacy.rst} (96%) diff --git a/Documentation/driver-api/gpio/index.rst b/Documentation/driver-api/gpio/index.rst index e1fbc5408cf6..fd22c0d1419e 100644 --- a/Documentation/driver-api/gpio/index.rst +++ b/Documentation/driver-api/gpio/index.rst @@ -9,6 +9,7 @@ Contents: intro driver + legacy Core ==== @@ -19,15 +20,6 @@ Core .. kernel-doc:: drivers/gpio/gpiolib.c :export: -Legacy API -========== - -The functions listed in this section are deprecated. The GPIO descriptor based -API described above should be used in new code. - -.. kernel-doc:: drivers/gpio/gpiolib-legacy.c - :export: - ACPI support ============ diff --git a/Documentation/gpio/gpio-legacy.txt b/Documentation/driver-api/gpio/legacy.rst similarity index 96% rename from Documentation/gpio/gpio-legacy.txt rename to Documentation/driver-api/gpio/legacy.rst index 8356d0e78f67..5e9421e05f1d 100644 --- a/Documentation/gpio/gpio-legacy.txt +++ b/Documentation/driver-api/gpio/legacy.rst @@ -1,4 +1,6 @@ -GPIO Interfaces +====================== +Legacy GPIO Interfaces +====================== This provides an overview of GPIO access conventions on Linux. @@ -129,7 +131,7 @@ The first thing a system should do with a GPIO is allocate it, using the gpio_request() call; see later. One of the next things to do with a GPIO, often in board setup code when -setting up a platform_device using the GPIO, is mark its direction: +setting up a platform_device using the GPIO, is mark its direction:: /* set as input or output, returning 0 or negative errno */ int gpio_direction_input(unsigned gpio); @@ -164,7 +166,7 @@ Those don't need to sleep, and can safely be done from inside hard (nonthreaded) IRQ handlers and similar contexts. Use the following calls to access such GPIOs, -for which gpio_cansleep() will always return false (see below): +for which gpio_cansleep() will always return false (see below):: /* GPIO INPUT: return zero or nonzero */ int gpio_get_value(unsigned gpio); @@ -201,11 +203,11 @@ This requires sleeping, which can't be done from inside IRQ handlers. Platforms that support this type of GPIO distinguish them from other GPIOs by returning nonzero from this call (which requires a valid GPIO number, -which should have been previously allocated with gpio_request): +which should have been previously allocated with gpio_request):: int gpio_cansleep(unsigned gpio); -To access such GPIOs, a different set of accessors is defined: +To access such GPIOs, a different set of accessors is defined:: /* GPIO INPUT: return zero or nonzero, might sleep */ int gpio_get_value_cansleep(unsigned gpio); @@ -222,27 +224,27 @@ Other than the fact that these accessors might sleep, and will work on GPIOs that can't be accessed from hardIRQ handlers, these calls act the same as the spinlock-safe calls. - ** IN ADDITION ** calls to setup and configure such GPIOs must be made +**IN ADDITION** calls to setup and configure such GPIOs must be made from contexts which may sleep, since they may need to access the GPIO -controller chip too: (These setup calls are usually made from board -setup or driver probe/teardown code, so this is an easy constraint.) +controller chip too (These setup calls are usually made from board +setup or driver probe/teardown code, so this is an easy constraint.):: - gpio_direction_input() - gpio_direction_output() - gpio_request() + gpio_direction_input() + gpio_direction_output() + gpio_request() -## gpio_request_one() -## gpio_request_array() -## gpio_free_array() + ## gpio_request_one() + ## gpio_request_array() + ## gpio_free_array() - gpio_free() - gpio_set_debounce() + gpio_free() + gpio_set_debounce() Claiming and Releasing GPIOs ---------------------------- -To help catch system configuration errors, two calls are defined. +To help catch system configuration errors, two calls are defined:: /* request GPIO, returning 0 or negative errno. * non-null labels may be useful for diagnostics. @@ -296,7 +298,7 @@ Also note that it's your responsibility to have stopped using a GPIO before you free it. Considering in most cases GPIOs are actually configured right after they -are claimed, three additional calls are defined: +are claimed, three additional calls are defined:: /* request a single GPIO, with initial configuration specified by * 'flags', identical to gpio_request() wrt other arguments and @@ -347,7 +349,7 @@ to make the pin LOW. The pin is make to HIGH by driving value 1 in output mode. In the future, these flags can be extended to support more properties. Further more, to ease the claim/release of multiple GPIOs, 'struct gpio' is -introduced to encapsulate all three fields as: +introduced to encapsulate all three fields as:: struct gpio { unsigned gpio; @@ -355,7 +357,7 @@ introduced to encapsulate all three fields as: const char *label; }; -A typical example of usage: +A typical example of usage:: static struct gpio leds_gpios[] = { { 32, GPIOF_OUT_INIT_HIGH, "Power LED" }, /* default to ON */ @@ -380,7 +382,7 @@ GPIOs mapped to IRQs -------------------- GPIO numbers are unsigned integers; so are IRQ numbers. These make up two logically distinct namespaces (GPIO 0 need not use IRQ 0). You can -map between them using calls like: +map between them using calls like:: /* map GPIO numbers to IRQ numbers */ int gpio_to_irq(unsigned gpio); @@ -446,12 +448,12 @@ A GPIO controller on a SOC might be tightly coupled with the pinctrl subsystem, in the sense that the pins can be used by other functions together with an optional gpio feature. We have already covered the case where e.g. a GPIO controller need to reserve a pin or set the -direction of a pin by calling any of: +direction of a pin by calling any of:: -pinctrl_gpio_request() -pinctrl_gpio_free() -pinctrl_gpio_direction_input() -pinctrl_gpio_direction_output() + pinctrl_gpio_request() + pinctrl_gpio_free() + pinctrl_gpio_direction_input() + pinctrl_gpio_direction_output() But how does the pin control subsystem cross-correlate the GPIO numbers (which are a global business) to a certain pin on a certain @@ -565,7 +567,7 @@ If neither of these options are selected, the platform does not support GPIOs through GPIO-lib and the code cannot be enabled by the user. Trivial implementations of those functions can directly use framework -code, which always dispatches through the gpio_chip: +code, which always dispatches through the gpio_chip:: #define gpio_get_value __gpio_get_value #define gpio_set_value __gpio_set_value @@ -731,7 +733,7 @@ the correct GPIO number to use for a given signal. Exporting from Kernel code -------------------------- Kernel code can explicitly manage exports of GPIOs which have already been -requested using gpio_request(): +requested using gpio_request():: /* export the GPIO to userspace */ int gpio_export(unsigned gpio, bool direction_may_change); @@ -756,3 +758,13 @@ After the GPIO has been exported, gpio_export_link() allows creating symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can use this to provide the interface under their own device in sysfs with a descriptive name. + + +API Reference +============= + +The functions listed in this section are deprecated. The GPIO descriptor based +API should be used in new code. + +.. kernel-doc:: drivers/gpio/gpiolib-legacy.c + :export: diff --git a/Documentation/gpio/00-INDEX b/Documentation/gpio/00-INDEX index 06c25fb7604c..64cf61245861 100644 --- a/Documentation/gpio/00-INDEX +++ b/Documentation/gpio/00-INDEX @@ -9,5 +9,3 @@ board.txt - How to assign GPIOs to a consumer device and a function sysfs.txt - Information about the GPIO sysfs interface -gpio-legacy.txt - - Historical documentation of the deprecated GPIO integer interface From patchwork Thu Mar 8 23:40:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 883414 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zy6Ws0zLyz9shn for ; Fri, 9 Mar 2018 10:43:05 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751278AbeCHXmg (ORCPT ); Thu, 8 Mar 2018 18:42:36 -0500 Received: from mout.gmx.net ([212.227.15.19]:42459 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751337AbeCHXlU (ORCPT ); Thu, 8 Mar 2018 18:41:20 -0500 Received: from latitude ([88.153.6.235]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LxPuE-1eafWz28j4-016vmk; Fri, 09 Mar 2018 00:41:15 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, =?utf-8?q?Jon?= =?utf-8?q?athan_Neusch=C3=A4fer?= , Linus Walleij , Jonathan Corbet Subject: [PATCH 6/8] Documentation: gpio: Move gpiod_* consumer documentation to driver-api Date: Fri, 9 Mar 2018 00:40:22 +0100 Message-Id: <20180308234024.24145-7-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180308234024.24145-1-j.neuschaefer@gmx.net> References: <20180308234024.24145-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:tXk7tqpVYGyJKpTRhKyucOvCagGbixppHtFmzQuCch0/GgiWPNO 3361QGvbXVZMDMpkq9IYHrI38cisnP3zFSfNOx8tmvuIbMl02TQDkkPAwHfwYioR374xjim sJnt/SOTR+NU/PtRSyh7wL4k+QFdK3Y3nWCyGlUo0Qh+2EohPjUZGqxkMLRL4szD21ThtBw GoSzrKn7dIizFjMv/FAPA== X-UI-Out-Filterresults: notjunk:1; V01:K0:wqwdiyxYFWs=:ronfFKlemQ5Qvx+EDycfPJ ieYctQxBoqQ73jD6OzSSuxpWc5pBLD9U2MSSI3Z95k2fLJR/SeKM3mKZHiRejAKyQtHyk2uwb hsl8AEtFDKS2AM8zncpo3VI3BqVB5iYuUoT0SqWe2jOWcj19rhAwPe8ZU1Isc3KcZ+5EHnsUh rWM/XAbA3gMvj1/4pyRAx66oPTkLK7zhIyt5i4p8bmsCK34OqfIRq2a37b/tK6+o0EV+7wKl0 wXW8FsuNQrGN4JVVq0wfVfODQjIZjTT+cVWYWC5cowq9iT0m49NJwGMVEqeCDXkYFPo726tFQ LbfJH6iqpIjPKchIaTfzYGV2hDIkpHYBNbdl0wtBsbo46Dq9Pk+3+5TUBAFXJnusL0dC3QesQ U8KeKfgGFX3N9q2GOJmuojeOwG8nQC7H7ucTN/BDgu+481wtBxjcBwO1gw4xTWE+5s/XEkjAY TwEKQLQZDSn7yUnMSfRx5/Q/YMvZ2rGK6bMWHgnoOUlfkZnn4GLTDrhbLknAtPTMDY5GldQfr MY7LFnXWtpPmhAgjYqBqx/yLOKc4kJYBRR71Nic0SmUJaofZG/sMGN7ycr4MkGIW5fLjw6PG1 lMXDpuCEc02IvtjaCCoOoOtm/Rc6ggUlxIZtmHSfTHAPIWyG/56H3fSGrF7iTy1cLjmSzL1dV 97o5K/HFw1AJOZsPBrnpsR/iNgG+GaxUUpwVk7OO/IOHqWfmb7Rjodpoy4OkFRXycypQBgrDD Qlx0q1g+ZqJblgZTfpiQzja0SEJNxDfGEMuy7IyJ6CBndwrzAIXzBh+OVBoc3h6kmG+hwE7oV kwYQRLVr4VaFGmvACSZd2uNOTARnYcJ8MtvDNoP28HaL86sBGA= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Move gpio/consumer.txt to driver-api/gpio/consumer.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer --- .../consumer.txt => driver-api/gpio/consumer.rst} | 85 +++++++++++----------- Documentation/driver-api/gpio/index.rst | 1 + Documentation/gpio/00-INDEX | 2 - 3 files changed, 44 insertions(+), 44 deletions(-) rename Documentation/{gpio/consumer.txt => driver-api/gpio/consumer.rst} (89%) diff --git a/Documentation/gpio/consumer.txt b/Documentation/driver-api/gpio/consumer.rst similarity index 89% rename from Documentation/gpio/consumer.txt rename to Documentation/driver-api/gpio/consumer.rst index d53e5b5cfc9c..c71a50d85b50 100644 --- a/Documentation/gpio/consumer.txt +++ b/Documentation/driver-api/gpio/consumer.rst @@ -1,3 +1,4 @@ +================================== GPIO Descriptor Consumer Interface ================================== @@ -30,10 +31,10 @@ warnings. These stubs are used for two use cases: be met with console warnings that may be perceived as intimidating. All the functions that work with the descriptor-based GPIO interface are -prefixed with gpiod_. The gpio_ prefix is used for the legacy interface. No -other function in the kernel should use these prefixes. The use of the legacy -functions is strongly discouraged, new code should use -and descriptors exclusively. +prefixed with ``gpiod_``. The ``gpio_`` prefix is used for the legacy +interface. No other function in the kernel should use these prefixes. The use +of the legacy functions is strongly discouraged, new code should use + and descriptors exclusively. Obtaining and Disposing GPIOs @@ -43,13 +44,13 @@ With the descriptor-based interface, GPIOs are identified with an opaque, non-forgeable handler that must be obtained through a call to one of the gpiod_get() functions. Like many other kernel subsystems, gpiod_get() takes the device that will use the GPIO and the function the requested GPIO is supposed to -fulfill: +fulfill:: struct gpio_desc *gpiod_get(struct device *dev, const char *con_id, enum gpiod_flags flags) If a function is implemented by using several GPIOs together (e.g. a simple LED -device that displays digits), an additional index argument can be specified: +device that displays digits), an additional index argument can be specified:: struct gpio_desc *gpiod_get_index(struct device *dev, const char *con_id, unsigned int idx, @@ -84,7 +85,7 @@ occurred while trying to acquire it. This is useful to discriminate between mere errors and an absence of GPIO for optional GPIO parameters. For the common pattern where a GPIO is optional, the gpiod_get_optional() and gpiod_get_index_optional() functions can be used. These functions return NULL -instead of -ENOENT if no GPIO has been assigned to the requested function: +instead of -ENOENT if no GPIO has been assigned to the requested function:: struct gpio_desc *gpiod_get_optional(struct device *dev, const char *con_id, @@ -101,14 +102,14 @@ This is helpful to driver authors, since they do not need to special case -ENOSYS return codes. System integrators should however be careful to enable gpiolib on systems that need it. -For a function using multiple GPIOs all of those can be obtained with one call: +For a function using multiple GPIOs all of those can be obtained with one call:: struct gpio_descs *gpiod_get_array(struct device *dev, const char *con_id, enum gpiod_flags flags) This function returns a struct gpio_descs which contains an array of -descriptors: +descriptors:: struct gpio_descs { unsigned int ndescs; @@ -116,13 +117,13 @@ descriptors: } The following function returns NULL instead of -ENOENT if no GPIOs have been -assigned to the requested function: +assigned to the requested function:: struct gpio_descs *gpiod_get_array_optional(struct device *dev, const char *con_id, enum gpiod_flags flags) -Device-managed variants of these functions are also defined: +Device-managed variants of these functions are also defined:: struct gpio_desc *devm_gpiod_get(struct device *dev, const char *con_id, enum gpiod_flags flags) @@ -149,11 +150,11 @@ Device-managed variants of these functions are also defined: const char *con_id, enum gpiod_flags flags) -A GPIO descriptor can be disposed of using the gpiod_put() function: +A GPIO descriptor can be disposed of using the gpiod_put() function:: void gpiod_put(struct gpio_desc *desc) -For an array of GPIOs this function can be used: +For an array of GPIOs this function can be used:: void gpiod_put_array(struct gpio_descs *descs) @@ -161,7 +162,7 @@ It is strictly forbidden to use a descriptor after calling these functions. It is also not allowed to individually release descriptors (using gpiod_put()) from an array acquired with gpiod_get_array(). -The device-managed variants are, unsurprisingly: +The device-managed variants are, unsurprisingly:: void devm_gpiod_put(struct device *dev, struct gpio_desc *desc) @@ -175,7 +176,7 @@ Setting Direction ----------------- The first thing a driver must do with a GPIO is setting its direction. If no direction-setting flags have been given to gpiod_get*(), this is done by -invoking one of the gpiod_direction_*() functions: +invoking one of the gpiod_direction_*() functions:: int gpiod_direction_input(struct gpio_desc *desc) int gpiod_direction_output(struct gpio_desc *desc, int value) @@ -189,7 +190,7 @@ of early board setup. For output GPIOs, the value provided becomes the initial output value. This helps avoid signal glitching during system startup. -A driver can also query the current direction of a GPIO: +A driver can also query the current direction of a GPIO:: int gpiod_get_direction(const struct gpio_desc *desc) @@ -206,7 +207,7 @@ Most GPIO controllers can be accessed with memory read/write instructions. Those don't need to sleep, and can safely be done from inside hard (non-threaded) IRQ handlers and similar contexts. -Use the following calls to access GPIOs from an atomic context: +Use the following calls to access GPIOs from an atomic context:: int gpiod_get_value(const struct gpio_desc *desc); void gpiod_set_value(struct gpio_desc *desc, int value); @@ -231,11 +232,11 @@ head of a queue to transmit a command and get its response. This requires sleeping, which can't be done from inside IRQ handlers. Platforms that support this type of GPIO distinguish them from other GPIOs by -returning nonzero from this call: +returning nonzero from this call:: int gpiod_cansleep(const struct gpio_desc *desc) -To access such GPIOs, a different set of accessors is defined: +To access such GPIOs, a different set of accessors is defined:: int gpiod_get_value_cansleep(const struct gpio_desc *desc) void gpiod_set_value_cansleep(struct gpio_desc *desc, int value) @@ -271,23 +272,23 @@ As an example, if the active low property for a dedicated GPIO is set, and the gpiod_set_(array)_value_xxx() passes "asserted" ("1"), the physical line level will be driven low. -To summarize: - -Function (example) line property physical line -gpiod_set_raw_value(desc, 0); don't care low -gpiod_set_raw_value(desc, 1); don't care high -gpiod_set_value(desc, 0); default (active high) low -gpiod_set_value(desc, 1); default (active high) high -gpiod_set_value(desc, 0); active low high -gpiod_set_value(desc, 1); active low low -gpiod_set_value(desc, 0); default (active high) low -gpiod_set_value(desc, 1); default (active high) high -gpiod_set_value(desc, 0); open drain low -gpiod_set_value(desc, 1); open drain high impedance -gpiod_set_value(desc, 0); open source high impedance -gpiod_set_value(desc, 1); open source high - -It is possible to override these semantics using the *set_raw/'get_raw functions +To summarize:: + + Function (example) line property physical line + gpiod_set_raw_value(desc, 0); don't care low + gpiod_set_raw_value(desc, 1); don't care high + gpiod_set_value(desc, 0); default (active high) low + gpiod_set_value(desc, 1); default (active high) high + gpiod_set_value(desc, 0); active low high + gpiod_set_value(desc, 1); active low low + gpiod_set_value(desc, 0); default (active high) low + gpiod_set_value(desc, 1); default (active high) high + gpiod_set_value(desc, 0); open drain low + gpiod_set_value(desc, 1); open drain high impedance + gpiod_set_value(desc, 0); open source high impedance + gpiod_set_value(desc, 1); open source high + +It is possible to override these semantics using the set_raw/get_raw functions but it should be avoided as much as possible, especially by system-agnostic drivers which should not need to care about the actual physical line level and worry about the logical value instead. @@ -300,7 +301,7 @@ their device will actually receive, no matter what lies between it and the GPIO line. The following set of calls ignore the active-low or open drain property of a GPIO and -work on the raw line value: +work on the raw line value:: int gpiod_get_raw_value(const struct gpio_desc *desc) void gpiod_set_raw_value(struct gpio_desc *desc, int value) @@ -308,7 +309,7 @@ work on the raw line value: void gpiod_set_raw_value_cansleep(struct gpio_desc *desc, int value) int gpiod_direction_output_raw(struct gpio_desc *desc, int value) -The active low state of a GPIO can also be queried using the following call: +The active low state of a GPIO can also be queried using the following call:: int gpiod_is_active_low(const struct gpio_desc *desc) @@ -318,7 +319,7 @@ should not have to care about the physical line level or open drain semantics. Access multiple GPIOs with a single function call ------------------------------------------------- -The following functions get or set the values of an array of GPIOs: +The following functions get or set the values of an array of GPIOs:: int gpiod_get_array_value(unsigned int array_size, struct gpio_desc **desc_array, @@ -361,7 +362,7 @@ The functions take three arguments: The descriptor array can be obtained using the gpiod_get_array() function or one of its variants. If the group of descriptors returned by that function matches the desired group of GPIOs, those GPIOs can be accessed by simply using -the struct gpio_descs returned by gpiod_get_array(): +the struct gpio_descs returned by gpiod_get_array():: struct gpio_descs *my_gpio_descs = gpiod_get_array(...); gpiod_set_array_value(my_gpio_descs->ndescs, my_gpio_descs->desc, @@ -384,7 +385,7 @@ values are stored in value_array rather than passed back as return value. GPIOs mapped to IRQs -------------------- GPIO lines can quite often be used as IRQs. You can get the IRQ number -corresponding to a given GPIO using the following call: +corresponding to a given GPIO using the following call:: int gpiod_to_irq(const struct gpio_desc *desc) @@ -424,7 +425,7 @@ Interacting With the Legacy GPIO Subsystem Many kernel subsystems still handle GPIOs using the legacy integer-based interface. Although it is strongly encouraged to upgrade them to the safer descriptor-based API, the following two functions allow you to convert a GPIO -descriptor into the GPIO integer namespace and vice-versa: +descriptor into the GPIO integer namespace and vice-versa:: int desc_to_gpio(const struct gpio_desc *desc) struct gpio_desc *gpio_to_desc(unsigned gpio) diff --git a/Documentation/driver-api/gpio/index.rst b/Documentation/driver-api/gpio/index.rst index fd22c0d1419e..6ba9e0043310 100644 --- a/Documentation/driver-api/gpio/index.rst +++ b/Documentation/driver-api/gpio/index.rst @@ -9,6 +9,7 @@ Contents: intro driver + consumer legacy Core diff --git a/Documentation/gpio/00-INDEX b/Documentation/gpio/00-INDEX index 64cf61245861..f960fc00a3ef 100644 --- a/Documentation/gpio/00-INDEX +++ b/Documentation/gpio/00-INDEX @@ -1,7 +1,5 @@ 00-INDEX - This file -consumer.txt - - How to obtain and use GPIOs in a driver drivers-on-gpio.txt: - Drivers in other subsystems that can use GPIO to provide more complex functionality. From patchwork Thu Mar 8 23:40:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 883415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zy6Wv12qcz9s0v for ; Fri, 9 Mar 2018 10:43:07 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751254AbeCHXmg (ORCPT ); Thu, 8 Mar 2018 18:42:36 -0500 Received: from mout.gmx.net ([212.227.17.22]:53369 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750857AbeCHXlV (ORCPT ); Thu, 8 Mar 2018 18:41:21 -0500 Received: from latitude ([88.153.6.235]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MhNk6-1fGZqw2spm-00McSh; Fri, 09 Mar 2018 00:41:16 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, =?utf-8?q?Jon?= =?utf-8?q?athan_Neusch=C3=A4fer?= , Linus Walleij , Jonathan Corbet Subject: [PATCH 7/8] Documentation: gpio: Move GPIO mapping documentation to driver-api Date: Fri, 9 Mar 2018 00:40:23 +0100 Message-Id: <20180308234024.24145-8-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180308234024.24145-1-j.neuschaefer@gmx.net> References: <20180308234024.24145-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:g5HOoQDx/EQAMWkFPzbgtabiRRktZTjSYpb/+ZQioZZRx/BL5op kOY8T1EFytYduUmtptpWEg7WgY8uoBZHT1NZlWhM6Vin+pi0hrZcvapAjRecWwxhVSu8wOO 4V2NERKCaf5JD+PudNZNQzMENathP0caAqjOuEU4AKggW1+6v8exFbuw+a/mM5fUKWIrQS+ pqQUL1XQ3n7b9xNTBGTxQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:DoEwwa8ZGxI=:XQ7KYgg7iaG68ZiGJkuDKh edskO2bxlwE2YUBXV9S8nq9C0y/IAGFH5PWXfQ9epC/XYzjGtY5xiA06VFJa9rK/1EMnFnDIA Xjnlnu0Zqw/2Q7d4SIE3G4EZUpkLAZ/pShwHr6Moxd7kY+EyGrft/HnmJuQPntdQjUEsmWmr4 +n+4b49nROxycNBRiyV882VooQ0uJ3WXCYFg5aPgjFklRVAyFNk6XM5ctDrvxu4FGxriDHSlP eFmtpOXER3J47hwN/E+9J+QIU5ajgVJ680gAeFKsx/DLJGhRBXL2Dfg37tK1EWgyhGuERk+OR E3Yg54dizNPThgfoihqQC3mbjmlGUkQmfdb5wIuVd9G8eOzLBLEVCKo7awaFiV17dMFJWYgAd q6Ue6wGx9HEbXmWdrRLECjBW6m/p0hRlAF3RtondVuiVZ4r5BsB9XPSJqV7xUqtpUDuAophh/ Ly6UGEIOOjXwyiXeAM2L6CWnEw/0vkz7YpNvhjWuU7VdG1xiqZRfF9h6avq4Ttjup0ITXChMG z5s5YR4yzDQmjqmNj3+LypwRFT51fMna2tMl6VNcqzaHFj+2DkntFtTS7pwXSn3efIhEkcBSY LyxnJkt2t4hwvO1iIPPTFbySK/L2B+XKWxD1euFpwIKwdktz4Id7nfcAT4cKUZNKZihU+Lmsc 4S/7ijajTEFfEfTlpiflbi5QxkM6NuDFmvmpNVhwhAeuDmudQPnDIeupKu3RfZUGLZPuNaIxQ jcknongrTPp0KssUuupRQfrIrJjr1qUAz8/fuSde4BWh1qZlSVIXN1Ld4WM62uUVZkHCrnqzD ooI7kIC08KHRwUe7mCmHYk4cngcMVb2KQMf92TQyocvEHcnwQ0= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Move gpio/board.txt to driver-api/gpio/board.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer --- .../{gpio/board.txt => driver-api/gpio/board.rst} | 39 ++++++++++++---------- Documentation/driver-api/gpio/index.rst | 1 + Documentation/gpio/00-INDEX | 2 -- 3 files changed, 22 insertions(+), 20 deletions(-) rename Documentation/{gpio/board.txt => driver-api/gpio/board.rst} (88%) diff --git a/Documentation/gpio/board.txt b/Documentation/driver-api/gpio/board.rst similarity index 88% rename from Documentation/gpio/board.txt rename to Documentation/driver-api/gpio/board.rst index 659bb19f5b3c..25d62b2e9fd0 100644 --- a/Documentation/gpio/board.txt +++ b/Documentation/driver-api/gpio/board.rst @@ -1,3 +1,4 @@ +============= GPIO Mappings ============= @@ -23,7 +24,7 @@ device tree bindings for your controller. GPIOs mappings are defined in the consumer device's node, in a property named -gpios, where is the function the driver will request -through gpiod_get(). For example: +through gpiod_get(). For example:: foo_device { compatible = "acme,foo"; @@ -40,7 +41,7 @@ it but are only supported for compatibility reasons and should not be used for newer bindings since it has been deprecated. This property will make GPIOs 15, 16 and 17 available to the driver under the -"led" function, and GPIO 1 as the "power" GPIO: +"led" function, and GPIO 1 as the "power" GPIO:: struct gpio_desc *red, *green, *blue, *power; @@ -60,13 +61,13 @@ looked up by the gpiod functions internally) used in the device tree. With above Internally, the GPIO subsystem prefixes the GPIO suffix ("gpios" or "gpio") with the string passed in con_id to get the resulting string -(snprintf(... "%s-%s", con_id, gpio_suffixes[]). +(``snprintf(... "%s-%s", con_id, gpio_suffixes[]``). ACPI ---- ACPI also supports function names for GPIOs in a similar fashion to DT. The above DT example can be converted to an equivalent ACPI description -with the help of _DSD (Device Specific Data), introduced in ACPI 5.1: +with the help of _DSD (Device Specific Data), introduced in ACPI 5.1:: Device (FOO) { Name (_CRS, ResourceTemplate () { @@ -105,12 +106,12 @@ Documentation/acpi/gpio-properties.txt. Platform Data ------------- Finally, GPIOs can be bound to devices and functions using platform data. Board -files that desire to do so need to include the following header: +files that desire to do so need to include the following header:: #include GPIOs are mapped by the means of tables of lookups, containing instances of the -gpiod_lookup structure. Two macros are defined to help declaring such mappings: +gpiod_lookup structure. Two macros are defined to help declaring such mappings:: GPIO_LOOKUP(chip_label, chip_hwnum, con_id, flags) GPIO_LOOKUP_IDX(chip_label, chip_hwnum, con_id, idx, flags) @@ -141,22 +142,24 @@ end. The 'dev_id' field of the table is the identifier of the device that will make use of these GPIOs. It can be NULL, in which case it will be matched for calls to gpiod_get() with a NULL device. -struct gpiod_lookup_table gpios_table = { - .dev_id = "foo.0", - .table = { - GPIO_LOOKUP_IDX("gpio.0", 15, "led", 0, GPIO_ACTIVE_HIGH), - GPIO_LOOKUP_IDX("gpio.0", 16, "led", 1, GPIO_ACTIVE_HIGH), - GPIO_LOOKUP_IDX("gpio.0", 17, "led", 2, GPIO_ACTIVE_HIGH), - GPIO_LOOKUP("gpio.0", 1, "power", GPIO_ACTIVE_LOW), - { }, - }, -}; +.. code-block:: c + + struct gpiod_lookup_table gpios_table = { + .dev_id = "foo.0", + .table = { + GPIO_LOOKUP_IDX("gpio.0", 15, "led", 0, GPIO_ACTIVE_HIGH), + GPIO_LOOKUP_IDX("gpio.0", 16, "led", 1, GPIO_ACTIVE_HIGH), + GPIO_LOOKUP_IDX("gpio.0", 17, "led", 2, GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("gpio.0", 1, "power", GPIO_ACTIVE_LOW), + { }, + }, + }; -And the table can be added by the board code as follows: +And the table can be added by the board code as follows:: gpiod_add_lookup_table(&gpios_table); -The driver controlling "foo.0" will then be able to obtain its GPIOs as follows: +The driver controlling "foo.0" will then be able to obtain its GPIOs as follows:: struct gpio_desc *red, *green, *blue, *power; diff --git a/Documentation/driver-api/gpio/index.rst b/Documentation/driver-api/gpio/index.rst index 6ba9e0043310..2b73ea5a1fbb 100644 --- a/Documentation/driver-api/gpio/index.rst +++ b/Documentation/driver-api/gpio/index.rst @@ -10,6 +10,7 @@ Contents: intro driver consumer + board legacy Core diff --git a/Documentation/gpio/00-INDEX b/Documentation/gpio/00-INDEX index f960fc00a3ef..650cb0696211 100644 --- a/Documentation/gpio/00-INDEX +++ b/Documentation/gpio/00-INDEX @@ -3,7 +3,5 @@ drivers-on-gpio.txt: - Drivers in other subsystems that can use GPIO to provide more complex functionality. -board.txt - - How to assign GPIOs to a consumer device and a function sysfs.txt - Information about the GPIO sysfs interface From patchwork Thu Mar 8 23:40:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 883412 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zy6W90dsgz9s0v for ; Fri, 9 Mar 2018 10:42:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750836AbeCHXl2 (ORCPT ); Thu, 8 Mar 2018 18:41:28 -0500 Received: from mout.gmx.net ([212.227.17.20]:59807 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751377AbeCHXlW (ORCPT ); Thu, 8 Mar 2018 18:41:22 -0500 Received: from latitude ([88.153.6.235]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LjLwB-1eOJhy3lWh-00dUZ0; Fri, 09 Mar 2018 00:41:18 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, =?utf-8?q?Jon?= =?utf-8?q?athan_Neusch=C3=A4fer?= , Linus Walleij , Jonathan Corbet Subject: [PATCH 8/8] Documentation: gpio: Move drivers-on-gpio.txt to driver-api Date: Fri, 9 Mar 2018 00:40:24 +0100 Message-Id: <20180308234024.24145-9-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180308234024.24145-1-j.neuschaefer@gmx.net> References: <20180308234024.24145-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:HjlXwKDUO2msKbcxssVu5DRynfVIMPY0D3hOxL40vQQNVGsdvPJ Dd8yCoT6e/cxTl9W9uV2q3tPDu5GStS4IK6cgnKYFaXEUq6xsBbsZlN8dJ7/sjsTmVYswuq A8X4V99LWXhr5WliC44p4GAJJpH68LSpU1dr6rHCA8aIznYtVQjARb/6rmRfUABknpUXCIb 3jJu5Kl2kw8U4Y/aD0EvQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:5Rzzt/zS8bw=:QQ1kfg2+X8EnvHRHZOGF3U eGxyHZmGZ7T8PscQcelPqFrji/v2XAjU/wujM4ST9z+MPfjMA4uvyLpvoc1jlJfAmyOa7JM4H 1TjzB71PQkGjqSSeW/gfqJD4Rl8qNNckZlCTjhQvSOMenzzYnp25PX8xqh4mPfD/sgNVjrCPL SiCVx58wZBwYgWMGjVHfLCU7Ol8SMtEouu0dsCwxXRnbWvHhi6IpZroiFE/bSP+3omRaveGM3 p7qGKmvH5KtVAGYGZ5847woR8c2tYY5Bl2a5KTMPgLWDn9p+0+izwHEGJ+uCnh2QzLD4Hcn+M J097YqtZwYolIS9uYrGJjHP2NhM1ou4N0pvf5cvsRF2ZvD9HeIfj3V4OKmTmFoKFelEbRI1wM jWRFI7tXcV4QkyoEZd+mngdDR1rmECdTsgv+fSfAVYRoOJGzspQuV0UWNx+M6WtzS28yPTvl+ hlMEe9gdPUFDlkfunxJNU92ZuW3i8TvPnXy/FsuWvjd67/Kc0ylQvXoVLPAtkNr1o5JwUmQpy YN1hLGqtEDptSzMwOzvgt+IqpEbvJuT/IiSPFMcNOBEwGxl1V79HOoeWMlq0Hw4a8iUb1x4O/ FMI+4C0vxh4UbceXqoLO6xMGhEAuCvWjm8iUChLLvtk4/HybOTk5g5ujgyM6387mT8J5tBHBP Xph2u9sNfnk/cdhuzC+Z+ENBHG+9mXDGeashlAmPE8/0cQqp6DCdQfwrgAS4Lsht+iq1jE72J C8Z39aI80xMiQ8mM2eeLb1CsyinkgS1YSSCLNu3t7fssekXqqExBKAbnmm4ciHcNt1norD1C3 TBN+9swXcMAoAR6WlfOoO5mz+KgCRIRnsJ1djHQs2VFdK3pLIA= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Move gpio/drivers-on-gpio.txt to driver-api/gpio/drivers-on-gpio.rst and make sure it builds cleanly as ReST. Signed-off-by: Jonathan Neuschäfer --- This patch applies cleanly on top of 93db446a424c ("mtd: nand: move raw NAND related code to the raw/ subdir") --- .../drivers-on-gpio.txt => driver-api/gpio/drivers-on-gpio.rst} | 1 + Documentation/driver-api/gpio/index.rst | 1 + Documentation/gpio/00-INDEX | 3 --- Documentation/gpio/sysfs.txt | 5 ++--- 4 files changed, 4 insertions(+), 6 deletions(-) rename Documentation/{gpio/drivers-on-gpio.txt => driver-api/gpio/drivers-on-gpio.rst} (99%) diff --git a/Documentation/gpio/drivers-on-gpio.txt b/Documentation/driver-api/gpio/drivers-on-gpio.rst similarity index 99% rename from Documentation/gpio/drivers-on-gpio.txt rename to Documentation/driver-api/gpio/drivers-on-gpio.rst index a3e612f55bc7..7da0c1dd1f7a 100644 --- a/Documentation/gpio/drivers-on-gpio.txt +++ b/Documentation/driver-api/gpio/drivers-on-gpio.rst @@ -1,3 +1,4 @@ +============================ Subsystem drivers using GPIO ============================ diff --git a/Documentation/driver-api/gpio/index.rst b/Documentation/driver-api/gpio/index.rst index 2b73ea5a1fbb..6a374ded1287 100644 --- a/Documentation/driver-api/gpio/index.rst +++ b/Documentation/driver-api/gpio/index.rst @@ -11,6 +11,7 @@ Contents: driver consumer board + drivers-on-gpio legacy Core diff --git a/Documentation/gpio/00-INDEX b/Documentation/gpio/00-INDEX index 650cb0696211..17e19a68058f 100644 --- a/Documentation/gpio/00-INDEX +++ b/Documentation/gpio/00-INDEX @@ -1,7 +1,4 @@ 00-INDEX - This file -drivers-on-gpio.txt: - - Drivers in other subsystems that can use GPIO to provide more - complex functionality. sysfs.txt - Information about the GPIO sysfs interface diff --git a/Documentation/gpio/sysfs.txt b/Documentation/gpio/sysfs.txt index 6cdeab8650cd..58eeab81f349 100644 --- a/Documentation/gpio/sysfs.txt +++ b/Documentation/gpio/sysfs.txt @@ -32,9 +32,8 @@ standard kernels won't know about. And for some tasks, simple userspace GPIO drivers could be all that the system really needs. DO NOT ABUSE SYSFS TO CONTROL HARDWARE THAT HAS PROPER KERNEL DRIVERS. -PLEASE READ THE DOCUMENT NAMED "drivers-on-gpio.txt" IN THIS DOCUMENTATION -DIRECTORY TO AVOID REINVENTING KERNEL WHEELS IN USERSPACE. I MEAN IT. -REALLY. +PLEASE READ THE DOCUMENT AT Documentation/driver-api/gpio/drivers-on-gpio.rst +TO AVOID REINVENTING KERNEL WHEELS IN USERSPACE. I MEAN IT. REALLY. Paths in Sysfs --------------