Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2275368rdb; Tue, 3 Oct 2023 16:31:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwgL9+jOA5ipH1iX3vSanGVrY/OEd6tbkoZZG7ZjdFS67TKNwE//nyEtT3jINJnwHPdWct X-Received: by 2002:a05:6a20:8f0a:b0:155:1710:664a with SMTP id b10-20020a056a208f0a00b001551710664amr1130988pzk.18.1696375865253; Tue, 03 Oct 2023 16:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696375865; cv=none; d=google.com; s=arc-20160816; b=ovHGl+DxyNtlLcTtR9euPdweG+9KJkSPJYu/8JMI/MNVo0t3UuJW75GAN2JWI5yXE9 Nc/2Z5dpi6A2cyh2K+FzWLY0CnoTr2mw/GVNULOVrTa70XKSW6CFFBIA3nZ4gOjiYZCp 6f5EN0ENWREZaf+F0l/zmGjQpkPpLSDpV2cpl2R1z7Zx9bqT28qVnKV4lNJfon/ug+sO 4V6poYCjs3Lx9JAn7ryAsRQbA54heooYss+ncrR/+4UnOypX4GhMt8icyil6PzYh87Ql Lnd/6xVQ6OS/j8E4qveXpH98a49qDI7fubacJmgi4Ljk/d7iP31m8SSR36EXG6grrtjo IFbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=0DwoPwHtvsNHshbiX0L5U/GGpl/naUYap0pFgc5OoPg=; fh=HjpvBnfXOqM3qzpFvUnt0v0s4G6FsdkeHMMkev/Hhic=; b=misysR/xXOyX4UchjsbhhumC0AuJyzkFI41z/HlMhUVR9bGu0BSOMywoI6IJge6RyD s9DbsrTRVD3uMl8S+bV0D4Vi4Y4mOljn6fWh2nYYYV8aOKUCvFdVW4JZ1mw2ZLKmQkyR lOGeCcmYeZTPjnfWTcWp4zFMSwVj322YZrNCXlSNQ//kYT6DTEORYAShTzGpbgky1k0V nt3Om8t4wKylKLB3yqHMFKr2qvSLanAVSXOSncL9VijL3q1UdZEfOAFhjGCToz7HKcFo eNVrCvuK06+1hXFRhlzmu9NkfrAL3GvQaVHKl/gql6ZVWQN4ZfkFk7J1RoT9vs0aCxoB Re7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b=fup1rsQj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codeconstruct.com.au Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id c22-20020a056a00249600b0068a3a2984ccsi2553060pfv.236.2023.10.03.16.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 16:31:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b=fup1rsQj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codeconstruct.com.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C062D818D519; Tue, 3 Oct 2023 16:31:02 -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 S232371AbjJCXaz (ORCPT + 99 others); Tue, 3 Oct 2023 19:30:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229818AbjJCXay (ORCPT ); Tue, 3 Oct 2023 19:30:54 -0400 Received: from codeconstruct.com.au (pi.codeconstruct.com.au [203.29.241.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EFEE90; Tue, 3 Oct 2023 16:30:48 -0700 (PDT) Received: from [192.168.68.112] (ppp118-210-175-196.adl-adc-lon-bras34.tpg.internode.on.net [118.210.175.196]) by mail.codeconstruct.com.au (Postfix) with ESMTPSA id 799B620059; Wed, 4 Oct 2023 07:30:39 +0800 (AWST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeconstruct.com.au; s=2022a; t=1696375842; bh=0DwoPwHtvsNHshbiX0L5U/GGpl/naUYap0pFgc5OoPg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=fup1rsQjI6vuo9F7ghDudR0GDrJtiWkokCJjW2gEiNomV9EFA+PifQ1z6X65JDVkd eu3Qv/lLuC/Xq/QAnP32VuWQAfPKFpJzXS1H3PihTjA39WDeswTe+PKzcqmiz2KxQZ dVzI57qBkV+WXOLxQrBqfh2lCBko/TlO9vs3XiGBTOHyVN+JSmU7EGD4s//VaOyqxM TZAkCouYeQyfBDttjPDWLxV/mAlDk6DJTwDKfVpd1jW7I8HzH+qC6odtOmBLtUwjkR Sk68RYBMauvX7fA7NrjYc0l1MWfywAoOQYP1prkTO/rCRRoGP2GBox5XhfvIaCqSen 26vRJ1Qd4NMKQ== Message-ID: <6608b6ea673454672fb5930b57e9e7a5570d96d5.camel@codeconstruct.com.au> Subject: Re: [PATCH 08/36] gpio: aspeed: use new pinctrl GPIO helpers From: Andrew Jeffery To: Bartosz Golaszewski , Linus Walleij , Andy Shevchenko Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Joel Stanley , linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org Date: Wed, 04 Oct 2023 10:00:38 +1030 In-Reply-To: <20231003145114.21637-9-brgl@bgdev.pl> References: <20231003145114.21637-1-brgl@bgdev.pl> <20231003145114.21637-9-brgl@bgdev.pl> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 16:31:02 -0700 (PDT) On Tue, 2023-10-03 at 16:50 +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski >=20 > 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. >=20 > Signed-off-by: Bartosz Golaszewski > --- > drivers/gpio/gpio-aspeed.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c > index da33bbbdacb9..d3aa1cfd4ace 100644 > --- a/drivers/gpio/gpio-aspeed.c > +++ b/drivers/gpio/gpio-aspeed.c > @@ -750,12 +750,12 @@ static int aspeed_gpio_request(struct gpio_chip *ch= ip, unsigned int offset) > if (!have_gpio(gpiochip_get_data(chip), offset)) > return -ENODEV; > =20 > - return pinctrl_gpio_request(chip->base + offset); > + return pinctrl_gpio_request_new(chip, offset); > } > =20 > static void aspeed_gpio_free(struct gpio_chip *chip, unsigned int offset= ) > { > - pinctrl_gpio_free(chip->base + offset); > + pinctrl_gpio_free_new(chip, offset); > } > =20 > static int usecs_to_cycles(struct aspeed_gpio *gpio, unsigned long usecs= , > @@ -973,7 +973,7 @@ static int aspeed_gpio_set_config(struct gpio_chip *c= hip, unsigned int offset, > else if (param =3D=3D PIN_CONFIG_BIAS_DISABLE || > param =3D=3D PIN_CONFIG_BIAS_PULL_DOWN || > param =3D=3D PIN_CONFIG_DRIVE_STRENGTH) > - return pinctrl_gpio_set_config(offset, config); > + return pinctrl_gpio_set_config_new(chip, offset, config); Ah, this looks like it removes a bug too. Nice. Reviewed-by: Andrew Jeffery > else if (param =3D=3D PIN_CONFIG_DRIVE_OPEN_DRAIN || > param =3D=3D PIN_CONFIG_DRIVE_OPEN_SOURCE) > /* Return -ENOTSUPP to trigger emulation, as per datasheet */