Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp473804rdh; Tue, 19 Dec 2023 04:52:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGrsy/kHGMcG4S916/jjRr2j3iFAlX0HrJOi2NVh/jprc9uqvtjIkraTzDmU9iziNd0uNf X-Received: by 2002:a17:907:36e:b0:a23:6079:67fa with SMTP id rs14-20020a170907036e00b00a23607967famr1311402ejb.112.1702990347083; Tue, 19 Dec 2023 04:52:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702990347; cv=none; d=google.com; s=arc-20160816; b=KdJEddNjCY7gchCPcPdkjIZumgUoEECQ/6RgM4ogRZDfh7PwrAXA9c5WL4NIfx/z1v MTlX2T5D5c90cEW8fjaKgVTMyt0/beibaHQ1V8nBEFhaZjIDXidjaCGNjzN/WVQbx/sp V/sKDIBpp2fSLa+zsqEcBoBOlMZxvmJ9td/C1TBgliy7wFPiKgYLO/wofYIROVlzveE3 vvH/S+CdLqbN5nch2585vWPT8hLjU5yrA9Qv+0OrCviOq2FNVoggd0Nfb8g8gwpBOYlw u3UQpHOxAchW+kBaR5ZURTabsrT5xhnI7/hUnwDXy+1fo/4uSSj+MrcXJ2eJekq4fx6p fljg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=89XT99hJVnEcS+sHYOhRqbpwmFtfYct0kRlYAqq/VFI=; fh=PjgfVAo6KQyJSAdg9Z7QJf4yOgYNF5Wz15+9yOf/0EQ=; b=PwlOUOrawqBBdhAVcw2Lj0MGcxQrtFrhP+l2A7kxoCM0xJiRUV9Ai/zAVPh9dKazfe XQqk/a23SFCv0guM0KJ/RbflMKY73fQF1g+46W3Q9uwsSrzCzGLgOcfX0NhXHb3RDEDI BbucFyHObg8b++rJQW6Jbn22pC+JMJxWknO+5GQjnjdyV2FDUf60Mf80rVa9H3gBc33F /FaOTHRb0WruBX7Pv1KHpbxz7RnZF0EoiMQ53ADEO0hJgRL829QXInd++QgHnY8MVusB JBZSyMM7e5Bg/qKOafO5QXqyiQJC9rMCj/ltaMf0/XhUXmgfKzPEd4RmuyIV0BTo3D8C PRpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b="I8Jx34W/"; spf=pass (google.com: domain of linux-kernel+bounces-5210-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5210-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k18-20020a1709060cb200b00a231003c247si4771146ejh.531.2023.12.19.04.52.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 04:52:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5210-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b="I8Jx34W/"; spf=pass (google.com: domain of linux-kernel+bounces-5210-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5210-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C948A1F225B9 for ; Tue, 19 Dec 2023 12:52:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD1F418EA4; Tue, 19 Dec 2023 12:52:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=9elements.com header.i=@9elements.com header.b="I8Jx34W/" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DC731BDED for ; Tue, 19 Dec 2023 12:51:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=9elements.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=9elements.com Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-33666fb9318so2497657f8f.2 for ; Tue, 19 Dec 2023 04:51:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1702990314; x=1703595114; 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=89XT99hJVnEcS+sHYOhRqbpwmFtfYct0kRlYAqq/VFI=; b=I8Jx34W/5PgZGXsFA+8277gYgrAbe8P9xt5rlp/hsn4UnOcA7qLK7jZcMDP7D06sJJ GkZ4SNq94plmQbpXKp3/IElH9kU+lrYhuqaXVfi82rIOnWdirJtyizDuB4xjx5WjyJ4O YRvN3RWQ8z8RxLpstjugUzjHXZwnoWZZbFXue//LVGWkiEyUzKNLQrkoKxifAPv0ZUHO dmXUvP+LiI8tCxJuladrpGRASm6x6cunxjx/NLuTOlKe17zbcZmYpJB6WvxCj5r/Z6Tb V4fdma2jbz5+ffGJPPQPyii46bQCOGdWlaOHrDu7fWqg3J3wnTsLclg1Rrot82xDAQZT jRuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702990314; x=1703595114; 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=89XT99hJVnEcS+sHYOhRqbpwmFtfYct0kRlYAqq/VFI=; b=ccnomCzNat4fYslML7VpjuujvLSSL9lbSmx0s+qrLC8+WVtDbgAJe55N5YwZTLbyL8 mVK3vVl0AnuEK5fEwYPhEasRZZEB4ppdjwpS6irL3cX4adBiHNEIiubIOvGITJhyQTsH qlJJitR6jzz/jKwh2nYyrvoGckAC35UwL09nD+NQIDxHxUAwb0fT+8bXF0gByMHqBLPj LnsVGG1RC6Cpw56ZtGbzoA4D22yG3IlcKM9mtSXKuc79oGBFjTy9i9Oc2V24G6gkXTxB 6b+2BBQ/blBFF2RAUCcEYbBF2VCT4wn1b2h5LCO6khsaAhmJa25Q8W6obo/VInBrdW0f VqVQ== X-Gm-Message-State: AOJu0Yw1wrvEhi4hoz8pTXsRrxsC8usqOIPnENGknkWlntYzgdbT3zK2 NVzW96by04XlnIrbcg0MN9cCCQ== X-Received: by 2002:adf:fec3:0:b0:336:6519:9a2b with SMTP id q3-20020adffec3000000b0033665199a2bmr1869182wrs.56.1702990313755; Tue, 19 Dec 2023 04:51:53 -0800 (PST) Received: from fedora.sec.9e.network (ip-037-049-067-221.um09.pools.vodafone-ip.de. [37.49.67.221]) by smtp.gmail.com with ESMTPSA id l17-20020a5d4bd1000000b00336607f6630sm8311579wrt.47.2023.12.19.04.51.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 04:51:53 -0800 (PST) From: Patrick Rudolph To: Patrick Rudolph , Linus Walleij Cc: naresh.solanki@9elements.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] pinctrl: cy8c95x0: Fix regression Date: Tue, 19 Dec 2023 13:51:17 +0100 Message-ID: <20231219125120.4028862-2-patrick.rudolph@9elements.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231219125120.4028862-1-patrick.rudolph@9elements.com> References: <20231219125120.4028862-1-patrick.rudolph@9elements.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit 1fa3df901f2c ("pinctrl: cy8c95x0: Remove custom ->set_config()") removed support for PIN_CONFIG_INPUT_ENABLE and PIN_CONFIG_OUTPUT. Add the following options to restore functionality: - PIN_CONFIG_INPUT_ENABLE - PIN_CONFIG_OUTPUT_ENABLE Signed-off-by: Patrick Rudolph --- drivers/pinctrl/pinctrl-cy8c95x0.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c index a8c7f00cceef..b925789a035f 100644 --- a/drivers/pinctrl/pinctrl-cy8c95x0.c +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c @@ -308,6 +308,9 @@ static const char * const cy8c95x0_groups[] = { "gp77", }; +static int cy8c95x0_pinmux_direction(struct cy8c95x0_pinctrl *chip, + unsigned int pin, bool input); + static inline u8 cypress_get_port(struct cy8c95x0_pinctrl *chip, unsigned int pin) { /* Account for GPORT2 which only has 4 bits */ @@ -727,6 +730,7 @@ static int cy8c95x0_gpio_set_pincfg(struct cy8c95x0_pinctrl *chip, u8 port = cypress_get_port(chip, off); u8 bit = cypress_get_pin_mask(chip, off); unsigned long param = pinconf_to_config_param(config); + unsigned long arg = pinconf_to_config_argument(config); unsigned int reg; int ret; @@ -765,6 +769,12 @@ static int cy8c95x0_gpio_set_pincfg(struct cy8c95x0_pinctrl *chip, case PIN_CONFIG_MODE_PWM: reg = CY8C95X0_PWMSEL; break; + case PIN_CONFIG_OUTPUT_ENABLE: + ret = cy8c95x0_pinmux_direction(chip, off, !arg); + goto out; + case PIN_CONFIG_INPUT_ENABLE: + ret = cy8c95x0_pinmux_direction(chip, off, arg); + goto out; default: ret = -ENOTSUPP; goto out; -- 2.43.0