From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932740AbcILIVr convert rfc822-to-8bit (ORCPT ); Mon, 12 Sep 2016 04:21:47 -0400 Received: from mail.karo-electronics.de ([81.173.242.67]:52380 "EHLO mail.karo-electronics.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932616AbcILIVq (ORCPT ); Mon, 12 Sep 2016 04:21:46 -0400 Date: Mon, 12 Sep 2016 10:21:36 +0200 From: Lothar =?UTF-8?B?V2HDn21hbm4=?= To: Leo Li Cc: Stefan Agner , Gao Pan , Wolfram Sang , lkml , Li Yang , linux-gpio@vger.kernel.org, "linux-i2c@vger.kernel.org" , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v5] i2c: imx: make bus recovery through pinctrl optional Message-ID: <20160912102136.04c0728d@ipc1.ka-ro> In-Reply-To: References: <1471644322-22670-1-git-send-email-leoyang.li@nxp.com> <20160906185849.27pjhawadca5pwow@pengutronix.de> <87ca69fb85848a0a86b34a9a9037a57b@agner.ch> <8f8f7ffc4aef513ef5064ba0491fbc63@agner.ch> <306f579a2f2362595a55c53e48657563@agner.ch> Organization: Ka-Ro electronics GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, 9 Sep 2016 14:37:12 -0500 Leo Li wrote: > On Fri, Sep 9, 2016 at 11:51 AM, Stefan Agner wrote: > > On 2016-09-08 16:57, Leo Li wrote: [...] > >> people fix problem that they don't really care by deliberately enlarge > >> the problem. That's why we don't panic() on any error we found. For > >> those who do care about the bus recovery, they can get the information > >> from the console. > > > > IMHO, it is just stupid to ignore errors and then let the developer > > later on trace back what the initial issue was. Error out early is a > > common sense software design principle... > > > > I am not asking for a panic(), I am just suggesting to only ignore > > pinctrl if it returns -ENODEV, the case you care are about. > > It was just an analogy for enlarging the problem for getting > attention. But you probably thought that it was not enlarging the > problem as you think pinctrl is required by the driver instead of an > optional thing. > The I2C bus recovery is a feature which is not used during normal operation and you won't find that it's not working unless something unusual happens (probably only in a productive environment). It may even be hard to trigger a condition to test the feature. Thus IMO it is vital that the driver complains loudly if something is missing to make this feature work if requested. Lothar Waßmann