Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2013824rdb; Tue, 3 Oct 2023 07:54:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmICAOlhNvd3B3WjfeMKrUWtEReX8vQyjt2pO9DxXtL6s9xKN/pHBF/+HNaxWTbdxDNzYX X-Received: by 2002:a05:6a21:3381:b0:134:2b31:e2a9 with SMTP id yy1-20020a056a21338100b001342b31e2a9mr15670609pzb.0.1696344875442; Tue, 03 Oct 2023 07:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696344875; cv=none; d=google.com; s=arc-20160816; b=RhTohgQluOlp7zuytbFV/MiZt2j+sPFIgqpKceEePbyZliCPKDn26JgQGok0VRVEdU 0qD084DaJ4vIedIeDPjlXORWkXzMhGZ+H/zexNPAzOyFkrL40gvFFdiiXdQH2mAvspWA JPZ9Zt+OFTtWmrGkTAoSvwPlbD8VDPVoukT7zeBur/DDlFMuoRJUp6wKEC/i5ZkU7IDp VmdgMpjF0CMhUHlPPwMK0CjSKb2sY9wIfPiZ1T9A/Jv0JmmaNY83Sw8JoiWgBDw70wQl 1xWjlU9RgDoSYVRsslsTSmb3dwMt6M9DsGdv7SeoU6xUTJJgDWGSu0lELBQrt9ezveF/ maRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FGIsRy8XjuOZvKHt9t36YQP6zzvIBqko3/T4/ujae7w=; fh=x1DgyNXKEfjYkXqXXPufQFwofrVBzO35FZ3LY3zi2o8=; b=LFxcW9WaMmDZBUet6i+83Dw2g0TtyC3S4oicYUsr9sAL0scbcd1zXyMqaCEgSbmkU7 KXWxJP9p5XuaBTJ5VZUogrooU4C5iHFu6wJMZV2USLN5npKp7tC3+2NwuyQL/6l3gRek 9BvnlYvJ9LMxUvP3Ml6IpCPLOmfWxPMxmAsSPnrJ4I2yGp+TR5kzvyOHSM35QyvK0xTe ZTUjF5JgK1M8TB81LsehrxeEdqj76k5S2OcNpQsc8kafA3Km85W+gSFeN2ONMG0W4Kxu Qyl8FhTbiBTLaCEdIUe55uiqtombGBQ58jVI1v4DSS1YKAmOfjkmQwnK1AtpU0Kz4vmI 8YSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b="PU/F6s6j"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id t32-20020a056a0013a000b0068e4a646d2csi1754275pfg.252.2023.10.03.07.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b="PU/F6s6j"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B4CD181142D4; Tue, 3 Oct 2023 07:54:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240354AbjJCOwW (ORCPT + 99 others); Tue, 3 Oct 2023 10:52:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240253AbjJCOvm (ORCPT ); Tue, 3 Oct 2023 10:51:42 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15E1DF1 for ; Tue, 3 Oct 2023 07:51:38 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4060b623e64so6338675e9.0 for ; Tue, 03 Oct 2023 07:51:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1696344697; x=1696949497; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FGIsRy8XjuOZvKHt9t36YQP6zzvIBqko3/T4/ujae7w=; b=PU/F6s6j7k/zkzXy9y/UonWjmhRyUiVXR3TtUxs3as+kEAiHKrF7zqFhIt58KeIDBK OLuvrHUN2hTyute2gRo9+ZcKBStowLJ7yuCz4pJiPip+hnued0xzP8h/ihbM4yeo62KP 4XWhaIvvIk/rCrKE3mL/srp8CObJ86M4AoYTEdPo7FD+pRdbnHXbbc3I2KnY630hriNX CHCpYMumrecTsDx0bBxDJ+QNt8Wi8+7C3t/lfcGJbL/bIRFV9Jl+i+4tA/ODF3avbOaF co4Bdkt1WUmplaI2r+NbrM1tsPd+Tf5Aq9i0tZ5vGrqchwR9QJWlxEZstgEQ5pXYnvsU jQ/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696344697; x=1696949497; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FGIsRy8XjuOZvKHt9t36YQP6zzvIBqko3/T4/ujae7w=; b=OyhbGhvgXnX3CzP+u/IjeJS47+zdxCOzHke5BRHpztq+dsbaSMD01yywisH30BS9/r LAfLMNAl1Zae30Ckx38OaF6VfgdjLVzNsQMR+YRz9FUcbVEMC/D/m4xbdJm5kxlOWGTI 5mRqKid2tXUNKjnSlt/gTKAnZGennQWnonPdnvcy4IJTxcB7SrOtpJJFVaP/kTKGGgry Ms2oIzgW8ZwtQXxr+pakD/1+snN5GTF8+WIqMbFYqFbhROwCDG88f8QDicdE+YZk3QxH Zf7EmVan5gt8AC8w3oEFprtd45tuj2m1EF1trnVARJcC+rQSk7tFYQMQftXD0pN2Fl00 9rag== X-Gm-Message-State: AOJu0YzEzshTl0bVGhE6XC76n9ZTXvltpQhh9XL4GiKiGLhxfdrce15R oscMzfgGj9hEMhwiI6cfc6g8wHWwxOcyEhtsb1I= X-Received: by 2002:a05:600c:4f4b:b0:403:aced:f7f4 with SMTP id m11-20020a05600c4f4b00b00403acedf7f4mr2371018wmq.12.1696344697353; Tue, 03 Oct 2023 07:51:37 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:1f2d:3479:a5de:fa35]) by smtp.gmail.com with ESMTPSA id c15-20020a05600c0acf00b003fe29f6b61bsm1462773wmr.46.2023.10.03.07.51.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:51:37 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Emil Renner Berthing , Jianlong Huang , Hal Feng Subject: [PATCH 18/36] pinctrl: starfive: use new pinctrl GPIO helpers Date: Tue, 3 Oct 2023 16:50:56 +0200 Message-Id: <20231003145114.21637-19-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003145114.21637-1-brgl@bgdev.pl> References: <20231003145114.21637-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 07:54:19 -0700 (PDT) From: Bartosz Golaszewski Replace the pinctrl helpers taking the global GPIO number as argument with the improved variants that instead take a pointer to the GPIO chip and the controller-relative offset. Signed-off-by: Bartosz Golaszewski --- drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 4 ++-- drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c index 530fe340a9a1..22a2db8fa315 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c @@ -918,12 +918,12 @@ static struct pinctrl_desc starfive_desc = { static int starfive_gpio_request(struct gpio_chip *gc, unsigned int gpio) { - return pinctrl_gpio_request(gc->base + gpio); + return pinctrl_gpio_request_new(gc, gpio); } static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio) { - pinctrl_gpio_free(gc->base + gpio); + pinctrl_gpio_free_new(gc, gpio); } static int starfive_gpio_get_direction(struct gpio_chip *gc, unsigned int gpio) diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c index 640f827a9b2c..5557ef3fbeb2 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c @@ -547,12 +547,12 @@ static const struct pinconf_ops jh7110_pinconf_ops = { static int jh7110_gpio_request(struct gpio_chip *gc, unsigned int gpio) { - return pinctrl_gpio_request(gc->base + gpio); + return pinctrl_gpio_request_new(gc, gpio); } static void jh7110_gpio_free(struct gpio_chip *gc, unsigned int gpio) { - pinctrl_gpio_free(gc->base + gpio); + pinctrl_gpio_free_new(gc, gpio); } static int jh7110_gpio_get_direction(struct gpio_chip *gc, -- 2.39.2