All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] staging:iio:ade7854: Cleanup on I2C/SPI code
@ 2018-03-16 22:48 ` Rodrigo Siqueira
  0 siblings, 0 replies; 34+ messages in thread
From: Rodrigo Siqueira @ 2018-03-16 22:48 UTC (permalink / raw)
  To: John Syne, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Greg Kroah-Hartman, linux-iio, devel,
	linux-kernel, Barry Song
  Cc: linux-iio, devel, daniel.baluta, linux-kernel

This patchset reworks the I2C/SPI code from meter module. The set of
patches try to reduce the code duplication and make the communication
reliable. The current version of the module had many code duplications,
which make the code more error-prone and hard to read. Jonh Syne
identified some wrong error handling and fixed it in his patches; in
this series of patches I analyzed Jonh's fixes, and use it in the new
code.

It is important to highlight that meter module is under observation, due
to the lack of hardware and the old design of the chip. However, John
has the hardware for testing and interest to help to update the code
[1]. As a result, this patchset represents the first work effort to
update the meter module in the staging.

1 - https://marc.info/?l=linux-iio&m=152046885922153&w=2

Changes in V2:
 - Reorganize the patchset to make easier to backport fixes.
 - Adds two commits at the beginning of the patchset. First, fixes bugs
   related to wrong verification in read/write I2C operations. Second,
   adjust the incorrect amount of data read.
 - Removes unnecessary code in read/write functions for SPI and I2C
   during the rework.

Rodrigo Siqueira (8):
  staging:iio:ade7854: Fix error handling on read/write
  staging:iio:ade7854: Fix the wrong number of bits to read
  staging:iio:ade7854: Rework I2C write function
  staging:iio:ade7854: Rework SPI write function
  staging:iio:ade7854: Replace many functions for one function
  staging:iio:ade7854: Rework I2C read function
  staging:iio:ade7854: Rework SPI read function
  staging:iio:ade7854: Remove read_reg_* duplications

 drivers/staging/iio/meter/ade7854-i2c.c | 238 +++++++++-------------------
 drivers/staging/iio/meter/ade7854-spi.c | 268 +++++++-------------------------
 drivers/staging/iio/meter/ade7854.c     |  40 ++---
 drivers/staging/iio/meter/ade7854.h     |  23 +--
 4 files changed, 159 insertions(+), 410 deletions(-)

-- 
2.16.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2018-03-20  1:53 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-16 22:48 [PATCH v2 0/8] staging:iio:ade7854: Cleanup on I2C/SPI code Rodrigo Siqueira
2018-03-16 22:48 ` Rodrigo Siqueira
2018-03-16 22:48 ` [PATCH v2 1/8] staging:iio:ade7854: Fix error handling on read/write Rodrigo Siqueira
2018-03-16 22:48   ` Rodrigo Siqueira
2018-03-18  9:45   ` Jonathan Cameron
2018-03-18  9:45     ` Jonathan Cameron
2018-03-20  1:53     ` Rodrigo Siqueira
2018-03-20  1:53       ` Rodrigo Siqueira
2018-03-16 22:48 ` [PATCH v2 2/8] staging:iio:ade7854: Fix the wrong number of bits to read Rodrigo Siqueira
2018-03-16 22:48   ` Rodrigo Siqueira
2018-03-18  9:48   ` Jonathan Cameron
2018-03-18  9:48     ` Jonathan Cameron
2018-03-16 22:49 ` [PATCH v2 3/8] staging:iio:ade7854: Rework I2C write function Rodrigo Siqueira
2018-03-16 22:49   ` Rodrigo Siqueira
2018-03-18  9:56   ` Jonathan Cameron
2018-03-18  9:56     ` Jonathan Cameron
2018-03-16 22:49 ` [PATCH v2 4/8] staging:iio:ade7854: Rework SPI " Rodrigo Siqueira
2018-03-16 22:49   ` Rodrigo Siqueira
2018-03-18  9:57   ` Jonathan Cameron
2018-03-18  9:57     ` Jonathan Cameron
2018-03-16 22:49 ` [PATCH v2 5/8] staging:iio:ade7854: Replace many functions for one function Rodrigo Siqueira
2018-03-16 22:49   ` Rodrigo Siqueira
2018-03-18  9:58   ` Jonathan Cameron
2018-03-18  9:58     ` Jonathan Cameron
2018-03-16 22:49 ` [PATCH v2 6/8] staging:iio:ade7854: Rework I2C read function Rodrigo Siqueira
2018-03-16 22:49   ` Rodrigo Siqueira
2018-03-18 10:00   ` Jonathan Cameron
2018-03-18 10:00     ` Jonathan Cameron
2018-03-16 22:50 ` [PATCH v2 7/8] staging:iio:ade7854: Rework SPI " Rodrigo Siqueira
2018-03-16 22:50   ` Rodrigo Siqueira
2018-03-16 22:50 ` [PATCH v2 8/8] staging:iio:ade7854: Remove read_reg_* duplications Rodrigo Siqueira
2018-03-16 22:50   ` Rodrigo Siqueira
2018-03-18 10:05   ` Jonathan Cameron
2018-03-18 10:05     ` Jonathan Cameron

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.