{"id":2230081,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2230081/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20260429074356.118420-2-herve.codina@bootlin.com/","project":{"id":42,"url":"http://patchwork.ozlabs.org/api/1.1/projects/42/?format=json","name":"Linux GPIO development","link_name":"linux-gpio","list_id":"linux-gpio.vger.kernel.org","list_email":"linux-gpio@vger.kernel.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260429074356.118420-2-herve.codina@bootlin.com>","date":"2026-04-29T07:43:37","name":"[v2,01/17] of: Introduce of_property_read_s32_index()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"5d1f58c14a93ea4db4a8413c9cbb722e03b1160a","submitter":{"id":81983,"url":"http://patchwork.ozlabs.org/api/1.1/people/81983/?format=json","name":"Herve Codina","email":"herve.codina@bootlin.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20260429074356.118420-2-herve.codina@bootlin.com/mbox/","series":[{"id":502009,"url":"http://patchwork.ozlabs.org/api/1.1/series/502009/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/list/?series=502009","date":"2026-04-29T07:43:41","name":"ASoC: Add support for GPIOs driven amplifiers","version":2,"mbox":"http://patchwork.ozlabs.org/series/502009/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2230081/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2230081/checks/","tags":{},"headers":{"Return-Path":"\n <linux-gpio+bounces-35758-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-gpio@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=dkim header.b=PIJvxGis;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-gpio+bounces-35758-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com\n header.b=\"PIJvxGis\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=185.246.85.4","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=bootlin.com"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g58WL1b7wz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 17:46:22 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 4C640307211F\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 07:44:18 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 6CBDB3A783F;\n\tWed, 29 Apr 2026 07:44:15 +0000 (UTC)","from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 189223A6EFA\n\tfor <linux-gpio@vger.kernel.org>; Wed, 29 Apr 2026 07:44:12 +0000 (UTC)","from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])\n\tby smtpout-03.galae.net (Postfix) with ESMTPS id B95AF4E42B68;\n\tWed, 29 Apr 2026 07:44:11 +0000 (UTC)","from mail.galae.net (mail.galae.net [212.83.136.155])\n\tby smtpout-01.galae.net (Postfix) with ESMTPS id 8D29A601DF;\n\tWed, 29 Apr 2026 07:44:11 +0000 (UTC)","from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id 5F4C6107294F3;\n\tWed, 29 Apr 2026 09:44:08 +0200 (CEST)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777448655; cv=none;\n b=KqE+Xu1VVFQQprYAcT3jqew7tGMq4/G34undhgFykzmPZXjO0lnEl6rPqyJg9Auc1z8jkonYv/Oa2QQwvj66IZLtQA5ucA2qWa7ghNRwUii96rb77vmDH/pfxYlb9ucXWqa9rhp0R9yRXAH4bru+7nTY752XBmVxP1aKVo1WVX4=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777448655; c=relaxed/simple;\n\tbh=Rec6tKdlrPie2YlW6IezIVTsdvPBR7mcFyVSswWMX0k=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=h5JmYF1MctMOwOoIhpkryuv8++Wo2/StJMrL6vddh2++FeI0G/GOT9JaQvq2oZa9vTkzdMsEMijE+3Y3WlodOo2GFz/Fc9AxH2yQ3dWSfqZSXM8RtwVNveIm1Nur7nAo12EPrYG6m6StEu+RKKUrC7svJZDw+ofA6y1BfH1EvKA=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com;\n spf=pass smtp.mailfrom=bootlin.com;\n dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com\n header.b=PIJvxGis; arc=none smtp.client-ip=185.246.85.4","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;\n\tt=1777448650; h=from:subject:date:message-id:to:cc:mime-version:\n\t content-transfer-encoding:in-reply-to:references;\n\tbh=bwLke4Yv7KiuA2B/0DRghtp6oBFzx2igNOWj+w+dOh0=;\n\tb=PIJvxGisdsGvAzSxK2T43Bmz8JUXirJtXhy7qRFGf6maQ8Kj2NLVxMwQ3xvjoGjHgZGFiB\n\tMrWY/QzEGDVqBcCDazRX1pA5blLqwEakIYLgOfcpq6i3Zz+y1YuPIqc3jsGG43RPHo7v5M\n\tQ0bdSIrHLkzQtxPN/uTJfS6lV8U7/0pDf/Z30w2kMHBjYtGTeruZVjUGloJ3TROn/1kSQ0\n\tzCqWggh31i/fHtzeIXhtGEXAJW5rYluUuUW1+USNnRa4IxCTUYGiqOQqiMSVX3AEKwhtA6\n\tJ507UAVZBa2f2EdtoYlvXgWAtOAN03mspjS/f4o9XKC2l7gwmfiRf9BmqviZGA==","From":"Herve Codina <herve.codina@bootlin.com>","To":"Herve Codina <herve.codina@bootlin.com>,\n\tBartosz Golaszewski <brgl@kernel.org>,\n\tLinus Walleij <linusw@kernel.org>,\n\tLiam Girdwood <lgirdwood@gmail.com>,\n\tMark Brown <broonie@kernel.org>,\n\tRob Herring <robh@kernel.org>,\n\tKrzysztof Kozlowski <krzk+dt@kernel.org>,\n\tConor Dooley <conor+dt@kernel.org>,\n\tSaravana Kannan <saravanak@kernel.org>,\n\tJaroslav Kysela <perex@perex.cz>,\n\tTakashi Iwai <tiwai@suse.com>","Cc":"linux-sound@vger.kernel.org,\n\tlinux-gpio@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tChristophe Leroy <christophe.leroy@csgroup.eu>,\n\tThomas Petazzoni <thomas.petazzoni@bootlin.com>","Subject":"[PATCH v2 01/17] of: Introduce of_property_read_s32_index()","Date":"Wed, 29 Apr 2026 09:43:37 +0200","Message-ID":"<20260429074356.118420-2-herve.codina@bootlin.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260429074356.118420-1-herve.codina@bootlin.com>","References":"<20260429074356.118420-1-herve.codina@bootlin.com>","Precedence":"bulk","X-Mailing-List":"linux-gpio@vger.kernel.org","List-Id":"<linux-gpio.vger.kernel.org>","List-Subscribe":"<mailto:linux-gpio+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-gpio+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Last-TLS-Session-Version":"TLSv1.3"},"content":"Signed integers can be read from single value properties using\nof_property_read_s32() but nothing exist to read signed integers\nfrom multi-value properties.\n\nFix this lack adding of_property_read_s32_index().\n\nSigned-off-by: Herve Codina <herve.codina@bootlin.com>\nAcked-by: Rob Herring (Arm) <robh@kernel.org>\n---\n include/linux/of.h | 7 +++++++\n 1 file changed, 7 insertions(+)","diff":"diff --git a/include/linux/of.h b/include/linux/of.h\nindex 959786f8f196..28153616e616 100644\n--- a/include/linux/of.h\n+++ b/include/linux/of.h\n@@ -1476,6 +1476,13 @@ static inline int of_property_read_s32(const struct device_node *np,\n \treturn of_property_read_u32(np, propname, (u32*) out_value);\n }\n \n+static inline int of_property_read_s32_index(const struct device_node *np,\n+\t\t\t\t\t     const char *propname, u32 index,\n+\t\t\t\t\t     s32 *out_value)\n+{\n+\treturn of_property_read_u32_index(np, propname, index, (u32 *)out_value);\n+}\n+\n #define of_for_each_phandle(it, err, np, ln, cn, cc)\t\t\t\\\n \tfor (of_phandle_iterator_init((it), (np), (ln), (cn), (cc)),\t\\\n \t     err = of_phandle_iterator_next(it);\t\t\t\\\n","prefixes":["v2","01/17"]}