Message ID | 20231017120431.68847-55-brgl@bgdev.pl |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4085966vqb; Tue, 17 Oct 2023 05:09:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFigsNTR44AyImkqia9IK08bPPLCUK2R6loZENBaEOJ/tZo5ngTH8exLsIEEMgNloqm3/z0 X-Received: by 2002:a05:6a00:1d09:b0:6bc:ff89:a2fc with SMTP id a9-20020a056a001d0900b006bcff89a2fcmr2006827pfx.2.1697544555144; Tue, 17 Oct 2023 05:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697544555; cv=none; d=google.com; s=arc-20160816; b=X1pWBnABGJbONVDIHoO0jWWAg4FvcfP7p1NvXCab4COmBSqrXc/6rrX6GksEoRbPEi VzLI4bV6SQt1IVqu22969f33V71ExtOzy7UWj+4DacvOv/iQLCt16p6YMOz+jSp+VYKN 9USs0KkU27I4X2HJMqy0X6G/2uMuOeg8QbKz0sTGV13exTR0vAiGUI97RVfFJZ4YbaMS rOE9Y6cZ0uCZbxyEax1aGSeJ1dFO/E8sCGxOYD5TjlFuqmECjtP+5JEfr1OSlCSsGZcR 2IompiXR5DIDqlM1+4bLhu5dIW6Ker7QcaLhWg8eIVyhMVu79eb6gMMDFogaEmXiET/5 5N6g== 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=IDbQa4pbNgPSy0Q7qNPPuIZ1OX8+KoCwyythnm8P9i8=; fh=kOxmq+prcfKKX/dgMaMxTb6TRjzyc//QKXZBiaS/a94=; b=UU1i8xr7Rn9jh+oIgYPdnNow9zkCktssQGQu5SD2dXWcoBzW+iFcCPDoRFxosUotbu z4Ef/AhTpDKvh2l1qfOPBEMoFunrN88f5Fvl9ka4DIA9RxLPf9wfzM/qx9nbfBrwBTtM flV+eSVLtwn+Z9m0KO5rcbb+/7mcsscV1SYizrN+bUqN23yPXpQygc863xXxC47hsuGB kt0nBq/L/l/Sx/Y8GLef++ZXeQX1Qn+nLMiT4yHFeEP9wSaYqg2S4pwl1in7NEKDBieI Kmad07Ac30KUUOziutQJvBL8VNOy4Zz5cNtevyRs83cb87NzBdzK2ZPgYMQ0xI2GHDOu Posg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=mYI4b8ge; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id w8-20020a63f508000000b00577f7b6e7b4si1714783pgh.624.2023.10.17.05.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=mYI4b8ge; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 3ACEF801DCDC; Tue, 17 Oct 2023 05:09:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235048AbjJQMI2 (ORCPT <rfc822;hjfbswb@gmail.com> + 19 others); Tue, 17 Oct 2023 08:08:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343619AbjJQMH0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 17 Oct 2023 08:07:26 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A9FC213F for <linux-kernel@vger.kernel.org>; Tue, 17 Oct 2023 05:05:43 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2c50906f941so56970931fa.2 for <linux-kernel@vger.kernel.org>; Tue, 17 Oct 2023 05:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697544340; x=1698149140; 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=IDbQa4pbNgPSy0Q7qNPPuIZ1OX8+KoCwyythnm8P9i8=; b=mYI4b8ge26f4cBfLQjNoyAP6xewpEAX+N+wtc/jQGGHm78NJMqKsuXaJHxKprHo1J+ kz+LCQAVjftP+LL/Oj1Fg8vOVrLpdTpWxJkAiiWzlt09cj+IoFPQCoZHxrqy2m2e0AX+ /KcvB9rBOzEHjZw5M5lK0dpx9ayOfj/jetxPzGqgza/9Yy6r9mnEh/qFe3b0jIEulKH4 0JSaj8G6xOOc/jO5X8a+G7oGMfSPR3I1c61JcduGy7ZgQv3rcYgi2pkdUV/S1QUrypHM P4OiSVznNPwULTQxfS9jrcXxYLngx4rKR4bx4floMwUfk3SL120pC/sLvwn0QdsvN4hy 48hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697544340; x=1698149140; 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=IDbQa4pbNgPSy0Q7qNPPuIZ1OX8+KoCwyythnm8P9i8=; b=UIdlogsjnFpWgEmLrpzSDirk0uWbJKsqtjBfr43RV5eSz4J/DPupCpeT4l/pL963FF VqzwbUiULTa4nyAsY8/WErky4py8+486a7FtNo+zbZWkNp6JY9FYNnOs/bknPPpoi6B7 FtOmEcKgS6gQm6/o4izyDrEQMXcrfovDG9waBxoQ9v7B5LvPzMcFCnZrX32flIhVTo3T J//BctDQu8UHxUJuZzLL51YylVrNekXoXr+I5umjT9A7dK8O+pzIAsXKSOws4wRR3+1/ 6slUaDH0yorv5J5HkLWCIxTaAkrwNmCJTnCE/1fOUuv9Zwjafd3ShXIujlAF3IM1RAn/ CSyA== X-Gm-Message-State: AOJu0YxywmhL7AKvjIx9mSS0G+LsdDSvlfM+RuTZXnkZkNAmrGVqpIvP HwpV0TQ7mZL6XyWhJhaW9WuYIA== X-Received: by 2002:a2e:a162:0:b0:2bc:f5a0:cc25 with SMTP id u2-20020a2ea162000000b002bcf5a0cc25mr1529232ljl.2.1697544340583; Tue, 17 Oct 2023 05:05:40 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:f1ee:b000:ce90:ed14]) by smtp.gmail.com with ESMTPSA id a2-20020a05600c224200b00405442edc69sm1353859wmm.14.2023.10.17.05.05.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:05:40 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Linus Walleij <linus.walleij@linaro.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Subject: [PATCH v3 54/73] pinctrl: intel: drop the wrappers around pinctrl_gpio_direction_input() Date: Tue, 17 Oct 2023 14:04:12 +0200 Message-Id: <20231017120431.68847-55-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017120431.68847-1-brgl@bgdev.pl> References: <20231017120431.68847-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 fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 17 Oct 2023 05:09:08 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780004479765562935 X-GMAIL-MSGID: 1780004479765562935 |
Series |
pinctrl: don't use GPIOLIB global numberspace in helpers
|
|
Commit Message
Bartosz Golaszewski
Oct. 17, 2023, 12:04 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> pinctrl_gpio_direction_input() now has the same signature as the wrappers around it so we can drop them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- drivers/pinctrl/intel/pinctrl-intel.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
Comments
On Tue, Oct 17, 2023 at 02:04:12PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > pinctrl_gpio_direction_input() now has the same signature as the > wrappers around it so we can drop them. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Now, for the sake of symmetry can you add (at least to the all Intel drivers you modified in this series) the following: int pinctrl_gpio_direction_output_with_value(struct gpio_chip *gc, unsigned int offset, int value) { gc->set(gc, offset, value); return pinctrl_gpio_direction_output(gc, offset); } ? And respectively in this driver .direction_output = pincttl_gpio_direction_output_with_value,
On Tue, 17 Oct 2023 at 14:41, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > On Tue, Oct 17, 2023 at 02:04:12PM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > pinctrl_gpio_direction_input() now has the same signature as the > > wrappers around it so we can drop them. > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > Now, for the sake of symmetry can you add (at least to the all > Intel drivers you modified in this series) the following: > Good idea but this is v6.8 material, I don't want to extend this series anymore at this point. Bart > > int pinctrl_gpio_direction_output_with_value(struct gpio_chip *gc, > unsigned int offset, int value) > { > gc->set(gc, offset, value); > return pinctrl_gpio_direction_output(gc, offset); > } > > > ? > > And respectively in this driver > > .direction_output = pincttl_gpio_direction_output_with_value, > > > -- > With Best Regards, > Andy Shevchenko > >
On Tue, Oct 17, 2023 at 02:44:25PM +0200, Bartosz Golaszewski wrote: > On Tue, 17 Oct 2023 at 14:41, Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > > > On Tue, Oct 17, 2023 at 02:04:12PM +0200, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > > > pinctrl_gpio_direction_input() now has the same signature as the > > > wrappers around it so we can drop them. > > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > > > Now, for the sake of symmetry can you add (at least to the all > > Intel drivers you modified in this series) the following: > > Good idea but this is v6.8 material, I don't want to extend this > series anymore at this point. Then let's postpone at least Intel and Cypress patches after v6.8-rc1 is out.
On Tue, Oct 17, 2023 at 2:46 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > On Tue, Oct 17, 2023 at 02:44:25PM +0200, Bartosz Golaszewski wrote: > > On Tue, 17 Oct 2023 at 14:41, Andy Shevchenko > > <andriy.shevchenko@linux.intel.com> wrote: > > > > > > On Tue, Oct 17, 2023 at 02:04:12PM +0200, Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > > > > > pinctrl_gpio_direction_input() now has the same signature as the > > > > wrappers around it so we can drop them. > > > > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > > > > > Now, for the sake of symmetry can you add (at least to the all > > > Intel drivers you modified in this series) the following: > > > > Good idea but this is v6.8 material, I don't want to extend this > > series anymore at this point. > > Then let's postpone at least Intel and Cypress patches after v6.8-rc1 is out. > But then we'd have to postpone the renaming and we'd be stuck with both variants in the tree. This is suboptimal. We'd also have this huge series spanning two subsystems for 3 months during the v6.8 release cycle in the tree causing conflicts and other issues. I'd prefer to merge this during the v6.7 merge window and then we can keep on improving it without affecting both trees. Linus will be taking those subsequent patches as usual. Linus, what do you think? Bart
On Tue, Oct 17, 2023 at 02:55:07PM +0200, Bartosz Golaszewski wrote: > On Tue, Oct 17, 2023 at 2:46 PM Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > > > On Tue, Oct 17, 2023 at 02:44:25PM +0200, Bartosz Golaszewski wrote: > > > On Tue, 17 Oct 2023 at 14:41, Andy Shevchenko > > > <andriy.shevchenko@linux.intel.com> wrote: > > > > > > > > On Tue, Oct 17, 2023 at 02:04:12PM +0200, Bartosz Golaszewski wrote: > > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > > > > > > > pinctrl_gpio_direction_input() now has the same signature as the > > > > > wrappers around it so we can drop them. > > > > > > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > > > > > > > Now, for the sake of symmetry can you add (at least to the all > > > > Intel drivers you modified in this series) the following: > > > > > > Good idea but this is v6.8 material, I don't want to extend this > > > series anymore at this point. > > > > Then let's postpone at least Intel and Cypress patches after v6.8-rc1 is out. > > But then we'd have to postpone the renaming and we'd be stuck with > both variants in the tree. This is suboptimal. We'd also have this > huge series spanning two subsystems for 3 months during the v6.8 > release cycle in the tree causing conflicts and other issues. I don't see how this is related. What I'm talking is only related to dropping the wrappers in the drivers _after_ whatever you do with generic APIs. > I'd prefer to merge this during the v6.7 merge window and then we can > keep on improving it without affecting both trees. Linus will be > taking those subsequent patches as usual. > > Linus, what do you think?
On Tue, Oct 17, 2023 at 3:16 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > On Tue, Oct 17, 2023 at 02:55:07PM +0200, Bartosz Golaszewski wrote: > > On Tue, Oct 17, 2023 at 2:46 PM Andy Shevchenko > > <andriy.shevchenko@linux.intel.com> wrote: > > > > > > On Tue, Oct 17, 2023 at 02:44:25PM +0200, Bartosz Golaszewski wrote: > > > > On Tue, 17 Oct 2023 at 14:41, Andy Shevchenko > > > > <andriy.shevchenko@linux.intel.com> wrote: > > > > > > > > > > On Tue, Oct 17, 2023 at 02:04:12PM +0200, Bartosz Golaszewski wrote: > > > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > > > > > > > > > pinctrl_gpio_direction_input() now has the same signature as the > > > > > > wrappers around it so we can drop them. > > > > > > > > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > > > > > > > > > Now, for the sake of symmetry can you add (at least to the all > > > > > Intel drivers you modified in this series) the following: > > > > > > > > Good idea but this is v6.8 material, I don't want to extend this > > > > series anymore at this point. > > > > > > Then let's postpone at least Intel and Cypress patches after v6.8-rc1 is out. > > > > But then we'd have to postpone the renaming and we'd be stuck with > > both variants in the tree. This is suboptimal. We'd also have this > > huge series spanning two subsystems for 3 months during the v6.8 > > release cycle in the tree causing conflicts and other issues. > > I don't see how this is related. What I'm talking is only related to dropping > the wrappers in the drivers _after_ whatever you do with generic APIs. Ah, I misunderstood you. Ok, I'll drop them from the tree. Bart
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 0f8e27d16929..f772be70e56d 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -990,11 +990,6 @@ static int intel_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) return GPIO_LINE_DIRECTION_OUT; } -static int intel_gpio_direction_input(struct gpio_chip *chip, unsigned int offset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int intel_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, int value) { @@ -1007,7 +1002,7 @@ static const struct gpio_chip intel_gpio_chip = { .request = gpiochip_generic_request, .free = gpiochip_generic_free, .get_direction = intel_gpio_get_direction, - .direction_input = intel_gpio_direction_input, + .direction_input = pinctrl_gpio_direction_input, .direction_output = intel_gpio_direction_output, .get = intel_gpio_get, .set = intel_gpio_set,