Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp276850rdb; Sun, 14 Jan 2024 17:11:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcbekwhia4nkJeV783SYYMve8SE8+Z3Evw5PHbsZbPFEgQ+qXN8e608fm/XgfHsG9nhyRS X-Received: by 2002:a54:4e96:0:b0:3bd:62ac:cd3d with SMTP id c22-20020a544e96000000b003bd62accd3dmr3794772oiy.47.1705281118465; Sun, 14 Jan 2024 17:11:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705281118; cv=none; d=google.com; s=arc-20160816; b=vwmkvDUgdV+bBQF0vMYhQdQ80AXRBvsCItvVn4LeE/OFsc9DB8QUICKsP/YbAVmtxw N36iuR9n8EsV5QTLvhK0cVcExL7HweNATyefkFKr0phuV/gGmPWYF8gmdmggwb0F/K8a Ky2b0dz4kAdJNxZffbvEb+YNPlVkKxwbeFZ2phBMhb2FlvepyLG4W1Vg3iEp7KwufQz0 0sfP6VfnEKaYBkcSImdaTij+ky4AXyqlHKOoZdsbzUB46lb5kuEyqVU1h2NRapVPJ3e1 zxtO1d6kSLkSFNNr8rUwRnjSlHLiQ2VtUwFvrfJ4tRN1ThIf4W/Si3huTlC5jriUUEt+ cbeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=amynolKdoHmiN1OjIo/zKV0igK43klkDcMBce7dcMRE=; fh=mCNskkAe340YJBEOrBgstUsXdEVZyvA51sKcDfvglHQ=; b=jvNXJxcl/mmphusfs9Z01P0qwViuM6bl+Ak1Tyggl/w70K32gWKOkjPODbHHw40AiP c7BpO8ifdBEALX34KxouaSDYK4ruBm9Bbx7uSRbpGbo473Itfhy2MkDfB1WXTWGabf4j Xsi+up/moE58u03q6prootMAZCsckFmVbYvhkTiF0LmZ0FiuSEaekFi7T9PROj+8D57Z CJHVRVVvuXjm/akcjiYY+65WBeb/MMwp5T4qqsgUpramSu5uv/YhWugcm86KF+9hRjeT VUn4anRkapjRLXEfI8ay4KHP6fyEGt+y2ZoULrdbMZ7zraSfJJi6VkqFU4ya67DNEeqD xm7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=ICUEfyU5; spf=pass (google.com: domain of linux-kernel+bounces-25576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25576-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d10-20020a65424a000000b005cdfd1b40dasi7811374pgq.816.2024.01.14.17.11.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 17:11:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=ICUEfyU5; spf=pass (google.com: domain of linux-kernel+bounces-25576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25576-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B8EAA2814DC for ; Mon, 15 Jan 2024 01:11:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1876A15BE; Mon, 15 Jan 2024 01:11:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ICUEfyU5" Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDEE8137B; Mon, 15 Jan 2024 01:11:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-559533e2503so205686a12.1; Sun, 14 Jan 2024 17:11:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705281104; x=1705885904; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Y1rZ/h3cbN1N5NXVmLdpqMA/KIcAJWlHyWzl1o7Zy9M=; b=ICUEfyU5ZyebGEpHJk6XSwwGV8RT38NUSDqt0sHTSvEmsLEqRPGc50HTGylvxMxxm8 23PE0ykJHp4HZKx9yyA81QgkMZ0J9G2WaBc4FdsVJZARt3tH+c4HuckKyiELawhpjzc4 kTZDXwYOExHXFeEwijUy91EBxmvgNcsZiFg01w9ll6eH2bNdgEwMc02c0jIJEZtGLN44 ly/NbwW462XMH6iuP8i63FmCtlvXLx5/97hbm6W5qjcsvgl5pnaPr+A+LRFsnjZG8Fum fyq8Y6b3EhEMwWj+oK/gaK2DZmnp9VmqifjfymB9TBZA/rvTB6Shd8r0MtaxaKxUXi74 T5ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705281104; x=1705885904; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y1rZ/h3cbN1N5NXVmLdpqMA/KIcAJWlHyWzl1o7Zy9M=; b=iBdx12SXOBnZVeu6Brj8yPH9liTSvbYK7sFZZm64de5111VV19kkpBXKJSvX1PPytr wxRlTL3PZMmsYgvV1ps2QVNctHLu13WrxBnsdnL3GvhMqB92bMxcfWzTUsu4CwecCr6J oUCxPueBiGH8V6k53ACJMwbq+mtjiqj+IRZm6lWHnUF8XmepM1W7XUh1gL3xIYa3Tn89 rEdt1A8b/3eeCHjkActHinkE4of6q0xMR2Xr41DBe2HhBO2SVvC2/8M4epdzmP9XTzHT CZpzCgYoJji4cr8cs8XYwm509SqDrxSrFUAhUP+apBr7DYtcdyMlupHpHYno8lJMWJJp CWCw== X-Gm-Message-State: AOJu0YyNUMGk2dFwdasyi56pXeET15WRE0810uiHs/7MlfEvyqMJ5SdH wZddDvm4ERlXarfXHbXuJqfe/k0WyShzuxsz/0DOAB5cpjRmfw== X-Received: by 2002:a17:907:c284:b0:a2c:b1f0:eb5b with SMTP id tk4-20020a170907c28400b00a2cb1f0eb5bmr2252890ejc.43.1705281103803; Sun, 14 Jan 2024 17:11:43 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240115004847.22369-1-warthog618@gmail.com> <20240115004847.22369-2-warthog618@gmail.com> In-Reply-To: <20240115004847.22369-2-warthog618@gmail.com> From: Andy Shevchenko Date: Mon, 15 Jan 2024 03:11:07 +0200 Message-ID: Subject: Re: [PATCH v2 1/9] Documentation: gpio: add chardev userspace API documentation To: Kent Gibson Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, andy@kernel.org, corbet@lwn.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 15, 2024 at 2:49=E2=80=AFAM Kent Gibson = wrote: > > Add documentation for the GPIO character device userspace API. > > Added to the userspace-api book, but also provide a link from the > admin-guide book, as historically the GPIO documentation has been > there. .. > +.. note:: > + Do NOT abuse userspace APIs to control hardware that has proper kerne= l > + drivers. There may already be a driver for your use case, and an exis= ting > + kernel driver is sure to provide a superior solution to bitbashing > + from userspace. > + > + Read Documentation/driver-api/gpio/drivers-on-gpio.rst to avoid reinv= enting > + kernel wheels in userspace. > + > + Similarly, for multi-function lines there may be other subsystems, su= ch as > + Documentation/spi/index.rst, Documentation/i2c/index.rst, > + Documentation/driver-api/pwm.rst, Documentation/w1/index.rst etc, tha= t > + provide suitable drivers and APIs for your hardware. Very good note and would be nice to convince users to follow it: https://stackoverflow.com/q/77683532/2511795 (OOH you might be proud it's Rust, OTOH as described above) --=20 With Best Regards, Andy Shevchenko