From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40F87C35646 for ; Fri, 21 Feb 2020 16:34:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B37820578 for ; Fri, 21 Feb 2020 16:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbgBUQeO (ORCPT ); Fri, 21 Feb 2020 11:34:14 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:46488 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725957AbgBUQeO (ORCPT ); Fri, 21 Feb 2020 11:34:14 -0500 Received: by mail-oi1-f194.google.com with SMTP id a22so2122755oid.13; Fri, 21 Feb 2020 08:34:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q0P9tu6IOsuIOQ9cj+JFMIkV9AXW3CYPDjGH2uYPm8M=; b=TQan+uI+buGQSXnVw9oHBVYIl68M0Y0nZhJSw3qYaBAcnViQ2WE+xmpF7EGWl0C5MG AFAYukVTvmPds0Yt1uZHImTdyhsE57op0/EoFBu7UANTInihLVOHjJ2LuuxNDyz+Jxt5 7h/VB8CivGoN5BgC06wfIYUC2h3LJvDv/OxXHq4rZlUlfTTmDYkv9NBQzpq7VUdloguW 8eoYJEWhtm6ny7lvbKekL9xfjF4BUUP+z6C8cw/H0tD/alyL93c0X4K1e5/SHII8ppNO iqn+eSP95Mm7EtABezqcGciJ5oFvwGqNYbrDzjkyPXDc7kyk+w1Xlz4yDWNfx67VQt1P BXJg== X-Gm-Message-State: APjAAAUrHi/8Nfwh6StJyLqXLHMdvEPp2NO2ws7uODFnGje9uJdNbnzN 3/JwM+hRTMVwoUN/M3rvgWXyaM5ZKqkYy8A6KLg= X-Google-Smtp-Source: APXvYqzPNoAH+zVsto1+IiOMGfW8xsdQo0YD/gttJz8Iqi71pUo1KidDfXV90s/3JMzKKHdE/I36dl+GbJbfTmLaY4E= X-Received: by 2002:aca:c4d2:: with SMTP id u201mr2773907oif.54.1582302853428; Fri, 21 Feb 2020 08:34:13 -0800 (PST) MIME-Version: 1.0 References: <20200218151812.7816-1-geert+renesas@glider.be> <20200218151812.7816-5-geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Fri, 21 Feb 2020 17:34:02 +0100 Message-ID: Subject: Re: [PATCH v5 4/5] docs: gpio: Add GPIO Aggregator documentation To: Randy Dunlap Cc: Geert Uytterhoeven , Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Harish Jenny K N , Eugeniu Rosca , Alexander Graf , Peter Maydell , Paolo Bonzini , Phil Reid , Marc Zyngier , Christoffer Dall , Magnus Damm , Rob Herring , Mark Rutland , "open list:GPIO SUBSYSTEM" , "open list:DOCUMENTATION" , Linux-Renesas , Linux Kernel Mailing List , QEMU Developers Content-Type: text/plain; charset="UTF-8" Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org Hi Randy, On Tue, Feb 18, 2020 at 7:30 PM Randy Dunlap wrote: > On 2/18/20 7:18 AM, Geert Uytterhoeven wrote: > > Document the GPIO Aggregator, and the two typical use-cases. > > > > Signed-off-by: Geert Uytterhoeven > > --- /dev/null > > +++ b/Documentation/admin-guide/gpio/gpio-aggregator.rst > > @@ -0,0 +1,102 @@ > > +.. SPDX-License-Identifier: GPL-2.0-only > > + > > +GPIO Aggregator > > +=============== > > + > > +The GPIO Aggregator allows to aggregate GPIOs, and expose them as a new > > "allows" really wants an object following the verb [although the kernel sources > and docs have many cases of it not having an object]. Something like > > allows {you, one, someone, users, a user} to aggregate Changing to: provides a mechanism to aggregate GPIOs > > +gpio_chip. This supports the following use cases. > > + > > + > > +Aggregating GPIOs using Sysfs > > +----------------------------- > > + > > +GPIO controllers are exported to userspace using /dev/gpiochip* character > > +devices. Access control to these devices is provided by standard UNIX file > > +system permissions, on an all-or-nothing basis: either a GPIO controller is > > +accessible for a user, or it is not. > > + > > +The GPIO Aggregator allows access control for individual GPIOs, by aggregating Changing to: provides access control for a set of one or more GPIOs > > +them into a new gpio_chip, which can be assigned to a group or user using > > +standard UNIX file ownership and permissions. Furthermore, this simplifies and > > +hardens exporting GPIOs to a virtual machine, as the VM can just grab the full > > +GPIO controller, and no longer needs to care about which GPIOs to grab and > > +which not, reducing the attack surface. > > +Generic GPIO Driver > > +------------------- > > + > > +The GPIO Aggregator can also be used as a generic driver for a simple > > +GPIO-operated device described in DT, without a dedicated in-kernel driver. > > +This is useful in industrial control, and is not unlike e.g. spidev, which > > +allows to communicate with an SPI device from userspace. > > allows {choose an object} to communicate Changing to: allows the user to communicate Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds