Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp338979rdb; Thu, 5 Oct 2023 07:28:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZ257oXvVyVFqB2oHLV+iqJxjX3VwzgCCxdeljtPyB8EMpAndCZg1aLzTxm4B7D3qfC3tc X-Received: by 2002:a17:90a:fa02:b0:268:15f5:9191 with SMTP id cm2-20020a17090afa0200b0026815f59191mr5237756pjb.36.1696516135522; Thu, 05 Oct 2023 07:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696516135; cv=none; d=google.com; s=arc-20160816; b=OHU9QCmXaSm9jqNbaHqONGSeNTRcsgGDhnNwTpGIAbPEo9heb1OaOBSXFlmp9WUr+F 1ylF/U8W1pb0r/VNv1/xPfFTAsrDm0EN680U6/IdlHtAd2cN4N6PVTqgYG30s4+dw8RA LD5VoVXQXzhyea46CltxmH9B0waI3/dcklpFdtAodT2AZ7q1YcVAjM605lg5agAbtAKa zAlt8JM/F4MVHqfS6t5dckUBZ49BIhK7M1kfJIyiyHa0OVDQyRYmNrGibGq4o0MHjX0X 9CdADYp0SRxnNLZR6Hv4dYfRub8xS0SdmHcRvWYg9LHMpekN4+CyOJk11cuuqzpuvObd 2+NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=YGoaC1Wcp6rYPnjGJSe6VARj9bzOCTTk06EKi9+Z3hA=; fh=/wIzTV0nXrHn70dQspPwWK3v5JwxMA1SU7GhGXBap9w=; b=iTOzTCVtkaPzt+Rc58nrF/mYOOD6JPkGMJbO3XhJrTXOYt2Q2eYllW7ZsOzZKrplgv gCZiCzUJynG4X0g/EiF9DoB96MqpL3S6DD0unB+OLw4iDD9UgwV35nQwdQfauXa4xY82 VRM6xtEsfJ/1hzedd8Yvgr6hLiZtSzQ9+rildfqKz0IRg2zijgL+CmC7XkJGahIZKIOP 9pzMTaPe/pvV93oEUb/TbwKqlH3oS3vR7HXaH3UTc8gPfjJvL1LQIG19wVT3fOM+2GyP ifyIeIcDS4hlN3kmb80GkfudKOZ5IFrYMxCifXqG2nA5GSokqI6S9C1b5W/dzPTHm0BY lRLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=ToicOkGb; 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 Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id o2-20020a17090a744200b0027739322ce2si1674538pjk.100.2023.10.05.07.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 07:28:55 -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=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=ToicOkGb; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 067F7805B33C; Thu, 5 Oct 2023 07:28:29 -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 S233268AbjJEOZk (ORCPT + 99 others); Thu, 5 Oct 2023 10:25:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231635AbjJEOXr (ORCPT ); Thu, 5 Oct 2023 10:23:47 -0400 Received: from mail-vk1-xa2e.google.com (mail-vk1-xa2e.google.com [IPv6:2607:f8b0:4864:20::a2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCC746EAE for ; Wed, 4 Oct 2023 23:43:05 -0700 (PDT) Received: by mail-vk1-xa2e.google.com with SMTP id 71dfb90a1353d-49a885c5961so256635e0c.3 for ; Wed, 04 Oct 2023 23:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1696488185; x=1697092985; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YGoaC1Wcp6rYPnjGJSe6VARj9bzOCTTk06EKi9+Z3hA=; b=ToicOkGbMDRzKJjS+3Of1B+rRcvxnOkRWFF//ulW62YXlpewLPYH7qTE5l3srgrcz9 ogBlik5CC69N1xiChCHA1BxOTh3Y6xZjYwrY0CPqnrwYweDxPFmSszLv1mXuALHVuD6R /aCxVvBOG2kR165AeP3Bgayfmy7owV+OVl8oNBuuxtVhoU/X5yBS+cxd4UXNKET7Jg5H 8F2rt8LFjSn2ADFp7QeAjkEDmPxPLkWYkyfLaQk6K6YknMr7J8kE+5NObp1EFJ1KwSRG Iwy2l1sSoMJPzlR8w98Q/vJvxyRUUxpHsc1Pvrgnr7lnnDMfpqBQNIZ+SmW7a9eIt7TM oqSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696488185; x=1697092985; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YGoaC1Wcp6rYPnjGJSe6VARj9bzOCTTk06EKi9+Z3hA=; b=hKSgyw0tJ0KEJ03KvxRyjWkAVxrF9rH/+ZmXvVYM53r45BpNmC4+NXwljskDoDWRf5 Wt69Zbzz8+sOAWLIaQCTKtauc27S+WuF311hwsdGFRlm0TvDtVeFMIpqr2Ug7XrWI0sR GGoSfeszoQp0MD6eyFuCWsncysbXxnK/41D06bLklxnuMXZbiUdPZapWCYrD5ZNhgheb 9c035uJe4di3X7sX0r7qrZuZgn53qk9Xf+huwO5eam4JuvKt8XnR+yAN5Wkdw3uWZ79g F/d9IBVcrCLpT3H3XCSqpbFwjwnydnMNggqWqR1itiGNKIQG6dDQ62b6BAbP8qZ1yyM1 lImA== X-Gm-Message-State: AOJu0YyYBpa+2MoaPriMVhlu6Mzb6ylk+jdVmMaYSf55n5mToeRzZQMF RI29Qmq+mX4kf1RO+YTd99fGwV5cg/hAlT/BE51ZLA== X-Received: by 2002:a1f:cb42:0:b0:49b:289a:cc3f with SMTP id b63-20020a1fcb42000000b0049b289acc3fmr3946166vkg.3.1696488184932; Wed, 04 Oct 2023 23:43:04 -0700 (PDT) MIME-Version: 1.0 References: <20231003073926.10771-1-brgl@bgdev.pl> In-Reply-To: <20231003073926.10771-1-brgl@bgdev.pl> From: Bartosz Golaszewski Date: Thu, 5 Oct 2023 08:42:54 +0200 Message-ID: Subject: Re: [PATCH] gpio: aspeed: fix the GPIO number passed to pinctrl_gpio_set_config() To: Linus Walleij , Andy Shevchenko , Joel Stanley , Andrew Jeffery Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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]); Thu, 05 Oct 2023 07:28:29 -0700 (PDT) On Tue, Oct 3, 2023 at 9:39=E2=80=AFAM Bartosz Golaszewski = wrote: > > From: Bartosz Golaszewski > > pinctrl_gpio_set_config() expects the GPIO number from the global GPIO > numberspace, not the controller-relative offset, which needs to be added > to the chip base. > > Fixes: 5ae4cb94b313 ("gpio: aspeed: Add debounce support") > Signed-off-by: Bartosz Golaszewski > --- > drivers/gpio/gpio-aspeed.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c > index da33bbbdacb9..58f107194fda 100644 > --- a/drivers/gpio/gpio-aspeed.c > +++ b/drivers/gpio/gpio-aspeed.c > @@ -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(chip->base + offset, confi= g); > 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 datashee= t */ > -- > 2.39.2 > Queued for fixes. Bart