From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH RESEND] i2c: add sc18is600 driver
Date: Sun, 18 Jun 2017 17:18:53 +0200 [thread overview]
Message-ID: <20170618151853.GA4927@katana> (raw)
In-Reply-To: <20170613154748.7018-1-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 672 bytes --]
> + switch (dev->state) {
> + case SC18IS600_STAT_OK:
> + break;
> + case SC18IS600_STAT_NAK_ADDR:
> + return -EIO;
> + case SC18IS600_STAT_NAK_DATA:
> + return -EREMOTEIO;
> + case SC18IS600_STAT_SIZE:
> + return -EINVAL;
> + case SC18IS600_STAT_TIMEOUT:
> + return -ETIMEDOUT;
> + case SC18IS600_STAT_TIMEOUT2:
> + return -ETIMEDOUT;
> + case SC18IS600_STAT_BLOCKED:
> + return -ETIMEDOUT;
> + default:
> + case SC18IS600_STAT_BUSY:
> + dev_err(&dev->spi->dev, "device hangup detected, reset!");
> + sc18is600_reset(dev);
> + return -EAGAIN;
> + }
Please have a look at Documentation/i2c/fault-codes. Most look good, but
the NAK cases probably need fixing.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: Sebastian Reichel <sre@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] i2c: add sc18is600 driver
Date: Sun, 18 Jun 2017 17:18:53 +0200 [thread overview]
Message-ID: <20170618151853.GA4927@katana> (raw)
In-Reply-To: <20170613154748.7018-1-sre@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 672 bytes --]
> + switch (dev->state) {
> + case SC18IS600_STAT_OK:
> + break;
> + case SC18IS600_STAT_NAK_ADDR:
> + return -EIO;
> + case SC18IS600_STAT_NAK_DATA:
> + return -EREMOTEIO;
> + case SC18IS600_STAT_SIZE:
> + return -EINVAL;
> + case SC18IS600_STAT_TIMEOUT:
> + return -ETIMEDOUT;
> + case SC18IS600_STAT_TIMEOUT2:
> + return -ETIMEDOUT;
> + case SC18IS600_STAT_BLOCKED:
> + return -ETIMEDOUT;
> + default:
> + case SC18IS600_STAT_BUSY:
> + dev_err(&dev->spi->dev, "device hangup detected, reset!");
> + sc18is600_reset(dev);
> + return -EAGAIN;
> + }
Please have a look at Documentation/i2c/fault-codes. Most look good, but
the NAK cases probably need fixing.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-06-18 15:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 15:47 [PATCH RESEND] i2c: add sc18is600 driver Sebastian Reichel
[not found] ` <20170613154748.7018-1-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-17 18:13 ` Andy Shevchenko
2017-06-17 18:13 ` Andy Shevchenko
2017-06-18 14:02 ` Sebastian Reichel
2017-06-18 14:17 ` Andy Shevchenko
2017-06-18 15:18 ` Wolfram Sang [this message]
2017-06-18 15:18 ` Wolfram Sang
2017-06-19 16:20 ` Wolfram Sang
2017-06-19 16:20 ` Wolfram Sang
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=20170618151853.GA4927@katana \
--to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.