From patchwork Mon Apr 7 07:09:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 14039815 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D30F6C36010 for ; Mon, 7 Apr 2025 07:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1oJEkpaKzk7KM5O+yA10t99Sq6/Y0ezDYdwYB3ESkdY=; b=wBAH+Coynbh1Q11uPzcf68E6CN M+xJcXX84inmu3R66POUQOiDdCZijau6uLQaoTuyaDEzE9oSDP1b7O/2W+98ViIuQwd8VAxCudZWP w9sZ8InhvG0nxNW5Bc6Z3PIa/awaES3skwNReo21079wMBCHpBIWL19DezOyr7yOJbVU4kcbTuurF nLDHsggPSeIAHWcd4RaGGwvR0zg1tUK2eUrJp3MjgOUkPvO3tUTRTXf6gqS0iYx67dA4YFZq8YMA/ Mep668z1+uBFP+dcfJlzBCGFRHXfV9D7ioFpCMtMgGIiqSFqbRQABeJ1ixYIeeDfyKq5+ojjuxkEu 6MOM1S8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1gfH-0000000GhWE-1DQh; Mon, 07 Apr 2025 07:13:03 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1gbn-0000000GgRV-31RC for linux-arm-kernel@lists.infradead.org; Mon, 07 Apr 2025 07:09:28 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43cf257158fso26759595e9.2 for ; Mon, 07 Apr 2025 00:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1744009766; x=1744614566; darn=lists.infradead.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=1oJEkpaKzk7KM5O+yA10t99Sq6/Y0ezDYdwYB3ESkdY=; b=rLa6iw66dwycPYgRl94V7/xQLXarj/noTPKj1ycRuQ/MV1vxcEFKM3rSqBwohX6Or6 KlJEb5Px1MG0tKxoZDpEuHOmu/73cSo5UigIJ6rEOJIdht7EpCXtNO44CL0lw2XTaXXj jFammtGwo43/HiBX9TZUicvmm1FdQM3Dce2PJxpBBCpQW2QyRnAjqFUCMomHW5PmJ9tV ytHzko/GuQHsbSsFOoDOb2/5RpBe+8YGpoelVDOoExwssVWcueFczcfOjwIIMHTu7I5Z 5CD31iOmcEbZahIeeLBnvr0hyskwyhA4xvcJQu9r/Tfb/O4u3oIeMu5fmtR5EGOHZHPB UfVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744009766; x=1744614566; 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=1oJEkpaKzk7KM5O+yA10t99Sq6/Y0ezDYdwYB3ESkdY=; b=mGXRYEU8TH0AI1WZaIdXDTXKycIKJtJKmatCeMDzgI7m059OhRloFxA9c7q6fuChFy wzYh2MayOvsN5kBUrdz7jDnHzJ0NtbgdlwtwX21QVfqPsJIVFtkDBniAL20F8SUe0wxm 7kAMFkAXc/Eg82k+FIki6jGIvDZE9pQNVp9LDWSVBVyIVeYuB00xa/yZjQIFWDma2j9C K6L6KuzOYK/9Cdl4s/7GSEDtTCX4n94nodYmwCpb7e73uuuGg0ebsE0AXzcV6NqFAb07 8l2PzJ8+zIj/URfBJnTZi9AtNH0BBu1spmYhs2YBD9Ir75Utrp+tCVqwYtEZzwV8wuOV 1yQA== X-Gm-Message-State: AOJu0YzxTdzP/12w45ob29NVSL+d/PMbCLK+7gL9Vpns700q+VMg87xR WH54LOZoyuFHip4CqYk7/VTNtcnKkrEF7m76lqmMdnO8aMNL/chaIl9zFKh9TLY= X-Gm-Gg: ASbGncuwyG5lQU9jO12sS8Kc59wIS7l8u3bas/npytGROnjgvx+ekopdK5TCVMpUk6F iahx61lfKwYzVRxtP49EJQ03wNtZ/NzKQYPEvkDa6sryzHGs4FozpotgwOv5SrLCI20sFiT6TCe 4NA//RgzaE7kPz606mcPZ2XojW+MkxHLwNuJ9ce16IMR6ZUiromlyJK69y+gJ3fK4iqOWhS8gdJ bRPGWvK6RLqnmuCZ8Z4umQTipQbZSMwD+x3Kl1XuSTmptbpM1I6WxT8TstgaaFI9Oy4rqmxRf9p r3ORlywz2DI/qEpbPUBkUCXoZ0lJf6TCZWzbI4OxHtMPLRIB X-Google-Smtp-Source: AGHT+IGFE6oyFiQ9CpLcLlV+haks6tvvNCLBB+aF4dXus3yMP1Llx4O8MohrwYM8rVwVT69R0foFDA== X-Received: by 2002:a05:600c:8719:b0:43c:f85d:1245 with SMTP id 5b1f17b1804b1-43ecf8e7321mr124503985e9.17.1744009766064; Mon, 07 Apr 2025 00:09:26 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:8c64:734d:705a:39a7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec1663060sm124622795e9.14.2025.04.07.00.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Apr 2025 00:09:25 -0700 (PDT) From: Bartosz Golaszewski Date: Mon, 07 Apr 2025 09:09:18 +0200 Subject: [PATCH 1/4] ARM: orion/gpio: use new line value setter callbacks MIME-Version: 1.0 Message-Id: <20250407-gpiochip-set-rv-arm-v1-1-9e4a914c7fd4@linaro.org> References: <20250407-gpiochip-set-rv-arm-v1-0-9e4a914c7fd4@linaro.org> In-Reply-To: <20250407-gpiochip-set-rv-arm-v1-0-9e4a914c7fd4@linaro.org> To: Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Russell King , Linus Walleij , Bartosz Golaszewski , Krzysztof Kozlowski , Alim Akhtar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Bartosz Golaszewski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1612; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=6854LsY/CEKL9LDW7nLKKhBRDGj/vD8F0/gksPec/Gs=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBn83ojv0NTNspg6Wx5Fggczg/6It7m8U2gT0lPo rxrHkr6h86JAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ/N6IwAKCRARpy6gFHHX chutD/0cndTpas2Wdg5qBWP1Y3VKSiVXC6hIuu1om0Dd6+1pvJPesqjLF2JFC6zXuYLNkg0+5Jg rGlvPXMOI1t9FgiAdbgKurXOq+HFhT4k2qSnOquBOC/PNHNbPYOOlpJuZidhiPkiCKltu3o92pr K7HivuuUnrD3r2PaQXoLjhIhZ+jnddu7iDYZQQYgSjAF2FXJVs/TOgQY+fnL2rRRAXZ4kfA/ll7 6dbIgHm1IM735m+b5kQW+9UuDG14bt/y9uWTJbvgK+xvtRhl5k9jyTWi/P6P3K93ceJolsL+zdC WUj/jWB0+TrXlKsF57cr4miv9xpRtfcFOM68jyZJYP/8RT/B5CCxCMHxW7L7SpUkcHnwtwhj6p5 Iz9NnHrsLZdZsytg+wpvHk5roaSVuWDVE77oA8uClfW6LB+PcAYTI3kuSkoVRVI7dfSXJWSLVn/ ouOOd1MUVkGTz++pCGaCtcnKe176tnqXb5Wm5MNK93LUMpg2F7KMVNZUW0NBY47bKkYN3Wz9ANJ hLKVuAzR5UxbPRdG3dHLIKEHknx3vm0Ac7/z0V1wh99rz6jMLZWAHXAY+/BJPRpl9jTJQEazQ6e 7nKzWccg6Qhy55gudCDhtyMQvrJPacNqZJ+cdOXjly/IYjPEwBorwqoF/42IPiZqADwOvawnQ1U Ns/4rCW8lnZP6Rw== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250407_000927_762774_610A27AE X-CRM114-Status: GOOD ( 13.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- arch/arm/plat-orion/gpio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 595e9cb33c1d..766036fdd792 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c @@ -211,7 +211,7 @@ orion_gpio_direction_output(struct gpio_chip *chip, unsigned pin, int value) return 0; } -static void orion_gpio_set(struct gpio_chip *chip, unsigned pin, int value) +static int orion_gpio_set(struct gpio_chip *chip, unsigned int pin, int value) { struct orion_gpio_chip *ochip = gpiochip_get_data(chip); unsigned long flags; @@ -219,6 +219,8 @@ static void orion_gpio_set(struct gpio_chip *chip, unsigned pin, int value) spin_lock_irqsave(&ochip->lock, flags); __set_level(ochip, pin, value); spin_unlock_irqrestore(&ochip->lock, flags); + + return 0; } static int orion_gpio_to_irq(struct gpio_chip *chip, unsigned pin) @@ -540,7 +542,7 @@ void __init orion_gpio_init(int gpio_base, int ngpio, ochip->chip.direction_input = orion_gpio_direction_input; ochip->chip.get = orion_gpio_get; ochip->chip.direction_output = orion_gpio_direction_output; - ochip->chip.set = orion_gpio_set; + ochip->chip.set_rv = orion_gpio_set; ochip->chip.to_irq = orion_gpio_to_irq; ochip->chip.base = gpio_base; ochip->chip.ngpio = ngpio; From patchwork Mon Apr 7 07:09:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 14039816 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2218EC36010 for ; Mon, 7 Apr 2025 07:15:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=P54VA/QfQ5VWCZa2DrfOM44F5qJ8PR9WzkkmyLvWpKo=; b=JoJpR+wK82lc44dtu69Vu16A3y h/O42UnOcsIZZSp8mTnXEwa3GvmGKAgbsuYtRMBZkzpu4Ay9zBqFMWLWlTJI8WuWBOMGDsqsGHBjh dKFg8ot35m3nAJqPSfO6DMQnwWRpOqdOGHOINBXzRvjg8pw4JIJwg7oLMppEnQs6yzus0LgKXU7dz qmsbKAUg0rB2MOkhgC+1kd74lfrCQ2y1RBr4RkzMopnwB8fnFpWgtTRQThSTKA5c7SFC++3/sSREK pexOmKG8uN3267T57xuq8g158StDLwZgWfrvbZteb5rkf4djxDRGkPQgn5OXr7ewAiPIVg+ZN18Cf GvD7C0bA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1gh0-0000000GhqL-4A4v; Mon, 07 Apr 2025 07:14:50 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1gbp-0000000GgS9-0Nx4 for linux-arm-kernel@lists.infradead.org; Mon, 07 Apr 2025 07:09:30 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43cf3192f3bso39855855e9.1 for ; Mon, 07 Apr 2025 00:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1744009767; x=1744614567; darn=lists.infradead.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=P54VA/QfQ5VWCZa2DrfOM44F5qJ8PR9WzkkmyLvWpKo=; b=euOLtTeaqSgeMDntojDiDHdjgyqNhpzlAhHtBong3cnsxy4GenoY9iRhgYA85YyGSQ 0/wOIZRQptiNRdEzwag9BK104cCw2pLWOMlXW1zUaqq9BBmBp6Z4aMD2UpIO4eDdspcm RwTzE896nMuT4A7fUB+IChx2+GrfpOUqdl5vRFM1bqxWwgoIjD1njdFBBkkWqfTlf9FB 1xUgztiCPorWeAes+tSAMWKokC4soJUARijlyBetgj5LEgF3T1aejrh3GCrkLrzDbZ7q Zc1jEFvHoEeYYRZ+fDAtTjKgwctH6qzkT8ADx5rE9kD2E9iogVK1OOBE1eUcM/adyyV0 n1VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744009767; x=1744614567; 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=P54VA/QfQ5VWCZa2DrfOM44F5qJ8PR9WzkkmyLvWpKo=; b=dwLKWnf7l5osKMO0Eks+GGNfpYhO4m+L4k66ELsD8s3Tty+ZKmbTDD6XEP2meLFdlp jdTXS//fZ2/+Rmo5+ZyeoZGReeQmAyfrwCE5P8WvcC3PERMP2QiwX1G5CK3LRt2nq8I8 jYBiPUka1kOtWO7LshzGphVM1Sa8GC4nN7C1IHhOFCOVO5Db/RKtcSCAECkMunP9Jtbb HpqHhojjwAaAhnDvqCrA4tQso+8x7wrHGON5ZuVHOHqRYX0YmbRX1RmX2hcY6u7VjW2L FVex1BB95f/W1fUMKMzJpJj9JLG65M5xiK2dSNZ/MYfaf1KPcCwS/ySa8tlcyts1Fn0K xrGg== X-Gm-Message-State: AOJu0Yzj7OElmri9UYR9LetmMQkWrpd9TGCz5siTggX0cePOSz+JSbBC /fY4k6Osp7ukNotgt3K8T7rz2Umoc/xG3IGbCBzKSODODi3gSqPdMQQEz6LPU36Zx7E9WIH7sF/ ajv8= X-Gm-Gg: ASbGncslAKQCUEjTrLdZ+AEXRDXVJuy2GP5u8hooiBt6WecsVGOPLl/5oPRUC7XtQgT gQ7bHhUvGmcRJ5P1vPK6omijSOG0haTSeUSgJq58s/tMzTKlAOsPj+mqtxo3WEdPCpTJeoziJ6c 451/xFXMxbhwiF3YmrARS252bIo7BzTmC2Ksd0GVHJ7pUYRXVER5DfzNT4Nq7RbpqxPAINY3yNK IQvQ1SzGg1yns7j2fIPe/LTW4PPBAgEg7ju6tcU11fGvlqJXW2AgOy3lGU2JNibEWoUKCDLsrPS /czpitcrM7qtroEz4ls4FxJp/P7yNRxRhXSH9Q== X-Google-Smtp-Source: AGHT+IHlbYVaSeQ4i6pCJ+5QwB6SPB1j4w0/Dq7AFXUieSOfltPppg5yQl42lc4SWdhOL/4TY1MnaQ== X-Received: by 2002:a05:600c:1912:b0:43c:fcbc:9680 with SMTP id 5b1f17b1804b1-43ed0d98e11mr66774425e9.25.1744009767393; Mon, 07 Apr 2025 00:09:27 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:8c64:734d:705a:39a7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec1663060sm124622795e9.14.2025.04.07.00.09.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Apr 2025 00:09:26 -0700 (PDT) From: Bartosz Golaszewski Date: Mon, 07 Apr 2025 09:09:19 +0200 Subject: [PATCH 2/4] ARM: sa1100/gpio: use new line value setter callbacks MIME-Version: 1.0 Message-Id: <20250407-gpiochip-set-rv-arm-v1-2-9e4a914c7fd4@linaro.org> References: <20250407-gpiochip-set-rv-arm-v1-0-9e4a914c7fd4@linaro.org> In-Reply-To: <20250407-gpiochip-set-rv-arm-v1-0-9e4a914c7fd4@linaro.org> To: Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Russell King , Linus Walleij , Bartosz Golaszewski , Krzysztof Kozlowski , Alim Akhtar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Bartosz Golaszewski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1726; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=xsWx6NHlIxnhL6jtmZVFoxqhJ5i8IDr9WwAEXelZLcc=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBn83ojCLYV8dzwcSNLnX4bkKX+gH1+RDkz/zjfu UvxHKlCXuyJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ/N6IwAKCRARpy6gFHHX chMGD/9WaglQntxBb+rFUYx9pTpsQhM2cuIhUhgxNCX/UTl/3szgAcD06UaZbzpECecUIUvcZcf xHvg9m/8zUqjvoulvOdHUUhu1M/64mJr08Mc59L7LYUNUP5DJgPZnDIFvclIIyXxgl2/R2TD2gb W1iJTaMePwcZgWSB00BZBRYxN/q8f/2O6XISU6cNUdJ0zYvgkW9M9tZhSzGQ65VB2MsoracdfiO Isfwpu60HyoH7bKqnCU3/NT3fn472ynWuWAOAKCLl5g5Bkv810i9mWpnLDn+db8t6hU86JhbldJ l/BNF2J2U4O74bHUDEVQwSDyvbHN1YOYCsTfOLgvQmlU7umqx+iCfPGsaqpp52oYItloneBpuWv HKWWkhv2YftZY44ytOEUa0y1HknhvANP18iKzjY+k4ZouGO45TXtsRrtHsYDOLk+c/DhqwwOmPF aDX2XQ3DsiwI6Jx3zvTNp5vT4FYSEwoSroABjT7ADXDkrS0mfbIwAAPYt60KWKhIQgj3OWAXJuM 0a7oF0P4c5rvq5KFVG9hl6GsbYufNkx6PVx+uslfrKQBjHZuV0EL7wCO8V6y10cEZBBeeUTTK+n kGGs5+XXX1fhdeD5Y3suIaahWADJWI5MkDd+0OajiUpvCEENwVBvEsmdNIW0nm3nk7OTSTKfVTD wjA0QNCPuSn2sHA== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250407_000929_135530_7AF0B391 X-CRM114-Status: GOOD ( 13.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- arch/arm/common/sa1111.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 9846f30990f7..70dca9937644 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -563,7 +563,7 @@ static int sa1111_gpio_get(struct gpio_chip *gc, unsigned offset) return !!(readl_relaxed(reg + SA1111_GPIO_PXDRR) & mask); } -static void sa1111_gpio_set(struct gpio_chip *gc, unsigned offset, int value) +static int sa1111_gpio_set(struct gpio_chip *gc, unsigned int offset, int value) { struct sa1111 *sachip = gc_to_sa1111(gc); unsigned long flags; @@ -574,6 +574,8 @@ static void sa1111_gpio_set(struct gpio_chip *gc, unsigned offset, int value) sa1111_gpio_modify(reg + SA1111_GPIO_PXDWR, mask, value ? mask : 0); sa1111_gpio_modify(reg + SA1111_GPIO_PXSSR, mask, value ? mask : 0); spin_unlock_irqrestore(&sachip->lock, flags); + + return 0; } static void sa1111_gpio_set_multiple(struct gpio_chip *gc, unsigned long *mask, @@ -613,7 +615,7 @@ static int sa1111_setup_gpios(struct sa1111 *sachip) sachip->gc.direction_input = sa1111_gpio_direction_input; sachip->gc.direction_output = sa1111_gpio_direction_output; sachip->gc.get = sa1111_gpio_get; - sachip->gc.set = sa1111_gpio_set; + sachip->gc.set_rv = sa1111_gpio_set; sachip->gc.set_multiple = sa1111_gpio_set_multiple; sachip->gc.to_irq = sa1111_gpio_to_irq; sachip->gc.base = -1; From patchwork Mon Apr 7 07:09:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 14039833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2F645C3601E for ; Mon, 7 Apr 2025 07:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mKHBQhlPmU3j6804TJoiY+lijz2sviuHoc3u/Cr+n0I=; b=2yHLqMzfpoco5IySBRKoRXorBn zTX2TjMkrlRsg3th7kd3Frwm2RTzHH3rtir3qB0wnoMDQdOibPz963/d8COsfVuTywmtxeETVlzXS tegJeOMNE6pZ1ylNhkF+TWMXDGao04ry18MJHA5n6PAPXcmZ6GCxws67LTvC9QEgIp6DySKv9rySI dLi/4JP8232j+SzgBooBbsshwccbH4mw0nAT+abL/HE7Hd2FTeo0FQre95MAVfC+RNnW15A44VLP/ 6qVWOY5Kt9mscHvT2Zjva4N6r+HGXWoO6nG5VWz5Haw24tyiJUPTJSWgZuW8x+eL8O4dCEel0UKmF mdOG7EFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1gij-0000000GiBa-2i2l; Mon, 07 Apr 2025 07:16:37 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1gbq-0000000GgSP-0Pfz for linux-arm-kernel@lists.infradead.org; Mon, 07 Apr 2025 07:09:31 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-39c1efbefc6so2168794f8f.1 for ; Mon, 07 Apr 2025 00:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1744009768; x=1744614568; darn=lists.infradead.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=mKHBQhlPmU3j6804TJoiY+lijz2sviuHoc3u/Cr+n0I=; b=1ITPt3JyVzzg2WGKPDykWtjiZHcIszm423gD4LSqc0bmqGskb/07/EKhdHsDb4gMlM /ZFBlMx3eifZyk/PkOCXmtqN4hWcUuTIumQgZlw7oqHTCYxJzMsvpM8JJrgqBoI6LY6b a4O65aKobM3W+gH292XgCsMxKUoAirv72ytDMT9qtvfkOVivs0iru832gPuw684yPEZP aONg+Wt4RPtXPjBJYiD54Bwl1m2T5AInOHCB/Mx7ltJVgJu6WISmMNvl68HPvQyspEEj Dz/Kt0+vTSSuBacld6Gi/Oh6aNM0rVRsFGIHthlAFZzGZw3AdNj7QzuddoSzRSxap3P0 KSJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744009768; x=1744614568; 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=mKHBQhlPmU3j6804TJoiY+lijz2sviuHoc3u/Cr+n0I=; b=FhYfM85AYUnfwGWrgSdqwhNJ5PeVnkB2J++VkxE44zml+fCsI4XtQNErEOlzbbYCRc z6uKbAi9Ao1cf65K0AwiN2tKhFxVvUCF+M+CU3ZQZ1nMlBQ6GZeAjOJ3z4/oyvVZt2b6 OxEpA3DQ7AKDd2frfEK29Ly10aN/3h6OoAO1/tMxa3lWOt4Xe8ysdQBiB3THN+H35r3H FRub+gsTRjRhk32k4qOOw9HUE+Y6h+4TeAuGVT9hnbpZl+zksfp2A0puGD7lg3nHTywq liIFv8Wo+YuhdDK5Qp7einbU5eZNZGfeflJXFT5lGwBI50DkSXuWvJWNcqWduv8TLpaE G4Mg== X-Gm-Message-State: AOJu0YyeiT6DlUKX1DS5B2gNvj+1KeRNXDjUGg0lsGQQMY3LsZMnwr3b hAc9sX1TuV6CVs/YMRw7VpRvsz+oKNNIOu/4sbqTLDY5LpARRRl+lmKTQreaXEE= X-Gm-Gg: ASbGnctnI2vTW6NIGXrRX3gvaxaLyJpNKSGKVssSeApQCFpBd8huPu382UPcuebamEw pwfKYH3tObvSpeChzvI/a3PrHQYj3g2FWTCJeMcZPBiMc4aFjjH0KBbumvlaX4BTuuyhdhezmS5 iCRcJdSfCJm6fb9gvSTWn5l6SkRqV2PaWSbGwujKPwacMzf/eXam9pmn/ddiNv5rCv+8q8MSa5M 2wHgCmhH52/MfP+mnq3Wv/1Ci14b5wDlaHU0Qg1Ra23H1psbY33PQaymMmJAKMJ3GxuIGuaQkwE HY40K4SbHpdh9Hcm00J+LqFv5JlSp52afT54869wMqVG5oHN X-Google-Smtp-Source: AGHT+IEOVwEvDvK/VaX877azSHwhGwB+qG3k0uZPl7enDJ5MXPhr/6Jl2r6haw04RdA5keAMOfMCAQ== X-Received: by 2002:a05:6000:440d:b0:399:7f44:5c74 with SMTP id ffacd0b85a97d-39d6fd06920mr4321098f8f.55.1744009768449; Mon, 07 Apr 2025 00:09:28 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:8c64:734d:705a:39a7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec1663060sm124622795e9.14.2025.04.07.00.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Apr 2025 00:09:27 -0700 (PDT) From: Bartosz Golaszewski Date: Mon, 07 Apr 2025 09:09:20 +0200 Subject: [PATCH 3/4] ARM: scoop/gpio: use new line value setter callbacks MIME-Version: 1.0 Message-Id: <20250407-gpiochip-set-rv-arm-v1-3-9e4a914c7fd4@linaro.org> References: <20250407-gpiochip-set-rv-arm-v1-0-9e4a914c7fd4@linaro.org> In-Reply-To: <20250407-gpiochip-set-rv-arm-v1-0-9e4a914c7fd4@linaro.org> To: Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Russell King , Linus Walleij , Bartosz Golaszewski , Krzysztof Kozlowski , Alim Akhtar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Bartosz Golaszewski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1649; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=ehKRyvYg5rUoJTMfe9/Qu0Sq86m2y/6ATgEJ9xwP4+c=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBn83ok4MKKf0abAA3OAYKfP6+RbRvjSZlJeEPjq onYoqwKNmOJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ/N6JAAKCRARpy6gFHHX cg+gEACBTJJGVlRuVE35u0vd0TPLco/EUqtFuji2MMq9tgOsFcm+6EyEyHEQWYwVXELmtyi+pgs v47ssFCyjuUpRiTQuoDAiz+kNGhhbedC/Y81QS9HhmIiqRr7+4or1ntC0EF6w5bDaCJ8czd5b1u r+uHTdRr3K0PH7leknEkF03e2e8FaUoC6DfVhGDgiKSNujP+zHMI7CTLP1CCLMw6Vni4z5rnZ+B DTtwtPu/nStaMeYbGVVXdRHMfuzLqGHhT/vURx7RlT8x4ozmQCC+hRgjMeokIALearKmc9fxYGB 6mLjyWbGDqlKg7ewiYLhs4/hVQqxrveH8fwxGUhqb9gu761NA6BXH6uqRGupXN1Yfb9bQBJDv0U 8egk07IK/MjZ3r1pBfvICWR7mPPe+WPaiEIZYJdVU0FZr3n5qbj5Cvx3cxDbMawDkChProIlGKB La8MSZeeryoNdDhNqBCuTQDl5LzdUCQEZgr6a750ft2Lx8NJRckIBa9+xlwydt5/Sed6G5FqBtj mb8BBh21dARgYpr76EntXsciH5RifmwOuKMO8WhVzLwM920GOuBCc0KnVZjgE3BBSRyLZnjsLEj S6Uy6Iibd+lHLM8ACyvhERmG9VK2xhyBVzAKzEjp7D8UMlGaSjXznkrvHdePu3ybRMH4hftvDol VtUkDFktum4jREg== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250407_000930_143184_D8A0028D X-CRM114-Status: GOOD ( 14.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- arch/arm/common/scoop.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index 0b08b6621878..2d3ee76c8e17 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c @@ -63,7 +63,8 @@ static void __scoop_gpio_set(struct scoop_dev *sdev, iowrite16(gpwr, sdev->base + SCOOP_GPWR); } -static void scoop_gpio_set(struct gpio_chip *chip, unsigned offset, int value) +static int scoop_gpio_set(struct gpio_chip *chip, unsigned int offset, + int value) { struct scoop_dev *sdev = gpiochip_get_data(chip); unsigned long flags; @@ -73,6 +74,8 @@ static void scoop_gpio_set(struct gpio_chip *chip, unsigned offset, int value) __scoop_gpio_set(sdev, offset, value); spin_unlock_irqrestore(&sdev->scoop_lock, flags); + + return 0; } static int scoop_gpio_get(struct gpio_chip *chip, unsigned offset) @@ -215,7 +218,7 @@ static int scoop_probe(struct platform_device *pdev) devptr->gpio.label = dev_name(&pdev->dev); devptr->gpio.base = inf->gpio_base; devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */ - devptr->gpio.set = scoop_gpio_set; + devptr->gpio.set_rv = scoop_gpio_set; devptr->gpio.get = scoop_gpio_get; devptr->gpio.direction_input = scoop_gpio_direction_input; devptr->gpio.direction_output = scoop_gpio_direction_output; From patchwork Mon Apr 7 07:09:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 14039834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5E6FC3601A for ; Mon, 7 Apr 2025 07:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HsaSC2HaVJRroJP0HwzWYTmvmXosq879cETOeyvqI4E=; b=NxKAlonZv6m7o+3MBtkB3fJMtf da5wyHvXEUdH1tfsO9A4oZNn0tRZnbWb0ZAeWLE1CyI9b8hnEiNYoltLwaiX6t0oECnSRF32msbiM OGMrsKXVmY9EQDqqw2e4gS+M4hZ4YbB1foD9dGsVA122SwKHVLp9U0qsghP4CvnGb4l5qr165PKhZ r5q/J4qLqk6UX6tnRhUAdTI/DUF6GyGRGPAd+1eA0+Rq8b9x3NC8w5J3rREiBdzkvCNv+dFcJLqx9 +W86qKD8dGtxKhNCG/flGhCXfruSLKqs9HgZuKeq7l0Fk2LTX9unzW/B1n3JpdorKyTCPtDqrgQ4R H7Bt4a1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1gkS-0000000GiZh-1n2M; Mon, 07 Apr 2025 07:18:24 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1u1gbu-0000000GgTS-0elG for linux-arm-kernel@lists.infradead.org; Mon, 07 Apr 2025 07:09:35 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43d0c18e84eso19913135e9.3 for ; Mon, 07 Apr 2025 00:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1744009772; x=1744614572; darn=lists.infradead.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=HsaSC2HaVJRroJP0HwzWYTmvmXosq879cETOeyvqI4E=; b=SNr/c6Bvv0xoYcvqnITwcDaA7evnY85CUlJtvLlI+1gYWJi1bmNNapfHBTI1M7Z02S E1ShW6ZZzRoYnz/RbLPG3qzjyUvM2qTpN9NlJR5ZNDR5IjqvrIquTN2/Xqno/FaV+eCX fdcM+fvuI+P9dZW1o0//RK0A5YAN2Ru0w6m+y01n7wofaZ4QnJRh5FOccCnAsRGa38xO cL/8NTn9mqeZc2543+SAYi+I41ctXWbsenUYt19ZtnfxLI9RuF2rICrhZn6Vq10WEHHp fiyISG/m4W81iwKxIX+c41udAM6yUFii59g9nQHm0iD0t63U/6T5JFIk5WhidEXY2QMu bgRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744009772; x=1744614572; 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=HsaSC2HaVJRroJP0HwzWYTmvmXosq879cETOeyvqI4E=; b=oLj5odzs8KHSTKQDecbNDdnaqs7HAybMQLE/JPIlZwCkpWYu+LXn+4W/A9xm5ZNBY/ QzmsoTLPAudmf+Lv7a1sDkdokePBp9JhuDVjXgQf9L8Go1+ASOlUm203krodpBAkPC4P wtuiBSeKeIfTYvViKidQRBdQOjAaY7tqx+Ps4r++Qb1YhgLSP9QOzqD0hS6PEOSWSWLk 0tsFLLffZ03iOwid+q4H9+3lkfs/eDvD3HUiAlh5dAavq+mGh1qX+CT+P3HrWvnRtaAV K+KadYS5xUu1GtMTPR4RXhSX6qIYx5Oub2XYOb7IwkB+172QTdbVyXcdiWOZpmQ7NrZ8 vFKA== X-Gm-Message-State: AOJu0YwirIbUyLHGBFlRflfIjH1C+qUVqA/KLkcJGdeB9f7Y8fNVbpM/ t88OhM4SXFvnrFY8eYjhh/4BAoikNMWKofCyndY+xPKY7Jj96HtCspeUh0n2Bsc= X-Gm-Gg: ASbGncuSwYUMnE14rKJpvSEgYKfzQmS1Y8Abvj5C1eYaNBmYzpZ4jB6RrfNkeZevYCp xJPOBiER2pJZuj37wKVPdLMLVOx7cpQsxL7CJHgieBDHBP5g3heVWuLlm9IT/1q9wVDvEbKdO65 KkT+txTg14FhLYNGefTbVXqI/7uf66JVJZpgrJsUzJP4yR2ChzWBmUSJiVZAR2vylp0KNpgU3yH YCcHyZq0lj64rP/4QFnbXxQF3GR1KdyHbAH1ZI4SOlG2zyOt/XfGb6xsPRPUDKrv8pOfmLmJnyP +KW1bJZpaZJ7G+6vmyRdbUd3XS91yU8/4ad8Gg== X-Google-Smtp-Source: AGHT+IFoq+Y3x3L+TzUAPfnpayxhMl0EXTH8ChvoeKZsiBjolFAg72wzCsqeqv6HGqtEWqKDzyAzpA== X-Received: by 2002:a05:600c:5394:b0:43e:bdf7:7975 with SMTP id 5b1f17b1804b1-43ed0db4aa5mr81239825e9.32.1744009769231; Mon, 07 Apr 2025 00:09:29 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:8c64:734d:705a:39a7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec1663060sm124622795e9.14.2025.04.07.00.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Apr 2025 00:09:28 -0700 (PDT) From: Bartosz Golaszewski Date: Mon, 07 Apr 2025 09:09:21 +0200 Subject: [PATCH 4/4] ARM: s3c/gpio: use new line value setter callbacks MIME-Version: 1.0 Message-Id: <20250407-gpiochip-set-rv-arm-v1-4-9e4a914c7fd4@linaro.org> References: <20250407-gpiochip-set-rv-arm-v1-0-9e4a914c7fd4@linaro.org> In-Reply-To: <20250407-gpiochip-set-rv-arm-v1-0-9e4a914c7fd4@linaro.org> To: Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Russell King , Linus Walleij , Bartosz Golaszewski , Krzysztof Kozlowski , Alim Akhtar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Bartosz Golaszewski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1523; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=abv30zYA5XuyGwoeP1ru48ZEwjgixTtNG3nmu6YE3a4=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBn83oktedBQx8pZUxbFWhdPQr1mhvAceAMNekvM eg9/SFm5bCJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZ/N6JAAKCRARpy6gFHHX cr4uD/920+W4HTn/DythHwMtCVrHef5JpB0YFglUyOJ4l+wrZNhV0VZcDRiw3F4l9uygDSEhyso biZUtfnWodZkYBVGq/dILl7oXl7vF8oWyBJBOzWK3dQxlFdzjiwjxS61wFDTiJtDqrwoHDBGvTP cdZzcOKwYrcWrxD1m8tsHEr4sYBaocCBaMA2DwOBsmTMuwLcnEhYE5HaoI7qjMdz+F5QjH+F5lT F4ogzhuGDbEZ6J5R06tmUkVr48izLrPyCCplJRhaREIq62mx+mTilrFqFpqxB2iDdfr46vmCzuJ 7xIvHs5P4COrgPm6/I5bKr+h3+1VzO7HQFBoDKY2Xuzejttwa3sTTD2RzFuKJiHYYkQM0Oxw178 Evb4gwQE/VxyQWocnlavibF52tIaBu3yLnHlf677OVaESjEllEOiw4lWfYVjj0vfVMDeR1OMO1/ +KBoC+MsYFiv2hkzvDRonuAMQITxCp1ygc3x2w6s9X7KYWS1CkudDWlCs/NRSMobunZUcYUkspl nsvorsS0oxCLJ07Oetc1JL7Q7A9uln5YELWlRQEIIT8hUBtLX7zVdJtvH6QwPqg5flDaNLjrTz/ O4tqaQq1mIozfl75z4Xn3k4+O6OudAZzvKN7VnXBJAK8HhrKrll2cDu2DajhxBcH61elXnqtFyn KFr7Ne2L2ryXdeA== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250407_000934_200145_AF3D1603 X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- arch/arm/mach-s3c/gpio-samsung.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-s3c/gpio-samsung.c b/arch/arm/mach-s3c/gpio-samsung.c index 87daaa09e2c3..ea496958f488 100644 --- a/arch/arm/mach-s3c/gpio-samsung.c +++ b/arch/arm/mach-s3c/gpio-samsung.c @@ -430,8 +430,8 @@ static int samsung_gpiolib_4bit2_output(struct gpio_chip *chip, return 0; } -static void samsung_gpiolib_set(struct gpio_chip *chip, - unsigned offset, int value) +static int samsung_gpiolib_set(struct gpio_chip *chip, unsigned int offset, + int value) { struct samsung_gpio_chip *ourchip = to_samsung_gpio(chip); void __iomem *base = ourchip->base; @@ -447,6 +447,8 @@ static void samsung_gpiolib_set(struct gpio_chip *chip, __raw_writel(dat, base + 0x04); samsung_gpio_unlock(ourchip, flags); + + return 0; } static int samsung_gpiolib_get(struct gpio_chip *chip, unsigned offset) @@ -515,7 +517,7 @@ static void __init samsung_gpiolib_add(struct samsung_gpio_chip *chip) if (!gc->direction_output) gc->direction_output = samsung_gpiolib_2bit_output; if (!gc->set) - gc->set = samsung_gpiolib_set; + gc->set_rv = samsung_gpiolib_set; if (!gc->get) gc->get = samsung_gpiolib_get;