From nobody Mon Feb 9 06:38:13 2026 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F9B22951C8 for ; Tue, 10 Jun 2025 12:33:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749558808; cv=none; b=o0FJhdVB4bmJ7KRze1UsaLhiPYM+E2afuinDtB3wqsL5KauNJZtCjseOW54DbNTzD12D2QkHdBtNpYcF3kxw0+YBsWxBofClGgpdeumKOREzyamP0dMlCVg+qOThnGHEnGZ6DJgeKlQUwhTOAANVhBsxfHiTI3iuYAQP6Sa3vz8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749558808; c=relaxed/simple; bh=JPSbp5yJtajANs5Kx0BJVfQNVJZOTJjm7ySQemaTVgs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DFS9U+gnUAK88Iptmj0H8Lf8MWTsTnxDd9Zyc2Z0YvRz7ppXV/feBRwNyTkRQFAH0EOdhcvtA9rUoEs2EgLd4GIEuNsoplJurPCL+7j9lK05kh4oCzqrUnHUb3Nrk+DkRPwK2KqVkZSQhgqX6H5iDGyfYF79Wl2aXGNDBykgjCY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=hjsZElK6; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="hjsZElK6" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4530921461aso20492335e9.0 for ; Tue, 10 Jun 2025 05:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1749558805; x=1750163605; 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=KaZhNfmNZvFczCK3uYFfm4lqI7dzagVSWDi4ZRPJnwI=; b=hjsZElK6LiepTawFD3/tkgssRztwV6biBmiDYWztzsJxY3QtEdycyVuvYScds5v+TE i4//7hRSH6pu1o7P7hj6NgQS2grPVYpLfbIuj17xzKmkM9fAjl3chDGv10etYfrNz+IK /g4qgMwL6b1DIgfbSrqR34vYL+Fmwd9xjfQaS38cIDQSlcmixZe/EyBeygGe3J+LcL9f l+/djRuGSIQ1n4ekO2/Eyaj7Yblx7nhUIwsPsfovmR8dyN9I0eUlndIo31ZKPqrBg3hT SmPB48cY9i5JCsjg9cNjmpcsneSkNBcGZqNjkWAX4N2yVO6xwFWQrY/zkdlBJdnePJEW k2Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749558805; x=1750163605; 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=KaZhNfmNZvFczCK3uYFfm4lqI7dzagVSWDi4ZRPJnwI=; b=pzUT/K9FDTQNbHCjAJYJwyZ2k2GaRXEa1AJqkYN86t0PFwjb1AVz7keCyOR33s+tdW uomMRT8u2n5D/hVdeCg58BQwkDWpdoZ6J4J/fRi7qZVzuuPeo4BLaCn7daIwy5w5Wiui L6TS+g6ym/k601der/eINQEF/AG5al3NxXrwYxbrI/3OkXu7DbCMPt25rZn/3GjZJn5E PSoQ1dQwHILHK265IYBvHhhbnmkWO/6HJSUoSWy1ORx3RxHmxTk9d65o1PRsAEsSM6Lc W3Jp00R0mOdhZbWhIZ5bocpZSIS7wv5BLuclMWZ8XSpUfEkRY9A35w5Dc12XUcDdap8v 4uOw== X-Forwarded-Encrypted: i=1; AJvYcCXi+B3nuWVpIg+T49bs6A2r4JCNOBt371KFIRCOjBn2M0/kJnM2lG2eAR1fto5o3a1FF8exMxvtpwNCuNE=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3kavM9Qz81WrWeRow5XIn2v3YG5h9zIK86c2hcuxaGtrIkBFA g6wnp0QPyXgv9AnnmUDP6YaW7cSKW3IyRCH/sF4AXaQr769lAhnkzQD9zH+oo+Q30cmiZan5zjK fp9WN X-Gm-Gg: ASbGnctPeZYPuzaBuRgpS9oGyLNXaDZg+qy9wJLyQfo94cUNuDprpnqF8MqQKLrnrUM 3cRBZwhaTeojh/O7Y2gX4f9oocn3c9+EdCarRD3rJjbW0ot9SQ4SqWK5iBJ7FSyv4LaByeVv0c+ inKhYZe5G80ShRymBhY7wRf6qqRfZzcVg/qBRSLugtksEUWJhNeWT8gpGoNhLSaViJtKSu2NVlt NFmLKkoI5kyggq5klAmdLDsW5HfxPyfazgqFeU+oT3NWUgHygbXTIbvOMWYGeKYw6FAOxxbdcVz djw2lZENJ4r49SPZz2slQ5hWip7GFEAhtGm2WRucSMwKpvMHzT3+QQ== X-Google-Smtp-Source: AGHT+IFSBusLtZEhcB35bdsLhsIDJKEdI0B2x6nuBuQEbHF1Ukz5MK6AfplwzfpXypgWmTNJf64szw== X-Received: by 2002:a05:6000:2283:b0:3a4:ef2c:2e03 with SMTP id ffacd0b85a97d-3a5318a90cbmr15138062f8f.33.1749558804571; Tue, 10 Jun 2025 05:33:24 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:4d:e52b:812d:eb7c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a53243661csm12290668f8f.53.2025.06.10.05.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jun 2025 05:33:24 -0700 (PDT) From: Bartosz Golaszewski Date: Tue, 10 Jun 2025 14:33:12 +0200 Subject: [PATCH 02/12] gpio: mm-lantiq: use new GPIO line value setter callbacks 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: <20250610-gpiochip-set-rv-gpio-v1-2-3a9a3c1472ff@linaro.org> References: <20250610-gpiochip-set-rv-gpio-v1-0-3a9a3c1472ff@linaro.org> In-Reply-To: <20250610-gpiochip-set-rv-gpio-v1-0-3a9a3c1472ff@linaro.org> To: Linus Walleij , Bartosz Golaszewski , =?utf-8?q?Marek_Beh=C3=BAn?= , Conor Dooley , Daire McNamara , Daniel Palmer , Romain Perier , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, openbmc@lists.ozlabs.org, linux-omap@vger.kernel.org, Bartosz Golaszewski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1909; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=h//lpMqxpm+YSvksV4b6ru3A6OjJcjH0LPneHhPANFI=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBoSCYOyVxQ6f3OBK/aG05w0mHNnvJLnDT+orDrz CyfWJIjJ4KJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCaEgmDgAKCRARpy6gFHHX ciHSEACbAaLEpy3rIEg/INTnqZRSZcKjIFtdWlKQuLFDeybOyeiSxsXh2wVCKE9HyLBM4Pe4aOe VeJn1Gr92epXjzFOgr9ljMI5XuvfDKiUaJ+rYkq7/Zs0doHxU2JdVUOZ56W/ksVaQRwyC8wCRBr 1Wli4N7JwPdD4t/y88MkdyHuplV05Azu8GK/HebhanaJmAdKsKGHxR/A4RYuWfrffEarVVAQ688 yj7fctEZEtajQVjw+qCP5GBjsONGyfRiTciEzFZk2Eo6IIQCZEYQq3wc8Gd6b/7f7x1mHHGRecY DySlDOvl/blSxGU/19Rk59Ji7N0jIHlFGoRdOlEfDYsyxYcQ1YGhBm/EWbwy7C7TVwwmYmhRHjQ 6U0crUDECD+RHZf8ESHp1fzD0gQD6M87Z2n5Qqj/iXDfT7F3+/E0NCfX2MGjJEoG9D+gFkzNSqN ovpcvq/yrRt4BiP+N/+81NwzARAgmNtA4arZxeyh5i4OqTMZtaMMgDsKwlZxHweLeCJzeHU2c01 Gd0uc8Rd+iWf1vbf/mnnIHTHyTaSYWwYmVxa/FJSj98NsXYkeE2f9VoTVKzBj/b4ltLuEiTBWHq cm2Kz0AGsiu4qJ7PmhkesDqXdEvXX8g0I9jum1a/5pvlAwYSlfyl1w9eyBKPjCur8y1vx+5atSV t1BHqk4gNTPA4rA== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij --- drivers/gpio/gpio-mm-lantiq.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-mm-lantiq.c b/drivers/gpio/gpio-mm-lantiq.c index 14ae257834381186faba94446ea326cb3be99ca2..897a1e004681c085217bcf295bd= 971f3424011b1 100644 --- a/drivers/gpio/gpio-mm-lantiq.c +++ b/drivers/gpio/gpio-mm-lantiq.c @@ -55,9 +55,9 @@ static void ltq_mm_apply(struct ltq_mm *chip) * @gpio: GPIO signal number. * @val: Value to be written to specified signal. * - * Set the shadow value and call ltq_mm_apply. + * Set the shadow value and call ltq_mm_apply. Always returns 0. */ -static void ltq_mm_set(struct gpio_chip *gc, unsigned offset, int value) +static int ltq_mm_set(struct gpio_chip *gc, unsigned int offset, int value) { struct ltq_mm *chip =3D gpiochip_get_data(gc); =20 @@ -66,6 +66,8 @@ static void ltq_mm_set(struct gpio_chip *gc, unsigned off= set, int value) else chip->shadow &=3D ~(1 << offset); ltq_mm_apply(chip); + + return 0; } =20 /** @@ -78,9 +80,7 @@ static void ltq_mm_set(struct gpio_chip *gc, unsigned off= set, int value) */ static int ltq_mm_dir_out(struct gpio_chip *gc, unsigned offset, int value) { - ltq_mm_set(gc, offset, value); - - return 0; + return ltq_mm_set(gc, offset, value); } =20 /** @@ -111,7 +111,7 @@ static int ltq_mm_probe(struct platform_device *pdev) =20 chip->mmchip.gc.ngpio =3D 16; chip->mmchip.gc.direction_output =3D ltq_mm_dir_out; - chip->mmchip.gc.set =3D ltq_mm_set; + chip->mmchip.gc.set_rv =3D ltq_mm_set; chip->mmchip.save_regs =3D ltq_mm_save_regs; =20 /* store the shadow value if one was passed by the devicetree */ --=20 2.48.1