Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp478468rdh; Tue, 19 Dec 2023 05:01:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IECTQz+O9zbdZj/ZaPrzjYdJy43k04DkKRPJ87o+brfjRcl/wxTDdAV08Oj8wsRxxM30OFB X-Received: by 2002:a05:6512:1302:b0:50d:1e16:59b7 with SMTP id x2-20020a056512130200b0050d1e1659b7mr10295584lfu.106.1702990896035; Tue, 19 Dec 2023 05:01:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702990895; cv=none; d=google.com; s=arc-20160816; b=KYrljQ0HpFIcbZXY4GJySOS/wzvI83alFA5HSbfeTcQkCT8s+s0xv9a2fI7N3LDqjM T/8HKY1om+kRXqhtI8N+VPLEnl/Z7p3EEI+WBsUj/hIesVdEQRN3oWy/t/7FmJEYSa8Q 2PgOxQbaUo0Dg70VQSYOy86+GmKxMAYHEmDnOsuPXerzVS6CX0O8WBDmCP5U+4UiMmZG vPlpkJxA49/nkpx1doJSvjRVI0Zio3FDo1lTSBYjweRzeLw3cosm3zwYQbDzq0483gf3 l8+GDYmStb15pz9MydZzFFccZCFdMePxyAKknpOWcmRxG9tCoEewIB5x9LD8UQd4r6B9 j/Kg== 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=yXaZD+3T2oQG88d8EDnJHjPY4JBEWSVAIst6eVjqC04=; fh=PjgfVAo6KQyJSAdg9Z7QJf4yOgYNF5Wz15+9yOf/0EQ=; b=y7gO/wbhf6fZYtBOyhW7Lsw6zp/ufiZ7oc/txwEeBn+IBgIt6JZPZh9ti41fGlBk2y nHZth1s9gyxIuVGJ9uD4pTT1nuiNgFDj0QHkg+PEAbnpRsX9fiKXEUjNuAZe0sYQK1WF M0c1KjrlX8z9S3zYcIo4SYqvhJD85yhD31HXlwgbz0C+M2Om/qMxgYxNMz0OVF2tF3RV vr4ClyJAohp0Qj/Ssso/5owjn8irs+84A+sEgd6UatUPIyesNpoiJDyve7vnqAGQHe1f LynKtP8H18rpvIHodImZsUwMCDit5rd8wO2KDjAUt/qEwkZfY7TpoJaMbS2KVsijcehK l11g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b="D++LY/he"; spf=pass (google.com: domain of linux-kernel+bounces-5211-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5211-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 r27-20020a170906281b00b00a1d89e70079si10562242ejc.306.2023.12.19.05.01.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 05:01:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5211-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="D++LY/he"; spf=pass (google.com: domain of linux-kernel+bounces-5211-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5211-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 4E2451F254A1 for ; Tue, 19 Dec 2023 12:52:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27B641A287; Tue, 19 Dec 2023 12:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=9elements.com header.i=@9elements.com header.b="D++LY/he" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 0D69B1BDFD for ; Tue, 19 Dec 2023 12:51:56 +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-f44.google.com with SMTP id ffacd0b85a97d-33621d443a7so4633162f8f.3 for ; Tue, 19 Dec 2023 04:51:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1702990315; x=1703595115; 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=yXaZD+3T2oQG88d8EDnJHjPY4JBEWSVAIst6eVjqC04=; b=D++LY/he+xX3ZEv8GlXMlTif0dh6zVXpxf2Tf/YZ7q9wSrxPeBdZQtGt403QSyWZz2 494z3VnwuR97qVu1Sp8+NYb8FXJrPUz7zsZ9VLyHU0PZDwju7G5uFwY5W0/Pu81qhobd MV4dT1qdyJ38X7DCYdOnAZmcXrRN3DsE08T8cAgMjBgMrE5/uvJbDh1uw/cOBWu4t45g JZLqKAcycbOq7O3kDPMZIjE/yd5b6H0NRFXtRppCESRAN08Q7y9cWrjgsMlVxIzHxVQr +uGBfyhkoTYXV0u5kz9viMl0U+TiCKhIx+2SqfK00TWC3NntywbfcvgcDO8Rl01CvBL/ SMPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702990315; x=1703595115; 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=yXaZD+3T2oQG88d8EDnJHjPY4JBEWSVAIst6eVjqC04=; b=oCFF/6VJ4PuTmR2OS760dVmJf4yxDXlAWBCvFRoN8tQq8tZXR6UObTZ02qFRqxofl8 jgdHCkUgbi+a2Y8STY6iDnHiuTFi8d78gU9FYG8j4Y2cSyk2HYdeZAcY7BPz1n3w5OOu qnx7cjr51ad7/XrqVEVzgC4zpFsMv+nBow76/HhErZAO1ZTK2+E90QDIbbEOtWqOmNP4 5z+al9YHRBe4wfqsl0st3/rLNPLNVjCeKDKBXpuF37yZA3NXxbcio1JCP2n3eX9fF0Yz 0LONSg2oTSFzNvnV+SR3b9Ee1fn1e8cM663MjCgWHrLPBgau1XPnzjq5tY6O5Fdp9mta Bv8w== X-Gm-Message-State: AOJu0YxX2Us0Pge4gXzVq23bEp6iJi5bZktqpvoHjxSzPFSqOuxFYoHZ /p+bX0FBe5Ik7CyI1LYfLr5Tig== X-Received: by 2002:a05:600c:1705:b0:40b:5e21:bdd4 with SMTP id c5-20020a05600c170500b0040b5e21bdd4mr9170151wmn.99.1702990314979; Tue, 19 Dec 2023 04:51:54 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 04:51:54 -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 3/3] pinctrl: cy8c95x0: Fix get_pincfg Date: Tue, 19 Dec 2023 13:51:18 +0100 Message-ID: <20231219125120.4028862-3-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 Invert the register value for PIN_CONFIG_OUTPUT_ENABLE to return the opposite of PIN_CONFIG_INPUT_ENABLE. Signed-off-by: Patrick Rudolph --- drivers/pinctrl/pinctrl-cy8c95x0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c index b925789a035f..fe9545c630a2 100644 --- a/drivers/pinctrl/pinctrl-cy8c95x0.c +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c @@ -715,6 +715,8 @@ static int cy8c95x0_gpio_get_pincfg(struct cy8c95x0_pinctrl *chip, ret = regmap_read(chip->regmap, reg, ®_val); if (reg_val & bit) arg = 1; + if (param == PIN_CONFIG_OUTPUT_ENABLE) + arg = !arg; *config = pinconf_to_config_packed(param, (u16)arg); out: -- 2.43.0