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: 404338 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3FDC9140085 for ; Wed, 29 Oct 2014 07:57:38 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751872AbaJ1U5h (ORCPT ); Tue, 28 Oct 2014 16:57:37 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:57619 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753305AbaJ1U5g (ORCPT ); Tue, 28 Oct 2014 16:57:36 -0400 Received: by mail-pd0-f175.google.com with SMTP id y13so1498908pdi.34 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=JBNu2dCFPOwkXRn8oH5/Zae8ny9Zj2mKmaeBWF1mFjWaxcKTAMHMgPfcSxnCLVONwz tHyV4T8kC4dPiPIzmn3EmL65dcnhkrJk02Sa6xN+F1+r9ei578K5khZ0oCm/7uuZ2qUL 4ex/8TEYRkrjUR37M+n88ERNe0UvRq6pMdCkc02DvQ5C9XSXIC5FnQoxObgw2gFPpx3+ ztOsxK5PCZmaNU/Ks+nqpRardJwR8/MklCJhEPweGUe6jQ/PrUC6ec7YFAb3fKHhrmZB RrEhQu739x3/+VQW3qUH9Z53pknhwIxDOrOizYBBj4BfXGSmxfQAbdLA2gZmeVVfJ22z MHzA== X-Gm-Message-State: ALoCoQnI415gdvID8z5ke3OZSaEN2n8YMi55yBoft+5o5BQYTITx4YzZPDxjKSBFZAc+K39roapJ 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 Cc: Sonny Rao , linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Doug Anderson , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org 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> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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);