From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Bryan Freed <bfreed@chromium.org>,
Jonathan Cameron <jic23@cam.ac.uk>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"max@stro.at" <max@stro.at>,
"jbrenner@taosinc.com" <jbrenner@taosinc.com>,
"lars@metafoo.de" <lars@metafoo.de>,
"grundler@chromium.org" <grundler@chromium.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: iio: light: isl29018: use regmap for register access
Date: Wed, 18 Apr 2012 09:16:47 +0100 [thread overview]
Message-ID: <20120418081647.GA3021@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4F8E5CFD.4040501@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]
On Wed, Apr 18, 2012 at 11:49:41AM +0530, Laxman Dewangan wrote:
> yes, the caching is done before actual transfer and it can make
> cache dirty in case of transfer failure.
> I am not sure what should be correct handling here: make cache dirty
> or revert the value to original one?
> But using the regmap will provide the common behavior across the
> driver and all driver will have same behavior rather than handling
> on differently across driver.
> So if there is any other policy for this, it will be same for all driver.
I'd mark the cache as dirty I guess, though you'll then need to arrange
to resync it at some point (presumably after you've taken recovery
action) so that won't be enough by itself. Or reset the device and
bring it back up manually if you think that might work.
regmap doesn't make much effort here since if physical I/O has started
failing you've generally lost the plot completely, 90% of the time it's
not going to be possible to reover the situation at all and if you can
then there's a couple of different strategies that might work and which
one is appropriate is going to depend on the device. I'll do a patch to
flag the cache as dirty since I can't see how it'd make the situation
any worse but the driver will still need to do something to handle this
situation for that to take any effect.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2012-04-18 8:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 8:50 [PATCH] staging: iio: light: isl29018: use regmap for register access Laxman Dewangan
2012-04-17 11:33 ` Jonathan Cameron
2012-04-17 11:59 ` Laxman Dewangan
2012-04-17 17:56 ` Bryan Freed
2012-04-18 6:19 ` Laxman Dewangan
2012-04-18 8:16 ` Mark Brown [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=20120418081647.GA3021@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=bfreed@chromium.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=grundler@chromium.org \
--cc=jbrenner@taosinc.com \
--cc=jic23@cam.ac.uk \
--cc=lars@metafoo.de \
--cc=ldewangan@nvidia.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=max@stro.at \
/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).