Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2012525rdb; Tue, 3 Oct 2023 07:52:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlkynAGcrZO0wegSN7/wBfXnW/xpmU+xXdFrO5Di5GiqiNUZe/ff5TdfNi2oG4okbSWMG9 X-Received: by 2002:a05:6a21:3e0a:b0:162:c4db:1dd4 with SMTP id bk10-20020a056a213e0a00b00162c4db1dd4mr14379747pzc.26.1696344735716; Tue, 03 Oct 2023 07:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696344735; cv=none; d=google.com; s=arc-20160816; b=hSdggdrxwl2RP6IZ3vLLsgfw/xpiwBNixzG9KslvnxdsNJD16NDw6xHg6CYm+6UFUh DxIL29GZllFKNUx7QVtH+UrTTriplv0n8ncgntwfIwA7PZ7h5KLZOYM8TaXD8DfemZqB joiaGZte5j4hfT+hIu9b6t0JhsWjgoGOAI9OmRCSvbl6B1srucQfeWv0jxaAUOp2WUfL VO9CKkJFyC5hcjOb8eU3t/bG9trwRCpAFAQSjgS7OXe81xZYvndtW5m4mN6mtUTUjXq+ GRtDo7OF2vgsCYWmCVqwNCvQBcdankQObV4I3J53k4ExPWelOufi7Ob97NTpMxhtothm /79g== 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=m+cAT0NJxUIuqflU1cBfM6vQPrUJJd4UlghEqs5YsBY=; fh=sFZAJ5ezbypTez9WcxrfVuMim2Eh6JACjzNsyeVATp8=; b=W2nB+cn6wmzlLdXCTxNq4XPJf0e88Tgew8Ja+T3SCeGutwa4HJbqxwPEGo/BeJPFvc rC0pw08iUQD4K08mj9yycI+fDFEbB3X3udXIJBKgidYS45Tuk/4Uc79wbbytS17e3AC3 /2Gz68feNzrGnLNBe3DwGELxNIAZRCD/dKJ91HizDeFGwWNhCWztYYaO3Mv1LVz8UhIm sdEfjvF7RoZk6w1dZpgdJFXclMtNoL8F2sTkdMF+3wpFFN62vatmMt3GVZuWYeStvplb qLAfqhWn6UKl7WgL5+jZ9gawZfaI3S9lEOUWFPVrMpqcXYSU6dZfHhIN+qCUcVHfDkqs FLPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=LFNdR+dp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id c6-20020a633506000000b00577f6b56757si1607639pga.495.2023.10.03.07.52.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:52:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=LFNdR+dp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 8788A8135BF8; Tue, 3 Oct 2023 07:52:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240196AbjJCOve (ORCPT + 99 others); Tue, 3 Oct 2023 10:51:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240186AbjJCOv2 (ORCPT ); Tue, 3 Oct 2023 10:51:28 -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 D6A75AB for ; Tue, 3 Oct 2023 07:51:25 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40666aa674fso10075725e9.0 for ; Tue, 03 Oct 2023 07:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1696344684; x=1696949484; 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=m+cAT0NJxUIuqflU1cBfM6vQPrUJJd4UlghEqs5YsBY=; b=LFNdR+dp4rIVI1EYTfKCEFUufwfItUQ9v/T8U0/sMedgyzvNAZTZJpsRGBUBGkZAJi gJagrqCK1lf9vndHIqNkIGbeGseePrXKlrzL726CLqTD3+7KGynrfFRMHeE/EcHauTCi P8JJe8BBS78kH6N+BiJR6jdl5hSJGg/hntlzfHHahaLhZoDhCaISyTpbhk4EFLXoFO4U jBjsCOWlY3BGBWNt6osytY7te3GyFMbqWKzl4cXkdZdbrlx3AnieG5g9ex2Sua/TCloy 9j94/cEfpZygogEmUI4SkrPKXNFxgPCnwEjW8GELXO+LjLXRNUYOnusEVZUBXCJARS7O g7mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696344684; x=1696949484; 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=m+cAT0NJxUIuqflU1cBfM6vQPrUJJd4UlghEqs5YsBY=; b=dyn6ZsWFz7YeikmHcpgyW++SDepdcS4ONrx7eKdNX94ku5Z3cPZFPR0Vo3m+l2D2dV WCLLsS+AZdcE6/Vxv6sxJp2tS0hpPz8B/F5De21h09Ne20ISlhs4Fv2oiFU4HBKS1vrt 46xHbLhxi/XFHtiv+pnB8XM1Bv/52qcSconoFfVt882O8AkHaF+XtYNgvNSbuzCz4ouQ JVlk4Rc4BLqH6Wp0yw7K8cvlX6bcnnaRCZAytru8Qi5POTC/w3sdZdLMtodtOjTiefTU E+uyi/4X2G5XFUQ90gruQUZyzCzWlgBQx83oxM+G10exdViLrd717zV6gX05gFVJbGD6 n7gw== X-Gm-Message-State: AOJu0Yw6j99liRFrhg42ITWX6lnImlwnuo/aVBuqdP+dEEVT2lCp67ck azJkDXY2AneRWGicsCi0YOLqNA== X-Received: by 2002:a05:600c:ac9:b0:402:f55c:faee with SMTP id c9-20020a05600c0ac900b00402f55cfaeemr12308302wmr.26.1696344684393; Tue, 03 Oct 2023 07:51:24 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:51:24 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 03/36] gpiolib: generic: use new pinctrl GPIO helpers Date: Tue, 3 Oct 2023 16:50:41 +0200 Message-Id: <20231003145114.21637-4-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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 03 Oct 2023 07:52:03 -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/gpio/gpiolib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 7c27a1efc1b0..511f6220071d 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1854,7 +1854,7 @@ int gpiochip_generic_request(struct gpio_chip *gc, unsigned int offset) return 0; #endif - return pinctrl_gpio_request(gc->gpiodev->base + offset); + return pinctrl_gpio_request_new(gc, offset); } EXPORT_SYMBOL_GPL(gpiochip_generic_request); @@ -1870,7 +1870,7 @@ void gpiochip_generic_free(struct gpio_chip *gc, unsigned int offset) return; #endif - pinctrl_gpio_free(gc->gpiodev->base + offset); + pinctrl_gpio_free_new(gc, offset); } EXPORT_SYMBOL_GPL(gpiochip_generic_free); @@ -1883,7 +1883,7 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_free); int gpiochip_generic_config(struct gpio_chip *gc, unsigned int offset, unsigned long config) { - return pinctrl_gpio_set_config(gc->gpiodev->base + offset, config); + return pinctrl_gpio_set_config_new(gc, offset, config); } EXPORT_SYMBOL_GPL(gpiochip_generic_config); -- 2.39.2