From patchwork Tue Jan 9 14:02:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Gibson X-Patchwork-Id: 761277 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 65B3A39850; Tue, 9 Jan 2024 14:03:46 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LeN794cX" Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1d3e6c86868so26220905ad.1; Tue, 09 Jan 2024 06:03:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704809025; x=1705413825; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rZBafw6hob01QS01xBkXqkw9nkyhWNI3hsapBEtWecI=; b=LeN794cXj9IksPz69EwfZ5FwnWREeDnn/YG7+YOwSbG5znEq1Z8w/G8QD8qpV0mkwg iF0+ryKPh+G2PyELN//2Evt9pm9VnydO7V+eW3el0Mc8mldn7eYg9cNzmySuCiBVTOZk yiNurOgnJhP/dLQRjoSzUKTqpNFH4z1M4vyrgd/WikKFvXEL3V2XxSGWomygpFU0+tkC R6r04zBzZexX3AzZGi0txYN+xhhno/gVohy54J5ayCUEBCd4Z1llOgN0Hai0iUEzRCAN FZa/VQeM/iePByYuGqoDnYFNXAZZHYUegDXvNAP8jbvpnLkhS9H7a9icXos7OeYiHiwb QZbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704809025; x=1705413825; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rZBafw6hob01QS01xBkXqkw9nkyhWNI3hsapBEtWecI=; b=EO9fUh6ZuPAeJukN93hW9HX5cKN8GomId9MatL7E3w2x3H6jMNAEYYRE2BhEbPFz5c 60pDjltvcyko27xAkpIko1Sr9Q9b+uqODl9JbrVpViwRtoCy3p6glVbsCZvSxdSJTeUO OxuW6GefebxisMJWmWFxpJdZUVk7OycQuL5syrHt7p0L3naJnAruFEANEHhMYoI2D1aG IqKeRNX1MSSkE5JbFeO8/6YFj8SSFvHHqRA1d+n+pURcWwgdLkHIbZojbGk1JnX9OJU/ CUUSeDd1dFn5PCklIZkkXuch4S1Q2xPs7fG6KDQgMoTtrMuwCXPXKZDtFqiVJFirK0Kk 75xA== X-Gm-Message-State: AOJu0YyzY2evTAI7ndgrUh7JHE6wIdhJ1cePWgMkEEuPTQ+El9OngGe+ yE2foNU15TuSn7uzc/knUV2mi36wjqAXuA== X-Google-Smtp-Source: AGHT+IE/JEBDO6v7IzoujrJgFdjXIeuiiUlZp7z8i//0M1qW+IdvYG5VRFSKX3C95yYO9bKCEyYqPQ== X-Received: by 2002:a17:902:a50d:b0:1d4:1327:bd15 with SMTP id s13-20020a170902a50d00b001d41327bd15mr5165391plq.32.1704809025335; Tue, 09 Jan 2024 06:03:45 -0800 (PST) Received: from rigel.home.arpa (60-241-235-125.tpgi.com.au. [60.241.235.125]) by smtp.gmail.com with ESMTPSA id jw23-20020a170903279700b001d538b6517asm1818362plb.230.2024.01.09.06.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:03:45 -0800 (PST) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, andy@kernel.org Cc: Kent Gibson Subject: [PATCH 1/5] gpio: uapi: improve description of fd fields Date: Tue, 9 Jan 2024 22:02:17 +0800 Message-Id: <20240109140221.77725-2-warthog618@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240109140221.77725-1-warthog618@gmail.com> References: <20240109140221.77725-1-warthog618@gmail.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Only a successful operation modifies fd fields, but the current documentation wording could be taken to imply that a positive fd value after an ioctl() returns indicates a success. Reword documentation to clarify that the fd is only valid after a successful operation. Signed-off-by: Kent Gibson --- include/uapi/linux/gpio.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h index cb9966d49a16..650c1099d1a6 100644 --- a/include/uapi/linux/gpio.h +++ b/include/uapi/linux/gpio.h @@ -189,9 +189,8 @@ struct gpio_v2_line_config { * buffer. If this field is zero then the buffer size defaults to a minimum * of @num_lines * 16. * @padding: reserved for future use and must be zero filled - * @fd: if successful this field will contain a valid anonymous file handle - * after a %GPIO_GET_LINE_IOCTL operation, zero or negative value means - * error + * @fd: after a successful %GPIO_V2_GET_LINE_IOCTL operation, contains + * a valid anonymous file descriptor representing the request */ struct gpio_v2_line_request { __u32 offsets[GPIO_V2_LINES_MAX]; @@ -402,9 +401,8 @@ struct gpioline_info_changed { * such as "my-bitbanged-relay" * @lines: number of lines requested in this request, i.e. the number of * valid fields in the above arrays, set to 1 to request a single line - * @fd: if successful this field will contain a valid anonymous file handle - * after a %GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value - * means error + * @fd: after a successful %GPIO_GET_LINEHANDLE_IOCTL operation, contains + * a valid anonymous file descriptor representing the request * * Note: This struct is part of ABI v1 and is deprecated. * Use &struct gpio_v2_line_request instead. @@ -465,9 +463,8 @@ struct gpiohandle_data { * %GPIOEVENT_REQUEST_RISING_EDGE or %GPIOEVENT_REQUEST_FALLING_EDGE * @consumer_label: a desired consumer label for the selected GPIO line(s) * such as "my-listener" - * @fd: if successful this field will contain a valid anonymous file handle - * after a %GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value - * means error + * @fd: after a successful %GPIO_GET_LINEEVENT_IOCTL operation, contains a + * valid anonymous file descriptor representing the request * * Note: This struct is part of ABI v1 and is deprecated. * Use &struct gpio_v2_line_request instead. From patchwork Tue Jan 9 14:02:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Gibson X-Patchwork-Id: 762055 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (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 1465F39ACF; Tue, 9 Jan 2024 14:03:59 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZQy29gvl" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1d54b763d15so10476415ad.0; Tue, 09 Jan 2024 06:03:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704809039; x=1705413839; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9IX5MdgvHzcC45EGoxSUtgBkn4tauaq0JPFZeGgYcY8=; b=ZQy29gvlSQ34hakbklkicCv+KDd9oS1RWxc5nutOYFjYyk45+SiwKaAOZoGMPSpex1 bQzkgMBWtYlPaVAmWUYWSq0qGJv+Dv4hP2WPiis8VZaStcbwx6Eh4dsN/kATjKBYDRgA NKgjoNfo+oo+9VZF3KdwfRO/Jb/84MA3XCzfcOcplS4PNafhkP3tl0dackPEjgdFrK7l /ERGl3D74YoquoR5b5nkf0wa4YH9g3J6OPMqqYO9ipW8BY82sA67q5qgtYvYFGnMsMGH Nk9Tdt7vcfcgFpuWnJzBDEvOQa30nQGg84TWLr308D8SZuNnoD3sFS/I5wxQxBiZ/lBX TaXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704809039; x=1705413839; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9IX5MdgvHzcC45EGoxSUtgBkn4tauaq0JPFZeGgYcY8=; b=rbD0JowrAX2hzE9wnkDLypE2NhEyiHyi9Ea8TvFZPF4yY6PL2vhaAEp+rTxL7szIOT +HWBB9TTCukIGUlhhKxopQdHs6NJ72tZ6oM2Pu6UzkDgAGsQYJa4zSsdnJbOhD8ol3YN lS6xNKRKVo2KV9zFWZzTSIRssRfmE5Cp6ndVneNDt0mJkdcJLNbrzxo0YakfZ+AWVLGc SzA8a/KYgCu7gprfgY87cGOkOMYKBX3IuUrgNf0GkJjwfxvWZLqhnzD9RrO8EdoTMKcd i9SlTlLGkVsY8EwYeIONDih5Sjce3X6mrIyO0rAvjBoV0KY+u5Q66yDv7coLbwolV3in YO0Q== X-Gm-Message-State: AOJu0Yz1qoCLKELTrR2DQUguiAcA1eG/kh0t3lx7iD2wxXqKysbyBKXL R2k+3NGF+KEPKgTCFsFA4hERmG4PPLWhEA== X-Google-Smtp-Source: AGHT+IE1B+5E4yXZiHr/7k0nR/SqU7friTO3wviR2qf5qMYoO/dj8rWkZ5REohbVVu8PAXIXDlnmAg== X-Received: by 2002:a17:902:d389:b0:1d3:2e0e:c889 with SMTP id e9-20020a170902d38900b001d32e0ec889mr3250366pld.62.1704809038948; Tue, 09 Jan 2024 06:03:58 -0800 (PST) Received: from rigel.home.arpa (60-241-235-125.tpgi.com.au. [60.241.235.125]) by smtp.gmail.com with ESMTPSA id jw23-20020a170903279700b001d538b6517asm1818362plb.230.2024.01.09.06.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:03:58 -0800 (PST) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, andy@kernel.org Cc: Kent Gibson Subject: [PATCH 2/5] gpio: uapi: clarify hte references Date: Tue, 9 Jan 2024 22:02:18 +0800 Message-Id: <20240109140221.77725-3-warthog618@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240109140221.77725-1-warthog618@gmail.com> References: <20240109140221.77725-1-warthog618@gmail.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The full name of the HTE subsystem is "hardware timestamping engine", so correct references and highlight that this refers to the HTE subsystem. Extend the description of struct gpio_v2_line_event to clarify that the timestamp_ns is sourced from the HTE if the GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE is set. Signed-off-by: Kent Gibson --- include/uapi/linux/gpio.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h index 650c1099d1a6..88c2a326940e 100644 --- a/include/uapi/linux/gpio.h +++ b/include/uapi/linux/gpio.h @@ -67,7 +67,7 @@ struct gpiochip_info { * @GPIO_V2_LINE_FLAG_BIAS_DISABLED: line has bias disabled * @GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME: line events contain REALTIME timestamps * @GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE: line events contain timestamps from - * hardware timestamp engine + * the hardware timestamping engine (HTE) subsystem */ enum gpio_v2_line_flag { GPIO_V2_LINE_FLAG_USED = _BITULL(0), @@ -288,6 +288,10 @@ enum gpio_v2_line_event_id { * * If the %GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME flag is set then the * @timestamp_ns is read from %CLOCK_REALTIME. + * + * If the %GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE flag is set then the + * @timestamp_ns is provided by the hardware timestamping engine (HTE) + * subsystem. */ struct gpio_v2_line_event { __aligned_u64 timestamp_ns; From patchwork Tue Jan 9 14:02:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Gibson X-Patchwork-Id: 761276 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 910233985A; Tue, 9 Jan 2024 14:04:11 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QHxNVk/m" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1d3aa0321b5so27301535ad.2; Tue, 09 Jan 2024 06:04:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704809050; x=1705413850; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QC+N5XwBd3tXbkTJGYgV0uatnb4qRHovhLZ5WiV8jxM=; b=QHxNVk/mNx5Cyoby76CnG+HXM7hLPW1G6S8nsbmFDn1NfcLWHu91CC1cjaiS3nO+rB hYsy0HCfFKY5gZfzoibnMIoFbnoiYOuFE1zWA9SvQzTfBFRxHZWSLV8agCiErScMsd4o anztkRNAMCNAubeD0Fz/TXdSJ3rzU3mdw/7w+Whg9QAh32+IyqlXslE6Ije4vnCKwn0H KJ0CeUL9E48Z68tQ2RYcjsSSkAQnAD8GBvHqvAjpUTK7XqXjd3Skv9e1C+Kr2rdmseDi zxscMy+yIMOxMTiMJQF/CrLBbqZuwzeAD9kH39AUgeKXtcwh9SF2oEJL1SmbE5drmz1u tLiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704809050; x=1705413850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QC+N5XwBd3tXbkTJGYgV0uatnb4qRHovhLZ5WiV8jxM=; b=Iw7b5AYOjU96KvxsvxPcLk6qwVi8k0bKVX8mWSUhqcpxoYe54VPyaosElLngfBizhI 4fHOhXaZPtsXt1H+ld5CemAVKfKfGRIgCQPKdaIXOS6bl7ISuL5kt1K6dVcJz0sHza16 GqvZ1cy/Q6qqUQEL6iHxJ+2aOago7Ov5d5p92qeTZp5BVbn1ouqeUvMmIykBVXZGa3Xz KLHRPSKUTPRG/6UekRaLAcFTX2JeWtYp4NPQb3A6ks6mwk3XjP+/9FWGUM6bsEurfbvg h3bocd5tpJ024H1DBgpN3L3IwXXcB3XHaOHUR9xbyNG/T8o3OogarIgFfiQKlhbDCg6d 2PjA== X-Gm-Message-State: AOJu0YwZzoTjyJzdZkWNzYylCsDiu7Mx9nzf7i0VI0x/yE03M4m5JgkG u1O5jSWxyRUDSXxkomvFsI32GNx5E4ZYAQ== X-Google-Smtp-Source: AGHT+IFunOXy/18QOlHd6n8yIlKRJVXr3+0qvuGKu3d6jsiu7GiD1jkF+UFbwnkBMSUArZUiifGtXA== X-Received: by 2002:a17:902:8a88:b0:1d0:6ffd:e2ef with SMTP id p8-20020a1709028a8800b001d06ffde2efmr5582875plo.137.1704809050470; Tue, 09 Jan 2024 06:04:10 -0800 (PST) Received: from rigel.home.arpa (60-241-235-125.tpgi.com.au. [60.241.235.125]) by smtp.gmail.com with ESMTPSA id jw23-20020a170903279700b001d538b6517asm1818362plb.230.2024.01.09.06.04.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:04:10 -0800 (PST) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, andy@kernel.org Cc: Kent Gibson Subject: [PATCH 3/5] gpio: uapi: drop trailing period from one sentence descriptions Date: Tue, 9 Jan 2024 22:02:19 +0800 Message-Id: <20240109140221.77725-4-warthog618@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240109140221.77725-1-warthog618@gmail.com> References: <20240109140221.77725-1-warthog618@gmail.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Make documentation more consistent by using trailing periods only for multi-sentence field descriptions, not single sentence descriptions. Signed-off-by: Kent Gibson --- include/uapi/linux/gpio.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h index 88c2a326940e..3ba8996e496c 100644 --- a/include/uapi/linux/gpio.h +++ b/include/uapi/linux/gpio.h @@ -88,10 +88,10 @@ enum gpio_v2_line_flag { /** * struct gpio_v2_line_values - Values of GPIO lines * @bits: a bitmap containing the value of the lines, set to 1 for active - * and 0 for inactive. + * and 0 for inactive * @mask: a bitmap identifying the lines to get or set, with each bit * number corresponding to the index into &struct - * gpio_v2_line_request.offsets. + * gpio_v2_line_request.offsets */ struct gpio_v2_line_values { __aligned_u64 bits; @@ -123,7 +123,7 @@ enum gpio_v2_line_attr_id { * @values: if id is %GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES, a bitmap * containing the values to which the lines will be set, with each bit * number corresponding to the index into &struct - * gpio_v2_line_request.offsets. + * gpio_v2_line_request.offsets * @debounce_period_us: if id is %GPIO_V2_LINE_ATTR_ID_DEBOUNCE, the * desired debounce period, in microseconds */ @@ -143,7 +143,7 @@ struct gpio_v2_line_attribute { * @attr: the configurable attribute * @mask: a bitmap identifying the lines to which the attribute applies, * with each bit number corresponding to the index into &struct - * gpio_v2_line_request.offsets. + * gpio_v2_line_request.offsets */ struct gpio_v2_line_config_attribute { struct gpio_v2_line_attribute attr; @@ -178,7 +178,7 @@ struct gpio_v2_line_config { * associated GPIO chip * @consumer: a desired consumer label for the selected GPIO lines such as * "my-bitbanged-relay" - * @config: requested configuration for the lines. + * @config: requested configuration for the lines * @num_lines: number of lines requested in this request, i.e. the number * of valid fields in the %GPIO_V2_LINES_MAX sized arrays, set to 1 to * request a single line @@ -216,7 +216,7 @@ struct gpio_v2_line_request { * @num_attrs: the number of attributes in @attrs * @flags: flags for this GPIO line, with values from &enum * gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW, - * %GPIO_V2_LINE_FLAG_OUTPUT etc, added together. + * %GPIO_V2_LINE_FLAG_OUTPUT etc, added together * @attrs: the configuration attributes associated with the line * @padding: reserved for future use */ @@ -273,7 +273,7 @@ enum gpio_v2_line_event_id { /** * struct gpio_v2_line_event - The actual event being pushed to userspace - * @timestamp_ns: best estimate of time of event occurrence, in nanoseconds. + * @timestamp_ns: best estimate of time of event occurrence, in nanoseconds * @id: event identifier with value from &enum gpio_v2_line_event_id * @offset: the offset of the line that triggered the event * @seqno: the sequence number for this event in the sequence of events for From patchwork Tue Jan 9 14:02:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Gibson X-Patchwork-Id: 762054 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 EF5923985A; Tue, 9 Jan 2024 14:04:24 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MjoP5gRj" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1d3ec3db764so9591465ad.2; Tue, 09 Jan 2024 06:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704809064; x=1705413864; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9vwiGVviPevkA4iifDdpPyAGQ7Bqosi9flSfILNptTg=; b=MjoP5gRjU1ULb1TTw3AAyPt4k23kBnq/N4klAygQ/BADI8tvxsvREPdHm9ex6aBfoj pG0y/BRp0wn+7XHb8wlEeMIVRaYnAEVWCuzxa86G9MYMnCv0tV5zgHHnRN+CKQYal+rd w3v2apFGfuwwH7lu57jPBFpOIJYqIgYThcUKkMvQ6HyDpPUfmbHAjOrMVqgXIvEdOCI5 vlgGigB4DLGBdUJPODWeaHjLIP+gucTmzgeLh2tP7EcP6xeIgx3F2jDYY68rk/WhXwzG 8WmPZ3lC4kCuXtwm4K/HUl07vjZptpyFv1+YZ0CKb/+m5yYsEOqykK+MqzJ8Ax13kx4d uwMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704809064; x=1705413864; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9vwiGVviPevkA4iifDdpPyAGQ7Bqosi9flSfILNptTg=; b=Frd9oIUflYuMAXVuJujFG0wzNgqu4i6+338L6JQdIF57wo8IiM2uhdPoPsD6iIiNtr FnjqCsDmnfFDmTo4MsecXyMUtFfhNxaREzknFDEUp+krezuBP/9z9ScbrjC4vIJmXWu1 9G08iZW11oSvxQmya/LBoyeEIcUW8ZiCNb8+y6dTp4e6oIB72Pjx3N6ek6tu+40rQ2bF 4A6vqQtDcuNNeTJh2vF0Rd9QIIsB94ZeCTiVYWNoJuCHyNFSyWlUiv5etcqKWwLX2yQ2 xiiLB3FeUfHXoLPbLNYIDAq9pLC12DX1F9akj3cephB957/oQd/sFA7jVWwMIgQj+RBY Hkig== X-Gm-Message-State: AOJu0Yw7z9FE28/VrHPsakGqLoGNUGt2P2/hH1PF/PdibRvrsFA3f7XK lD0ngPMCJwWo4r9XGH23xcIwC7tNaiF/jA== X-Google-Smtp-Source: AGHT+IH25ChbMn//2u7wEzfQwYMW0kHIYkq+ZVd4Qm1mtNEY054HfgFJJwm2WHhhAnouNWou++e59w== X-Received: by 2002:a17:902:eb90:b0:1d4:9225:9165 with SMTP id q16-20020a170902eb9000b001d492259165mr3115960plg.23.1704809064008; Tue, 09 Jan 2024 06:04:24 -0800 (PST) Received: from rigel.home.arpa (60-241-235-125.tpgi.com.au. [60.241.235.125]) by smtp.gmail.com with ESMTPSA id jw23-20020a170903279700b001d538b6517asm1818362plb.230.2024.01.09.06.04.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:04:23 -0800 (PST) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, andy@kernel.org Cc: Kent Gibson Subject: [PATCH 4/5] gpio: uapi: document possible values of gpioevent_data.id Date: Tue, 9 Jan 2024 22:02:20 +0800 Message-Id: <20240109140221.77725-5-warthog618@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240109140221.77725-1-warthog618@gmail.com> References: <20240109140221.77725-1-warthog618@gmail.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Clarify the possible values of event id, rather than requiring the reader to infer. Signed-off-by: Kent Gibson --- include/uapi/linux/gpio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h index 3ba8996e496c..e68a56969f36 100644 --- a/include/uapi/linux/gpio.h +++ b/include/uapi/linux/gpio.h @@ -490,7 +490,8 @@ struct gpioevent_request { /** * struct gpioevent_data - The actual event being pushed to userspace * @timestamp: best estimate of time of event occurrence, in nanoseconds - * @id: event identifier + * @id: event identifier, one of %GPIOEVENT_EVENT_RISING_EDGE or + * %GPIOEVENT_EVENT_FALLING_EDGE * * Note: This struct is part of ABI v1 and is deprecated. * Use &struct gpio_v2_line_event instead. From patchwork Tue Jan 9 14:02:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Gibson X-Patchwork-Id: 761275 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 1FC5139FFD; Tue, 9 Jan 2024 14:04:34 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OQN/zGMe" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1d4a980fdedso27293485ad.1; Tue, 09 Jan 2024 06:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704809074; x=1705413874; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ijQhkKPrA5WhMt4QQQ7nm21kPG9bAnEvYYwAYTNVVhY=; b=OQN/zGMeZdEI8mo0ztyTz71FJ5fu97unzzNllilfsBaIk7lPUN9f+QjHayxIEvcONQ Yv311s6LT2eYh10GmwWrCTilfxpp3Xql6m7KoW28qai09S3gURkbvXMyY9OuEMz5vorv udXarLE9nD4oH5fvBWZzM0nifNz9c8hNK9CXLW26kDZ/kiG30qWI60vjvYPoCdQcbLXs 3xC/dHvuspRLgLY0El9+B2+OM64AJJongJycsmaUk6PONZ9cSfy0mhUM1TlFpcoKK2bh O9QqpU7J7X+U0DZrSBzGHJH1Fk5OT10/XYq+Krjq2vjW3dkp0WAcQyvj8RPwuMXE1Sa8 P1jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704809074; x=1705413874; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ijQhkKPrA5WhMt4QQQ7nm21kPG9bAnEvYYwAYTNVVhY=; b=gvn1ScW8nCCqDCZcW2NWie5zTDIAcFdOYVVhh46tIOhRsgNDYT03qI7WsT5fzqb4gS CycCk98LPqsn77h8b1M4cSrhaz2dPorMwr46zF9ZLkl0zqGPAoMhM6k0TMF8QNflCQ0g NMgHDWg95MXd9OXfmUPGpT36LjJzmoYZRbTxTHK7koDlEToaTJi+GxcMD1QHW4+sYs3h URn0v1f6vUFpAKC+3AsZN1Q+/6uDG2AeOCz52oztj4GacD+4k78mY/qOSWiXridvCENc Xn0w3Vj3d65EV8lXV+TLFopMYcR6vg7hEH+Kij783z/efbzLfqAjT9glgL2OabSMEfHv rrSA== X-Gm-Message-State: AOJu0Yz08ZDmP8xTm39hQAmjkOFlbgpjwLEdl5R6tE1AECzcOofsrc5j zbPetuRCZu3v/V16EnPWDkchwbXIDAy60w== X-Google-Smtp-Source: AGHT+IF9acRiBuXtnmdP/L/n9HR/N/T4L5LgnpFxlih/9JoSewFxrm6a2SEWXR9hKKXD5TJ31tIzlA== X-Received: by 2002:a17:902:7804:b0:1d4:e308:d70b with SMTP id p4-20020a170902780400b001d4e308d70bmr5104104pll.92.1704809073967; Tue, 09 Jan 2024 06:04:33 -0800 (PST) Received: from rigel.home.arpa (60-241-235-125.tpgi.com.au. [60.241.235.125]) by smtp.gmail.com with ESMTPSA id jw23-20020a170903279700b001d538b6517asm1818362plb.230.2024.01.09.06.04.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:04:33 -0800 (PST) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, andy@kernel.org Cc: Kent Gibson Subject: [PATCH 5/5] gpio: uapi: clarify using v2 rather than v1 Date: Tue, 9 Jan 2024 22:02:21 +0800 Message-Id: <20240109140221.77725-6-warthog618@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240109140221.77725-1-warthog618@gmail.com> References: <20240109140221.77725-1-warthog618@gmail.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The documentation contains notes like This struct is part of ABI v1 and is deprecated. Use struct gpio_v2_line_info instead. This could be interpreted to mean the structs can be directly substituted in v1 calls. Clarify that the user should use the corresponding v2 ioctl() and structs. Signed-off-by: Kent Gibson --- include/uapi/linux/gpio.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h index e68a56969f36..103cd3c6c81e 100644 --- a/include/uapi/linux/gpio.h +++ b/include/uapi/linux/gpio.h @@ -333,7 +333,7 @@ struct gpio_v2_line_event { * also be empty if the consumer doesn't set this up * * Note: This struct is part of ABI v1 and is deprecated. - * Use &struct gpio_v2_line_info instead. + * Use ABI v2 and &struct gpio_v2_line_info instead. */ struct gpioline_info { __u32 line_offset; @@ -368,7 +368,7 @@ enum { * at the end of the structure on 64-bit architectures. * * Note: This struct is part of ABI v1 and is deprecated. - * Use &struct gpio_v2_line_info_changed instead. + * Use ABI v2 and &struct gpio_v2_line_info_changed instead. */ struct gpioline_info_changed { struct gpioline_info info; @@ -409,7 +409,7 @@ struct gpioline_info_changed { * a valid anonymous file descriptor representing the request * * Note: This struct is part of ABI v1 and is deprecated. - * Use &struct gpio_v2_line_request instead. + * Use ABI v2 and &struct gpio_v2_line_request instead. */ struct gpiohandle_request { __u32 lineoffsets[GPIOHANDLES_MAX]; @@ -431,7 +431,7 @@ struct gpiohandle_request { * @padding: reserved for future use and should be zero filled * * Note: This struct is part of ABI v1 and is deprecated. - * Use &struct gpio_v2_line_config instead. + * Use ABI v2 and &struct gpio_v2_line_config instead. */ struct gpiohandle_config { __u32 flags; @@ -446,7 +446,7 @@ struct gpiohandle_config { * the desired target state * * Note: This struct is part of ABI v1 and is deprecated. - * Use &struct gpio_v2_line_values instead. + * Use ABI v2 and &struct gpio_v2_line_values instead. */ struct gpiohandle_data { __u8 values[GPIOHANDLES_MAX]; @@ -471,7 +471,7 @@ struct gpiohandle_data { * valid anonymous file descriptor representing the request * * Note: This struct is part of ABI v1 and is deprecated. - * Use &struct gpio_v2_line_request instead. + * Use ABI v2 and &struct gpio_v2_line_request instead. */ struct gpioevent_request { __u32 lineoffset; @@ -494,7 +494,7 @@ struct gpioevent_request { * %GPIOEVENT_EVENT_FALLING_EDGE * * Note: This struct is part of ABI v1 and is deprecated. - * Use &struct gpio_v2_line_event instead. + * Use ABI v2 and &struct gpio_v2_line_event instead. */ struct gpioevent_data { __u64 timestamp;