From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756169AbcI1CBE (ORCPT ); Tue, 27 Sep 2016 22:01:04 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33663 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753785AbcI1CA4 (ORCPT ); Tue, 27 Sep 2016 22:00:56 -0400 Date: Wed, 28 Sep 2016 07:30:52 +0530 From: Viresh Kumar To: Stefan Agner Cc: Vladimir Zapolskiy , linus.walleij@linaro.org, shawnguo@kernel.org, aalonso@freescale.com, b38343@freescale.com, ldewangan@nvidia.com, van.freenix@gmail.com, p.zabel@pengutronix.de, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pinctrl: freescale: avoid overwriting pin config when freeing GPIO Message-ID: <20160928020052.GB2551@vireshk-i7> References: <20160927002650.4316-1-stefan@agner.ch> <17317e62-d9bf-4ab3-35b5-f2f9a4dcbedd@mentor.com> <960b299c947424598ec26bfcb36fd96b@agner.ch> <671a23a9ccdbdd6594ad89bf496c1490@agner.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <671a23a9ccdbdd6594ad89bf496c1490@agner.ch> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27-09-16, 12:34, Stefan Agner wrote: > Added Viresh Kumar to the discussion, he implemented the I2C recovery > functions. > > Yes, reordering the pinctrl/gpio_free calls would fix the problem too. > > However, I guess there is no explicit rule to that ("request/free GPIOs > only when they are muxed as GPIO"), so I think of it that the issue is > actually in the pinctrl driver. > > On top of that it is not entirely trivial to reorder the calls the way > i2c_generic_gpio_recovery and i2c_generic_recovery are set up right now. AFAICT, these routines don't touch the muxing part at all. Perhaps it is done internally by the GPIO calls. Can you please elaborate the exact change you are hinting towards here ? -- viresh