From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>, linux-iio@vger.kernel.org
Cc: lars@metafoo.de, knaack.h@gmx.de
Subject: Re: [PATCH 00/15] ad799x cleanup
Date: Thu, 05 Jun 2014 21:15:58 +0100 [thread overview]
Message-ID: <5390CFFE.4080600@kernel.org> (raw)
In-Reply-To: <1401835335-29969-1-git-send-email-pmeerw@pmeerw.net>
On 03/06/14 23:42, Peter Meerwald wrote:
> Hello,
>
> I ran into some issues with IIO events using the ad799x ADC driver with an
> ad7997 chip; the following series has cleanups and fixes
Hi Peter,
A useful looking set. Will take a look once Lars is happy with them all
(I'm lazy).
Putting my maintainer hat on, I'm trying to work out what if anything in
here would want to go to stable.
We are rather two interlinked between clean ups and fixes though I can
see why you did it like this. If possible to reorder to have any fixes at
the top that would be great.
>
> patches 1-6, 8 are cleanup
>
> patch 7 exposes the IIO event interface of the driver only if an IRQ has been configured
> for the device; no IRQ -> no events
While unexpected behaviour (and good to fix) I don't think this one is stable material.
>
> patch 9 shifts out the last two bits when reading the event value on ad7993 and ad7997
> (which have 10-bit ADCs); same as read_raw()
This looks like stable material.
>
> patch 10 checks the range of the event value on write and shifts the value into place;
> similar to the previous patch
this one as well (as Lars suggested, combining these makes sense...)
>
> patch 11 adds helper function to read/write the chip's config register (16-bit on
> ad7997/ad7998, 8-bit everywhere else)
You've already stated this is a cleanup rather than a bug fix.
>
> patch 12 actually writes the default config to the chip and keeps a copy of
> the config register in the driver's state
Another unexpected behaviour case, I think...
>
> patch 13 changes update_scan_mode() to store the enabled channels in the config
> register, on ad7992/ad7993/ad7994/ad7997/ad7998, hence the rename
Ouch - this would be stable material, but is rather more involved with earlier
patches than ideal...
>
> patch 14 reports only those events as enabled which actually are
Unexpected behaviour again, though I'd hope any userspace code would cope with this.
In theory any event can result in any other even being enabled, but then userspace
should be able to see what is enabled by reading back the relevant attributes.
It's clearly a bug fix, but stable material?
>
> patch 15 allows to write the event config, previously events could only be
> set implicitly via the buffer scan mode
Clearly still under discussion but sounds like more a case of unusual behaviour
(in need of fixing) than a bug that wants patching in stable?
Sorry for being a pain on this. Until fairly recently I'd just have been
cynical and applied this lot to the togreg branch and ignored the fact
it would be left broken in earlier versions! I'm trying to do this better
hence this email.
J
>
> regards, p.
>
> Peter Meerwald (15):
> staging:iio: Update iio_event_monitor program
> staging:iio: Fix iio_utils.h function prototypes
> iio:adc:ad799x: Fix ad799x_chip_info kerneldoc
> iio:adc:ad799x: Drop I2C access helper functions
> iio:adc:ad799x: Save some lines in ad7997_8_update_scan_mode() exit
> handling
> iio:adc:ad799x: Use BIT() and GENMASK()
> iio:adc:ad799x: Only expose event interface when IRQ is available
> iio:adc:ad799x: Make chan_spec const in ad799x_chip_config struct
> iio:adc:ad799x: Fix reported event values, apply shift
> iio:adc:ad799x: Check event value range on write
> iio:adc:ad799x: Add helper function to read/write config register
> iio:adc:ad799x: Write default config on probe and reset alert status
> on probe
> iio:adc:ad799x: Rename ad7997_8_update_scan_mode() to
> ad799x_update_scan_mode()
> iio:adc:ad799x: Return more meaningful event enabled state
> iio:adc:ad799x: Allow to write event config
>
> drivers/iio/adc/ad799x.c | 507 ++++++++++++---------
> .../staging/iio/Documentation/iio_event_monitor.c | 10 +
> drivers/staging/iio/Documentation/iio_utils.h | 6 +-
> 3 files changed, 317 insertions(+), 206 deletions(-)
>
next prev parent reply other threads:[~2014-06-05 20:14 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 22:42 [PATCH 00/15] ad799x cleanup Peter Meerwald
2014-06-03 22:42 ` [PATCH 01/15] staging:iio: Update iio_event_monitor program Peter Meerwald
2014-06-03 22:42 ` [PATCH 02/15] staging:iio: Fix iio_utils.h function prototypes Peter Meerwald
2014-06-03 22:42 ` [PATCH 03/15] iio:adc:ad799x: Fix ad799x_chip_info kerneldoc Peter Meerwald
2014-06-04 7:44 ` Lars-Peter Clausen
2014-06-03 22:42 ` [PATCH 04/15] iio:adc:ad799x: Drop I2C access helper functions Peter Meerwald
2014-06-03 22:42 ` [PATCH 05/15] iio:adc:ad799x: Save some lines in ad7997_8_update_scan_mode() exit handling Peter Meerwald
2014-06-04 7:56 ` Lars-Peter Clausen
2014-06-03 22:42 ` [PATCH 06/15] iio:adc:ad799x: Use BIT() and GENMASK() Peter Meerwald
2014-06-03 22:42 ` [PATCH 07/15] iio:adc:ad799x: Only expose event interface when IRQ is available Peter Meerwald
2014-06-04 8:01 ` Lars-Peter Clausen
2014-06-03 22:42 ` [PATCH 08/15] iio:adc:ad799x: Make chan_spec const in ad799x_chip_config struct Peter Meerwald
2014-06-04 7:57 ` Lars-Peter Clausen
2014-06-03 22:42 ` [PATCH 09/15] iio:adc:ad799x: Fix reported event values, apply shift Peter Meerwald
2014-06-03 22:42 ` [PATCH 10/15] iio:adc:ad799x: Check event value range on write Peter Meerwald
2014-06-04 7:46 ` Lars-Peter Clausen
2014-06-03 22:42 ` [PATCH 11/15] iio:adc:ad799x: Add helper function to read/write config register Peter Meerwald
2014-06-04 8:05 ` Lars-Peter Clausen
2014-06-04 8:42 ` Peter Meerwald
2014-06-03 22:42 ` [PATCH 12/15] iio:adc:ad799x: Write default config on probe and reset alert status on probe Peter Meerwald
2014-06-04 8:05 ` Lars-Peter Clausen
2014-06-03 22:42 ` [PATCH 13/15] iio:adc:ad799x: Rename ad7997_8_update_scan_mode() to ad799x_update_scan_mode() Peter Meerwald
2014-06-04 8:06 ` Lars-Peter Clausen
2014-06-03 22:42 ` [PATCH 14/15] iio:adc:ad799x: Return more meaningful event enabled state Peter Meerwald
2014-06-03 22:42 ` [PATCH 15/15] iio:adc:ad799x: Allow to write event config Peter Meerwald
2014-06-04 7:55 ` Lars-Peter Clausen
2014-06-04 8:35 ` Peter Meerwald
2014-06-05 9:14 ` Lars-Peter Clausen
2014-06-05 20:15 ` Jonathan Cameron [this message]
2014-06-07 15:53 ` [PATCH 00/15] ad799x cleanup Peter Meerwald
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=5390CFFE.4080600@kernel.org \
--to=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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).