From patchwork Tue Feb 11 12:59:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 864219 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 1B92E215F42 for ; Tue, 11 Feb 2025 12:59:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278783; cv=none; b=dv+p5dVGHugaOicDP++Svdbo/oH2dVYEqJO5qkW0EPMsbgg1v12A5wQzq/hT/qVt21Pxz7BUIlbcxni922nvQCOB0/CiP1DiO98bj2j0ppOgoo6AumB7rr66BmM4cLd1k303WObGcczuG8SxwI43WFpkwAd08TsY6SHLe5qRh1Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278783; c=relaxed/simple; bh=Xhx8I1RT8tRAlh1w32C6GuYPL3m92Qx4xndok+mVN0g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NJIzaNjrFgGrkkCmQPENmLPiFSrIv/FvuWqjyfyAwOw2806DWPanDEVS0K1yO+8eGm1yrjQt64aR0OSC3Iyfhh6im4fuvik2DWM32+MWCgCHLKgK4/ZE66/blpu2ZInU1EVuEe8lg+28uMTFKy1MBQWtNtIyWkHpFrUsFWLcNYI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=S7WDezW1; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="S7WDezW1" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-43944c51e41so21916695e9.0 for ; Tue, 11 Feb 2025 04:59:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1739278780; x=1739883580; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zEqkRuUVrt/6To7a12oQ0QZUf+6LHMqjT8FfLiEpQWk=; b=S7WDezW1YA+uXqHNcQf92IKieOMZewC6pSffvCDFYUK8ol6tWhngVim8XNSznufPtU hGq3MQBuQsb5n4mxGRSFwGifT2MjeX8TyCz0r05uZezfYfwINpusKHPISt9vbIkd4Jk5 FBeY+7ERFMQQONXpFpZl4xMKxKj4Tf+mNRnyF39ArJXO8tstLHW7StxFZT0zBwA+v1pg XunYUq2Uie5c8RET5TKf2+HjhYLFVRGP792kjvBTQxXfSkdl/OvWBTAHXhGg/vdZTgmv AlgTnPhgzdF9XEITbcnDp7Rk3hQVEiyrdlGF81qTrBOuip/S03eEQeUmiN3muc4hwVVS Wy5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739278780; x=1739883580; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zEqkRuUVrt/6To7a12oQ0QZUf+6LHMqjT8FfLiEpQWk=; b=C5AOsFv5VLirpiWXKWKur7yop3gMYuJZEIYVL6YzM96HdXAtTt00oi6ycYNNRwX2qH P2L76DlRxoCDswzJkJOFXipnvJPEXRYmzLBc0nIdSdLLhybVxh7C3IU2VDjW2MC6NRhE qNN0IwM4ubXlfwTQ1W+a9yWuDKfD2zpf7xOsDXa9U06G881hke2uro6brQ9AaE74fYO4 ssbHKB+j2ZC/2BsUAuGx728qgKngUa3goVOn2ePqZY2lcJ4dk0EUuXC0+2JFZL8HNDQo /Ur7OBXHTxPg4BK490/0TlgzyGy9YhUGCp5bdzcadAsKppQWaD3mY8z65nf+RQl9hDCY +kCg== X-Forwarded-Encrypted: i=1; AJvYcCVePXNd1Ka0YVWiHDeoBYhaOuragHehaYupSikOfSq8mOOWaJkgtBG4DbN5DeYXtrY51u80Z4szuN6e@vger.kernel.org X-Gm-Message-State: AOJu0Yy03F0i0UqBDorf/K2Nfg0UPiVyR8+CsowwElQfxChNFx8n1yK1 uRAl2ZC33gOc3VLzx8Ln/RiN35WTsFMm6EbWX8z68X20idDsDexX28z5pwM5wzk= X-Gm-Gg: ASbGncs3CSKcFTR/OmTcN/bdpw397V0YvKe73DvW3ZYJZKDSCHtdUFPDcaHPdwRkkPk dwkZJBAZXZ70hXB0UgUg9t4neT3+s1GVcviJ5uTb2xAp0jDE80bxi9OMbE2lE82g8D+cs6VKjpA pbUGbTHFENCzs+NphYxxaxL7+RDnKswSssreQevTgKJq9db0XKY0i3bxJ1Wm1WT4YWAs4tHgmPL 5XQ0TZZvJ7qtbLi5zykC0t3BLvd4rzTObVICL/gCSJXw8XnrQX5teBbi3MhHIKx3ICjmhitYOff 811gm6M= X-Google-Smtp-Source: AGHT+IHGXUSO0pPbwZ/qj7EObNe+fMSJu9V1qsIRXNnju8O0Hst+KLwvEOdVB5QPGzskoLkATSyhSg== X-Received: by 2002:a05:600c:1e14:b0:439:4d86:98c2 with SMTP id 5b1f17b1804b1-4394d8699fbmr26311775e9.29.1739278780302; Tue, 11 Feb 2025 04:59:40 -0800 (PST) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:561:8978:1d41:636a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4390d94d40csm209844095e9.9.2025.02.11.04.59.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 04:59:39 -0800 (PST) From: Bartosz Golaszewski Date: Tue, 11 Feb 2025 13:59:24 +0100 Subject: [PATCH libgpiod v4 03/17] bindings: python: doc: update the docstring for gpiod.request_lines() Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250211-improve-docs-v4-3-dc56702c2ca8@linaro.org> References: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> In-Reply-To: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> To: Vincent Fazio , Kent Gibson , Linus Walleij , Erik Schilling , Phil Howard , Viresh Kumar Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1543; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=JJ3iUo1uXw5+ZWJPe5ttDwDK3Nl44JJtkWrt73AVAtM=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBnq0m1B4+X3U8f2SwttTO0FrzV5trRjoWpZvKLg DTqO1vbrk6JAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ6tJtQAKCRARpy6gFHHX cmVtD/4kta9h4bkbCcHDEIYZyYP32QzIoVkMWhKqRYD/t4KPr8uPLQoyTQeTr4BEMDZsA8A8WhJ AokyJ0DBC3ginCAkp8LIbzGXHK6KHCYM8VExDZigye6zS4EPeuP66ef0uWaqmzSEnaPA1pHTNmR 0+nbFlIvzzVT4stMgwfJBU3ZOCt1kC3te6gXzVrZ4kEfgu1QxqS/bF9cyVhPeI4g5pVdKnqZqYC wQvvfdnKGnr6+hbVjer0zWiW4dnjOyMCJQPpv5FH+3v2Co1iJIYeCcnLDgGUGIRiXk6Tc1hBgLv WzXU4FYZ5L/ghR+qZfgazy1cP4Fvw8DVmzZWEUkcNMZWawZI2YDxEy8XgtLF6NswChDU10jHU3z ZrnAfWq87MknmA9nbavC8ikodV5RSLZUEpdkXNAyNXeBLz6/bW6dE9j2z+2rN48JUgfzwg3LWKY dqoOEMhJiuP3X3KHKgYZDe36+anpVWpzm63c6e2alYYbtc7tgKlghjurJnAvpEHCu+1sC/pep8y r7oO1xAaGNvEy0HcRyL+UZAbmxX/Tj94o/+lpMYT7u4Bq2oOppbuscAo/dehx4nnLk7umBpjYAi S5LcU7vleNhFp3Y/VflSKCuLtEtFu4il5AExVZ2JGpbqHZE2TqeCEZ77KceNsT6VbanDZwOkTdU aycoty+7wCEcR1A== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski The global request_lines() function was updated to take explicitly typed arguments instead of just passing *args and **kwargs down to Chip.request_lines(). However, the doc remained unchanged. Update it now to reflect the actual function parameters. Reviewed-by: Vincent Fazio Signed-off-by: Bartosz Golaszewski --- bindings/python/gpiod/__init__.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bindings/python/gpiod/__init__.py b/bindings/python/gpiod/__init__.py index 817c755..854e41f 100644 --- a/bindings/python/gpiod/__init__.py +++ b/bindings/python/gpiod/__init__.py @@ -99,9 +99,18 @@ def request_lines( Args: path Path to the GPIO character device file. - *args - **kwargs - See Chip.request_lines() for configuration arguments. + config: + Dictionary mapping offsets or names (or tuples thereof) to + LineSettings. If None is passed as the value of the mapping, + default settings are used. + consumer: + Consumer string to use for this request. + event_buffer_size: + Size of the kernel edge event buffer to configure for this request. + output_values: + Dictionary mapping offsets or names to line.Value. This can be used + to set the desired output values globally while reusing LineSettings + for more lines. Returns: Returns a new LineRequest object. From patchwork Tue Feb 11 12:59:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 864218 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.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 21BD721C9F3 for ; Tue, 11 Feb 2025 12:59:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278784; cv=none; b=auDCVq84Ai6wT76UbdVO4EsyyGKVGYzunN/KtN0NyzpWtf650ZHLaYAQDJkfohpTonayn+0bto+GXl2v3eJDccJLjUeRXEMAvKycWl4PrNTOQIovxvB51MkBrgU00lF+hWNnlB2WO39g3b9s1AYT3y1vhTS3ecCSddyRqEf6ORs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278784; c=relaxed/simple; bh=WO/IMfzFod/8cBoacm7o51W0b+nlCHHqIWQnuGnGvBk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TYWk4w6gNXGCBegKjG9Z9Obsk1zHHPWckGP5AhvA9miUrPPRmKwNV9+UVEzl3CyvWh5ndsTskRwS805OpC9rs7z0VV7qoUQ7qtB1gtX5pmYQ90EXdSl6KniyHBhz5Yr8Le4mnQhKpG99KiAeNmrpGeLetyIWeT7fSbXPSLBlcKg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=pbA+nxeQ; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="pbA+nxeQ" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4395561ab71so4909655e9.2 for ; Tue, 11 Feb 2025 04:59:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1739278781; x=1739883581; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=y1BBaXwMfpgsyUobFfQ5GTap8VassTB06r2EoTlfJ+w=; b=pbA+nxeQeyz4sMGkr0JMF2mS2AWCxWwUSAicGbjkcM9VgR0Qa8JpE4DQ1LzDGPJWEo vYjBg7NgKxGemq2NrrJWGwPSH5E9adX1su0wg43ciiRpBYc+JmJKpjyQbzxBzjMLbiQA U6ll9oqGUMRbtjYnWj81/vhvYaYKNNj+iXRqMnqHf5gWZiGkZNv+buuRCOE1/0WK4+mS 6wDKlEA/S6KVk4iLvg4KZytt3Tl0zZGnS1c8N9UNwh+fhp1wpx3HhfsmqMjfhS4o2UYs TS3DJl2tzRicYYY8CGHf2ycvXtho8IfSFl5v8F2zKeE0MhRClDuyYloq5XLoYWAgs2ub aZ6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739278781; x=1739883581; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y1BBaXwMfpgsyUobFfQ5GTap8VassTB06r2EoTlfJ+w=; b=jTPB96pq9wK54WlVk6modKFrGv5V84XGokncn9EJ6Tj+SeVYVYYjCmUaeUCcbuXmmy X0T5IincGLMGUwT3BJHqHBDfwvFazVDdfB++2m7pVh025HP5US25VVUh5woLaV1UONw2 C14eFdNMtbomFIWoNcypFuX8a7H+6Wd1+haR5dmY9E1BJZ27/W828U4p2i1RgTHPQ/TZ KhgVeRTxp6QCvBSUqF/s+7PFMICb14/jubRjH774Ohv3EtYPg5Z3t3Y7JfWfd3Rwq8o3 2NNrAcImbZww58ZeaTz27D5jhD9JEcdvzIYGW12qhyQJO1fniIXMyD+TjrLHnkHNY9Ff 5esQ== X-Forwarded-Encrypted: i=1; AJvYcCUownHzxpu0nZWP2Syu2me9rzJOFH8bO4jDiLVOLYOH3fg8mAXzrN6vMw5eF7Pp2NVQSVcwdoxYML9X@vger.kernel.org X-Gm-Message-State: AOJu0YyKTM2dvZkTuaadtM3BN2fxXdS41dDuAG0HVa4gNgg7g2wwuGbn dN3pgsju1Q9ZGpf4gAArF+Ve6x9SPK8rGWEkIoeQBZKx8GX2PBogFAaLTovOPMo= X-Gm-Gg: ASbGncuSsAaEZ8M+WB/0rite8dfRBlM5dkuQimMJdLCBUhFUsKN6vK/7o1lTx+MZCXM tQRlONdnUu7iHsJaZkd0vvRlgymY2KmlndvFh030qqzmin24WhZQ/jujNfpY17eWPlHappoGyvC 2+GnTQTZbwWBlrxoJHI5xlDn5WEwzMyJYhc/656MPmPchA5fsnjkGIRt8vfgRNXTp5WFWCZGaLX epPr89UFyOckKQGGwnE1v+AFblShPge8BMB15Zp0BXf+aZG2AdJJdCfZhvWCMY8TvwEYrO5umqT duZCBSc= X-Google-Smtp-Source: AGHT+IH/QqzP9Fm57nRToI5S4Xs7Fzxt4LrLCGSWsyZt/UganCDt1UrDuC4IjVlIOzrgiiUABagnDg== X-Received: by 2002:a05:600c:1f09:b0:439:4d37:7f4d with SMTP id 5b1f17b1804b1-4394d3781f2mr26389495e9.27.1739278781231; Tue, 11 Feb 2025 04:59:41 -0800 (PST) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:561:8978:1d41:636a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4390d94d40csm209844095e9.9.2025.02.11.04.59.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 04:59:40 -0800 (PST) From: Bartosz Golaszewski Date: Tue, 11 Feb 2025 13:59:25 +0100 Subject: [PATCH libgpiod v4 04/17] bindings: python: doc: make code examples appear as such in sphinx Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250211-improve-docs-v4-4-dc56702c2ca8@linaro.org> References: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> In-Reply-To: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> To: Vincent Fazio , Kent Gibson , Linus Walleij , Erik Schilling , Phil Howard , Viresh Kumar Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=979; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=ql8amRJIay+V0eyvml8PPHVhO3kwrPs+SWiWNGqjGeI=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBnq0m1ZEyXxUBzdrty2YlMBQBRMHQ6Rw+eRN6gg 3EOtwDB2lqJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ6tJtQAKCRARpy6gFHHX ctfrD/9qt7oKWLp7IkQFBD+KrgWJpAT+fSPY0IZ65u48y3C48ynkZ5GYU2LvU+nV2U7y9blMyUI 7EyRboA/dumjZe1AsJ5x14PzQGe6vD6+fXcPjFGOtPRPdlunROqwr3CS803f048BksiwzGNh/9/ FaAH/+YlCSz7GSGTinQbQpvCjDPLMwJ3Cg98mnPJd0Ifym+Gwv9z04Ck8aMIjbSbkXx7bxO6jAm KUVClS+UaFdNknIdHW+rGv8gDjxaDtI1idrc8zfYaul2zl+Bdy3xuHk61lW1272AgYTyfc48SJD 2JzTyLsOfSvIboGmVcmBBJ6dHHW0E0s1OGdwpjBp2Vm3BpFxwhhAXvBoEleAQd9g+UYLjAI9DSf t4bIEy9fHBxyZk6HTqliFzXd89F777VMBk28wFp9xViq8tBqwp7TKWm5InIETFx410YjxbQNt9b UOcREH6zpLxEmA64cDMdp1muGEUnZYpxbTOn9OOKD/2VCf6PJRUH4dI/mLSugMVlGhKLoOqmPwh IyR2D9V6trqV5oecI5u0vhnP3z8reYvhctwR3c89xYQ9wNyqxPUpwnSHIl9kwqPvA+M/lfwL+Xx Ix3QUzNFSvWf4kabf4JeZ4YiosvzgUwREd7UP/VX+5IVr8t26Pk+JgHIH0vIjSHcj7uMRTNDb2N DkWzQfXDRu9Zm8g== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski In order for code examples inside docstrings to be interpreted as such by sphinx, we need to use a double colon ("Example::"). Signed-off-by: Bartosz Golaszewski --- bindings/python/gpiod/chip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/gpiod/chip.py b/bindings/python/gpiod/chip.py index ddd07b8..5641343 100644 --- a/bindings/python/gpiod/chip.py +++ b/bindings/python/gpiod/chip.py @@ -39,7 +39,7 @@ class Chip: Callers must close the chip by calling the close() method when it's no longer used. - Example: + Example:: chip = gpiod.Chip(\"/dev/gpiochip0\") do_something(chip) @@ -47,7 +47,7 @@ class Chip: The gpiod.Chip class also supports controlled execution ('with' statement). - Example: + Example:: with gpiod.Chip(path="/dev/gpiochip0") as chip: do_something(chip) From patchwork Tue Feb 11 12:59:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 864217 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 3819A21C160 for ; Tue, 11 Feb 2025 12:59:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278786; cv=none; b=Vk7c977/nxsmRE0PsERe4rra3b914jjW2iKnhlOVfoE5Hy+U/uGfRFMPY8KiiLLRhHneXLfWz5QJcMD1HQ6tnDcFgOdkXgc3CEF60iVt8DFESs5h5dsL7Q1W96OIuLyEVQIaldd/5liVPPJytyJ/xH1ANmXNfqEyyaDep2Ka8yI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278786; c=relaxed/simple; bh=vXMfyBfCwmcZlImNds2ZpYink8E1dU2CJwjZR7ffIw0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O/ZjDQnbQt5bgO1kG8Zho33JCtiteLMVnXeucoNgqBIXLScO3O/Ce3tqlNXbT2yU3XMZVinExUkg02OSDPGbYVSawUX3e2fNDotA//PoqgG7seRwrsE2yM+6ttvRa2AeMv9EeGBxTwJ+Zig0nw3nLyBRVznFvwJNflMAR8L7KNo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=QhHTKaa/; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="QhHTKaa/" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-439554db49dso4994115e9.1 for ; Tue, 11 Feb 2025 04:59:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1739278783; x=1739883583; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=J8qQEfIoZcd5BDP5Ke0I95QrBh0088wo5gqTeCrW8Rw=; b=QhHTKaa/KG7pyuxBEtBe82b1MoBJG2JjhQzPWORJ95JbnkBNJa3WK/4/kmrqz/obPw fdL64upSrzMVPHQnBhnVylv7kvKEp60F5wnYuPuLxL36K7XGX8Rr0awgzhCx0X8ZwTIg 554U9WohEfBwGwMe4HF8SXcWLFXCEnwlY+l/hxKEwUMn1IwTKGLb2Fdncycu/kwFG80R JnfxrydO4GfGqrzc/ni3wUZBWVJTIZAMWuktfsDmBEH5Kn1FVmkOuIu7zruasOj5GAI7 Qi/REdGBg55L3vu1lJuIEHvjfDDjLKd3JAj3EvEMg78nzgvce4I4yDhUWWNM/MrHgOb4 eHHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739278783; x=1739883583; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J8qQEfIoZcd5BDP5Ke0I95QrBh0088wo5gqTeCrW8Rw=; b=TpdwCESN1f9HQZBCq/eWaIFFx9QlX7+m6pp10eW+N1BC7tjRJvHTuPNbcXyJCy977p ZhdxxpZDN53nDtet4oSClj4f/Ok8Xwxn+eO6WImYofSe6rrU+i5gwmOa4l0tTLqaWM9o UA4J90IttWomABklQJnunQJuRPvmlyMsCWQ4LUc9RM143YxoTFhj+sXIw7O8+OGfXPDz tGTTwHf80HipQ8gkjTayvt1OIzv2iLE2ha1gVJUZ3SOSQN98ZUw3vZfYvJAygZFkqxxt uLGkgTXpt4tbtWjVMmtsWRC3IkemDQErx1jkA2toBHuY5ckVzYC7lR6XqtUMF0+0CoOX gSxA== X-Forwarded-Encrypted: i=1; AJvYcCUWZny+WBm0h7ceALfw9QJUa4ZnjacsGUwIpDEpmhsV6X0tyniapSOTyLdVCCR5JbBg7fw9AR9J2WMa@vger.kernel.org X-Gm-Message-State: AOJu0YyPkWMFMEx3aROwB8t0YJ6BEkvz01jJPf+tMjywJzJblMizW7iF Hdf+NVuKTBEhdYwekn9gCEFf0fzRmdK7l21LIjQ82AzaUxBxFNZKw0xaRtWotdA= X-Gm-Gg: ASbGncuBQObp8GohRUiash9jrgqNA/09F1T1DSE1BA6oOjFNj5kj3OD8FrJFv03qqLe IkndR8+SlBrhmPMLF38CDKcSdfHeEFslZX/zOJpV7UaRHBrTL1+xDmgS+7VZBOvDlBZ8kGs9HOA VYf0Hrq9b1t3EX6Vg7HbQT5W7V/pSqmfTY8amvQV3h6DfpkYeA5KXDAU3yrQC2d6s4DRHwsOKRp vOidkk4s2tGtqcywELWUZa5uXYyMwXIZ/T+CT2wL2RYx/ViEU5V4YMDL1kxnEBeed7SxQZa4Mqv Yvb5xuA= X-Google-Smtp-Source: AGHT+IHtsJiD9q1DTOGuUYTybUn61NdajyZA6ML2JQ1VzrVJ3A2Wd4BSNw/Pkbe/tbz/QZVrb+JAaQ== X-Received: by 2002:a5d:588d:0:b0:38d:da11:df19 with SMTP id ffacd0b85a97d-38dda11dff7mr8857122f8f.41.1739278783598; Tue, 11 Feb 2025 04:59:43 -0800 (PST) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:561:8978:1d41:636a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4390d94d40csm209844095e9.9.2025.02.11.04.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 04:59:43 -0800 (PST) From: Bartosz Golaszewski Date: Tue, 11 Feb 2025 13:59:27 +0100 Subject: [PATCH libgpiod v4 06/17] bindings: gpiod: reword the docstring for LineRequest.__init__() Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250211-improve-docs-v4-6-dc56702c2ca8@linaro.org> References: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> In-Reply-To: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> To: Vincent Fazio , Kent Gibson , Linus Walleij , Erik Schilling , Phil Howard , Viresh Kumar Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1065; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=Y3gP+fQVa5ArhZWS64HI2dWPlLIXS38f6AQEio17tIg=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBnq0m1gE4DUKmjXrphsOh7IPgvrel9r+3Gft32a bUL27phs+mJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ6tJtQAKCRARpy6gFHHX clI9D/wKkqVjcti+7zK7hCf5DJW2dfqcREwH0HgU9BqF8sMXMbagdSTsz4A30GAe0JD5YchA3eD VqQO0A/YaLZenMGh4t36rTMJch+K2bfQPoGT3dPATEUyHLJTxpyPjZHhd696/pxpZPuOqw68Sgz YN/RutLFIKh9wfcgux+NbIuj7xNFYUfvZh3RhPYybEV8YHnpw9ryP0yTOPMP/8b5P/TQOAYX9X+ wXPILXsIaS0PGdxGbfcoXmRhG4A05+FuRuz6GgMmfQ8DuKgXCf8J02BTIEzli53qNCR/cTuGh/7 usYOHF6oVX9VZG2mKHWHpFtWPJxzBNapySi8m2JF2uRIGvsVuRwVjd66T/fE0S+IqEiuaksJKII D5J50LJu816VBLyAWXHyqUr4/c6IigIz28NUsmoUxSQSlxQTTVgCnJKQT2wLUMLbr9S+xOjphLi E+Nl6DhACYWuny0SZupdCUVyzyV67abhw9lK25TFZ+Rf6x7B1RiLOe+5xkuweF+fZBochM1CNAM xVOHtf5KkBI3ANYTH4B+2SEfBiy+eggKdjUUJaRpB5RS2qeynjX+N+DgOM/s5ejTd5PRBiE7uXJ XpynJHB28pvHExGCEKlU+vGijhw4KSAjqfc03ClVAZEsi9YO6YXl8pogNnYkTq90/rMudV5s80V epByD5VGJocKTCw== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski Change the docstring for LineRequest.__init__() so that when it appears in sphinx docs as part of the class description, it won't sound as if the class was not to be used at all. Signed-off-by: Bartosz Golaszewski --- bindings/python/gpiod/line_request.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bindings/python/gpiod/line_request.py b/bindings/python/gpiod/line_request.py index ef53e16..0220ba3 100644 --- a/bindings/python/gpiod/line_request.py +++ b/bindings/python/gpiod/line_request.py @@ -29,10 +29,8 @@ class LineRequest: def __init__(self, req: _ext.Request): """ - DON'T USE - - LineRequest objects can only be instantiated by a Chip parent. This is - not part of stable API. + Note: LineRequest objects can only be instantiated by a Chip parent. + LineRequest.__init__() is not part of stable API. """ self._req: Union[_ext.Request, None] = req self._chip_name: str From patchwork Tue Feb 11 12:59:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 864216 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 B2E0D215799 for ; Tue, 11 Feb 2025 12:59:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278789; cv=none; b=lEpqaubLqjlObBTH764OgOclvYrTvExW2/MJuUZjgFZcPD3h6bv5iIKcOKHVG4YbiR9FLcTTiYT4axXj+k5qKDYQbqJ2w6fjbGu1bxIT3SqEBYg09AfagcPH5DL4YuzJSEaJ/WccCp/1uoQbiq8w9ibBO/eYkHLfwecH4RIA7GE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278789; c=relaxed/simple; bh=WB7fTYVpBhCtObrR7qdfc3t8+TkfB83AoOsP88xUS08=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bujbAW8PF/UDH3OP0r5gafyg+9Qm5N1NkYzt0oZWFzHnnM+RhOT3t0J6xcu3H7KqFqwRReVCEvnP05JrOaUmw1CCs6BCsBP48mi0kPyvCGq0V2RegcaTOyM2hyIuZ8ApHx+BqLeasetIyza/93OjcCXqmdpBl3gGcQ5yL+rL7CA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=MbB/k0Rh; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="MbB/k0Rh" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-439473da55aso12867675e9.2 for ; Tue, 11 Feb 2025 04:59:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1739278786; x=1739883586; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ANA/S/Ju/e3qEgT9tA2+KKtVfktLoZrMTODVCC9QX4I=; b=MbB/k0RhD/OFsoE17qG88CzyfEs+MD1yWDLR+GmGk1gk4BkYsy5dFkO3/bthpLTLWE vIsXJyXfDJvfcLhaZlNZDl32W3DbPH1nzcsXvqyiQBCihj9a2n6JEs+u6qPrOl74RzJA JEcpx0j06kKUABm5y5os37CXmh9EgbqFeXEpIwIyHSNKX5hYPM+mdMEpS6QS3n5bvAeO qQDFrK2F22EPMca7PXkLcsa9JJsvauueL19eIPvSruZXPbPXePflQlIJPnybDW0b+KcJ OZ/u1ocRYvDD65EGQdoK8L2Ao+W/osnkHA0KFA2S2oZEfsylDqm3ZtDlboiwVkS924vB lSBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739278786; x=1739883586; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ANA/S/Ju/e3qEgT9tA2+KKtVfktLoZrMTODVCC9QX4I=; b=Aa5Ein7qjy3x4HePWVUUsm0cvgcKkVG4hTcvYNIeN6PobDAloT5luQ7xJ79JfTP5fO 1xmJv8E7gR3EbJPb7XmNtqprP3ngRw5Y49R/jgNSl1zffaFQH6tW6nDe6dXVMOWTMIBT GFoFMjX1K+pGJLXyig1WGcQuofWgDPG9QFlYffosUnun0ZhjJL0pRMez+5QAVywyKyQb qm1ND1nmIdGvHNTwKGi3EW/5yjc8Fja9RsJHSSrEym8mPAMDzr3BbH+WECXTNqA5MFHr 6jzQjNSLHbuwxI1AoSXNnot12iY5nr5qRmn4kFwUU9TiSrkPlKMPb7m6SK302fPB5gD2 clmg== X-Forwarded-Encrypted: i=1; AJvYcCUxhupWPAGA4HL/ir8BpvV7dIZyggQX5gZDXxxfPHFvMx0+PPkk5Na3au9ZDjSkg/KbT9M1h4yxo3c1@vger.kernel.org X-Gm-Message-State: AOJu0YxIjyZxVLp6sfbAiKuZEOfSinOv6N0Uii1IZNaNZyhQVs+d1L76 NiLOyGaZg/SftO+he8jSyxT4d3GWoQMEjSd8PhWmz4K0y1MdxTOA6RKMUqVvXrs= X-Gm-Gg: ASbGncsLe6JHOCqJjmJLtFLiNRbmWOBHCz0M8olmqeHa1oMJMoQ+LZBoWET8O2oh7N+ PK+0EB1/TAZaWQxOKRdWsSUXrwdmtk7Gji6dGzUE8GhRBrgT519MZy0a3Tm4NjCkmxBzCzH5mtG a1qqrXr5cJbTsHHRrsoSTwZGBlhwcxh1SVpU0um4EOSVDgykgzW+0BznOidG0xnb6mS0DGTek0s PmPuaGNK8lGGM7eIsUh3Mzu1eRllUW0Au2bO8x27VK8TIULRXV7YzXhcUEJhBhAncfdIwfbgTqx /oEMlFw= X-Google-Smtp-Source: AGHT+IGTEw6f/jMT7Y9rSI+dIIhHfxJew2oPRC6AbWnpy6GzrDxXT8Q3mqnhaIbx4zWaQNwhO7OM1A== X-Received: by 2002:a05:600c:4f8e:b0:434:a734:d268 with SMTP id 5b1f17b1804b1-43924990be0mr157670735e9.14.1739278785905; Tue, 11 Feb 2025 04:59:45 -0800 (PST) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:561:8978:1d41:636a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4390d94d40csm209844095e9.9.2025.02.11.04.59.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 04:59:44 -0800 (PST) From: Bartosz Golaszewski Date: Tue, 11 Feb 2025 13:59:29 +0100 Subject: [PATCH libgpiod v4 08/17] dbus: daemon: add a more detailed description to help text Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250211-improve-docs-v4-8-dc56702c2ca8@linaro.org> References: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> In-Reply-To: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> To: Vincent Fazio , Kent Gibson , Linus Walleij , Erik Schilling , Phil Howard , Viresh Kumar Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1640; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=QQqP3yj9obCCv4oCtUXElC79L1Ly6v7DP5+O2kzPRQ0=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBnq0m2X86mQY7Zd8qlcZ7u/R11otymooEXKcaMH gx48EY2oDKJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ6tJtgAKCRARpy6gFHHX cnOGEADLFo4NrwaJWo9cLVw8IfrduzpEoVRTqOFcgAqS6q2jwsqQuoZmm+caeGLiQC3VM6FrhC/ 7HvymMpQRLKYICY/8pWEU4aoPTvOpRqZ155ghtpZQK1w7szSsi14QozRnwtF4ycs8q4bIw/zHIN pNE0S4d8E+MbDQl19ojMt+oBTJOInPWBicQouYIX2d5GFUT8QtsxsKCSWZjB7UbTa7H30Z4xbgi Dif9/rYr0BHMHEEDKw7b7S2ca4w30ZRh7PaeZHrdHuuNAQaWU41AtXJeCb9Z26AJaLpVJMclMwQ YjkYowbRKHk8nao1pxh9vYyfpVTxbA3mUsrQXktbLpFpq5bv9OWprE5G5EEvFJRhTz2FGmqCHya VFY0MrqcOoktKC0SzbLhjxN9cPpIi6dWFHsuYjOp3eUfBCjoSA8gv6eEOURiXtvib/Ow+cUcdhg RZM5zk5siq8DWzi7zrnyqg80ixA5Tib0nRrweBWaHjAYaNSLGQrG65wcIgzN2iqx4ZT9VPbgk95 qvKCi8bpUqGwa1GLoldWNEy/D2Wc62XGAcCB6Zb/YSaIOxxCmFHB1od97m708u5aY5xUdp7vtXT m1P8WNJjbTg7B2YpthSbeMAyGhRdIduA7HliJym8f9DvFZxehs+IKAaJltisnV8XNLqSBXh6+Hi 6sNuxnrxxxx7IXQ== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski In preparation for adding man pages for the daemon and the command-line client, add a detailed description of what gpio-manager is and does to the output presented to user when they pass --help as argument. Signed-off-by: Bartosz Golaszewski --- dbus/manager/gpio-manager.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dbus/manager/gpio-manager.c b/dbus/manager/gpio-manager.c index d34c7ea..03ca7ab 100644 --- a/dbus/manager/gpio-manager.c +++ b/dbus/manager/gpio-manager.c @@ -85,6 +85,14 @@ static void print_version_and_exit(void) static void parse_opts(int argc, char **argv) { + static const char *const description = +"The gpio-manager is the reference implementation of the GPIO D-Bus API\n" +"built on top of libgpiod. It serves as the central authority managing GPIO\n" +"chips and lines, exposing their functionalities to other applications\n" +"through the D-Bus interface. It supports operations such as requesting,\n" +"releasing, and setting line values, as well as monitoring events like rising\n" +"or falling edges and line property changes."; + gboolean ret, opt_debug = FALSE, opt_version = FALSE; g_autoptr(GOptionContext) ctx = NULL; g_auto(GStrv) remaining = NULL; @@ -118,6 +126,7 @@ static void parse_opts(int argc, char **argv) ctx = g_option_context_new(NULL); g_option_context_set_summary(ctx, "D-Bus daemon managing GPIOs."); + g_option_context_set_description(ctx, description); g_option_context_add_main_entries(ctx, opts, NULL); ret = g_option_context_parse(ctx, &argc, &argv, &err); From patchwork Tue Feb 11 12:59:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 864215 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 0A98C220697 for ; Tue, 11 Feb 2025 12:59:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278791; cv=none; b=rFbgeXKwqbSmMjFIO2E1bGlQZb2pge4okqtYnhGFXfb20ejEBlgGXmtRswCF7OdT1rTvu/d/g+Z3YW0aHfrtA7KY2xBtaN8IjRHEYMzBRcqTkpWjm7/ah1+prcfICjVFMloU6nFaNM9CIfPPEFREHgTON/SHoSBTdLCVSvqVXq0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278791; c=relaxed/simple; bh=NOWwpmJBYV5ghwlu+/wbIJh/GmNExKZiNFQCVv+Sxo0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fpnsypT4i7n5XXZh5c9WUhvnSWtKz5Qa+RBdrv9cuf7nZ0Pqvu7uJV/l9cduuGMI/iY0FOhQQjrucvKu562uqIk2tMnEV5yAUUX8N8D9UvbyBlTpBJiFTqJIpQdQxbkTqTVnL2lKPry+uZrWh3jTjp6cAhWN4uV+pGgqLMfxjOQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=C2cGhanZ; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="C2cGhanZ" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-43934d6b155so18055875e9.1 for ; Tue, 11 Feb 2025 04:59:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1739278788; x=1739883588; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=InkFhCCRI2CAF2CvZhuAFHXRNWz5kwo2d8XJvFQW824=; b=C2cGhanZ3qP3tYQ7+rgoaXEvaxCntFwcdahOp72jSb3pNZ7V/lRmkfdcGBDXdymPuc n9jg77AYA+QtstzMdPXxLpUEpU8nXIwKlAE6NXUvl8+PdPde+RWr65TFRGepYQVqLa1e 88OjK+JVb71D+VomxaYncRXaGXPzNyumZfI3jTDUyUnnnswdmS6g3Kl6LDVK5HP5ndrb P4gVT+RU1PQOe+j8FSIAcR9fjeohZgM5n8/OTeIilCVyVhNrsffTu5BwEWi9aCPaYQdy kPE9GRtXo6Pmyc7R6zq8pvU4ZvABYmH+dKVZaxEuvu1wlcnD6VfQvwnmfISfLJynS71B plmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739278788; x=1739883588; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=InkFhCCRI2CAF2CvZhuAFHXRNWz5kwo2d8XJvFQW824=; b=DXIEPxL0Sl2GVNGNQaYRbaFlcikBOCvZhDJZRXK7BEPM/0c7kR1T3z/9Gcv1aWg4wK aM2I51AGG9IK4zXACATCDunvD9QzjC7arpWss7F4g4+U0u8L8puZ8HT7SoNcxD8DdUav Bpc/YJwL8t7pXtf78fp7v5itsqfL+bDCmvNiG21W+xzZEC/rrkY5Ry59Zip+T8FmmxSA 4KgADkxxtkq5AMa71WsyzOx+s6OIqhY42nqUadMAQ6cppT760KE1IDk0glJdXB+/6O85 SP0mUagnJZkWtq0dlgXHMF8MOio/Edenx6HdH4PF3oPUFjd2wO4jFXtLuDvxEXOSEoes Ds3w== X-Forwarded-Encrypted: i=1; AJvYcCXFr+KxVdtO2WYCdgQ9khEhE39wITQF+3atvX4e0OuJxs0N/y0XT07CElYSrZh/nVq2RosHLT2tBCfQ@vger.kernel.org X-Gm-Message-State: AOJu0YypSPmPfjMj1ZONtHtbxidBpWURnBZIQeAjeBHbb//u7VXHHsm7 C+KX3iCjtsPhlfLumMlFh7YkN2W/I2EhayRfDZ7UeCKpAcXCxUmty4Gs0CDIa+I= X-Gm-Gg: ASbGncucLEqHx0PGd9P8Ufz5jSbQKo+r2BSUH/t3rOk0YDrm1MMxAAwX/Ei67Be752l hLWC+NXDRS4KXutaVm6CYn/5sryGanKQcRHWrUbtd7UznyFh90T4Chjnmnu+6HtOGIHFX0VNoaS hNWc9VeMESBAlgPW8RHYs09Qr39+IJ8KcyOAkhcmkgzqw1ye/FT3U2nEpVUAgPUNzpIA3rt+UK1 sErvIIWf9IEqLG4EMv8Emmvrcimx56yk72RgrT1Gzpzx9X5uz3BBAn5d/Q/d7OpVRylkEuKTRdR oAzrb9E= X-Google-Smtp-Source: AGHT+IGAfLPxb403g1DltYd1G/OhspieSmHLtCQMNLMJXwLnZmPs+Q8SM5s4PrtfHX6wbbCamh9rKA== X-Received: by 2002:a05:600c:4586:b0:434:ffb2:f9cf with SMTP id 5b1f17b1804b1-4394cee55camr27847735e9.14.1739278788191; Tue, 11 Feb 2025 04:59:48 -0800 (PST) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:561:8978:1d41:636a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4390d94d40csm209844095e9.9.2025.02.11.04.59.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 04:59:47 -0800 (PST) From: Bartosz Golaszewski Date: Tue, 11 Feb 2025 13:59:31 +0100 Subject: [PATCH libgpiod v4 10/17] dbus: improve comments in API xml Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250211-improve-docs-v4-10-dc56702c2ca8@linaro.org> References: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> In-Reply-To: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> To: Vincent Fazio , Kent Gibson , Linus Walleij , Erik Schilling , Phil Howard , Viresh Kumar Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=7033; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=cUeMTm4AJlpUcPLKsb+j9wyt+CiiE0p1BclrHiEIvA8=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBnq0m2YV8P9B19QjeNWNpv9ZDJAUnOYImBalfSp APn5UystWqJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ6tJtgAKCRARpy6gFHHX cuciD/0XIbABHtt97xk0v/AGmjCPGm/T44S32KN62FLIGTOwLjATojXG2US6BQxH+GrfG+xd+bh Tikh69RT4uQvPCeG0+jGFPsVhhf0n9Ck+6bLHKoeaVV/Vx6LUtLIpk+JedxCJEos7eHf8XSA3ee HL1C29ZvAxGFQl29+08VdJsAtKZVlyixtAEXkWvkovWiV6A2ZaoNOHuTWVxH5zVJ+hkHpsf+BmX 1VOBY2m7BswM1gUs9zJcQgV59Xd7G+zOWSVvtSX8dv9/WNYZpf+K0bUSEPJcnoHUA1Z3MUhK2KI mKASAcnYFfphu09E4NJnbdAXO4jG7wGm8u9PFIEEe/1x89EXLKXlrT3RgQIhjoML0wm6ucQMmDa RG8cyuJgnGpdCkFEGe/eYet/0qCBdIXiCgXrVo7BvEaE9IioOtp1WJ0PssWI3QWIuEMZBO8yPtR qC3JZuHLRsQc1rkTwrZ3SpCKUSyNQ/G5lnIWhuZy4EKZ0gAdpPwnZtMizupKsr8gwa4mH2o1FpI ibpn+LwR5mpZ4N4tBhDHvIZlwdGKr3g7zc2v7cWVsoblBJz9Puq9QhLVz2ohCGN1M7xdNNGEgSW kYdMAtyawlfCBWQJ3SfdFaloPVVxD/Q4fA9dh9NsJMSNc/pxYmSjbR+db9OJCh0xcpXH5NlrHSR 39QksCu8c/xbcUw== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski The current comments don't follow any particular formatting so the resulting .rst generated with gdbus-codegen is all mangled up. Use proper .rst formatting to make docs better. Signed-off-by: Bartosz Golaszewski --- dbus/lib/io.gpiod1.xml | 98 ++++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 46 deletions(-) diff --git a/dbus/lib/io.gpiod1.xml b/dbus/lib/io.gpiod1.xml index ace7d72..411ea6e 100644 --- a/dbus/lib/io.gpiod1.xml +++ b/dbus/lib/io.gpiod1.xml @@ -1,5 +1,5 @@ - + @@ -54,58 +54,60 @@ contains the list of default output values which are only used in output mode. - Available line config options: + **Available line config options:** - "direction" => String representing the line direction. Accepts the - following values: "input", "output". - "edge" => String representing the edge detection setting. Accepts the - following values: "falling", "rising", "both". - "active-low" => Boolean representing the active-low setting. - "drive" => String representing the drive settings. Accepts the - following values: "push-pull", "open-drain", "open-source". - "bias" => String representing the internal bias settings. Accepts the - following values: "disabled", "pull-up", "pull-down", "as-is". - "debounce-period" => Debounce period in microseconds represented as a - signed, 64-bit integer. - "event-clock" => String representing the clock used to timestamp edge - events. Accepts the following values: "monotonic", - "realtime", "hte". + - **"direction"**: String representing the line direction. + Accepts the following values: "input", "output". + - **"edge"**: String representing the edge detection setting. + Accepts the following values: "falling", "rising", "both". + - **"active-low"**: Boolean representing the active-low setting. + - **"drive"**: String representing the drive settings. + Accepts the following values: "push-pull", "open-drain", "open-source". + - **"bias"**: String representing the internal bias settings. + Accepts the following values: "disabled", "pull-up", "pull-down", "as-is". + - **"debounce-period"**: Debounce period in microseconds, represented as a + signed 64-bit integer. + - **"event-clock"**: String representing the clock used to timestamp edge + events. + Accepts the following values: "monotonic", "realtime", "hte". Output values are applied to the lines in the order they appear in the settings mappings. - Example variant that allows to request lines at offsets 1, 5 and 11 in - output, push-pull and active-low modes and specifies the output values - as active (as visualized with g_variant_print()): + **Example variant** that allows requesting lines at offsets 1, 5, and 11 + in output, push-pull, and active-low modes, and specifies the output + values as active (as visualized with `g_variant_print()`): - // Line config tuple - ( - // Array of line settings mappings - [ - // Single mapping tuple - ( - // Offsets to map - [1, 5, 11], - // Line settings dict - { - 'direction': <'output'>, - 'drive': <'push-pull'>, - 'active-low': - } - ) - ], - // Output values - [1, 1, 1] - ) + .. code-block:: none + + // Line config tuple + ( + // Array of line settings mappings + [ + // Single mapping tuple + ( + // Offsets to map + [1, 5, 11], + // Line settings dict + { + 'direction': <'output'>, + 'drive': <'push-pull'>, + 'active-low': + } + ) + ], + // Output values + [1, 1, 1] + ) Request configuration is a hashmap mapping names of the available config options to their values wrapped in a variant. - Available request config options: + **Available request config options:** - "consumer" => Consumer name as a string - "event-buffer-size" => Requested size of the in-kernel edge event - buffer as an unsigned 32-bit integer. + - **"consumer"**: Consumer name as a string. + - **"event-buffer-size"**: Requested size of the in-kernel edge event buffer, + as an unsigned 32-bit integer. The object path to the new request is returned on success. The user should wait for it to appear before trying to use the requested lines in @@ -239,8 +241,7 @@ @@ -287,11 +291,13 @@ From patchwork Tue Feb 11 12:59:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 864214 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 2430A215799 for ; Tue, 11 Feb 2025 12:59:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278795; cv=none; b=S2UGLTTHpUBpYuCwi6jIzJGxYMhkz5wuZt6iItO8xg/2I/auL/6z+n/fUYVJRJlcRaaSByu1LQSyYY2+AC224Q9/lg71PVrbauWytfbRgelNl0N9EcDSz6g5NMnT/xewYfMp7PpSE830Rpznl0Gh0pRDHcUgPpRLdyVGQhblQG8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278795; c=relaxed/simple; bh=xtY16JuTPGy0f0AsElIlHsFkNo85eg7KSmoHacYE07Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LDQUFiEk8GfidVANPEcgpJI3V6dXkyzFARLW8TX8IT789V108tewIQYNuNrg2sFrssFwpr94B1AWrWNgcph4yM65Sts2m1RYm98onYiYc6m3iqpKX2bkBrVklfNQNxUaO2hw6NVEi9AciFBrTEsyHsvuST6vbC2amYWnBhtwwEE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=n6YoOPWY; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="n6YoOPWY" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-43618283dedso55382625e9.3 for ; Tue, 11 Feb 2025 04:59:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1739278792; x=1739883592; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ZPH+Pxwqlyrx1DSr8zde+bZJyhr4eJxNgQrIhm0XUcw=; b=n6YoOPWYk4H21/OcZX9AHpSZj40FhscfqFDEb69S8zRvrDkOElpJHzVrIMYeGQxs8b U9S4z8snGMzJDe8+xEdBqADO23s1tbODQPmxS/NbpAvAl5y9HOurogHNV/mGeshl/ItX ppSBxhSzRBL0XfUVDAiJpAPD1gzk6w5yVA6a/BhVoEcPNoE3Il9iortLcJHyRYJhlmyf tNPwdglDo/3ZlrpZIErYvwYN/NmSdtNoeOwieYZp/5/w04EsPtTvGshtL9VTt0XMPWWV a+J5Kivc27IetM5/hKUpIlQtufGKgPc3dlHFZ8qyAwcHNCGQBypz4VHRWFrEs9/n/xrT NVVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739278792; x=1739883592; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZPH+Pxwqlyrx1DSr8zde+bZJyhr4eJxNgQrIhm0XUcw=; b=cQ2oADK9CWi19YIYCiNC4VeLq387aMXVOd2vyQfAelEClkW+ScWrSjV5sPCiXGzith MYBngWwZ+H9Dp71kvyC0pD+u8UGci/5fuKlqC+fGQ24dnrVB//28ZOyk47y9VDWBJtyJ RZKhDg+pDvTEh66mf3QJKCyAf+RQvgqri6bfdOy1B9pHeL3HNMo4bo474BroVmNPNTTD qTSElYnnVOIiAawW4CqVIX6pQgV19Y2rLEXYTtLybkY5J11Z6F8muH734iEexO6UwlsQ rdvPqVcIUrVP0hlERmxQ5o6R7p691IoFEQHyPTiXvpuvykMW8yybXXUTneNEr+ntoheO kp5w== X-Forwarded-Encrypted: i=1; AJvYcCVBvTZj8Df/8vZt12RzBsMzNUFtZVqBYIFKr8U6miP0EwltUVSZGkbKlDTUZI85K1Tp6rTbsyYyz7Yy@vger.kernel.org X-Gm-Message-State: AOJu0YwihtTxQ+guuwfv5uW0BR/w7OcijiK1YJ4bVJ/Kp+8K1+cA3Ztg 6HArQTiN3x4VOlwKKW4Nxkql/AfLOWN9b5AbBGAZs8WaVz7tcUv7Rhb2eX/R7qHUJkPPeGNaPkW FswE= X-Gm-Gg: ASbGnctBJurZRiYh+5uHARYv2UdTOMSJ8NtjmfvLFdz0HdChLJluS3fa4z6OrWfSiZ9 9AxXD8CcskKQ0U5V1gAw+aqxNnjlQea5j8/2+oootx8LzAGngYdRi3k7C72p8Ymnd2GVaOBA22C ActhgrNVy5d3Num8IMqvYuXf3XrBXlMXbQxA/eoycipID/DFe7IM1qaz1+OnFXsajmFd52uJeJX Or4WYAVufLfBGMDa0jZpXmATZRhdqCXL4itglmR1d/NG3/9Yw9qbHIDXzg6zRn+KzFsLE+gOToU T1blDPs= X-Google-Smtp-Source: AGHT+IGVukhVj+2UDHcUjYTJ8XrXssPEQf3cnzaLKeDWU+q7Zt74VcW7bQ6FzmFsVsUHe+eLjVV80A== X-Received: by 2002:a05:600c:44c9:b0:439:34d3:63da with SMTP id 5b1f17b1804b1-43934d36692mr107533195e9.10.1739278792384; Tue, 11 Feb 2025 04:59:52 -0800 (PST) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:561:8978:1d41:636a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4390d94d40csm209844095e9.9.2025.02.11.04.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 04:59:52 -0800 (PST) From: Bartosz Golaszewski Date: Tue, 11 Feb 2025 13:59:35 +0100 Subject: [PATCH libgpiod v4 14/17] doc: add documentation for GLib bindings Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250211-improve-docs-v4-14-dc56702c2ca8@linaro.org> References: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> In-Reply-To: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> To: Vincent Fazio , Kent Gibson , Linus Walleij , Erik Schilling , Phil Howard , Viresh Kumar Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=4189; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=en4nI9CttlbGrQfJ+gSjxV0dUmu73WEAI1tpbSKo/VQ=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBnq0m3ZqWwQkl/QUHNexSH96NxoU9+DquCFB/u9 0mK9icIC1KJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ6tJtwAKCRARpy6gFHHX cvQ3EAC1aKFcA6wjSWUwLVR2YIN9rY4aZli7vj8tOSCeapM7Fgvv/KV4BzaViD5WBsz6vou133y o9GlRXizMXMhBQQcZrTIgcwFhak2ezc/tmGUzOOx0xduO0l0ExveKzjq8+x64g7lpQl0eTZdpOl e7300mrxt6KGV3G5A03sstlfLQaMK8kjLriClU67BqYXNupP6cdyExHNsUzpHRWDtzaALxHEBgq 1UxpFZnCHnB9TXCZ/fCdixedEWlHR1EXtrwk08tPhDuIbNRB7JocplJyy60wBCXAD/2cIoGWPbn WT+zId5mSEY2c60RijYEMFwuWTJ+1zGMUZ/LZ1mC2djMjlY90uxVI7g1gkG/84OVK6UeZM+0uES ND0RcQGCuQ0Ixkvgk/jQCrFCWzVUwcApkqsuxI9khoCEii/D2UFNWSGdpfqlPCrUM9Lh2cwEY0A OHS/8bDbFrbaWr9Y/GCbQRKWjHytzyAgT1KSA8EjI/sQzI7DyTqU6ZYR5jpwUzaxdqF68/oCXeh g/n1aWlPMbOBXOlqbNyQBhE6RvCirwQ0GoRFSdvIf4DrnLf9FDxb4Owp1fJywvdlaRHn0YIU0cJ ARa62sbfdh1iArJFRwAFNYDadSnq/dokr7PdEsylKAlg8bQZcqZFOhDm91T4ezBps2wBWor/+DJ OZxBjMhTZcS5B2g== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski The GObject docs are generated with gi-docgen and there doesn't seem to be an easy way of converting them to sphinx. Let's put the GLib docs statically into the sphinx output and reference them from the bindings chapter. Signed-off-by: Bartosz Golaszewski --- .readthedocs.yaml | 9 ++++++++- docs/Makefile.am | 1 + docs/bindings.rst | 1 + docs/conf.py | 41 +++++++++++++++++++++++++++++++++++++++++ docs/glib_api.rst | 23 +++++++++++++++++++++++ 5 files changed, 74 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 510b5c1..97086fa 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -11,13 +11,20 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: python: "3.12" apt_packages: + - autoconf + - autoconf-archive # doxygen is available by default, but just in case. - doxygen + - gi-docgen + - gir1.2-glib-2.0-dev + - gobject-introspection - graphviz + - libtool + - pkg-config sphinx: configuration: docs/conf.py diff --git a/docs/Makefile.am b/docs/Makefile.am index 0cfa4d5..3d5c1e4 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -32,6 +32,7 @@ DOCS_DEPS = \ cpp_request_config.rst \ Doxyfile \ index.rst \ + glib_api.rst \ python_api.rst \ python_chip_info.rst \ python_chip.rst \ diff --git a/docs/bindings.rst b/docs/bindings.rst index ed7ec69..73f1262 100644 --- a/docs/bindings.rst +++ b/docs/bindings.rst @@ -19,3 +19,4 @@ C library. cpp_api python_api + glib_api diff --git a/docs/conf.py b/docs/conf.py index cbe1691..9d80bde 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,4 +54,45 @@ except ImportError: html_theme = "sphinx_rtd_theme" if sphinx_rtd_theme else "default" +# We need to know where to put docs generated by gi-docgen but app.outdir is +# only set once the builder is initialized. Let's delay running gi-docgen +# until we're notified. +def make_glib_docs(app): + # For some reason on RTD we're in the docs/ directory while during a local + # build, we're still in the top source directory. + prefix = "../" if os.getenv("READTHEDOCS") == "True" else "" + + subprocess.run( + [ + "gi-docgen", + "generate", + "--config", + f"{prefix}bindings/glib/gi-docgen.toml", + f"{prefix}bindings/glib/Gpiodglib-1.0.gir", + "--output-dir", + f"{app.outdir}", + ], + check=True, + ) + + +def setup(app): + app.connect("builder-inited", make_glib_docs) + + subprocess.run(["doxygen", "Doxyfile"]) + +cwd = os.getcwd() +os.chdir("..") +subprocess.run(["autoreconf", "-ifv"], check=True) +subprocess.run( + [ + "./configure", + "--enable-tools", + "--enable-bindings-glib", + "--enable-introspection", + ], + check=True, +) +subprocess.run(["make", "-j"], check=True) +os.chdir(cwd) diff --git a/docs/glib_api.rst b/docs/glib_api.rst new file mode 100644 index 0000000..307f5f7 --- /dev/null +++ b/docs/glib_api.rst @@ -0,0 +1,23 @@ +.. + SPDX-License-Identifier: CC-BY-SA-4.0 + SPDX-FileCopyrightText: 2024-2025 Bartosz Golaszewski + +.. + This file is part of libgpiod. + + libgpiod GObject API documentation + +libgpiod GObject bindings API +============================= + +**GObject bindings** for libgpiod provide a high-level, object-oriented +interface to interact with GPIO (General Purpose Input/Output) lines on Linux +systems. These bindings leverage the **GObject framework**, commonly used in +GNOME and GTK+ applications, to wrap the lower-level C API of libgpiod. + +.. warning:: + The documentation for GObject bindings is generated using gi-docgen and + cannot be easily integrated with sphinx documentation. Please navigate to + a separate section dedicated exclusively to the GLib part of the API. + +`Navigate to GObject bindings documentation `_ From patchwork Tue Feb 11 12:59:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 864213 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 0EA9D21E0A6 for ; Tue, 11 Feb 2025 12:59:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278796; cv=none; b=RGFQUEtwe51BH57dfu45X/DxvUEw4Pyn0O8bqJBAO7DfGy2GfU1KmAJJlaEy90npe0xgzeclAd1LO/Ctjh3eEdM7XN28uKwIE6nWjE5OVE9wQ/9U/o+yxOcJrGe944Jm0vaCH0VoRqFt4P3l56lkuwLa/cQvBz31Ab+wr0uOXZ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278796; c=relaxed/simple; bh=p911NYjePCvIy4unFKbNijnZ/wrz7z1YubSGlF53/nI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Anv6tCte7mNXUTvI4QH+Fb30tVx01dr0DJuvxUsTKHKKRfQjErBDt8BAboLWv6LF9d/nNu1ONosQLP+ZMi0/slYZe5AtjO8cFmfZHrvDLoF85utqCb7UD+YMRZHGowEYOCPEdnd5bA7IKdX0ppoBlU3zc7GkIEm0M2FJ0ha0Qw8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=tYD6ehRE; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="tYD6ehRE" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso55627765e9.0 for ; Tue, 11 Feb 2025 04:59:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1739278793; x=1739883593; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Dbvm9ZUkmh1TMfOZuNbEptwzOSI59vlfaRilfSxDrlA=; b=tYD6ehRE86PmIxBUzLTgEqIxTt9tLGATToYTLFzsi+0xBxvvIcZhmcz0BtRDYP5NX5 7g7PWX9kfjB+XwONzj+box0yhzAX0aKL/zV1V+GRWJfrcH2lCETt0jYe2t8FLwt7PEfW r8ZQL44Fy/N7NKN9CRaohLzvNdsOeUo+tuEcw5ZglglD0tmpjua8Btt+gCVlZftidk6j +QdiQUabjpo15/YBNy/XCTI7DUh5Jybv0/WS1P5hA8KmwofR5PW+aZ2EsH/zJyrfO4V6 A94vwQEyPCDDiSvvwazEHNZrOQcFfp0QHf0jidaEhss8y0+vKVKgbvYgYFk8YpAE6WPp 32pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739278793; x=1739883593; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dbvm9ZUkmh1TMfOZuNbEptwzOSI59vlfaRilfSxDrlA=; b=RoaBadkMfrcPbQdfUwJSv1k2rBLGg+WX2LUmDRerpC9nn+rZ8/3UBBLvDV90xnhuQH zlCPCd3mHocRc7/znrNsFsKomg2CkPo2KtNUEaLcaRnDqLElX9nQZ+Kpa+f5xnQeqdjk JrlWo0V9b5v0YU0gjhxiffIjTJIzvFWGbeduqhlQVxYPFUxPgEFAwRp/tANWW4TfHPbA DkV0Vto3ZrUzkZ4e0zoahBxm84KpxZDZLWrtTVx0G04DY9IgZDrI2IUnHAdIb9V1gbE7 7eUiH5bxCbFqoeI7Fa4IKyza5pzDmKic7cIuSp3qEGVu91+WYP3oVvb58J2eSDSXzVsc a8Gg== X-Forwarded-Encrypted: i=1; AJvYcCWFm5zshzf9STY6HMxK0Qdmu2A5AAZZD14Q6OIbGJ1T8wDvzGQ3HYBBczN6IdCfv6IXtFSPG1xAbLbW@vger.kernel.org X-Gm-Message-State: AOJu0YxUzehsKviQ/x9vrBQcKvcKqbD1LZiYIXCmjMl895AdlR09icWC MVXsaJqEMO1D5lqYUjHh5krxJ22DazbqgPCdNBNLWrHRcCAyc6CUQlCxPbIj9UA= X-Gm-Gg: ASbGncs/fk+2RY4mTnbsGEn5PwY2A61tk0djIuAG36m+RKs2d+C2drp8Gl0e5FMbs32 9WBo5DJNr4VNJemli4bYRmDPBnb7/0kLm+1vC9KKynpndaXdXD04ZA2Y66WMoTwXkt4B2nzlEmm pP1IOTevYnCLeiDctbjEb1Eqs+VXDWZ4N+E+2QiCsvePSRrUODaXB96DXLjeDsMRltici23Zl/c HQH2w9qPUTRJ6tJ0MBOlrB0MxBhUohL1hHwKzJ2x5+3JoCTIPMsAHbVw2BUreDJqCQepmPOBi71 jC/DA3I= X-Google-Smtp-Source: AGHT+IEbG4vCKNMOsBCIm2MSlTCCABTVjXd0hdIK9/6/0r8h/umWaqxq+bZWgJbI7fk32AjbzhvTtg== X-Received: by 2002:a05:600c:4451:b0:439:4c83:2b8b with SMTP id 5b1f17b1804b1-4394c832cc2mr32944925e9.19.1739278793345; Tue, 11 Feb 2025 04:59:53 -0800 (PST) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:561:8978:1d41:636a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4390d94d40csm209844095e9.9.2025.02.11.04.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 04:59:52 -0800 (PST) From: Bartosz Golaszewski Date: Tue, 11 Feb 2025 13:59:36 +0100 Subject: [PATCH libgpiod v4 15/17] doc: add documentation for gpio-tools Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250211-improve-docs-v4-15-dc56702c2ca8@linaro.org> References: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> In-Reply-To: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> To: Vincent Fazio , Kent Gibson , Linus Walleij , Erik Schilling , Phil Howard , Viresh Kumar Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=5206; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=9PAQCU4EfRjqJRUASzq50a8SnFgx0AaBDmM7QTHUeNo=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBnq0m3dCw4YVMRm+8L3/2QiYWOoSV9tiy69MeXp /Y6OQyYvFKJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ6tJtwAKCRARpy6gFHHX cn44D/sG7a3diSI5gDyeELsywifKHI56AqiNtmEmVvhxeh8++AuHozP0AHUxgVndccEtizTRCla 8j6+fZxrkKpMZfVuJHz/KM+rWnGnPLlh6Epg/CtdQ+D/oDQJs9rHyKCCTQKc8+OzvmAa3jIrm2A M9Mx4yOT3FGQomRsbUtWB1rN8QhP03eeFmeT3UO2H1hnhMLWLyw7J3SJbQBeegDgg8cPh641Q5o zYndZLfGWujELq4ULYwUg3cg1CEgQv6zBHSlZHlRTRBBkAC+wbxJYzJrvStllzhJgdSB3knE/tU GQGOZzY8TI2rV3Thtli22rHQ0fK5MvAzDBzA2sniCAOOyvwGBX3QDmC7TROhWB1MCdiODCjS2JM 2NKO9GBjmrU3nfpeiyuMmTWmQkiwtLsIb1qXe4xowitOUY+c10HFKtgVWtAbeW47EY/i434HTqE W8/Ai5lT8CmYVqrCH6VPhws3xsu+KnjmuRlvC1xVvanfKq5gU+FMuaFMK9q9Pz1eJQ7G/q146dR GqkfQsOUrCInl8LMYPrl8DbHi2RForFKtDGgmDOdhFDdLt9Gard1h86wTIpUB+qZKJcjNYetnsW mTh1j030t/hKqXZy65WHiAbC6Yl6k2KA0cpcP4g4hwgM7Cxa8rFYTrxjk5QQ91q7DLhg/NZ7bjI TwxRXpxLl11tBCQ== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski We already generate man pages for gpio-tools. Let's use man2html to make them part of the sphinx docs. Signed-off-by: Bartosz Golaszewski --- .readthedocs.yaml | 2 ++ configure.ac | 32 +++++++++++++++++++------------- docs/.gitignore | 8 ++++++++ docs/Makefile.am | 1 + docs/conf.py | 22 ++++++++++++++++++++++ docs/gpio_tools.rst | 25 +++++++++++++++++++++++++ docs/index.rst | 1 + 7 files changed, 78 insertions(+), 13 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 97086fa..c2b0a7f 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -19,11 +19,13 @@ build: - autoconf-archive # doxygen is available by default, but just in case. - doxygen + - help2man - gi-docgen - gir1.2-glib-2.0-dev - gobject-introspection - graphviz - libtool + - pandoc - pkg-config sphinx: diff --git a/configure.ac b/configure.ac index 8eec855..af5d53d 100644 --- a/configure.ac +++ b/configure.ac @@ -327,18 +327,6 @@ then AC_MSG_ERROR([systemdsystemunitdir not found - needed to enable systemd support])) fi -AC_CHECK_PROG([has_doxygen], [doxygen], [true], [false]) -AC_CHECK_PROG([has_sphinx], [sphinx-build], [true], [false]) -AM_CONDITIONAL([WITH_DOCS], [test "x$has_doxygen" = xtrue && test "x$has_sphinx" = xtrue]) -if test "x$has_doxygen" = xfalse -then - AC_MSG_NOTICE([doxygen not found - documentation cannot be generated]) -fi -if test "x$has_sphinx" = xfalse -then - AC_MSG_NOTICE([sphinx-build not found - documentation cannot be generated]) -fi - if test "x$cross_compiling" = xno then AC_CHECK_PROG([has_help2man], [help2man], [true], [false]) @@ -346,7 +334,25 @@ fi AM_CONDITIONAL([WITH_MANPAGES], [test "x$has_help2man" = xtrue]) if test "x$has_help2man" = xfalse then - AC_MSG_NOTICE([help2man not found - man pages cannot be generated automatically]) + AC_MSG_NOTICE([help2man not found - man pages and documentation cannot be generated]) +fi + +AC_DEFUN([DOC_PROG_NOT_FOUND], [AC_MSG_NOTICE([$1 not found - documentation cannot be generated])]) +AC_CHECK_PROG([has_doxygen], [doxygen], [true], [false]) +AC_CHECK_PROG([has_sphinx], [sphinx-build], [true], [false]) +AC_CHECK_PROG([has_pandoc], [pandoc], [true], [false]) +AM_CONDITIONAL([WITH_DOCS], [test "x$has_doxygen" = xtrue && test "x$has_sphinx" = xtrue && test "x$has_pandoc" = xtrue && test "x$has_help2man" = xtrue]) +if test "x$has_doxygen" = xfalse +then + DOC_PROG_NOT_FOUND(["doxygen"]) +fi +if test "x$has_sphinx" = xfalse +then + DOC_PROG_NOT_FOUND(["sphinx-build"]) +fi +if test "x$has_pandoc" = xfalse +then + DOC_PROG_NOT_FOUND(["pandoc"]) fi AC_CONFIG_FILES([Makefile diff --git a/docs/.gitignore b/docs/.gitignore index 86f8cfd..c9ffb90 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -3,3 +3,11 @@ doxygen-output sphinx-output + +# Automatically generated .rst +gpiodetect.rst +gpioinfo.rst +gpioget.rst +gpioset.rst +gpiomon.rst +gpionotify.rst diff --git a/docs/Makefile.am b/docs/Makefile.am index 3d5c1e4..1b5a46c 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -33,6 +33,7 @@ DOCS_DEPS = \ Doxyfile \ index.rst \ glib_api.rst \ + gpio_tools.rst \ python_api.rst \ python_chip_info.rst \ python_chip.rst \ diff --git a/docs/conf.py b/docs/conf.py index 9d80bde..06fe932 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -91,8 +91,30 @@ subprocess.run( "--enable-tools", "--enable-bindings-glib", "--enable-introspection", + "--enable-tools", ], check=True, ) subprocess.run(["make", "-j"], check=True) os.chdir(cwd) + +for page in [ + "gpiodetect", + "gpioinfo", + "gpioget", + "gpioset", + "gpiomon", + "gpionotify", +]: + subprocess.run( + [ + "pandoc", + "--from=man", + "--to=rst", + "--standalone", + "--wrap=none", + f"--output={page}.rst", + f"../man/{page}.man", + ], + check=True, + ) diff --git a/docs/gpio_tools.rst b/docs/gpio_tools.rst new file mode 100644 index 0000000..7372de4 --- /dev/null +++ b/docs/gpio_tools.rst @@ -0,0 +1,25 @@ +.. + SPDX-License-Identifier: CC-BY-SA-4.0 + SPDX-FileCopyrightText: 2025 Bartosz Golaszewski + +.. + This file is part of libgpiod. + + GPIO tools documentation + +Command-line tools +================== + +The **libgpiod** project includes a suite of **command-line tools** to +facilitate GPIO manipulation from console and shell scripts. + +.. toctree:: + :maxdepth: 1 + :caption: Manual entries + + gpiodetect + gpioinfo + gpioget + gpioset + gpiomon + gpionotify diff --git a/docs/index.rst b/docs/index.rst index 8dcea20..a52cc3a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -26,3 +26,4 @@ this interface. core_api bindings + gpio_tools From patchwork Tue Feb 11 12:59:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 864212 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 AE51E21E0BA for ; Tue, 11 Feb 2025 12:59:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278798; cv=none; b=YPNj5pJdK6FCtSQQeCTo9yHbyLa50GDi4ZJBxfWk35/+01tbTB0XGfZcQRmY3i6OLWxbS43VqwgXjsUIihrbWjJCSHJVPlgGdkcAUwacOtH8jmK9vJNnXJGmaosmMOzEacINp9EJamwhl0iSif4+atFaR8F/+USlSPfg/v39nBA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739278798; c=relaxed/simple; bh=pZcR0PzqmqVwp/+EGp/cSk8P1KY7qKy2EamThKb/SIU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZeF8pW/53YlTkWM30hpVqCr2rk3eGZ1g3fs6tT5ig+YaRnG8FRewtXJefnwoi9On/nKTgOiVn36+zD58qvWngHLKiJAfZcr4Momh2hXGu9WmgF9RCp0Aglq/bFATag0CuklIjpW9PIlLkeAK7T3eHC+ZgKX0jwJg0ZsMl4LB+44= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=qCHBMgKp; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="qCHBMgKp" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso55628095e9.0 for ; Tue, 11 Feb 2025 04:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1739278795; x=1739883595; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=8vVZCU+yHAjmiNaJEaScySLgV9S9u7F+Ea2dbInUSdc=; b=qCHBMgKpaUdEyzJ7H9K9HI7M5Vsco2563Z3DOh2eo1hn+OwMaJ/Nv9NjEA2HWOTcNB 18pWbf1RRXW+extqr/aXnrDC4PmjedBVG0TaxKgdTgMWqVhxuGnHNtZw8hE0/S5f0Ypz dLb+SivhmGXyQNvpB1AVyar5v330XqIwTPRTl8VSSFD9Q1IrfYNLO59Up5K0M4eIxcQA nVHRde/xWFGkIOFPXFIP4oT0ETPbAOpJvtPaubXGf2k1FKATDxP5KT+ppizGg1II0p7K 2F5iY1FLyyGRd0G8QEULzB5EQ1Bu7pxndQUuwursX6TR7DmybzunvbUc8Q4IOM9+7RBi f+hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739278795; x=1739883595; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8vVZCU+yHAjmiNaJEaScySLgV9S9u7F+Ea2dbInUSdc=; b=J2MW8+xV2P6zXDqFz5WJ/BJO5ShvzwLd2eDZbIjyP0rFaxQS0GP0nnCVtiMXirrE2y MYwyskgs7qslw5aIPlY6cEXAr+LNEqN/EQ32wcamj8c5Dgfa39VEkmvgaFcJogP6pCIm eErmmjaxE0LwAR9HfI275Pibq5CYiHN6nuJHgqW+DCYehPbJZ6SfYwS8qx2Kp90uiwNo LvzSdOWZip+cdb4fDgXW98lCOgVBY0YzzKz/vvbpMnr64qkdL0rooWwsaJXqGl/yrkBg bKO0lSPxvxlUqqIMmiEEY8S6hB+6XVkw6mQ8YObZn9lxZRm8kqKsUFU/EY4nPGaA5yy6 P/1g== X-Forwarded-Encrypted: i=1; AJvYcCV9kLmgXrU0nOnCfv2/kVPJyOJ2GZFpHmlt7IGdgLUmMB4nlHi4bM5hmTv16zg274vwINm2xvMjj5yk@vger.kernel.org X-Gm-Message-State: AOJu0YxW1Q0gCDQ8OTFbaHvPRnKAwPpGS025radp+VSQ75EmnRAWG+Rg Rzt1dRqrOo9uxB70U2DoLlozWcvfOwczY7JQ4a6yEJHfqzZ54SSz8ncQGCh7Sbs= X-Gm-Gg: ASbGncuEGLsIiD396p/N7+v2AWpSuM3Epm4jFUqN6wPkuR/PlShjs6M9Tft6bhasOy5 ooPofuwIdVXh39juFQxqo2yPBiJjmcL25p0C/1u1nGx+I+T1GUFuZba+PhMEj2ejWqfs85FjOnr smPhzNxirvDuo5Lp+g5QbJZ0lAMfb4VcOoIDHdLUcs+BxT6DGhy+C7ooYQGglytTRuADKdB9dh9 tlDnqicwwX/j8Mta4CaKVS1zU9ULSsISF5npwwriYsYN7Jo4Ak05ciY90y+O9dj9nh/TXMNzPsW /Z5To8Q= X-Google-Smtp-Source: AGHT+IFd9Iey+TrXktzkRgh2SpKzh8WbuKb6qsKF92O2fFh2BOzxBLnQfobdOWetFdmkGiLNKQujmQ== X-Received: by 2002:a05:600c:4f8b:b0:439:40c1:1338 with SMTP id 5b1f17b1804b1-43940c11470mr101560955e9.11.1739278794527; Tue, 11 Feb 2025 04:59:54 -0800 (PST) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:561:8978:1d41:636a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4390d94d40csm209844095e9.9.2025.02.11.04.59.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 04:59:53 -0800 (PST) From: Bartosz Golaszewski Date: Tue, 11 Feb 2025 13:59:37 +0100 Subject: [PATCH libgpiod v4 16/17] doc: add documentation for D-Bus API, daemon and command-line client Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250211-improve-docs-v4-16-dc56702c2ca8@linaro.org> References: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> In-Reply-To: <20250211-improve-docs-v4-0-dc56702c2ca8@linaro.org> To: Vincent Fazio , Kent Gibson , Linus Walleij , Erik Schilling , Phil Howard , Viresh Kumar Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=5329; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=GJVRfzZrXSyYmVo4vfibVn9csqUua3+DjonZU5isJ2E=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBnq0m4q8eNE+Mie7AVQMvjwCxdcO7uX8hQ2qkBz qQr7/yefH+JAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ6tJuAAKCRARpy6gFHHX cm9HEAC6Lop2TQwWjSLZBDIulGrzUdeUVhBFOtWqKgrY9t2q0QTXiFNVhUmUERlkR6RBXsikW44 ke3jPNM9IaQ5PTvrgAxIkiSWYvXPFSKzUJJRliX9Nb0Bpuw8yupyswaqzPIFAMldJXJrwIcvD0u nLKkKBgZEXLSlqLdyATPhB/sTse0pTkK1kU4e7yMVEtTBpF88GN0xrvoU5ii0e3Zyv5Zte4tst1 ZRWFI5QAVwkfOZ4Gt9wz9nMvKZ10b8cr5YCfnXuwtuqWvwyu5DVqK/UtUYWM6RN8CC3VB+32Ej8 t+3IkDSDxv+8dxIYbiBZ+CgcKxaFzS3eGmrHHgOwyboR0fKnxXmJr/OPjoG+8fV1Gz+T5CjkvfS 7s37+pDDuCVTMBj4do7CTbieAxCzzEVGlucS6pkuPE4/vxbi7VR3NqdxfbQNw2YshdHTRmHe6tJ 0kVyK6NR6JwUUqEO2iD2HeCEvXTKTbBfY1ERT3DKX6I0+NlxTa2H4Memq7+Equ+aryWaBDfSuPi JbmOvB4nFCY8zY3yJQ5iocuYKpSyzDpdKxLLCHKRAKlwW3SK2r2f0xdxxEJyjF/FuN6LiKZw1HJ P2AU3RTcOmcJ4DH11eiFvqK6yBBRh2uNsJRUkLsd37DNdv3wvLiieG1uob/4O9G/65LXg34dNQu hzDUY+z3on4ofLg== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski Use the man pages for gpio-manager and gpiocli + some manual labor to provide sphinx docs for the libgpiod D-Bus API. Signed-off-by: Bartosz Golaszewski --- .readthedocs.yaml | 2 ++ docs/.gitignore | 6 ++++++ docs/Makefile.am | 3 +++ docs/conf.py | 17 +++++++++++++++++ docs/dbus.rst | 24 ++++++++++++++++++++++++ docs/dbus_api.rst | 23 +++++++++++++++++++++++ docs/gpiocli_top.rst | 29 +++++++++++++++++++++++++++++ docs/index.rst | 1 + 8 files changed, 105 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c2b0a7f..5f4f5ac 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -24,6 +24,8 @@ build: - gir1.2-glib-2.0-dev - gobject-introspection - graphviz + - libglib2.0-dev-bin + - libgudev-1.0-dev - libtool - pandoc - pkg-config diff --git a/docs/.gitignore b/docs/.gitignore index c9ffb90..61dac9a 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -11,3 +11,9 @@ gpioget.rst gpioset.rst gpiomon.rst gpionotify.rst + +gpio-manager.rst + +dbus-io.gpiod1.*.rst +gpiocli.rst +gpiocli-*.rst diff --git a/docs/Makefile.am b/docs/Makefile.am index 1b5a46c..e03ca22 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -30,10 +30,13 @@ DOCS_DEPS = \ cpp_line_settings.rst \ cpp_misc.rst \ cpp_request_config.rst \ + dbus.rst \ + dbus_api.rst \ Doxyfile \ index.rst \ glib_api.rst \ gpio_tools.rst \ + gpiocli_top.rst \ python_api.rst \ python_chip_info.rst \ python_chip.rst \ diff --git a/docs/conf.py b/docs/conf.py index 06fe932..6fb399d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -92,6 +92,7 @@ subprocess.run( "--enable-bindings-glib", "--enable-introspection", "--enable-tools", + "--enable-dbus", ], check=True, ) @@ -105,6 +106,20 @@ for page in [ "gpioset", "gpiomon", "gpionotify", + "gpio-manager", + "gpiocli", + "gpiocli-detect", + "gpiocli-find", + "gpiocli-info", + "gpiocli-get", + "gpiocli-monitor", + "gpiocli-notify", + "gpiocli-reconfigure", + "gpiocli-release", + "gpiocli-request", + "gpiocli-requests", + "gpiocli-set", + "gpiocli-wait", ]: subprocess.run( [ @@ -118,3 +133,5 @@ for page in [ ], check=True, ) + +subprocess.run(["gdbus-codegen", "--generate-rst", "dbus", "../dbus/lib/io.gpiod1.xml"]) diff --git a/docs/dbus.rst b/docs/dbus.rst new file mode 100644 index 0000000..0dcbb81 --- /dev/null +++ b/docs/dbus.rst @@ -0,0 +1,24 @@ +.. + SPDX-License-Identifier: CC-BY-SA-4.0 + SPDX-FileCopyrightText: 2025 Bartosz Golaszewski + +.. + This file is part of libgpiod. + + GPIO D-Bus API, daemon and command-line client documentation + +D-Bus interface +=============== + +The **libgpiod D-Bus API** provides an abstraction for interacting with GPIO +chips on Linux systems via the D-Bus messaging system. It enables relatively +efficient, asynchronous control of GPIO lines, offering methods for +configuring, monitoring, and manipulating GPIOs. + +.. toctree:: + :maxdepth: 1 + :caption: Contents + + dbus_api + gpio-manager + gpiocli_top diff --git a/docs/dbus_api.rst b/docs/dbus_api.rst new file mode 100644 index 0000000..6192949 --- /dev/null +++ b/docs/dbus_api.rst @@ -0,0 +1,23 @@ +.. + SPDX-License-Identifier: CC-BY-SA-4.0 + SPDX-FileCopyrightText: 2025 Bartosz Golaszewski + +.. + This file is part of libgpiod. + + GPIO D-Bus API documentation + +D-Bus API +========= + +The following set of strictly defined interfaces allow users to use any +**D-Bus** library in order to interact with the **gpio-manager** as well as +reimplement the manager itself if required. + +.. toctree:: + :maxdepth: 1 + :caption: Interfaces + + dbus-io.gpiod1.Chip + dbus-io.gpiod1.Line + dbus-io.gpiod1.Request diff --git a/docs/gpiocli_top.rst b/docs/gpiocli_top.rst new file mode 100644 index 0000000..52e3295 --- /dev/null +++ b/docs/gpiocli_top.rst @@ -0,0 +1,29 @@ +.. + SPDX-License-Identifier: CC-BY-SA-4.0 + SPDX-FileCopyrightText: 2025 Bartosz Golaszewski + +.. + This file is part of libgpiod. + + GPIO D-Bus command-line client documentation + +Command-line client +=================== + +.. toctree:: + :maxdepth: 1 + :caption: Manual entries + + gpiocli + gpiocli-detect + gpiocli-find + gpiocli-info + gpiocli-get + gpiocli-monitor + gpiocli-notify + gpiocli-reconfigure + gpiocli-release + gpiocli-request + gpiocli-requests + gpiocli-set + gpiocli-wait diff --git a/docs/index.rst b/docs/index.rst index a52cc3a..3101e14 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -27,3 +27,4 @@ this interface. core_api bindings gpio_tools + dbus