From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752567AbdLLST0 (ORCPT ); Tue, 12 Dec 2017 13:19:26 -0500 Received: from gloria.sntech.de ([95.129.55.99]:58638 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752247AbdLLSTW (ORCPT ); Tue, 12 Dec 2017 13:19:22 -0500 From: Heiko Stuebner To: Brian Norris Cc: Linus Walleij , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Doug Anderson Subject: Re: [PATCH] pinctrl: rockchip: enable clock when reading pin direction register Date: Tue, 12 Dec 2017 19:19:19 +0100 Message-ID: <2334693.oO4CeGnqou@phil> User-Agent: KMail/5.2.3 (Linux/4.13.0-1-amd64; KDE/5.37.0; x86_64; ; ) In-Reply-To: <20171212174343.192017-1-briannorris@chromium.org> References: <20171212174343.192017-1-briannorris@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Brian, Am Dienstag, 12. Dezember 2017, 09:43:43 CET schrieb Brian Norris: > We generally leave the GPIO clock disabled, unless an interrupt is > requested or we're accessing IO registers. We forgot to do this for the > ->get_direction() callback, which means we can sometimes [1] get > incorrect results [2] from, e.g., /sys/kernel/debug/gpio. > > Enable the clock, so we get the right results! > > [1] Sometimes, because many systems have 1 or mor interrupt requested on > each GPIO bank, so they always leave their clock on. > > [2] Incorrect, meaning the register returns 0, and so we interpret that > as "input". > > Signed-off-by: Brian Norris thanks for catching this and it looks good to me, so Reviewed-by: Heiko Stuebner