linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] iio: stx104: Add IIO support for the ADC channels
@ 2016-07-19 16:24 William Breathitt Gray
  2016-07-19 16:25 ` [PATCH v2 1/3] iio: stx104: Unregister IIO device on remove callback William Breathitt Gray
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: William Breathitt Gray @ 2016-07-19 16:24 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw
  Cc: linux-iio, linux-kernel, William Breathitt Gray

Changes in v2:
  - IIO_CHAN_INFO_RAW mask used for analog input channels
  - STX104_ prefix added to IN_CHAN_OFFSET define
  - STX104_MAX_NUM_CHAN define removed as unnecessary
  - Whitespace added to pad comment about ADC sample capture and completion wait
  - Switch statement in write_raw callback refactored to return 0
  - Comma added to last element initialization of stx104_info
  - Comment added to warn why stx104_channels is not const
  - Comment added to explain GPIO offset in gpio_get_direction callback
  - ARRAY_SIZE macro utilized to get number of channels in stx104_channels
  - Replace devm_iio_device_register with iio_device_register call and
    respective iio_device_unregister call
  - Perform GPIO chip registration before iio_device_register to prevent race
    condition

The first patch in this patchset ("iio: stx104: Unregister IIO device on remove
callback") fixes the improper registration of the IIO device by replacing the
devm_iio_device_register call with a iio_device_register call and a subsequent
iio_device_unregister call in the remove callback. This issue when GPIO support
was added in commit 765550e4d98d ("iio: stx104: Add GPIO support for the Apex
Embedded Systems STX104"); a remove callback was introduced, but
devm_iio_device_register related code was not reimplemented.

The second patch is the actual code to implement the ADC support, while the
third patch is simply to move the STX104 driver to the IIO ADC directory; I
separated the move to its own patch in order to make the addition of the ADC
support code clear in the commit log.

William Breathitt Gray (3):
  iio: stx104: Unregister IIO device on remove callback
  iio: stx104: Add IIO support for the ADC channels
  iio: stx104: Move the STX104 IIO driver to the ADC directory

 MAINTAINERS              |   2 +-
 drivers/iio/adc/Kconfig  |  15 ++
 drivers/iio/adc/Makefile |   1 +
 drivers/iio/adc/stx104.c | 390 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/iio/dac/Kconfig  |  10 --
 drivers/iio/dac/Makefile |   1 -
 drivers/iio/dac/stx104.c | 255 -------------------------------
 7 files changed, 407 insertions(+), 267 deletions(-)
 create mode 100644 drivers/iio/adc/stx104.c
 delete mode 100644 drivers/iio/dac/stx104.c

-- 
2.7.3


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

end of thread, other threads:[~2016-07-24 13:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19 16:24 [PATCH v2 0/3] iio: stx104: Add IIO support for the ADC channels William Breathitt Gray
2016-07-19 16:25 ` [PATCH v2 1/3] iio: stx104: Unregister IIO device on remove callback William Breathitt Gray
2016-07-24 13:20   ` Jonathan Cameron
2016-07-19 16:25 ` [PATCH v2 2/3] iio: stx104: Add IIO support for the ADC channels William Breathitt Gray
2016-07-24 13:18   ` Jonathan Cameron
2016-07-19 16:25 ` [PATCH v2 3/3] iio: stx104: Move the STX104 IIO driver to the ADC directory William Breathitt Gray
2016-07-24 13:22   ` Jonathan Cameron

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).