linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leo Li <pku.leo@gmail.com>
To: "Lothar Waßmann" <LW@karo-electronics.de>
Cc: "Stefan Agner" <stefan@agner.ch>, "Gao Pan" <pandy.gao@nxp.com>,
	"Wolfram Sang" <wsa@the-dreams.de>,
	lkml <linux-kernel@vger.kernel.org>,
	"Li Yang" <leoyang.li@nxp.com>,
	linux-gpio@vger.kernel.org,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v5] i2c: imx: make bus recovery through pinctrl optional
Date: Mon, 12 Sep 2016 11:27:13 -0500	[thread overview]
Message-ID: <CADRPPNQbTCs9TLqUSNUTG6YBn3fs8F6FKUw1G582D4ExcL1oVQ@mail.gmail.com> (raw)
In-Reply-To: <20160912102136.04c0728d@ipc1.ka-ro>

On Mon, Sep 12, 2016 at 3:21 AM, Lothar Waßmann <LW@karo-electronics.de> wrote:
> Hi,
>
> On Fri, 9 Sep 2016 14:37:12 -0500 Leo Li wrote:
>> On Fri, Sep 9, 2016 at 11:51 AM, Stefan Agner <stefan@agner.ch> 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.

I agree.  A message is already added in this patch to mention that bus
recovery is not supported due to pinctrl when there is a problem.

Regards,
Leo

      reply	other threads:[~2016-09-12 16:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19 22:05 [PATCH v5] i2c: imx: make bus recovery through pinctrl optional Li Yang
2016-09-06 18:58 ` Uwe Kleine-König
2016-09-06 20:06   ` Leo Li
2016-09-06 21:07     ` Uwe Kleine-König
2016-09-06 23:14       ` Leo Li
2016-09-06 21:51     ` Stefan Agner
2016-09-06 22:40       ` Leo Li
     [not found]         ` <CAChUvXOGjTn6K5588UVgjbRWUY+weDtk2qbOU-NM4=kA2znh=Q@mail.gmail.com>
2016-09-07  5:55           ` Uwe Kleine-König
     [not found]             ` <CAChUvXMPDZB7=ZArQ5+6ae42N=Bsgv_OczGXnyhBjEdjt_yvsw@mail.gmail.com>
2016-09-07 16:40               ` Leo Li
2016-09-12 16:35               ` Leo Li
2016-09-12 18:29                 ` Leo Li
2016-09-08 22:39         ` Stefan Agner
2016-09-08 23:57           ` Leo Li
2016-09-09 16:51             ` Stefan Agner
2016-09-09 19:37               ` Leo Li
2016-09-09 20:34                 ` Stefan Agner
2016-09-09 20:59                   ` Uwe Kleine-König
2016-09-12 16:47                     ` Leo Li
2016-09-12  8:21                 ` Lothar Waßmann
2016-09-12 16:27                   ` Leo Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADRPPNQbTCs9TLqUSNUTG6YBn3fs8F6FKUw1G582D4ExcL1oVQ@mail.gmail.com \
    --to=pku.leo@gmail.com \
    --cc=LW@karo-electronics.de \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pandy.gao@nxp.com \
    --cc=stefan@agner.ch \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).