Linux IIO development
 help / color / mirror / Atom feed
* Work plan to move meter out of staging
@ 2018-03-05 14:02 Rodrigo Siqueira
  2018-03-05 14:21 ` Daniel Baluta
  0 siblings, 1 reply; 8+ messages in thread
From: Rodrigo Siqueira @ 2018-03-05 14:02 UTC (permalink / raw)
  To: linux-iio, daniel.baluta, 21cnbao

Hi,

Recently, I started to work on IIO subsystem, and I already have sent some
patches. Now, I want to move to the next step by working for helping to push
the meter module out of staging.

In this sense, I am planning to do the following tasks:

1) Make meter checkpatch free

I already made some checkpatch cleanups in this module, but it still have some
tiny things to fix. I already start to work on this task, and I will send a
patch series this week with the checkpatch fixes.

2) Code cleanups

I noticed the code has some duplications and utilizes many magic numbers which
make difficult to read the code. In order to attempt to improve the code
readability, I am planning to work on the following tasks:

* Part of the code that I believe that has some duplications that could be
  generalized:
 - ade7753_spi_write_reg_[0-9]+
 - ade7753_read_[0-9]+bit
 - ade7753_write_[0-9]+bit
 - ade7758_spi_write_reg_[0-9]+
 - ade7758_spi_read_reg_[0-9]+
 - ade7758_spi_read_[0-9]+bit
 - ade7758_spi_write_[0-9]+bit
 - ade7759_spi_read_reg_[0-9]+

* I believe there is a vast number of macro that could be removed because it is
  used one or three times in the whole code. I think the direct use of
  IIO_DEVICE_ATTR can be better in these cases. This changes can solve some
  checkpatch problems, and improve the readability.

* There are some magic numbers that I believe that came from the datasheet. I
  think that it is possible to use some defines to improve the readability in
  these cases.

3) Missing code

These parts look much more fun to work. However, I do not fully understand the
IIO subsystem yet, and maybe I say something that does not make sense. So, If I
say something that does not make sense, please let me know.

So, I believe the meter module still need some pieces of code. For example:

* ade7754, ade7759, ade7854 - It does not have iio_chan_spec and
        											*_read_raw/*_write_raw

* ade7758 - *_read_raw looks incomplete.


That's it.
Is my work plan to move meter out of staging make sense?

Thanks

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-03-06 14:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-05 14:02 Work plan to move meter out of staging Rodrigo Siqueira
2018-03-05 14:21 ` Daniel Baluta
2018-03-05 16:30   ` Lars-Peter Clausen
2018-03-06 11:53     ` Michael Hennerich
2018-03-06 12:36       ` Rodrigo Siqueira
2018-03-06 13:04         ` Daniel Baluta
2018-03-06 13:41           ` Jonathan Cameron
2018-03-06 14:09             ` Michael Hennerich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox