Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753693AbbHEUo5 (ORCPT ); Wed, 5 Aug 2015 16:44:57 -0400 Received: from mail-lb0-f177.google.com ([209.85.217.177]:34065 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753139AbbHEUo4 (ORCPT ); Wed, 5 Aug 2015 16:44:56 -0400 MIME-Version: 1.0 In-Reply-To: <20150805194602.GB1230@localhost.localdomain> References: <1438795388-22743-1-git-send-email-edubezval@gmail.com> <1438795388-22743-3-git-send-email-edubezval@gmail.com> <20150805180215.GA4161@localhost.localdomain> <20150805194602.GB1230@localhost.localdomain> Date: Wed, 5 Aug 2015 17:44:54 -0300 Message-ID: Subject: Re: [PATCH 2/2] gpio/mxc: implement reading output gpio value From: Fabio Estevam To: Eduardo Valentin Cc: Linus Walleij , Alexandre Courbot , Ulises Brindis , Fabio Estevam , "linux-gpio@vger.kernel.org" , linux-kernel , Russell King Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1097 Lines: 28 On Wed, Aug 5, 2015 at 4:46 PM, Eduardo Valentin wrote: > OK. Then, what is the recommendation? Do we set this by default in the > driver code or this is left for DTS pinmux configuration? You just need to set the SION bit in the pad you need to read the output. SION is bit 30 according to Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt > To me seams like a bug in the gpio driver still, as the possibility to > read the value of an output gpio is missing/inconsistent. No, it is not a bug. The Reference Manual explains the need of setting the SION bit: >From the mx6q reference manual: "28.4.3.2 GPIO Write Mode The programming sequence for driving output signals should be as follows: 1. Configure IOMUX to select GPIO mode (Via IOMUXC), also enable SION if need to read loopback pad value through PSR" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/