From nobody Mon Feb 9 07:20:57 2026 Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.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 636931F3D37 for ; Fri, 31 Jan 2025 20:24:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355091; cv=none; b=txKW7csnJq76uleT7RZbrIREuzh0T9+yrIyDOeN2yH/pdJjeUXY5iZE2CA2NtlwFUYRIx8WGyDF9etbmJY9oY/vlOl698afi+dQlTp0T+E3Nxo+Uegux/UUeuHGnJZZor7ylmetfTF3o8mIQMUXvP84rdgZUStNz4JPvKJI+wTs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355091; c=relaxed/simple; bh=oe7N+J9cytrMnLNUSaM/Omiuuu90wAztekXP99d069k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ruy+VY6o/V1QDnmTj5/KNZaicOuKgc/gwisQ3OOSLNJSvle/lyevBcDue3vbsjE//fmV3Q+g/cN2KqJilvFAXO2zocQGq1nK27PQKYlbjyIWK+usb48aVG2Lu8osu5wCwI37dm55tn4rdqanrX55S7/r0Xvudr6wjEAffJe80uw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=ueZMN8Jw; arc=none smtp.client-ip=209.85.160.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="ueZMN8Jw" Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-2a0206590a7so1322859fac.0 for ; Fri, 31 Jan 2025 12:24:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355088; x=1738959888; 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=VExoELcV8x0LQmV6C7xp1BlVeCvht+mgfIMccHi3FPY=; b=ueZMN8Jwvfxq+NQV2mO6jeS6cQV/cLFNjN5CTUYEa6sBTQguN+LLIxjtEH66QaMmTv XaCz6U/OOKgomm2+nMFBh3Jq0MDvqnML+yfPSg+9kiIMSTzypHAweQ1bYTTu+3SJrcDL vZylBg681V64dP87Wuzi78d0D7c2GNNuGOdiHWrZAluukTm3GzBeMn2N9Ghv2m+O3Hbm ZKkFmBJjdgeHQCcdgi54aa/LExPrwHyI+pTx+2dIovWscRu/P8n7+X/MXpEQENZjzJy3 cr4AVI8IM5sgwc+kmRMXyAXLwJS2HVPbD2CEKjvnhbEYUC/k4CnpdgzfO9JddltaCvwo Jh5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355088; x=1738959888; 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=VExoELcV8x0LQmV6C7xp1BlVeCvht+mgfIMccHi3FPY=; b=LJQJff7d3AITWTFC7b64Hb0B268BnOMe0xAXac21PxRf+HMVA79Wu7zeJtCiE7jQDh 2YBxCPfSng+cU3ki1tIac0t8amiXVG9QqEHOysdz/WpK9U7gsn8kJucsW0l7WnSZvga2 7Vxyhqp4dfXpuEMwhP2KSB5CIVFaY5jYyp/yhOJwFWFqRdk9Kh4b5vcWbhcWhsmD/gEO yoQwjqrgDhT8DlhJF26dZORigbFcY6VFUkClOmfD9vBSPaT2Ft4eSiO2zhdbQovHTcIH bbZu9SGR8ckjqMJUo/PJ71V727W3tc9RW0ahq1tpSlKVWOHkXZWHRgGvL/KCV5MV31ZB bAog== X-Forwarded-Encrypted: i=1; AJvYcCUMLgxOZ8l+j/+cCCR0nWWkWkpvL2nQCzXEbOf6VejRlXpZiKTQktCD8HPJ7yZLoZRIVYS1ftxJKfQOxOw=@vger.kernel.org X-Gm-Message-State: AOJu0YxUZ0AF4AN+TQ/3rZSzOAsCcvJNYTsXlBKb9cLy9mWRnEYvSm/i qbWdKSIzREmhL4/VjIUMoCg2HhSIw4DtLlJara0VLGLs3pnkoRjmr+TP8V6pErk= X-Gm-Gg: ASbGncvZKUe7NhDDToNF4yINWxNec9sitJ/zTaZWUouQzzP2JV0yE48XcYrpM/jMz0P cImRBvkkydmcy7JwRzYDuhfGgYvWH76yiuMw3c7JU8mU6WLLE5qu+lx2BJWfvwFqAQ+Mp4Memt6 vLbVqLPRIPY43Ur7dFDe32CR4VSVSXkuVwFfsuGpTUKUwkDckhTjgsOO9pe7Fi2FXaPzC9YoHW/ 7IG73Zp455pnUwzCnF9GcxCwWqeXeyweQo583llG2Fwow6Kq5dqPBGmndZ81El80OMTf3mntf9I gG5/DsbNpd9RO8Gz75tQZlOKAJlDP5XdWfMwiYfYp6pGFUg= X-Google-Smtp-Source: AGHT+IG48amD1C5d4QahkI7FJNfsOoMi2CtgfNG8+gnzn0CcyJBNzM/PkTQMiDNqV/T79ZK3cKZLjg== X-Received: by 2002:a05:6871:a012:b0:29e:5297:a2a7 with SMTP id 586e51a60fabf-2b32f3ca389mr8811438fac.30.1738355088436; Fri, 31 Jan 2025 12:24:48 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.24.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:24:47 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:41 -0600 Subject: [PATCH 01/13] gpiolib: add gpiods_set_array_value_cansleep() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-1-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Add a new gpiods_set_array_value_cansleep() helper function with fewer parameters than gpiod_set_array_value_cansleep(). Calling gpiod_set_array_value_cansleep() can get quite verbose. In many cases, the first arguments all come from the same struct gpio_descs, so having a separate function where we can just pass that cuts down on the boilerplate. Signed-off-by: David Lechner Reviewed-by: Linus Walleij --- include/linux/gpio/consumer.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index db2dfbae8edbd12059826183b1c0f73c7a58ff40..1c9bb3cb1ee80fe52aabf5bd24b= 1d128eff2bc99 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -655,4 +655,11 @@ static inline void gpiod_unexport(struct gpio_desc *de= sc) =20 #endif /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */ =20 +static inline int gpiods_set_array_value_cansleep(struct gpio_descs *descs, + unsigned long *value_bitmap) +{ + return gpiod_set_array_value_cansleep(descs->ndescs, descs->desc, + descs->info, value_bitmap); +} + #endif --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (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 7ECCE1F4266 for ; Fri, 31 Jan 2025 20:24:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355094; cv=none; b=d1tW7kOtuEvoNdHV4csamYGSDy/y0DEbAiNyLbE/UzIdCb79rjpsZVySMuQSi6m7AQGOLEITMAkA1cUwBM9SAIgMoM2Fl8kKHQZ/UuRLYvjkRnIcRVy3OgHy+y8mLyvGZP5R8MhuV7ibrlR3OpvnAaReh07bvEdQkbfQqqMb2pM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355094; c=relaxed/simple; bh=rw0sTpvokUQNOxXktkwUiVgyBWFEQak6z7kbvwC+d0k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YsdBzx7bFOA6RWuAvn9NxrNZ0MQrgsBp/zgoPcs/HQwypM+iLs4WRbrKAORTLU5YUciL0q2F5cPGajLUTVYQSr5WRAu9rvAXLSiafb05tKRfyZ07hK4ReIt+p1EGWbsXmDknD6wdna2fiAyZM0653kcvWvrcTTmDkpWnHOmDgCQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=ig2spnB5; arc=none smtp.client-ip=209.85.210.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="ig2spnB5" Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-71e15717a2dso1266636a34.3 for ; Fri, 31 Jan 2025 12:24:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355091; x=1738959891; 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=8Y1Uq2vC9ngxtabj+o6Gf/0MmnPKx34MFqyZVe1ZJHY=; b=ig2spnB5ORsHBPO9Y7nXycafF0XrCNtyHpbBQiJlFhRCJzhD+P63NHG7Yc3+rie4wo Mr917YqOD9SDmep54TVk1MQRWPTZklSbZHJI0otG2bBK7sL8CU+OGhyYSPEut98gL4Am /OamnTc89XUpnCD9s8nMCU1Yp2t50dPGzeYwrwj4B0whOWNhTdqOgAGsfB57FU3Q7ibZ +D2hbdgSPZW/fxOr2hN2CCrhN6U1bEW+MkJXEhvm7iZ0xdvgqfME5m+uCnNVxhEQEJMH Lx2W6FXmvSWHlwbKU0a4TJ/gjeqx78VIr5vzW4+lr6aucRQxdzZvzXh+n5sjyaEunDVz 5L8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355091; x=1738959891; 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=8Y1Uq2vC9ngxtabj+o6Gf/0MmnPKx34MFqyZVe1ZJHY=; b=krgXv7CBRxpC4U290q2me/cqVeacA6YUOgsvtQojKnNIL06pQFZl7+hcZq4AY6EnUO o4FS67m8Aqy0wudmD0Tz405UIG23AU+toTsvsMyGsSkbUxcM4sdWBapvNEfukZU3tead RSib5wnNYHwAFo221/KRnDPsymWgdbQpBLfFt/AQiNP83qDgWQB6++iu580Pf5jKeT99 USw2npXV5Is3HnPgM0T0XHyXd273XzG5nR+N9Xi24zHbIj2ZW+FE1vABGBL3kGynYHcD 9B9YUbDFy/NWp0MfxtS/YixsrhqiPbhmw6zzSKXDI2FizIdINMTHmGJg6hbKDyN9i1tN aSxQ== X-Forwarded-Encrypted: i=1; AJvYcCWtUebeqL6kw7eixQl9XVU4/eddWY/JLhsLnUie5P6i1Z49t68Km/b5Fjb2sTDjitcxzCAoJ5Njs9XUg7w=@vger.kernel.org X-Gm-Message-State: AOJu0YxNNQu4Q31/WCK+Js0mW7cQIY+//NrvEIjn2aiBZBwkPYeHHgol FNt/35YNRzPsLTFVxOj3NjS2bzB1S37HdZNcCKZ1uoVzhPJvEPF0v0nwlTsZ6e0= X-Gm-Gg: ASbGncvcBnWxPdw05MyHrjbW+oYr3l3bz7T2VNgUwrqUq9JEBHn9/mD/dhcudAKvo/s 2Qs3OAbINmBlSit1t9yfpX5y6beB8Ky2qD5/OtnHup0uw7pE+xwTxK3KPdrqDFtqFd4wKyE2OYh kKmxU9d/IVmtIta3E48j6hajkpIaV32lbxBWUOYCLifIa46CCDRa6VyY3uFyk9kC/L4aKFiAioi 4KFWrXprXLLQRoaKagvbTVRXvJ2Jb4InKMmBnVpt90yJFKdA1OwTsrKW3ESfO/mTUjsePQvf0Lz iwFWZSMoOStQvswfpGERG52vBqp65ljXuLrY9R5b9SQx2mI= X-Google-Smtp-Source: AGHT+IHpL9OiC+7p99DGjWrddY5GvJC4qVZT5ABdvIbOzG8MeWG3IwFdHaR/KYiBNOSR8xIQZbb8jw== X-Received: by 2002:a05:6870:ff46:b0:29f:ecfc:32df with SMTP id 586e51a60fabf-2b32f02152dmr8447581fac.14.1738355091503; Fri, 31 Jan 2025 12:24:51 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:24:50 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:42 -0600 Subject: [PATCH 02/13] auxdisplay: seg-led-gpio: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-2-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value_cansleep(). Signed-off-by: David Lechner Acked-by: Andy Shevchenko Reviewed-by: Linus Walleij --- drivers/auxdisplay/seg-led-gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/auxdisplay/seg-led-gpio.c b/drivers/auxdisplay/seg-led= -gpio.c index f10c25e6bf126cfaac3e4c353f8bfc6639d94a60..c158b2c2827415e75d0b122914b= 8b18c043e8c76 100644 --- a/drivers/auxdisplay/seg-led-gpio.c +++ b/drivers/auxdisplay/seg-led-gpio.c @@ -36,8 +36,7 @@ static void seg_led_update(struct work_struct *work) =20 bitmap_set_value8(values, map_to_seg7(&map->map.seg7, linedisp->buf[0]), = 0); =20 - gpiod_set_array_value_cansleep(priv->segment_gpios->ndescs, priv->segment= _gpios->desc, - priv->segment_gpios->info, values); + gpiods_set_array_value_cansleep(priv->segment_gpios, values); } =20 static int seg_led_linedisp_get_map_type(struct linedisp *linedisp) --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.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 C28C91F3D4C for ; Fri, 31 Jan 2025 20:24:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355096; cv=none; b=QdcJp3qsChv2V2Yao8fBE4ZGttRmJt7ZdkZo83dX/195rK6Nr98QRAM0mwhRt+w3s4GkiiyscZwyvlyWjPtxz5NlFOhxUGfvmoRqgx5V3EhOUR1MeZd7ZOYcoYG+EkvA53UUuPttQfeZVunTnph3DBS2bJZ0T+LlSGXu2M65bt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355096; c=relaxed/simple; bh=KSnpvBpYf1I2zTKJ1PQkgSeFWmdqfKH1K8H306V9HCs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iRXgZeEnDDfEqg2ypusxF4xUoQ3wm19i+AlquhF61RGtq0AqBBQLCow8TNKUOIganhYcRv+e2iP5KFf3kOP83Hsdj/UydOJSCq6SkUYkeQlMJyZge5QxvcWSR3k44M5V2AjKZHu4aQ9q8fhipWIXNwe4Q3uoEndcx5dL1vYVPxc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=kHPWQe4x; arc=none smtp.client-ip=209.85.160.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="kHPWQe4x" Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-2b3680e548aso934575fac.0 for ; Fri, 31 Jan 2025 12:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355093; x=1738959893; 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=g/d91jflGtqcHyVEIBk6nu4SgcmlMkVjeTIYU/X9iWg=; b=kHPWQe4xfcF8hLtkR73pCTnp9JC2Vm/ElpZTPXHBFENS4iT24APePUQBTkbV4+bEA/ 0RhMD7TIunoXPctqU2fPlCrGa3VuP1xVpfET4CmlHHA1RSayvsnIsckNhUuiwUOXGQmV xa2xA2Ch6zTxl5kOtM/fsVWxGbOJ2n9EuIGsxWawKEj6TZ9BneYxeOYrFCRo5FzBVbX8 5SQoMARcWE3CvFe+zbojReetgvJiknmmYk+Vzq++6AX6SkxKURkZKOduwIkDOp1rr46X A2gNeYU0pPxNBBIic4gouY0tM+GFGx3F/Id9f/o9Qc7JiUnW8AEMLqd+xt41yWYjYJMg VJSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355093; x=1738959893; 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=g/d91jflGtqcHyVEIBk6nu4SgcmlMkVjeTIYU/X9iWg=; b=X77cVuQcTWqx/8/C3ftE5a186V4oJNXd4AFg32RpPvC+TsoyyiBViNn1Pz4TzabtZC epZUVTz6FYPUCTFnT+EQALrLqgFEoay+zllNfqxvO3voCe7dWeFMCrrmD2cmmQ2Lw1vK LpCweh5DQx6YV6Cl5z/bi/TnCTRYKmiNPkybXarAgSPLPKWZUgo6EJ01XRD6aide3Jd+ mAx9haY8CkGGPJ9y5NTauVQN/EznuA/vAHcpSIAdw49O4Wz5biJ9W0a+vSTAZQscAI+H 0tJufazZwysgnMw06JzRsfUpPz/PWJw3oMVLGG+G2OsOkKjYNTcsgX5q0Cn0hOai5SgO nEJg== X-Forwarded-Encrypted: i=1; AJvYcCVKEWWosUmLC+PP+Ul/Y9U9LJY8T5+gfg8wqnJPTKPBjgW7qfIEYfGcvidF825C1kPE1350wR7z44OvPeg=@vger.kernel.org X-Gm-Message-State: AOJu0Yz/aiVdUzNsxNTHUfkVSoCyrocFKA9QrjdpsD+RRlZusXl2zDwg Wth2RbB3xf3EsPjQn9HZ2AgyV1INTxu7Xh5H5kPSlPCkZ1jeXiRPTQALwmyNYqs= X-Gm-Gg: ASbGnctGzvxrmDNn6X8qcmdNPx5RizmDQVYGIQpTSZY56wkaCZBmyk0l0a/gpkjc515 YATficQth3/abnuKZU4mKiv0vj//zJhABHl0nsdD5owXdR/baRpoepEOXcUNqcfBVB6ggDP68wS rEP3JjC9nUi21cPniodXEujHFGRUZBfySSOZnFrEQzIcxZCbnfcQmqSZNloPlzafNdfdXJe8cd7 mDDjpp7orJkpBexKZuhG3ZH4dN6qgbhpd8WYJ0b0Z8Razg/kCTMSS5bqF0q7vBI2ec6pzhjmxsd 0uXtxDCsPQXaA+x0cH+bgvqNp8A4fRnP0H4LJIa3e379Ewg= X-Google-Smtp-Source: AGHT+IG7MwrRorXxkcWjIdgGK+4mzXkuq9AO0FFEdnZrk7oRmiSNnPUZ/DfqxHivj4lEixFczChGQg== X-Received: by 2002:a05:6870:d1d0:b0:2ae:d23:3c2d with SMTP id 586e51a60fabf-2b34fe99372mr8034579fac.8.1738355093684; Fri, 31 Jan 2025 12:24:53 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:24:52 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:43 -0600 Subject: [PATCH 03/13] bus: ts-nbus: validate ts,data-gpios array size Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-3-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Add validation of ts,data-gpios array size during probe. The driver later hard-codes 8 as the size of the array when using it, so we should be validating that the array is actually that big to prevent possible out of bounds accesses. Signed-off-by: David Lechner Reviewed-by: Linus Walleij --- drivers/bus/ts-nbus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/bus/ts-nbus.c b/drivers/bus/ts-nbus.c index 2328c48b9b1260e805c631f2aa7379d620084537..d3ee102a13893c83c50e41f7298= 821f4d7ae3487 100644 --- a/drivers/bus/ts-nbus.c +++ b/drivers/bus/ts-nbus.c @@ -48,6 +48,10 @@ static int ts_nbus_init_pdata(struct platform_device *pd= ev, return dev_err_probe(&pdev->dev, PTR_ERR(ts_nbus->data), "failed to retrieve ts,data-gpio from dts\n"); =20 + if (ts_nbus->data->ndescs !=3D 8) + return dev_err_probe(&pdev->dev, -EINVAL, + "invalid number of ts,data-gpios\n"); + ts_nbus->csn =3D devm_gpiod_get(&pdev->dev, "ts,csn", GPIOD_OUT_HIGH); if (IS_ERR(ts_nbus->csn)) return dev_err_probe(&pdev->dev, PTR_ERR(ts_nbus->csn), --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.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 9D82D1F4E40 for ; Fri, 31 Jan 2025 20:24:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355099; cv=none; b=BcTu+il+68jswitsrqeBRK6RDt2/hX9fzsxJqvZGtB3Yi06N4Cr2y+NuiM7z/Yz/q86vMLTauv70SLM5LEkEbXndS6VcUBZOEAI1F4xDVw4u83rDtm9l6kbSw6wnDKh0pr+XEKHcGFaPI5ArgSBTmeD/m4hDxM0p3h4MUTWqCS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355099; c=relaxed/simple; bh=YRrA2gctgtC9TxPdq1m76F+qrw6XgkoDj0DtVE83Qk0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ka20YwXyfBb+AuLqpwKTzekzhFr9F6IL7DGCficfcuycHN5yCXjATc7FRfI568hojhEuORvni4y9VLVzAw0Hbi50j/V4e7FlrI2dZr6RWCczIZ+VmKLK4BbPzKWrFNyl7UIoPPQi+spMkapFdn3RF16a2PdoMVI+AGo+4B5OY64= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=NDdrGTEY; arc=none smtp.client-ip=209.85.160.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="NDdrGTEY" Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-2aa17010cbcso994377fac.3 for ; Fri, 31 Jan 2025 12:24:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355097; x=1738959897; 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=9hlyYXLAXkselsSNF7g0Bc64z/LNWZ956QqcL4gqDjo=; b=NDdrGTEYz2np6Cl9evbzZyDhI/48wDzwH/V/o9jhCus8B4Itu8rtWCN/G175aqpP25 3eN2VqFSu9aiy1ZSMHmmLkptNDCz9pnbscxcAVeVAAo06WrBVIdJpPMOJm5BBI8FDoqK Eltr9akLCmJcgQsHWwlKFWyNKrPq/TobSsUsiKO7MfKwJYJ13K+JJm3yuB6SD04pnKCx X6o8+4mlL90DOWZMwDwgmw+TIt0jiDjrtPdJpGiQgPObMN8rKQdhwmE5e5B8djmy85YE 2MPRUnZ2SDn0IR9qnz+NMVojogLOoy2OvLOg6eKcXggazySkyKDBDiMcPFstObe2681I XOpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355097; x=1738959897; 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=9hlyYXLAXkselsSNF7g0Bc64z/LNWZ956QqcL4gqDjo=; b=hIlLQewKn0Mcp+pEHVf/zgG251y1mbXaKPLdEcoa4eHkesZ88u9MxlACExLCSEXomC UiUylJZy4jASTqm0aOiC2B18rST2LemlsqXmP+0lECHIUwcA8FAjIzEJDX3A/QLc6wFx f2TbYHPGqlYpdrTT//nKorsewRqHDrxt6YZBGIjo/NgT2y7offMZbl0LiwwCYubeLUTA 3QY9ebdngzAb7aRBkYge+imQwr9qWXyoeRb+F1BdAtumhMRrOq9tDRQxQsZDovgJypww HDtcVeSXSz7XiCe5K18P3cUKKxgvtGWYm2eebJ2p6nQGXZtUDUmWOMICaCi0p7zTUYCV zyyQ== X-Forwarded-Encrypted: i=1; AJvYcCXR29xch77YBexJtop/JnSX3WiU3yj/5zQqnPlGDrpZVLklA1gm/OJmFmZrr69rG3RbvtlG+FU+JBdcbRA=@vger.kernel.org X-Gm-Message-State: AOJu0Yyz0XkzpHY0dvrq1p0tG6xU4SISQZX7yCk8ap3JxHDN/95vZ/cc zYq3o1JXpFfpsSkVYv1WWdCChNM9JLR8FOhIY6T0TnJ4eAy0/pBFjVwLZd91qTc= X-Gm-Gg: ASbGncuSJFYz6ziI7jc8qewcxttnA4Y0ae9B1+a/T8hIXRsi1m9EyjV73DdRMh8Kwe6 5Xxxy0b0vhD6gkvdDEIeGJDeJfwLxD4sDndq4NAldqA3vsAcqO9dgRip12H60NgojeCCdNqplCl rOml9Aq3CWtwmoSZiC5K4oRz1dIQWCbITyC/BrEYOScvos5/1qLpI1eJbIPnjGx4THNSPteuf70 PD30U87qg4WQeWKEDaO+6zASyUaxDucGztUDWH32uwWo6KA5oMTHDWX8RIvMzQUiZtXO5wSVWnT Go/jNyM/CDeFDNmsZHi2uiyl9kt2mk5ufmi3p8CeOctxCos= X-Google-Smtp-Source: AGHT+IG22JJZ1zoEE08gl8CxgOf30mezmJIUs5PEqf+3dMT59zSIuFvgdvLgZxy1Rl/Rs71gFur6Bg== X-Received: by 2002:a05:6870:2dcb:b0:29e:6647:1080 with SMTP id 586e51a60fabf-2b32f07b26bmr7733897fac.21.1738355096771; Fri, 31 Jan 2025 12:24:56 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.24.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:24:55 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:44 -0600 Subject: [PATCH 04/13] bus: ts-nbus: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-4-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value_cansleep(). ts_nbus->data->ndescs is validated to be 8 during probe, so will have the same value as the hard-coded 8 that is removed by this change. Signed-off-by: David Lechner Reviewed-by: Linus Walleij --- drivers/bus/ts-nbus.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/bus/ts-nbus.c b/drivers/bus/ts-nbus.c index d3ee102a13893c83c50e41f7298821f4d7ae3487..31ae9a26257c3e0af2ba99666e0= c04e882da935b 100644 --- a/drivers/bus/ts-nbus.c +++ b/drivers/bus/ts-nbus.c @@ -109,8 +109,7 @@ static void ts_nbus_reset_bus(struct ts_nbus *ts_nbus) =20 values[0] =3D 0; =20 - gpiod_set_array_value_cansleep(8, ts_nbus->data->desc, - ts_nbus->data->info, values); + gpiods_set_array_value_cansleep(ts_nbus->data, values); gpiod_set_value_cansleep(ts_nbus->csn, 0); gpiod_set_value_cansleep(ts_nbus->strobe, 0); gpiod_set_value_cansleep(ts_nbus->ale, 0); @@ -150,12 +149,11 @@ static int ts_nbus_read_byte(struct ts_nbus *ts_nbus,= u8 *val) */ static void ts_nbus_write_byte(struct ts_nbus *ts_nbus, u8 byte) { - struct gpio_descs *gpios =3D ts_nbus->data; DECLARE_BITMAP(values, 8); =20 values[0] =3D byte; =20 - gpiod_set_array_value_cansleep(8, gpios->desc, gpios->info, values); + gpiods_set_array_value_cansleep(ts_nbus->data, values); } =20 /* --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) (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 D3E841F5415 for ; Fri, 31 Jan 2025 20:24:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355101; cv=none; b=e1iqrgPtxdWHo+NCs+AzP0Cs6QLNEyD3nFzxHkC67NYMKCaIfBbUzVtx6kNyA5cyvi0jULwKz8Ouiipm6rqM1q+846dXg2A+x2KL2VkSR5dygln2fIZv6nwoZec3HAoFRGDd1rwcy3j4wSl04lnVC6Jsp0bVVQ7agVIbXaTGk1c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355101; c=relaxed/simple; bh=Y984jgguFlZIBOThWuuUJpuuUbC3lQREEzsrrqDNozE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tXjRIWSdwHWvRUmByrjuQBc7SUfAtKyHGqmganbUaxg/7sJm1t+LHPZECjuB4m4F36vUOIc7zn6w7F5dyurMUZUTlmh65OLrEBeLc+7/URHZDHW9E3+Sgu7cxds60CvPppCi7FxhuMbvAJZVilNg6710nFU5MGIq1aGIKCVsDfM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=g6MnSnqm; arc=none smtp.client-ip=209.85.161.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="g6MnSnqm" Received: by mail-oo1-f43.google.com with SMTP id 006d021491bc7-5fa8fa48ee5so689738eaf.2 for ; Fri, 31 Jan 2025 12:24:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355099; x=1738959899; 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=o0JxocTLtlGRqW6c379kuZnM3hX6Je635Dhf0CbFSJY=; b=g6MnSnqmPtos+/Hg7bCHWyJKjyq+TDTZqQp7OZrONvvlcKC/VYH7QgztlisRLGBmdQ jghEuXFMKrOniW4QAFgqAQCOipaZgdbpuJ2O4hEfYH6TL1LPD66bsT8BBIUmC5cK5oXY a3WzaqU9TOr9tJbZlFvfxYd28mIK3gM++T93/iSK0iFNb/wyxXP5FCzwszwhwIwkWzPF Cf7b4jyXBl9ahw4wJ+Dwp0erV/pFzP6ulzDkKc2WOMQkoWqUs0lv6OwYa4WGFYdXzh04 EW1bOG18E7VCvYDsAEcFi3H4hFINROcY5yuREBrnlO8RR+FZ0ZCadWx38i+EYlzpnau/ dkSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355099; x=1738959899; 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=o0JxocTLtlGRqW6c379kuZnM3hX6Je635Dhf0CbFSJY=; b=KR9P2S7sJNfRUwVDqTaLv9b/HQX5vkGoamKU7KImuhP/hvXy4vS3oxEfVGVG6Yh4ZC 1DVf5qeH6iY8kDMoZRFuQRUBNs8ER0ERqmkkM7f2yVmChXAexBBznQ6/15/jgASxSS/e ndBu5YeOCiD/nLg/v6pE1Y2bQCZ3wgWvgxmOtiDw8i+a+GMu+a44+vtbqPek/unIA44R fKhaHR3Mg8lF8OyOpHiuG/+JFk43D8/0c0a0Si7cY2ugP4VZlrzEKm5bYmXHQQ93NG10 9kexNrN0PT62tTwYgsUKfb50yir2mxEAtibQReLN3kXk1U9t+dUxiT0zqf+JFdi73vIc 70ag== X-Forwarded-Encrypted: i=1; AJvYcCXxx2P985PiXFn4PhbtmQuEM1fC/y1wM8VQKPuwG0LtS6ye39PtFOHv786eRr02Jc0Kc2P1zJwD25pYei8=@vger.kernel.org X-Gm-Message-State: AOJu0YwtARUvgZfY3wNSVdaijBEThd4Ip2zcSgQl2LQnVieRbzntVvGY pEC/qiPHRxTuNmhx4jMIHquP2mWBW03zDDEODeogQEoGKB/knAYf/ogIAurgnoo= X-Gm-Gg: ASbGnctTpX73V7DjTRGVBhem0n3k0Hl9R8oWFPy+/Ccb5v9gQ6ex/Pzk2Sf7WJqVEfz IvIamQxQDkVpj+TsUhEhE8Riofd2ajoIvRyffzB0XIKgLb2xZ/ZQK/xtb9J5vM9Bjys7FcjpQrd yFD2LDbIS75IOArSR00fuy969aLJkGKShlY4DEGZ1RhDfP4Ft4YBbS+Of1msBqrv99g/srmiq9d j87i002vCcnF53Ncf34Vd5KHGsvWA+fwvhnzPcUUjND/e3OcH/boErSTL0cnWB9oP5JUGsXUH0n c+QEJh4pbn9N7gt4JVcdJNiloAqVi4xBqpEjqyAFw1Vjal0= X-Google-Smtp-Source: AGHT+IHLLvw8v92D1IAdlvToO2DW44SjM8+FGXyX2n6gPI7BbY77buvq2CWQaGC5P0PVhdqadGjO1Q== X-Received: by 2002:a05:6870:948e:b0:296:beb3:aa40 with SMTP id 586e51a60fabf-2b32f350834mr9144614fac.36.1738355098867; Fri, 31 Jan 2025 12:24:58 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:24:57 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:45 -0600 Subject: [PATCH 05/13] gpio: max3191x: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-5-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value_cansleep(). Signed-off-by: David Lechner Reviewed-by: Linus Walleij --- drivers/gpio/gpio-max3191x.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/gpio/gpio-max3191x.c b/drivers/gpio/gpio-max3191x.c index bbacc714632b70e672a3d8494636fbc40dfea8ec..fee8dd2bd3c9eb7c06817430634= eaf905cc9cbd8 100644 --- a/drivers/gpio/gpio-max3191x.c +++ b/drivers/gpio/gpio-max3191x.c @@ -309,23 +309,21 @@ static int max3191x_set_config(struct gpio_chip *gpio= , unsigned int offset, return 0; } =20 -static void gpiod_set_array_single_value_cansleep(unsigned int ndescs, - struct gpio_desc **desc, - struct gpio_array *info, +static void gpiod_set_array_single_value_cansleep(struct gpio_descs *descs, int value) { unsigned long *values; =20 - values =3D bitmap_alloc(ndescs, GFP_KERNEL); + values =3D bitmap_alloc(descs->ndescs, GFP_KERNEL); if (!values) return; =20 if (value) - bitmap_fill(values, ndescs); + bitmap_fill(values, descs->ndescs); else - bitmap_zero(values, ndescs); + bitmap_zero(values, descs->ndescs); =20 - gpiod_set_array_value_cansleep(ndescs, desc, info, values); + gpiods_set_array_value_cansleep(descs, values); bitmap_free(values); } =20 @@ -396,10 +394,8 @@ static int max3191x_probe(struct spi_device *spi) max3191x->mode =3D device_property_read_bool(dev, "maxim,modesel-8bit") ? STATUS_BYTE_DISABLED : STATUS_BYTE_ENABLED; if (max3191x->modesel_pins) - gpiod_set_array_single_value_cansleep( - max3191x->modesel_pins->ndescs, - max3191x->modesel_pins->desc, - max3191x->modesel_pins->info, max3191x->mode); + gpiod_set_array_single_value_cansleep(max3191x->modesel_pins, + max3191x->mode); =20 max3191x->ignore_uv =3D device_property_read_bool(dev, "maxim,ignore-undervoltage"); --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (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 EEAC21F55F3 for ; Fri, 31 Jan 2025 20:25:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355103; cv=none; b=Aer1s94r62IwLyVdHgi05tRMQv1BALiVs+E/3cpJdjVkTCFI03lqBfgWxCOeozjs6p7wKZxY0/fEIV7SzLqJR3cycXlocLysPlT14Qjh2Kfo+BK7XHZ4n15b4m2MGtmi438B/RA4rJSzD6DRr1QKgyVE2YLxLTGqQlYtfHwg9nY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355103; c=relaxed/simple; bh=9/jQiweV7yB0cOyjEzTaktkYDTP4ZnpLC0eY9PbXQiI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jFhojSIAQIWOYFgaonqp7jXqS7bQH0FZZtaaTeqZibz89eVjfgepHJkjeBc0ZP9zmTsaz7LRUEO36QOPHGK6GTctwqoq4d24mVQDOnWWjVVcQ2u70IyzAW0m3s6C1TfBMOOCtJEc5AaYgBWapUAXcU9sUdMG42UKpoXvFOKTGMI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=dPOQXsl0; arc=none smtp.client-ip=209.85.161.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="dPOQXsl0" Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-5f4ce54feb8so1270255eaf.3 for ; Fri, 31 Jan 2025 12:25:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355101; x=1738959901; 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=HLsz4+tHpjKqe9Yh2fzFcV0a8GzDcsWx5V/eyXI7CsY=; b=dPOQXsl0jyCRKlP9OZrbnBzIkog9S7YDFa0F4xmuWXBuN9tnRHwd2YqfZbpjURjHM2 qotZJvpGyyYMyW3I7NxtrwidnoXp9GUZspNWpvTUEjW5TY0uzG27gbKE3jqVKVXaamVV c3sCvAtI2fBkvD/jRU1HabsdnA1biCTUsxXzorz50dCFKhTEpAK7eWVgdg3z/364Dc/n GB4Kx4b6/PU/kvEOEgifO7TlOvvbLhze+14A19IMqYf+IbZn2EFAvoebHmjnrwFQBsyG 0o+mH2KgOAiIG552xnoZDlO3DmItar2Vq5PY90p38uXkikPoSt+v2xaj9hwtSwmk3p8I 7QHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355101; x=1738959901; 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=HLsz4+tHpjKqe9Yh2fzFcV0a8GzDcsWx5V/eyXI7CsY=; b=sQN6AN+duQqtUlvF8Fph4YMpc+P9j/QlHtO5nEC6ZhEDNzQCO/Lr/jPc805EPZGMx2 nsqhs0VeSZYdApaZVO6zFavJ7qyTH3xoQMykk1c9ihqvHN2hfyg19+VZGvkEasOEOAnt zUcttbLUxZRlby7FQQH9f7//MG3lS3ByUZSWRedimwKxofxdyvh/5WLXkOa9vSLdWcyq Jf19zRrLZ/qzqiAKJeq9Clx7Q1kJJtxH3HtMglTg0LetlLM7oCt2QYvrkcxyQ58mVk12 2A8S0E4e2CVWLt7KOm9GtnwCL4Y6CXMmtHX8wYm24lJqbgg0xK0FKL/zSpRdOfv/Q7O+ VkyA== X-Forwarded-Encrypted: i=1; AJvYcCVBdwCfVxTdUPMymqRUvy6E7Ec+An8nl23JSZQPcZJZmG6qyivLWITuYQXEvp3D7IDOCAeJtcAqR3RAXgo=@vger.kernel.org X-Gm-Message-State: AOJu0Yw4g/VFnDaGO7LIkdxhD8arKcAGpwK79dmFa3zz/lQq6pl0ghhZ 35X6o5FzQZYpXqvpSINicWj4mySsfuUxis/tt4PEsjHPi57rEgm6dFHgJHB05lg= X-Gm-Gg: ASbGncuiPN3rg5NSYHFjptdzQIVCGJwmtPHbW8bSTqV+RSytberB/n3gACMyATa5LFR HsrBZXQdCR9FBdCG52PTIFtBiNWC4Oq0Dh4pJZ+rivC9/0Y5IFlPlxquzJtVkVG/3I8eCiWjWZ3 y8hsUF+FZ38tuocZNmTjcFyDDBk8GHzRsYr5BeZDGYbpk9wji7l7rrOvbuKO4wzbIUdsPeX4qiI 1GxkGCkVoVmClDcvfU6CZup8wuFW7lx/mWt/M9sj4aQPBI3W7TjeyokJ39W7q5rU4SEcgnOmd1+ e1Ud9/zZXJlzyc6ekClW1qEGyIsxYUNnq8kNFKWiJ1iM/Js= X-Google-Smtp-Source: AGHT+IE0gOiKruiwKZS2fVv0rrPSXfEcYE6NWhi9xtJKoPa0qd12KXWlAvVzsWhUG+e0SGLuDExKGg== X-Received: by 2002:a05:6870:702a:b0:29e:6096:c25f with SMTP id 586e51a60fabf-2b32f0bbdf3mr8023505fac.23.1738355101014; Fri, 31 Jan 2025 12:25:01 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.24.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:24:59 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:46 -0600 Subject: [PATCH 06/13] iio: adc: ad7606: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-6-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value(). These are not called in an atomic context, so changing to the cansleep variant is fine. Signed-off-by: David Lechner Reviewed-by: Linus Walleij --- drivers/iio/adc/ad7606.c | 3 +-- drivers/iio/adc/ad7606_spi.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c index d8e3c7a43678c57470a5118715637a68b39125c1..fe2216fd072e375f3dd8096980e= 53074f8ee3758 100644 --- a/drivers/iio/adc/ad7606.c +++ b/drivers/iio/adc/ad7606.c @@ -818,8 +818,7 @@ static int ad7606_write_os_hw(struct iio_dev *indio_dev= , int val) =20 values[0] =3D val & GENMASK(2, 0); =20 - gpiod_set_array_value(st->gpio_os->ndescs, st->gpio_os->desc, - st->gpio_os->info, values); + gpiods_set_array_value_cansleep(st->gpio_os, values); =20 /* AD7616 requires a reset to update value */ if (st->chip_info->os_req_reset) diff --git a/drivers/iio/adc/ad7606_spi.c b/drivers/iio/adc/ad7606_spi.c index e2c1475257065c98bf8e2512bda921d6d88a3002..d3064e452adfbc40b44f4437e76= a73aeeb036ef0 100644 --- a/drivers/iio/adc/ad7606_spi.c +++ b/drivers/iio/adc/ad7606_spi.c @@ -297,8 +297,7 @@ static int ad7606B_sw_mode_config(struct iio_dev *indio= _dev) * otherwise, they must be hardwired to VDD */ if (st->gpio_os) { - gpiod_set_array_value(st->gpio_os->ndescs, - st->gpio_os->desc, st->gpio_os->info, os); + gpiods_set_array_value_cansleep(st->gpio_os, os); } /* OS of 128 and 256 are available only in software mode */ st->oversampling_avail =3D ad7606B_oversampling_avail; --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-oa1-f54.google.com (mail-oa1-f54.google.com [209.85.160.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 108191F6673 for ; Fri, 31 Jan 2025 20:25:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355107; cv=none; b=iPVxbnKeEdsLyRdsHgTF/tV3Up9Ofew+A4h/fVHLCgQfAS2RHHaaWwUMYFHDtbY4A++YRmp/Y3x6CjVDg72TFOu6jdgJSfXSOkJ0jx0rjcGvoAxuGE/BYyyR7aLViV6YgbBaOUoaPPbCcAkAuh0PqtYUHyO3xgpRLHijiftlre8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355107; c=relaxed/simple; bh=a4UCT4/NNPETnikiY/3/IXvAqgQyANJWQskJKLdiZxw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=W4SqokMLoVrfHZwItZeZm9CyScIH2Rxr5FsJvyGHgY8D6K5TwNTwJCkn6GGl3pdwDv7KYThIdip+uvf040lgCvzcsDuLDufPZGeljcuY5FZ3iYnrnaMo0RXLysjWGGQe4QxGSGaWv2yCtvcC78cthft+Bb987nKe1t138rHdYSY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=i3p50MoR; arc=none smtp.client-ip=209.85.160.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="i3p50MoR" Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-2a3d8857a2bso1235841fac.1 for ; Fri, 31 Jan 2025 12:25:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355104; x=1738959904; 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=WNU4SR73NkzT5flFO6XZzV58Nb+8n8xP048rFGpOLNA=; b=i3p50MoRqTck66HqRmjce02FFEVCLPd1WryuRoM8Vuk+27DcmPvbT5L1dLrth8Rspe SEJB+O8mrL3HlRbKg5VFYWuQCDhd9iOd4J+Lt4BFQJljF4pHcQrCLAKdvLDtw0FlJGV1 7dEVAyPkdLMXt20S1aFiNAknpOWcDXQLBiMeQMF6UQLyyjAzwVOLhiheBRWtvlGJLrkT YS2GUkU7S1H9uADGOi9+20YUVkUG5taerhoyFL8T8fFl/7yBhswxXr+dFp1bwdy7n38P 1IXFmSQrGkvfN+yZ77Yu/R9POZDUUjLQtzpE/7EtjT2Db+Ut9M+aCRHdVkFBw5e8e1N8 FszQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355104; x=1738959904; 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=WNU4SR73NkzT5flFO6XZzV58Nb+8n8xP048rFGpOLNA=; b=Mk2ZVjzgctz4DJPyAFRhIDDHa4uzSevsJT5g8ZvCzqoO4DThuSUJ0WG1zz70p4M40l TeGPJnMlCykQasBg3eFkvGIMEfg1XUK7yGDug7GMp7VFzYPXoz2J/47RJ65wzc+ATkC5 1qscy3unIZTFb8DXQfZNt1eZdeBZVFg9SERA9M6ZUVZlbv1Wfk5qcrJQ6VDASNY6WCRY zEqM3lMgrDzwDZfnXeqfZCuafPOowc8lhudHlsSiRqbWgW4F1FSyBIPHL12fPsoTL7iI Q2JEHSWkb57Y6QxUcugqyYP39miKSH5cC3Z1eXfHMgArgjW62TrkT4D0vQRPN4dc0hqe gJWw== X-Forwarded-Encrypted: i=1; AJvYcCV5Ua5HnMiGbNvap8orOdt8E76RJ3YkT0+uKbuq1prv5/ZusVOD4IntkW7ca5difyWW8orrjlEXgtotIBI=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+mQkZFJuRdBXG2xy3ABT7QZbpWuOxAITZTXJ7qW11JIW+HRAb w9sGM0Yw3x0WHGEhnP9FY88zKs+OaVF6IxfRWY9Qu3X388r7J2HQ5e3nh8K/D1I= X-Gm-Gg: ASbGncutvdoAvUXGo8EZ79qb4XQZ5sZZAeFui96oX4TQkaNd9Ai8AuL+PuKpo8viXC4 YYrEmu0kbOOPjNPris2EnWhHXBdAHOGsm80D5dR0kfXRySAH3J5Sv7pJh4OhwVwEQShBELxxaIW FWlx9KQna7p66o9cxdVSMy+6TMz+XS1rTh9F8KQpv4WuUmmBNc/f6ivHvmZRcrZXAMuXvwurtwo F7K1+570jf09Xp0NtRYn7msc2Lg4FoAA/3Qylgwh8D0apwpflYMX22VaE4WsyhrBvs1DwXgEXkJ ARIx0i8QCjQgn0VbDPW5p2no1uaJNSToQeIME23t+1kNYzM= X-Google-Smtp-Source: AGHT+IEjjM8UkUItH0qBBqM7/8yjcARln6tFWMQk1I1vtwY7yg+bjxT3tjK0CN1AwA297vbCg45WVA== X-Received: by 2002:a05:6871:7891:b0:29e:48d6:2e62 with SMTP id 586e51a60fabf-2b32f06986amr8146491fac.9.1738355104164; Fri, 31 Jan 2025 12:25:04 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.25.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:25:02 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:47 -0600 Subject: [PATCH 07/13] iio: amplifiers: hmc425a: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-7-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value_cansleep(). Passing NULL as the 3rd argument to gpiod_set_array_value_cansleep() only needs to be done if the array was constructed manually, which is not the case here. This change effectively replaces that argument with st->gpios->array_info. The possible side effect of this change is that it could make setting the GPIOs more efficient. Signed-off-by: David Lechner Reviewed-by: Linus Walleij --- drivers/iio/amplifiers/hmc425a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/amplifiers/hmc425a.c b/drivers/iio/amplifiers/hmc4= 25a.c index 2ee4c0d70281e24c1c818249b86d89ebe06d4876..e8c67c8145b1b9ccb9b70ccd3ce= 4f5de08f96e69 100644 --- a/drivers/iio/amplifiers/hmc425a.c +++ b/drivers/iio/amplifiers/hmc425a.c @@ -161,8 +161,7 @@ static int hmc425a_write(struct iio_dev *indio_dev, u32= value) =20 values[0] =3D value; =20 - gpiod_set_array_value_cansleep(st->gpios->ndescs, st->gpios->desc, - NULL, values); + gpiods_set_array_value_cansleep(st->gpios, values); return 0; } =20 --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) (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 81E481F7085 for ; Fri, 31 Jan 2025 20:25:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355110; cv=none; b=A/k+UKWjiN46ZwcOV53ASMjAjaoIFBt5ehR4JU/6upH5D9hvMvlspoKfXPiI6KgDQN7toJcMUmtho7otFajwpq+pIMoZwmpVK32q6yxlPlGsiriq4U+h/vV5bmDwzkh5U5LipYdmjGbUtgUSQJRWJka8+m46lElSaPxFNHFQhPs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355110; c=relaxed/simple; bh=Dir9udBrhZIEDuzX3pRLNcZGmhbiV9AhUdKa7dHH2zs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=usPBpaySZp17e+nMA8zgqHkq1+YybUk3ibae1pXsZ88Iohl4d9DfrsZMRsoZiJS/d/G/BlUtv3L5bizC18OpEBpoevjTqKaRKNfjaz/9M3mwdeZ9zIAsXufHGtoODrKk+naMVvFUZagXXaTnTkGhzs3NC50q0/HiADhE1QNR8j4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=JLqiHDEm; arc=none smtp.client-ip=209.85.160.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="JLqiHDEm" Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-2b33aabfe46so986027fac.2 for ; Fri, 31 Jan 2025 12:25:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355106; x=1738959906; 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=DXSo9qIqFw2jH0TFUFiXNHDreUcSE5l/XqXZpt46Vu0=; b=JLqiHDEmc5QOTTvhC7d5nL1vn+WC3Poy4hTEcuXYTaFGW4yEm/1zyc+ngmEptSqGFM uLDCvKUKB++42M2YtmVGMG0QBxnNnDglYbuSmoY6Ojjf+BoLddAmKeFvrnbE2viMU1zr hhhq06ewVft5HMEb2wOISaPPa/E+ZIPsyuNTNxcUhi0AJxLV8Be03dvfV0Xq+T+brhbL cQUb2KfmxGPVChau+3bN0HKFgOtWb+up3CWWwR0OUMjKQ6/0E678p/pgFHPrZrG4NkYR HfGTCH7jhVbD3GS8EjzY8v/BkE8WIdOJ9SLNLfWUMt8ac9GfrpDw1+tbgvOHgUbuo8Iq NhKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355106; x=1738959906; 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=DXSo9qIqFw2jH0TFUFiXNHDreUcSE5l/XqXZpt46Vu0=; b=wbKO9VHJjx0uHGLqixfKR2Au3hxTyHLRuCSNijfUNqmkzdg1yQzHGyzbQP1O1gdDHC 6PD21k5lx4MoH0/G+Aqtr2LtoMmPeiW7s5ni/HN16ivNScHQyzf+8Gqop15gTJLKLg6s rO57z4+jR91ol3VeVcbI4INplgiGPxSYB9x1mWzcY3r3ZiwxCnWG20ChPQ1qF2nXgycF 6ggGRGZ7H9v/LBtIek/rJriAtC2qUrLs/5FTYE9rOzT3RIbKGNn0ZQr4tHxbdhR5XeT2 V9Vvyql10Typx1ozXEZ3n4czEjpHtWGJgxQRSsZbeejJUzmviDSedB5nMyT2i5cG9uOZ tEwA== X-Forwarded-Encrypted: i=1; AJvYcCXtLjb1BoUtFGMzsOm09Vzk7s60eJgkllXuoyeVGV6B/uju53h4pAr9436jWFdjD07/fJ09vq+39kwXKcI=@vger.kernel.org X-Gm-Message-State: AOJu0YyVooG5Rwo+aXLn/P9voEuka5ArEvSCMveBLtX6pBvpa6BVyaMN Oktv/TzR5JalwTa5tRxjs0bXvl4lfQt9fkspBLkWdmllq/3Q5Ni3RR1OUoa3wHQoqViKhyP0ZDy S X-Gm-Gg: ASbGncvztDHFrBHHUg24B5adyyPpkGwg1jmyeSRaVfPCfsa1yMjVDX03DJrM13b88IU St3DTElraFDnaZFAGaUL0eThyCXl6N9DSrthm3yX0cBhetq/Ale5bnpUDYVw3+l1JCn2JEBQihi hPjF7/1VuKwohFr04NfXo6gYXWz5RDG+KrT2SyOlkbWCWizKVgjmY1qxgboeJxdol37Sr9BfICq 4zcZEUsghQOXGFiou49HreP71yvlpTGt70aZAs5C1gOzDojCGT/wCRXl7VvQ4sKsaKLIbLYuTWy n07uwHQJpSQUkRnLq/j3AOM8l/UV4tzRfr/HIVryY9NrZJk= X-Google-Smtp-Source: AGHT+IEk+EYILkaYfRPwnEDbJBIEBFXhatYC+4TE05088ijfOkCj1XESP7wyxn6VQQJyYksFnt4aeg== X-Received: by 2002:a05:6871:a9cc:b0:29e:2d18:2718 with SMTP id 586e51a60fabf-2b32f26194dmr7999805fac.28.1738355106264; Fri, 31 Jan 2025 12:25:06 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.25.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:25:04 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:48 -0600 Subject: [PATCH 08/13] iio: resolver: ad2s1210: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-8-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value(). These are not called in an atomic context, so changing to the cansleep variant is fine. Signed-off-by: David Lechner Reviewed-by: Linus Walleij --- drivers/iio/resolver/ad2s1210.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/iio/resolver/ad2s1210.c b/drivers/iio/resolver/ad2s121= 0.c index b681129a99b6cf399668bf01a1f5a15fbc4f95b8..938176ac7209a92180fe8d55191= d4abce026afdd 100644 --- a/drivers/iio/resolver/ad2s1210.c +++ b/drivers/iio/resolver/ad2s1210.c @@ -182,8 +182,7 @@ static int ad2s1210_set_mode(struct ad2s1210_state *st,= enum ad2s1210_mode mode) =20 bitmap[0] =3D mode; =20 - return gpiod_set_array_value(gpios->ndescs, gpios->desc, gpios->info, - bitmap); + return gpiods_set_array_value_cansleep(gpios, bitmap); } =20 /* @@ -1473,10 +1472,7 @@ static int ad2s1210_setup_gpios(struct ad2s1210_stat= e *st) =20 bitmap[0] =3D st->resolution; =20 - ret =3D gpiod_set_array_value(resolution_gpios->ndescs, - resolution_gpios->desc, - resolution_gpios->info, - bitmap); + ret =3D gpiods_set_array_value_cansleep(resolution_gpios, bitmap); if (ret < 0) return dev_err_probe(dev, ret, "failed to set resolution gpios\n"); --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.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 328601F75B1 for ; Fri, 31 Jan 2025 20:25:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355112; cv=none; b=MmvivWu4nOaGlKopvDglvuwI/xqDpZkfZTwye0jwyCaDVGhpgkwy3xHJ8v4ItyLw51JtQcj6ruFPjM8+XJYhgN4leGBInqnqfj3RLlO67UdfSmAR0zngo4RvIZ+CPA0a+/n0C+lr1TxsBcmn5zpriaBZCObs0hdffrpJ9LL0BTo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355112; c=relaxed/simple; bh=MK0Ks2Di2rJVvigp/s/vAkyxV2Ps9hTBvb2TEAom5M0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bQ2GIfaah1wjGLldLOWlNd5T1GECbYPks0zlkwTaJOveHIKIB1aiGo2QcRGX4XepvJJ0xtc//Wg3w3x7M2ceX9RzwuWKveRvLoqsfq95GD92pDHPILZz6eMA8qRfPnkZpCtkymApAuiQKEAlPGhO83DHZWCNcLrW7dMawPWOtLU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=TvKooawx; arc=none smtp.client-ip=209.85.210.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="TvKooawx" Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-71e157a79c8so645481a34.2 for ; Fri, 31 Jan 2025 12:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355109; x=1738959909; 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=lwWNVnhNlJbHZ/NQhMSjzQrpqbMeo/6h41DdX1Qvb2w=; b=TvKooawxk3ek74wKtIXI5KaEKZulBtQxUrB6kT0RHQ8XQ5TNLQejFlCawjYv5dJxKP QmA0sG4JSA4gCGhiV44hp1U4iN0rC9D0ZGD6wp3VOQdc+WLXeUfK4cBDwc+pjyGzfk/7 pIVDcxasgxQJ2GQFj2lxnW02DL477FldSm5uh+zU/Fgw1W+FRvpN4rRejYXzpHxzzQSq iCG1ZxCO27hKzZQIg5uybXovgC0OSu8/fCgzH4gIlDI1w2BuG2YhRlRuDEC39pO9u22J zfw/1OapEiNvUatIPZ5hKMapWz2jItA1s2EfzhfSeHtmWGsEuE8dHTerIIfQDTMKhuZ/ 0yHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355109; x=1738959909; 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=lwWNVnhNlJbHZ/NQhMSjzQrpqbMeo/6h41DdX1Qvb2w=; b=DtzI1Ykz7J/RvMpUfXxdf0PadZd/jBU/VHWyW2nImb8Y1uzWV2JEw+gpFg8C5lS0lj st1fmM8tHCkEXJRr7Hoh2QUnIEO3KisEe7dDSBxmwQe8AlByTV6Qe7PgMb/xGNBRz6Bv syhopOaEqD+yCIPhJejVmcGLzGMsQu3PIMRy4t44E+kYw9t6MhJm4mvfFpe/SpXpDPxD tIFndiP4kG1uGC19Kg8DxRL6ib/ZkTXf27g4AT7Z0x2w1rVLUiYpzL/5j21W9qoCsBD+ FBIgOIlKr2cAMxpA33mBM9nh3nZbs4adtLjganSjaqz8UZqeiCNubONNin3XI36grSXY ZXeQ== X-Forwarded-Encrypted: i=1; AJvYcCV/ITc2VwJI2qsRxXpyIOPRJLFdki1+rB3KBtqpNqttZp4vczGBUhM4eg4yDtWsZEMkyqX6pMwShLiUEY8=@vger.kernel.org X-Gm-Message-State: AOJu0YwzFvZ/LES5teUOUizTQ3h2RO4GLiP2cuGIoQpoG/uT6KlCFxTx NbC0orX20Y7cqEKYnxl/P6kk9OiV8JWyGqFZl5gR1hYB8Wpj9ySe/SQLceThNF8= X-Gm-Gg: ASbGncv/fH9B9f7OkS+U44jG5G4xKsS8I0Jaqs5tGmbpUXnGiss/Fi5SsekPMpm7jcr xWIIpX06MsLyQFxRYfVial0fXgfOO9LHqw0kr5/P2/K6V5JrA7MicQdydIJjrYuEP+wF/abVgmW pQUTXxxJN9j+dIPPy5HFvdlFWGC+O75UEg3vUCQPilsepp31H+/HREcB/vh2BpOj2OTlyVqKlrZ 6IRWSV24uz3Yw4/yCLfY/sIdCNzG4lub7XVUplH4arlYgllyEoGznPA2DtnVvvqa7s5QF0C3eZe 46bPGhxkbid09Te720FOjWzjJgH2j93/4dKcX5ZUIJkq1ik= X-Google-Smtp-Source: AGHT+IHQyjQ8y3Rtu7NlfkeMw/zOxhLdOk/J2rb/TrRaSbO1InYUF9KwbynHBq+Y9XgpJsj8OqBDUw== X-Received: by 2002:a05:6870:7186:b0:296:aef8:fe9a with SMTP id 586e51a60fabf-2b32efdc7b9mr8033858fac.7.1738355109312; Fri, 31 Jan 2025 12:25:09 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:25:08 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:49 -0600 Subject: [PATCH 09/13] mmc: pwrseq_simple: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-9-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value_cansleep(). Signed-off-by: David Lechner Acked-by: Ulf Hansson Reviewed-by: Linus Walleij --- drivers/mmc/core/pwrseq_simple.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_sim= ple.c index 37cd858df0f4d7123683e1fe23a4c3fcd7817d13..b3a6d053c826741005f1484ad81= df30b6bf75bbc 100644 --- a/drivers/mmc/core/pwrseq_simple.c +++ b/drivers/mmc/core/pwrseq_simple.c @@ -54,8 +54,7 @@ static void mmc_pwrseq_simple_set_gpios_value(struct mmc_= pwrseq_simple *pwrseq, else bitmap_zero(values, nvalues); =20 - gpiod_set_array_value_cansleep(nvalues, reset_gpios->desc, - reset_gpios->info, values); + gpiods_set_array_value_cansleep(reset_gpios, values); =20 bitmap_free(values); } --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) (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 548431F78ED for ; Fri, 31 Jan 2025 20:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355115; cv=none; b=cfRp+jH2/E39Mb6lyTfeDU0bdB6Z0IIiJARYJPsYC2GoXXyEwG3zrYH2NvRIjh+pE03+Dpy+eiiyQbJTwGy7xCWmTm51rRjEH+uO7D9nSEI1+AVS8Y5hE8rktU7cwsEkej5qhmTXZdXV0cEXR6oFniyAMIu3fENmuaad1lszi4I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355115; c=relaxed/simple; bh=9CicIm6xDarlbk67AANQJSF1s3m5MgjSBlIRcxjc/Fo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WSlGA2CfeMN85XV6S3ArOe/iQ5Oxz0w0n3B3Ww2lsKqU0iHOk6pER0vnmRcLMy5TAuQ+d4sw/v5YXLsW7xw1LBegcC7l6AeIqlYI8S3KhYTeSmlCeuUdSp0YMTNs+J5tnFKu8NyOdgBbXgCAyp6eqoXKvzj/PahxdBMUSHTd40o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=wlI+CUIC; arc=none smtp.client-ip=209.85.160.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="wlI+CUIC" Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-2b29662f823so620736fac.3 for ; Fri, 31 Jan 2025 12:25:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355112; x=1738959912; 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=q8dlq+1FyobpCXd9TkKRwFwRft57r9IiORFW/g/tAaA=; b=wlI+CUICXgXZ59m2jPFbdGv2J3EAl6YkI5OUi/o+5HQFg88HspRlr0dr1Ize9/zZhX vgbpaxsjqQ/QqRq1yjMqvW9qbxX33uCRK4wTRB91evDI5+FGRFEuBDaMCqG/MQZpJC3/ bCWmxqxUDHoywe7tnFcOdgK2yuwPKsY+vyODObT6GFruCueLz/oc+ccc/9kSiZ+XWO8E 8hdmqDBq4XpUmELiwQFDfZpCjeeFhJdOkm6M20lOsf8VzfgOqD5FaKNCKmDUeS++Fdp6 Xq3mCVUjEVhfX7aQ5E0CD3QkC7ZwhZ9xffOXr1M0hlZ8bVJXGwPCZbNeTgRpOff8wAZW z6Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355112; x=1738959912; 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=q8dlq+1FyobpCXd9TkKRwFwRft57r9IiORFW/g/tAaA=; b=Ukp6vkTtT1SQ90SZNT0xxa3dkQleXgrOPiL7D0glsSdq4LIiDBRvshifNZwLcTg7wY pePhZ+zBG1HAXFlACdQx/FJgqRVYL3ZZp+8bO6wX/iM8j8FYjwcohN6oDxI4mU8hkaZx r+A/gt2sQGKQtPMPvBmCigzvwxUrF3ubD9ZSHXiQzlxSr27AHvfCBJQwTJAEGk68mgjn COmRVng2OpSp1a7X3dU6k6tQJHYUNf0eyITVghU59t7J4QVwdw88Nyfv0tVaEmjm1vvS FSNZtN61xymoYH8Aq8K3Jeez1UdbDCOEhWx3aHVc85CCvuHupkCPTmOmp/UihCbQsq1Y r2eg== X-Forwarded-Encrypted: i=1; AJvYcCWkTWA6sbWLg255NDEdEUi6byJ8e04znckIUrhp7jAPTdu3yVllXCx+2AkAPd4nwTWimU1tSAPcvuxfkBA=@vger.kernel.org X-Gm-Message-State: AOJu0YxZHEuR15eC7Joc7z0fASTdaYmbbcJ7EKYE5XUIFJx1O150y/HL F5sA0zulkHDbpu5Wl4rqYeMwPzPg20RoSuFjnBONQxk0PFkYEALjxQIJhUQg3dc= X-Gm-Gg: ASbGncsm8dmg7mV+xRo6L23aKTspJ7UrZ2grwZo/krTELy7QYRjMHoOQzhWBl1o6co0 7VCp8uBwfajV6GM77L0z/GNxlgSs1NzUpl/oZW9d4ZJ4tCgD/rION7W1K0R4xSCAhK54aTmIzrZ Js1SqzYlfZw8UjdX6dqUZCoOKFuwmE7Dsf0V0skrpLj+SvUedbHIeCYeoBQPOhoX8z/wSRXq0m6 30pG2wQmRWaPjDrS/U09/1bTXjqrl1Vy8v/2WCEUpVF8gkNgk5U+zVVKIxkOocXT3WAIGoez2E/ ZPJH5W9Aw0FItCiDqJctafGty3QNP9ZBFIZV1sx0M3zajDo= X-Google-Smtp-Source: AGHT+IEOPFpYcNvsoJvtChI72uu39YNNI5XV7tV2UH+PWhk+hEwEt/BHCYYItie+9RSXj9400mKLXw== X-Received: by 2002:a05:6871:2106:b0:29e:2caf:8cc with SMTP id 586e51a60fabf-2b32f30c9fcmr7202349fac.37.1738355112453; Fri, 31 Jan 2025 12:25:12 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.25.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:25:11 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:50 -0600 Subject: [PATCH 10/13] mux: gpio: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-10-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value_cansleep(). Signed-off-by: David Lechner Acked-by: Peter Rosin Reviewed-by: Linus Walleij --- drivers/mux/gpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mux/gpio.c b/drivers/mux/gpio.c index cc5f2c1861d4a22d984bcd37efb98dd3561ee765..fdfb3407543dc3c2563750b0137= 54ceb3390e39a 100644 --- a/drivers/mux/gpio.c +++ b/drivers/mux/gpio.c @@ -28,9 +28,7 @@ static int mux_gpio_set(struct mux_control *mux, int stat= e) =20 bitmap_from_arr32(values, &value, BITS_PER_TYPE(value)); =20 - gpiod_set_array_value_cansleep(mux_gpio->gpios->ndescs, - mux_gpio->gpios->desc, - mux_gpio->gpios->info, values); + gpiods_set_array_value_cansleep(mux_gpio->gpios, values); =20 return 0; } --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 9E4221F8678 for ; Fri, 31 Jan 2025 20:25:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355118; cv=none; b=P8Pdn/8IYj4I1WiGx48LqUmguvTwlnqQENfkWzsV8b5lNKrF10sR5HX//7Y2k5XkYWrQtA3VMxIKo7NzuyYtlEs3sxeIzsFy1vKM/p2OshApBp+FVzIWkykGqLXAMZzqqw3DKzmO/Y7pjd4sOLfS/8BGVdKOay0/JlMHti4+dvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355118; c=relaxed/simple; bh=5lFciV6sDtnvvFQNJQrSdhN6LDbuB2QD+esDyLXoYWY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aGG3iWZJHFctJDskLNoWmpVWkJaQp+MFaIKEF7MlkFdO+BuMLDLotlQHnO9I04vGVwBtBtquFsUpkF1Lz5yofB4LNQdB2/U4kGjabUu5n5yP+jPcd/9LPmaYQ4RO7b3kIHULFtw/+Z52iT1whXTsF4NTPI1on5Z7FsazPP+FC5w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=xfWVISNq; arc=none smtp.client-ip=209.85.210.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="xfWVISNq" Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-724f4d99ba0so1124297a34.0 for ; Fri, 31 Jan 2025 12:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355115; x=1738959915; 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=59JJI4CO0oacXanEEbv/QOEs28IMbairlUQePRWumA8=; b=xfWVISNqGvmJvPxCnksE/Yz1kneKNWKaDoiPyVLVuJJqQz0AQds5/lIkpGqMh16iAD ZERvZm4NHH8ecjtnA156EOdT+s3afBz+65DNdZt3iYc6HqEWYMjMyPm8Oa1Zu3dPVK4n CbpaQ2ouRcwZeE4GRJsuUuze3SLPEEZf4CyvVcS6g/sEFkP/lEB0nbmevg42OYuehQjL 4ohqvG7FisQgxd+xvcJN/S6d9ahf31PmA33gG1nKowgQJgD8P+e0HjR3kWZiVVKkuPUD 3mdj0uy6cgk5FRaXgawn4H7fxeN9x9oZP6o3ixsNVrT4QqFTpirkBPSGe8iZKk7Ez5iQ nxhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355115; x=1738959915; 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=59JJI4CO0oacXanEEbv/QOEs28IMbairlUQePRWumA8=; b=Cy48WG3pCv+cbHmklp1DfHE327kK7OZGg/GSk4NNSetLmWkgHlFPqPISE48rj9v7rS EAHATaS9ok6mr5ehtcV6FEok5JiwayKCxaNPFwdbw4Z4SVlqc1IRe0ukr8z5ls3B1O9s EJUhvrJcheMLuhkmq67kqRBOnoZggyGArkEhxTsN6bRXXvfX6YL8IcBBuOK5G5iXiWAK 3YEeAheJJvzjbz++FdnVar4pj/FnfUSpCoPisFTAHZIFRQxRcIEOCZxcWNcfMf2b+o6a cllVbH3y6rlOjPQPY2QM5F+KsQxZ+YBhOEkN1IAIBqDCPnlsmTMfMSrtcfF1Ag2i6QSN yN6g== X-Forwarded-Encrypted: i=1; AJvYcCW/VXUyMGc9VyqoQcu1GnxbjA5tYFE2cKJ3GXYFldJl9hwXwzh6JPWEhs4DBO2Iq2RfJTelIkhTREKWKgo=@vger.kernel.org X-Gm-Message-State: AOJu0Yy5EP+p7/EUrN24m5/6IyBO10vvd/vvkiN1bfCXznuWFZ+5yZ1f 2iJe23FoOiVM1B7l1yVr17wbd0pf1lbFCUolBGJfQotbYDHA1nLKmRPD0Qvf0j8= X-Gm-Gg: ASbGnctbberQj8DZdIgu+Biru1vY/ilYJKZj1XpoMWg1gquvZymks4omZoayBAoAPDT xSTJQGglvbiPPB4IjCvuu1xsNtHzY8ObxN0RnQy9E0ASS77bRbeKNqCweZ/uNecFufGDEvS5unZ gyg0ypGoeC9Ia5qoemQViXG2dxCYkALhyZJV5MX0JvZlHBtAe5E2MDx2S1rXZQ+KUDfivF5EnkN 8ayugcDY3ia3Ga9jV5W5jyIQF6i8hRnoW56YNyi06S5e+JR3wurhBp4NPfJdIAqUvndTVHezIT6 beZEDps/4djQiBQ9tbmTfkg9qEsnnMF6fMI//furxFV0a38= X-Google-Smtp-Source: AGHT+IFrVMAfd3Y3wOZ0h4O9q45j+fMg4Vw3AAmlNZ9ZgYIq1KVZZxWHseA00ADe6a66eu+rR/ZJMg== X-Received: by 2002:a05:6830:6805:b0:71d:eb02:baed with SMTP id 46e09a7af769-72656774376mr9460293a34.8.1738355115546; Fri, 31 Jan 2025 12:25:15 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.25.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:25:14 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:51 -0600 Subject: [PATCH 11/13] net: mdio: mux-gpio: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-11-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value_cansleep(). Signed-off-by: David Lechner Reviewed-by: Linus Walleij --- drivers/net/mdio/mdio-mux-gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/mdio/mdio-mux-gpio.c b/drivers/net/mdio/mdio-mux-g= pio.c index ef77bd1abae984e5b1e51315de39cae33e0d063d..d7eaeadde2873977606bdcb5821= dba18aa4a578f 100644 --- a/drivers/net/mdio/mdio-mux-gpio.c +++ b/drivers/net/mdio/mdio-mux-gpio.c @@ -30,8 +30,7 @@ static int mdio_mux_gpio_switch_fn(int current_child, int= desired_child, =20 values[0] =3D desired_child; =20 - gpiod_set_array_value_cansleep(s->gpios->ndescs, s->gpios->desc, - s->gpios->info, values); + gpiods_set_array_value_cansleep(s->gpios, values); =20 return 0; } --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) (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 9630E1F8688 for ; Fri, 31 Jan 2025 20:25:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355120; cv=none; b=DCQWxPY9vxcA+caRGL12HJSTtNJC4CXr0yOF7jb97KRsk6gepGCQgWE0wGQ/NjlVGP+MV70VnehvzqaX0a9/PHMcRmp3sfXN1MISDWRNl1KAZwRCqdYhxTpcRErtPOu70tyh0adNfE0kWxyAJQEjH2rq9tGmrqvDejUbjNtuzlk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355120; c=relaxed/simple; bh=rmBWKBYHCI+WuV2jjWYGUn7c5T236U0xlpQEPpz0oeY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oWjerb7oBRIoEbIImcgW3GmSxK8FRTExUyi1VXV5l53CBgwMTrMZsmOHfS9s1dDEc5Dc/FnOmH7dHVnQOlWBlQEmIMBGCBkK6vpCo6o0oA+/YqehD4NNmS7NhhP79Ezd/F/JTtJX0Yu4gVQ8R6dposJVmPaWDzIM+8dwhyATNE4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=s6wxqIkH; arc=none smtp.client-ip=209.85.160.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="s6wxqIkH" Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-29f7b5fbc9aso720048fac.3 for ; Fri, 31 Jan 2025 12:25:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355117; x=1738959917; 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=FzzIwzQtyYUR99JIrJ6how8p6bj9KukV10X1RHN4Hv8=; b=s6wxqIkH1D9BN7+dFKiVfTcWWUarvgFPerBjQBy2NCE81v48dt3r66cfJ5wtOQ/LiT PzJg2f0V1gkwEImOdpkVpgU8AM/RLxz5Yp8VdZT+gXb7II+fyULczC9ffD4/Rq0p+WEr X5lbmVf3N1WdV+WTfAOiA1ZdqYc8frmtJxKxmU/7Hv1rDXeiNfReGh2nl7dvUtOYPfrW QpIB/BIY4NB7jyxCkAPzlo0R+x8sTudxVaSVqlzpwMi0EpHUtGcDJVqkDoP4UGtxYXRg Q07OAtIcAT8tRFMvvVrQ60DJmzpBTFdHI8Q5YjebwR34OUPgteE5yDJftgmc9pUg+HwJ Tigw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355118; x=1738959918; 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=FzzIwzQtyYUR99JIrJ6how8p6bj9KukV10X1RHN4Hv8=; b=T8cicTdrwY6XcPOGy+eDHiHhs5vQIOnH4RaDeO4kXlSa1f0DaZ0XazvdleUieaf01U 8yLDNC1K4hWvpAxfvT13OSLzelpVaFegbm3HtauMQqmkoNWNbiCgYtLz2uh1RizUNx85 L6KKLxXh2Okpv3pBnCunoPmuNtuVEvpZfDMJUuZ7pe3K9gYn4wh8biLmAvjNE2xXFvRJ mUdUe4wY3ZJJh5AMARRN29o770GKsmIA9PV3AudvkMmya/zFuRt3lXMkNGAoblvtHEno iElEymi+zyUAxhWy+/InuYQUmXd3PMeuzEDXQQ9C2+QuSY2iAScdfkeA5C7RYqePZaK3 42WA== X-Forwarded-Encrypted: i=1; AJvYcCU9t14Wsk6oBQXDgAa/3uQxSdvkbhrJYgsInRrI7WzQHH6lKjjocx68LmgugZc5A0sKIOhXs/vpRLJapU0=@vger.kernel.org X-Gm-Message-State: AOJu0YzRqs2b2y32qd6zL4uC7a5Yi0HY5W3pzxvBc87I0cy9B8uGPS8J ZhkvcaJbCiadFi3LuN/vhRz8hJINgrCcKsf8ns3PrxVKeGCGxK5d/HOoPaU4dv8= X-Gm-Gg: ASbGncvs4UIUh7DBcBaD3f977A+S9AGHjq84PJ4xcQE7p3AXMlmS/9mCpHXQ7VAQH9R 2OkwUIg4JIcKoXgoV938Va9CgFJAp7s3Mg/hxiPsY9z7sCIJbX3w7nM9deaJsYBnU2xpNMdIqVz Zu1C9XlSlqrZelrL8SW+22ky/z7f7lwZrShZFKgtSam4XqhAYeiN7nNpY2btza8HDblIWMWI+vg CLwrvCIwhgQh3vLqSIelrNzH4xu7siyIqyhbPWkiZPnmRaDoIYVXY9QK0ToUfl8hPlTbWSz3jlq oG6/jFOxRCurjuZ+5aF3IaFTyow2Bcap9xNpuPoiXA+7baQ= X-Google-Smtp-Source: AGHT+IERsKIHS0RESeT1aGghrd2e2VbJU3Jew/L2qRirwk6axnCtq0WNFwypLdr9E1c9DhZObl9GKw== X-Received: by 2002:a05:6870:32cf:b0:29e:255e:9551 with SMTP id 586e51a60fabf-2b32ef5a830mr8108456fac.2.1738355117684; Fri, 31 Jan 2025 12:25:17 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.25.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:25:17 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:52 -0600 Subject: [PATCH 12/13] phy: mapphone-mdm6600: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-12-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value_cansleep(). ddata->cmd_gpios->ndescs is validated to be equal to PHY_MDM6600_NR_CMD_LINES during driver probe, so it will have the same value as the previously hard-coded argument. Signed-off-by: David Lechner Reviewed-by: Linus Walleij --- drivers/phy/motorola/phy-mapphone-mdm6600.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/moto= rola/phy-mapphone-mdm6600.c index 152344e4f7e44de0f8ab1cae6ae01a1f1c5408e9..8243bab6ac3af2ee1394ef743aa= ad12a19c8ae36 100644 --- a/drivers/phy/motorola/phy-mapphone-mdm6600.c +++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c @@ -177,9 +177,7 @@ static void phy_mdm6600_cmd(struct phy_mdm6600 *ddata, = int val) =20 values[0] =3D val; =20 - gpiod_set_array_value_cansleep(PHY_MDM6600_NR_CMD_LINES, - ddata->cmd_gpios->desc, - ddata->cmd_gpios->info, values); + gpiods_set_array_value_cansleep(ddata->cmd_gpios, values); } =20 /** --=20 2.43.0 From nobody Mon Feb 9 07:20:57 2026 Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) (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 C5BD91F892C for ; Fri, 31 Jan 2025 20:25:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355122; cv=none; b=dGd9P8JIpxE0eQMz9M7umPaBs+8/DcpiHG/bwU8ZudzIOkSRZJmsuv4sd+OKaPaMBJE5iHTWgIZ8QsHgfBR7HWDG6YcsGQ1HxYvqCTlsA0YD2SMu5A+lSzd+AzLZV91H7a4OYbOKFAanAtoZlMXjN45MstEwU3hp2Vo2JliSees= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738355122; c=relaxed/simple; bh=Q5q1Cf62xGuA/zV0+TKjafPv8tjFCx47ZmXmvjB7zzM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=htJ5QfJjj6a/lheL+QYYTNsPQ5Yir5Zb7e6O2aYXsCVSl1FPm1S83GHCE0hAFM3etmU6IPHgBxjhSc3IWqnYOY4NbRkTu39pwDbc3lXOZbp0gFGXnZjoLDTEtEVau1qr241vuWzjSRlsXw0fL3YNyiCtQflw8rJKZdwRGAVaTO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=FbeReIqM; arc=none smtp.client-ip=209.85.161.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="FbeReIqM" Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-5f88a93dceeso736909eaf.2 for ; Fri, 31 Jan 2025 12:25:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738355120; x=1738959920; 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=t9cxGVlfrmOEOQA8LocUnneYPfclUeeeatGnfm6leQU=; b=FbeReIqMO8vnYpLBMq/tCQ0Wzeek2MVG2PLNB7Yw48XmSR91lLUE85YYll47wHcuEu KycvhEOn+wigv6T6KB/XPC6dioLkMKuCOjMedEl4BodAinW7aFP4eqPQQ99l0fu3cWaq gL2G84kObRY7oQq7XO76+72cpJntOeMqOKS/xffF+kT00xJqHKfs15kGwTrKa/ctI3TQ 77d0pr/L9NTJqbNgESKgZy83jyDmvTaegIUUhESKXVJFQSNXL4ADZVNr2ACMFqyVI1q7 uISHy0u6AS8n/eTyhSwV2M7LS93hU2/mUq2Kkd/UVI0onUxYS/iy/TL1dPzrw+s0oVxw cz3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738355120; x=1738959920; 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=t9cxGVlfrmOEOQA8LocUnneYPfclUeeeatGnfm6leQU=; b=czDD/4B7KFgct6Xs0O3Ll5iBBMVtnGINGfrEXgjsR8MyYvhOKoqLhvzHkYunK22TNu D/YLnpYNbPy5Yo+E0WWNN5DD+HIWmkOB7Ix/lZb/6EivU7OH4KYce5LTUwnodxQ7ByKc 4OXFhZMCJYyD4PGLgv0Z5fTYAPRSBivOCwT/wpVDsFX2aeaBK0hXKd7WCg/broHvUBZK A/Bmg1EZjpokyyPsESEcjZcAz8mNSzQPnmo2okSSl1ygNpglf/DOPNh6knxJIoYCPInP ni5hFsfq7iUMIgrbi2m/BhGNEmIxfW0SXlKYCGrUIZhcgqsbL7UB8r+NZT8fdgZ8Qg/n 9/qg== X-Forwarded-Encrypted: i=1; AJvYcCUn3fyPco1BQims0o+YnwGPMTPqaxGkNo1Q9mh/ukvoS4kn98g4+hAvAeX/TSIr5OTQK/DXR/8rSUOgsTw=@vger.kernel.org X-Gm-Message-State: AOJu0YyQFl/OacrHP7dP9G6GGPcerhq0TZTCgsLae2KdLSBhUAz/O7Xt RYwbWsr7LG3N93sbxzEyGIQlJwmx/pSCdUIzqzexc1VvlLcfx/nNiASHuSOvMxc= X-Gm-Gg: ASbGncs/Xca+raF5eZrUkwLnJtDMMSevih9fcdDaIHlvYIe+CEBmb93Qs3AWYFdlw2F FRvaUiii7IYu1rERxcs5y5bXCpf2CtDNiMBH7bCejq0S/LEGjnqwOASdtqd7L1TZzj1vq+A+Zq8 DxI56dh8G/xUUxa/4Jgg0++XJkabJEg39tlq+/RWse0NmPPAEtk+iPFeWAVUz280bJ39/1WcX7Q iEPnAiBdSONDVyBhch1wsxEL/UA+7CHzLWyw8BAL5oD0NMqg4d1R3LFZKVT7xQkvcXo1Kp0W2nH VwbphGDnKDgJDuevPcWzHmGPgOuqtLLOzo/sGBOij5ZQLvc= X-Google-Smtp-Source: AGHT+IGqg3uaTvNfsfu96auAGMNqMTSmH6qy7PdoMmcZZ87lNXJHf3Cu8HBE7iXbpxe/5j7p/ZYumg== X-Received: by 2002:a05:6871:209:b0:29e:20c4:222e with SMTP id 586e51a60fabf-2b32f2f8592mr8795453fac.34.1738355119837; Fri, 31 Jan 2025 12:25:19 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b35623d2ffsm1403157fac.22.2025.01.31.12.25.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2025 12:25:18 -0800 (PST) From: David Lechner Date: Fri, 31 Jan 2025 14:24:53 -0600 Subject: [PATCH 13/13] ASoC: adau1701: use gpiods_set_array_value_cansleep Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250131-gpio-set-array-helper-v1-13-991c8ccb4d6e@baylibre.com> References: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, David Lechner X-Mailer: b4 0.14.2 Reduce verbosity by using gpiods_set_array_value_cansleep() instead of gpiods_set_array_value_cansleep(). Signed-off-by: David Lechner Acked-by: Mark Brown Reviewed-by: Linus Walleij --- sound/soc/codecs/adau1701.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c index 291249e0a2a32df7dde81904dce2f6be143fc2d7..d3e6b2763950f78143c0feb07c3= 6764cb265441a 100644 --- a/sound/soc/codecs/adau1701.c +++ b/sound/soc/codecs/adau1701.c @@ -325,9 +325,7 @@ static int adau1701_reset(struct snd_soc_component *com= ponent, unsigned int clkd __assign_bit(1, values, 1); break; } - gpiod_set_array_value_cansleep(adau1701->gpio_pll_mode->ndescs, - adau1701->gpio_pll_mode->desc, adau1701->gpio_pll_mode->info, - values); + gpiods_set_array_value_cansleep(adau1701->gpio_pll_mode, values); } =20 adau1701->pll_clkdiv =3D clkdiv; --=20 2.43.0