From: Melissa Wen <melissa.srw@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Alexandru Ardelean <ardeleanalex@gmail.com>,
Melissa Wen <melissa.srw@gmail.com>,
Alexandru Ardelean <alexandru.ardelean@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Stefan Popa <stefan.popa@analog.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Barry Song <21cnbao@gmail.com>,
linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
LKML <linux-kernel@vger.kernel.org>,
kernel-usp@googlegroups.com
Subject: Re: [PATCH 0/4] staging: iio: ad7150: improve driver readability
Date: Tue, 7 May 2019 17:35:43 -0300 [thread overview]
Message-ID: <20190507203543.dpold6kx5j2pjar2@smtp.gmail.com> (raw)
In-Reply-To: <20190505140510.62b42abe@archlinux>
On 05/05, Jonathan Cameron wrote:
> On Sat, 4 May 2019 14:12:22 +0300
> Alexandru Ardelean <ardeleanalex@gmail.com> wrote:
>
> > On Sat, May 4, 2019 at 1:24 AM Melissa Wen <melissa.srw@gmail.com> wrote:
> > >
> > > This patchset solves readability issues in AD7150 code, such as clarify
> > > register and mask definition, fashion improvement of mask uses, reduce
> > > tedious operation and useless comments.
> > >
> >
> > Hey,
> >
> > Two patches seem a bit noisy/un-needed.
> > The other 2 are fine from me.
> >
> > This driver does need some work to move it out of staging.
> > I am not sure what would be a big blocker for it, other than maybe it
> > needs a device-tree binding doc (in YAML format).
> > Maybe Jonathan remembers.
> >
> > Some other low-hanging-fruit ideas would be:
> > 1) remove the code for platform_data ; that one seems forgotten from
> > some other time; the interrupts should be coming from device-tree,
> > from the i2c bindings
> > 2) you could do a AD7150_EVENT_SPEC() macro (similar to
> > AD7150_TIMEOUT() macro) and use it in the ad7150_events[] list; that
> > would reduce a few lines
> > 3) similar to 2), you could do a AD7150_CHANNEL(x) macro ;
> > 4) in ad7150_event_handler() the checks could be wrapped into a macro,
> > or maybe some function ; i am referring to "(int_status &
> > AD7150_STATUS_OUT1) && (chip->old_state & AD7150_STATUS_OUT1)" checks
> > ; those seem to be repeated
> > 5) add of_match_table to the driver
> >
> > I (now) suspect that the reason this driver is still in staging is this comment:
> > /* Timeouts not currently handled by core */
> >
> > I wonder if things changed since then ?
> > If not, it would be interesting to implement it in core.
> Hmm. Timeouts are 'unusual' to put it lightly.
> I'm thinking the ABI needs to perhaps be more specific but not sure what
> a good naming is.
>
> Otherwise, I just took a quick look and can't see anything much else
> that needs doing. Obviously something might come up in a thorough
> review prior to moving it though!
>
> Jonathan
> >
> > Thanks
> > Alex
> >
Hi Alexandru and Jonathan,
Thank you for your help! Soon I will send a v2 with the fixes pointed out.
I'm also including the ideas above in the work plan for this driver.
P.s.: Sorry for having previously sent an email with HTML.
Melissa
> >
> > > Melissa Wen (4):
> > > staging: iio: ad7150: organize registers definition
> > > staging: iio: ad7150: use FIELD_GET and GENMASK
> > > staging: iio: ad7150: simplify i2c SMBus return treatment
> > > staging: iio: ad7150: clean up of comments
> > >
> > > drivers/staging/iio/cdc/ad7150.c | 102 ++++++++++++++-----------------
> > > 1 file changed, 47 insertions(+), 55 deletions(-)
> > >
> > > --
> > > 2.20.1
> > >
>
prev parent reply other threads:[~2019-05-07 20:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 22:13 [PATCH 0/4] staging: iio: ad7150: improve driver readability Melissa Wen
2019-05-03 22:13 ` [PATCH 1/4] staging: iio: ad7150: organize registers definition Melissa Wen
2019-05-04 10:13 ` Alexandru Ardelean
2019-05-05 12:52 ` Jonathan Cameron
2019-05-03 22:14 ` [PATCH 2/4] staging: iio: ad7150: use FIELD_GET and GENMASK Melissa Wen
2019-05-04 10:43 ` Alexandru Ardelean
2019-05-06 6:51 ` Ardelean, Alexandru
2019-05-07 20:44 ` Melissa Wen
2019-05-08 7:50 ` Ardelean, Alexandru
2019-05-03 22:15 ` [PATCH 3/4] staging: iio: ad7150: simplify i2c SMBus return treatment Melissa Wen
2019-05-04 10:36 ` Alexandru Ardelean
2019-05-05 12:59 ` Jonathan Cameron
2019-05-03 22:16 ` [PATCH 4/4] staging: iio: ad7150: clean up of comments Melissa Wen
2019-05-04 11:12 ` [PATCH 0/4] staging: iio: ad7150: improve driver readability Alexandru Ardelean
2019-05-04 14:42 ` Alexandru Ardelean
2019-05-05 13:05 ` Jonathan Cameron
2019-05-07 20:35 ` Melissa Wen [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=20190507203543.dpold6kx5j2pjar2@smtp.gmail.com \
--to=melissa.srw@gmail.com \
--cc=21cnbao@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=alexandru.ardelean@analog.com \
--cc=ardeleanalex@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=kernel-usp@googlegroups.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=stefan.popa@analog.com \
/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).