Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2083914ybv; Fri, 21 Feb 2020 08:35:35 -0800 (PST) X-Google-Smtp-Source: APXvYqzf7EkHDh3LHtbdMsPfRXaosOl/Bxo9tDIV0PggrGiH1jTK2movNTaKXj6uswkaTuwiFjGP X-Received: by 2002:a9d:6f0a:: with SMTP id n10mr29930376otq.54.1582302935375; Fri, 21 Feb 2020 08:35:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582302935; cv=none; d=google.com; s=arc-20160816; b=WLxy1XrDzVzgL3DFVQb7MX6WADL8qdnSKuxxXdgZeT/H4mPu8MINHj3PAGVBrb/VZs z/sb8upBPm3JxKGrcg5J//7usRxFp9PRCcGeslqY//UdXXx2lD9MdfIU8a8hTh6zHvG0 ZB3qJW/aNw42S7EwvwkDllwffYHbHwTQJHE2osKvluayrboEKd7WfgkN6MX0fuGzxgFy 7i+ZuIFtrmVdagjYy8BXU8DJKXTzBSe+5DW7JvSIV+VBZT4Q4yytqvN6HnRhtxt4a9yN HiB5xOSnKZLuG46QIseKTxrPJt/YRhDbjrM8xFsHRRQUXCcDr9cKAYIJb2JqNb3UnnQF gLaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=Q0P9tu6IOsuIOQ9cj+JFMIkV9AXW3CYPDjGH2uYPm8M=; b=DIhQQJ6oXjirb8e07SVmLk/MypqO3JUIP79A0h2Q71fUQ1KxCY/P+fHAMIuvakGO1B 1t1HouDEeR7hJ/s/LUwdk2/bQW/hQalvlHxNTrOchWBkWPwtSWmq3VOzQk7h5C2UW1jb nwCnUUmMa5XE5ggZE1XsVCflGFHJYymgh49oyotun5mO/eEXhWyw/NjWDQXF1DwG+hJd n7NYhP4zcIdYluhZMltzYBrK8SYGWo6gXPsVxTxJ/X54PYYgNHQyPLYfwv5VywcBvLhl aWdYqwXa3b5H2m+zErwLeo/a/3NGDSFhVTTehibxw0STqx7wkWlj4Y3kvcxyFajI0Eez /gjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z73si1093310oia.40.2020.02.21.08.35.21; Fri, 21 Feb 2020 08:35:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727152AbgBUQeO (ORCPT + 99 others); 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-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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