From patchwork Tue Oct 28 20:57:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 5179891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 75E62C11AC for ; Tue, 28 Oct 2014 21:00:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B3422017A for ; Tue, 28 Oct 2014 21:00:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D78C82017D for ; Tue, 28 Oct 2014 21:00:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XjDq3-0007to-S5; Tue, 28 Oct 2014 20:57:59 +0000 Received: from mail-pd0-x229.google.com ([2607:f8b0:400e:c02::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XjDq0-0007q0-W4 for linux-arm-kernel@lists.infradead.org; Tue, 28 Oct 2014 20:57:57 +0000 Received: by mail-pd0-f169.google.com with SMTP id y10so1525639pdj.0 for ; Tue, 28 Oct 2014 13:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=p0xvMpYpKSQ8+2EgNuOVM0ixfr6HjjMrjrKKZ0B8w10=; b=JIwshSqiLfjReyDBjkwPclYZhQ0v7GTV/ackRSpGM02bkuPES+rO2zDK1nQ6uotPT6 fGCsi/36O0rsZOC9xSR8s/CsulbDavHIvACKgtb/3FGiz+vwsujH2LwHJ/BJM1iRhNYB dxazu2XNiydBndggYH12BERrhBy9Q5szJ3Yfs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=p0xvMpYpKSQ8+2EgNuOVM0ixfr6HjjMrjrKKZ0B8w10=; b=iw2GUn7T1S1kHi4okn58MdMO4ahDIeeffSCSuaYk5tbQ3I+PIvjP6UOsLOBEBEPv2r zY0/Y6WvKJ2yf9ooEJNTIAFqKS/Gw0n3refRoa7AlKq+/g+MFEgzggVImSQml+GpLGpP qNe9CuJjz06TSevZt+Vnc6KgHrzZmUyMcszu6pIabntDSWPJ1X/ZlrRX7XqTNpOgMyW9 ElBIUMQuBeISs6f2FZbN9849TLGQ+fxtP1T6fHT61OlhRZse2qc/6wDsF6gWAjAQcAys JaMhMeI1Cmlu5jII8cBGT6bKd20qlY5UNYxycurTace2v3d4lrRVhllbFQK4K3OyecSo ko2g== X-Gm-Message-State: ALoCoQmkk/phcDxKndnnizRFmLmV+U8S31pBwr15H0I4pUN4ifux2qg8r2mqlazE2KlhwYnUTfYT X-Received: by 10.68.164.65 with SMTP id yo1mr6014291pbb.126.1414529856126; Tue, 28 Oct 2014 13:57:36 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by mx.google.com with ESMTPSA id i10sm2464334pdr.21.2014.10.28.13.57.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Oct 2014 13:57:35 -0700 (PDT) From: Doug Anderson To: Linus Walleij , Heiko Stuebner Subject: [RFC PATCH 2/2] pinctrl: rockchip: Implement PIN_CONFIG_OUTPUT_DISABLE Date: Tue, 28 Oct 2014 13:57:15 -0700 Message-Id: <1414529835-16207-2-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1414529835-16207-1-git-send-email-dianders@chromium.org> References: <1414529835-16207-1-git-send-email-dianders@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141028_135757_058210_E3E651DC X-CRM114-Status: GOOD ( 10.66 ) X-Spam-Score: -0.8 (/) Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Doug Anderson , linux-rockchip@lists.infradead.org, Sonny Rao , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If someone requests us to disable output for a pin, we'll configure it as an input. Signed-off-by: Doug Anderson --- drivers/pinctrl/pinctrl-rockchip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 40970c3..c1ac14c 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -971,6 +971,12 @@ static int rockchip_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, if (rc) return rc; break; + case PIN_CONFIG_OUTPUT_DISABLE: + rc = _rockchip_pmx_gpio_set_direction(&bank->gpio_chip, + pin - bank->pin_base, true); + if (rc) + return rc; + break; case PIN_CONFIG_OUTPUT: rockchip_gpio_set(&bank->gpio_chip, pin - bank->pin_base, arg);