Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp768303rdg; Wed, 11 Oct 2023 05:12:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWeTSIp+z2mp8FTKT55IC0HFuBQhM0zZUCIkmLLknILU4YCe9Kyf7SF7jy4NbMQjlcruPr X-Received: by 2002:a17:90b:4d8b:b0:27c:df02:88b3 with SMTP id oj11-20020a17090b4d8b00b0027cdf0288b3mr7955097pjb.8.1697026340667; Wed, 11 Oct 2023 05:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697026340; cv=none; d=google.com; s=arc-20160816; b=Nza6DkxZWjC20kk68RusH1fgkWucizFgd79PkEuNx9SOLGVtKWi5WOn8Vzt4zos/oX XB810P+MUJIVry9JvLMr1sTlH+7iC3Tt8sqZQtF6Ed2E3rcqSRTCIbirQRl+bKUnZLV2 RtY9rxu81DSHx05DWnFmdfkqFyOYPXpgQ7cKgYUwXXUAvGMqRUoVyW1khsV9Ppa1KBZH exYO0yP8asjK1uQvnG8ejLc3z+opGXKmpjD0WP/dPaM8RoKekLCRAGvJWkF3e0gKEIzV OZsqZ4CGzvogchMN1sSTZ393EJYR/XqZHwa5t9OcXXUST19Hqr/KnJjCSAjtpZHaACSV ttrQ== 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=Ks2t/2sFBUuZyfDpT4cAX7qKrPmH6DMrQUqaUAZXib0=; fh=kOxmq+prcfKKX/dgMaMxTb6TRjzyc//QKXZBiaS/a94=; b=jp+7B+VruJSVd1gLkHUaYnNRvUfAn44hiH5Qrn84OaYCqjGPKP//6eI4bDgurPGOV1 JSaj9rXf8RDT1JwJFpBc8K30y+u81XnBozXjpH8vl4LLOMaKBJhHsseunhej83g+MjJS sX/7LToIRR2ItuIv0VMPhg6JsHZrO0mMFQMEqx5uhgwF472RhV6l7J7DfDyaWWEqjcJy qTxzWM8YhbZ6XasCp+1qYvubD2KYgbgHL+Z1KkyNdzBL3cRJGdiU4sfRMsG0NaRnsXas pnB2udsz9GQBwaePF1xg9j1/R9Ml6HfgAlwt49P/GCxj7pxVeI1psSWc9ZQMxKZ2aExJ mfVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=o91Zf7B6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k6-20020a17090ac50600b002774e11ca41si16087599pjt.67.2023.10.11.05.12.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:12:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=o91Zf7B6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 3EB62824C4E2; Wed, 11 Oct 2023 05:12:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346884AbjJKMLC (ORCPT + 99 others); Wed, 11 Oct 2023 08:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346861AbjJKMKE (ORCPT ); Wed, 11 Oct 2023 08:10:04 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B9FD1A1 for ; Wed, 11 Oct 2023 05:09:38 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-406619b53caso63175295e9.1 for ; Wed, 11 Oct 2023 05:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026167; x=1697630967; 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=Ks2t/2sFBUuZyfDpT4cAX7qKrPmH6DMrQUqaUAZXib0=; b=o91Zf7B6sCrisBCXWYTy+Y8B3svAz11INSZBIK56Dt29JevW44M5RBIjoj5osCW7zT TDmuOSyWJvW1MOke3yZ5QmW4HOd030bJnlBcBcYfnmxG+2mGucpC7x9vuox0fC/lz0kB hU6NJjoIs81yyC1zSrkwkrMTzIxjfyMwszjhDoC7VAqmLisvy0dqJDmlp3VVvQ9hC1uS gI4r9YNV7uHgGe3AbyfTf497bQWyfKmL97C/BbU99FN5rTBx9DED9qULPWbyQFoHufoL a/HF8b1EnhzsVyBx3PcUigzNGYwourjxMlQZXrGzNrwixw4WiBIPi9/1Y/XLkJlKBa2i O2qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026167; x=1697630967; 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=Ks2t/2sFBUuZyfDpT4cAX7qKrPmH6DMrQUqaUAZXib0=; b=ngdcrUKMB1ZhQIW2wh0s9TjSlpPEC/cVih6sdm8g9iOHtu5Z6QqXLoD4Rg1ulcXaHd N4Mchk5GJGwp6Pzz4ZBDeuOZFSM5kA7SaJJYx2rR54Hidrw0hBqCPkuspBIsgNC6X25T fEUG3ZviqFwA+BI7oVa4ZhnC0slj8Ap6j1yQydM6PnA2eAqV3H5A9ovzbAWE8Nu71RmW kIGKTdQHis9q7fZcPalEWDXpytR/BiE8UcJ2WM6BOfBwxjbMFeMFSaZk+iKehalGEYmh W6zPBBZ9qOkmPdx0TAiZCMLxnuxgiYckA+cMoJ3+GkAwwiTYb1n8488gCFiTmsUbD9HE X02A== X-Gm-Message-State: AOJu0YwNKTilQuMMWGr/XBifv4qN1K+s6OTdb+9O5NeK8oCxOjZMMm3j zfyRc/gLH1DmRa/nHVmd6jDR3w== X-Received: by 2002:a05:600c:2154:b0:402:ff8d:609b with SMTP id v20-20020a05600c215400b00402ff8d609bmr18248812wml.33.1697026167228; Wed, 11 Oct 2023 05:09:27 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:e551:3946:26fc:f94]) by smtp.gmail.com with ESMTPSA id w21-20020a05600c015500b0040652e8ca13sm19012253wmm.43.2023.10.11.05.09.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:26 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 22/62] pinctrl: mediatek: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:50 +0200 Message-Id: <20231011120830.49324-23-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011120830.49324-1-brgl@bgdev.pl> References: <20231011120830.49324-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 11 Oct 2023 05:12:08 -0700 (PDT) X-Spam-Level: ** 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/mediatek/pinctrl-moore.c | 4 ++-- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 ++-- drivers/pinctrl/mediatek/pinctrl-paris.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/mediatek/pinctrl-moore.c index 889469c7ac26..dc41ffa31357 100644 --- a/drivers/pinctrl/mediatek/pinctrl-moore.c +++ b/drivers/pinctrl/mediatek/pinctrl-moore.c @@ -512,7 +512,7 @@ static void mtk_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value) static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int gpio) { - return pinctrl_gpio_direction_input(chip->base + gpio); + return pinctrl_gpio_direction_input_new(chip, gpio); } static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int gpio, @@ -520,7 +520,7 @@ static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int gpio, { mtk_gpio_set(chip, gpio, value); - return pinctrl_gpio_direction_output(chip->base + gpio); + return pinctrl_gpio_direction_output_new(chip, gpio); } static int mtk_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index 74b15952b742..fc046415b567 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -811,14 +811,14 @@ static const struct pinmux_ops mtk_pmx_ops = { static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) { mtk_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } static int mtk_gpio_get_direction(struct gpio_chip *chip, unsigned offset) diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c index b7cb5a1f1060..14b151aec2f9 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -916,7 +916,7 @@ static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int gpio) if (gpio >= hw->soc->npins) return -EINVAL; - return pinctrl_gpio_direction_input(chip->base + gpio); + return pinctrl_gpio_direction_input_new(chip, gpio); } static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int gpio, @@ -929,7 +929,7 @@ static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int gpio, mtk_gpio_set(chip, gpio, value); - return pinctrl_gpio_direction_output(chip->base + gpio); + return pinctrl_gpio_direction_output_new(chip, gpio); } static int mtk_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) -- 2.39.2