Tejun Heo [Wed, 22 Aug 2012 23:49:44 +0000 (16:49 -0700)]
staging: omapdrm: use alloc_ordered_workqueue() instead of UNBOUND w/ max_active = 1
This is an equivalent conversion and will ease scheduled removal of
WQ_NON_REENTRANT.
Only compile tested.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emil Goode [Fri, 17 Aug 2012 16:53:26 +0000 (18:53 +0200)]
staging: drm/omap: Add error handling
This patch adds fail checks for kmalloc and kzalloc calls
and also adds a error path that frees allocated pages by
introducing a call to _drm_gem_put_pages.
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 4 Sep 2012 19:12:05 +0000 (12:12 -0700)]
Merge tag 'iio-for-v3.7b' of git://git./linux/kernel/git/jic23/iio into work-next
Second set of IIO rework and new drivers for the 3.7 cycle.
Firstly we have the second half of a series reworking support for
the various sigma delta ADCs from Analog. The first half was fixes
that have already merged in the v3.6 cycle. Other than some
little cleanups this mainly consists of a unifying library module
that the various drivers can then use. Another new driver is
using this undergoing revisions and the code reduction already
seen from this is considerable. A nice piece of work.
Secondly we have a good number of tidying up patches from various
sources doing things like adding include guards and removing
unintended header ordering requirements. Also a mass annotation
of missing __devinit/exit. Peter Meerwald has been getting around
with cleanup of lis3l02dq, documentation fixes, white space clenaups
and a small issue with my spelling ;)
Thirdly we have some improvements to our kfifo usage that have
been around for a while but are now suddenly in demand from a
number of users.
Forth we have some clk_prepare_enable and clk_prepare_disable
cleanups.
Fifth is the addition of i2c dacs to the ad5446 driver
Finally we have some email address updates. I'll do the
MAINTAINERS one separately.
So a general mixed bag but nothing terribly controversial
or 'exciting'.
Ian Abbott [Fri, 31 Aug 2012 19:41:49 +0000 (20:41 +0100)]
staging: comedi: das08: abbreviate IS_ENABLED()
The `IS_ENABLED(CONFIG_COMEDI_DAS08_ISA)` and
`IS_ENABLED(CONFIG_COMEDI_DAS08_PCI)` macro calls are a bit long-winded.
Define a couple of macros `DO_ISA` and `DO_PCI` as abbreviations for
them.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:48 +0000 (20:41 +0100)]
staging: comedi: das08: Add helper functions to check bus type
Add inline helper function `is_isa_board(board)` to check if the driver
supports ISA boards and this is an ISA board, and `is_pci_board(board)`
to check if the driver supports PCI boards and this is a PCI board.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:47 +0000 (20:41 +0100)]
staging: comedi: das08: Don't report iobase for PCI device
Don't bother reporting the I/O base address for PCI devices as it's not
very interesting.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 16:42:18 +0000 (17:42 +0100)]
staging: comedi: das08: absorb das08_pci_attach_common()
Absorb `das08_pci_attach_common()` into `das08_attach_pci()` since
that's the only place it was called from.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:45 +0000 (20:41 +0100)]
staging: comedi: das08: Remove manual configuration of PCI boards
Remove the code that allows PCI boards to be manually attached by the
`COMEDI_DEVCONFIG` ioctl (or the `comedi_config` application).
Supported PCI boards will be attached automatically at probe time via
`comedi_pci_auto_config()` and the `attach_pci` hook in the `struct
comedi_driver`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:44 +0000 (20:41 +0100)]
staging: comedi: das08: Support read-back of AO subdevice
Stash the last value written to each AO channel in private data and
support the INSN_READ instruction to read it back. Don't bother setting
the SDF_READABLE subdevice flag though as the hardware isn't really
readable - we're just faking it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:43 +0000 (20:41 +0100)]
staging: comedi: das08: Initialize AO channels
Initialize the AO subdevice channels to mid-range data value so they are
in a known state. This allows us to support reading back the current
value in a later patch.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:42 +0000 (20:41 +0100)]
staging: comedi: das08: Rearrange AO write functions
Combine the AO write functions for 'JR' boards and other boards into a
single function and factor out the data writing from the comedi
instruction handling so it can be called from elsewhere in a later
patch.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:41 +0000 (20:41 +0100)]
staging: comedi: das08: Unmark some __maybe_unused functions
The `das08jr_di_rbits()`, `das08jr_do_wbits()`, `das08jr_ao_winsn()` and
`das08ao_ao_winsn()` static functions are currently marked as
`__maybe_unused` as they were formerly only referred to by possibly
conditionally compiled out code. This is no longer the case (they are
referred to by `das08_common_attach()`) so their `__maybe_unused` tags
can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:40 +0000 (20:41 +0100)]
staging: comedi: das08: No need to check insn->n for counter config
There is no need to check the value of `insn->n` is correct in
`das08_counter_config()` as the core comedi module will have already
checked it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:39 +0000 (20:41 +0100)]
staging: comedi: das08: Remove i8254_iobase from private data
The I/O port base address for the counter subdevice doesn't need to be
stored in the private data. It can be calculated on the fly using the
offset in the static board data.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:38 +0000 (20:41 +0100)]
staging: comedi: das08: Remove pci_iobase from private data
The `pci_iobase` I/O port registers from PCI BAR 1 are never accessed,
so don't bother storing this base address in `struct
das08_private_struct`.
The `pci_iobase` member was checked for non-zero in `das08_detach()` but
we can check `dev->iobase` is non-zero instead.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:37 +0000 (20:41 +0100)]
staging: comedi: das08: Remove dead code
Remove the code that has been in `#if 0` for a long time.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:36 +0000 (20:41 +0100)]
staging: comedi: das08,das08_cs: Move das08_cs_boards[]
Move `das08_cs_boards[]` from "das08.c" to "das08_cs.c" and make it
static const. It no longer refers to anything in "das08.c" and no
longer needs to be exported.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:35 +0000 (20:41 +0100)]
staging: comedi: das08: Avoid zero initializers in board structure
Don't bother initializing the `i8255_offset` and/or `i8254_offset`
members of `struct das08_board_struct` in `das08_boards[]` and
`das08_cs_boards[]` if they are zero as they are implicitly initialized
to zero anyway, and zero means the corresponding subdevices are absent.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:34 +0000 (20:41 +0100)]
staging: comedi: das08: Remove function pointers from board structure
Remove the `ai`, `ao`, `di` and `do` pointers from `struct
das08_board_struct`. These were initialized in `das08_boards[]` and
`das08_cs_boards[]` to point to comedi instruction handler functions for
the subdevice, but there are only two sets of functions depending on
whether the `is_jr` member is true or false, and some of the functions
will be NULL if the corresponding `ai_nbits`, `ao_nbits`, `di_nchan` and
`do_nchan` members are zero. Determine which handler functions to use
in das08_common_attach().
One element of `das08_boards[]` had `ao` set to NULL and `ao_nbits` set
to 12. Set `ao_nbits` to 0 in this case to let das08_common_attach()
know this board has no AO subdevice.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:33 +0000 (20:41 +0100)]
staging: comedi: das08: Mark 'JR' boards in board data
Add a bool member `is_jr` to `struct das08_board_struct` and initialize
it to `true` in those elements of `das08_boards[]` corresponding to the
'JR' board models. This will be used by a following patch that removes
the `ai`, `ao`, `di` and `do` members from `struct das08_board_struct`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:32 +0000 (20:41 +0100)]
staging: comedi: das08: Add number of DI channels in board structure
Add member `di_nchan` to `struct das08_board_struct` to set the number
of digital input channels explicitly. Currently, the code determines
the number of channels to 3 or 8 depending on what function the `di`
member points to, which is not very elegant.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:31 +0000 (20:41 +0100)]
staging: comedi: das08: Remove pc104 bustype value
Remove the `pc104` value from `enum das08_bustype` and replace
occurrences of it in the code and data with the `isa` value. The code
treats them as equivalent anyway with expressions like
`(thisboard->bustype == isa || thisboard->bustype == pc104)`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 4 Sep 2012 18:58:26 +0000 (11:58 -0700)]
Merge branch 'staging-linus' into staging-next
Pick up 2 more comedi patches from Ian that are needed for other
changes in the future.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:30 +0000 (20:41 +0100)]
staging: comedi: das08: Correct AO output for das08jr-16-ao
Don't zero out bits 15..12 of the data value in `das08jr_ao_winsn()` as
that knobbles the upper three-quarters of the output range for the
'das08jr-16-ao' board.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:29 +0000 (20:41 +0100)]
staging: comedi: das08: Correct AI encoding for das08jr-16-ao
The element of `das08_boards[]` for the 'das08jr-16-ao' board has the
`ai_encoding` member set to `das08_encode12`. It should be set to
`das08_encode16` same as the 'das08jr/16' board. After all, this board
has 16-bit AI resolution.
The description of the A/D LSB register at offset 0 seems incorrect in
the user manual "cio-das08jr-16-ao.pdf" as it implies that the AI
resolution is only 12 bits. The diagrams of the A/D LSB and MSB
registers show 15 data bits and a sign bit, which matches what the
software expects for the `das08_encode16` AI encoding method.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 24 Aug 2012 16:26:26 +0000 (17:26 +0100)]
staging: comedi: serial2002: Set range for digital inputs and outputs
I got an update from the original author of this driver (Anders
Blomdell) to set the range table for digital input and digital output
subdevices. Apply it.
Cc: Anders Blomdell <anders.blomdell@control.lth.se>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 4 Sep 2012 18:46:38 +0000 (11:46 -0700)]
Merge branch 'staging-linus' into staging-next
This gets the 6 staging comedi patches that are needed for further
patches that Ian sent.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 15:39:43 +0000 (16:39 +0100)]
staging: comedi: das08: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`das08_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
ioctl), its reference count is incremented in the `for_each_pci_dev`
loop (in `das08_find_pci()`). It is decremented when the `detach` hook
(`das08_detach()`) is called to detach the device. However, when the
PCI device is attached automatically via the `attach_pci` hook
(`das08_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `das08_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 15:39:42 +0000 (16:39 +0100)]
staging: comedi: amplc_pci230: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`pci230_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
ioctl), its reference count is incremented in the `for_each_pci_dev`
loop (in `pci230_find_pci_dev()`). It is decremented when the `detach`
hook (`pci230_detach()`) is called to detach the device. However, when
the PCI device is attached automatically via the `attach_pci` hook
(`pci230_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `pci230_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 15:39:41 +0000 (16:39 +0100)]
staging: comedi: amplc_pc263: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`pc263_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
ioctl), its reference count is incremented in the `for_each_pci_dev`
loop (in `pc263_find_pci_dev()`). It is decremented when the `detach`
hook (`pc263_detach()`) is called to detach the device. However, when
the PCI device is attached automatically via the `attach_pci` hook
(`pc263_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `pc263_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 15:39:40 +0000 (16:39 +0100)]
staging: comedi: amplc_pc236: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`pc236_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
ioctl), its reference count is incremented in the `for_each_pci_dev`
loop (in `pc236_find_pci_dev()`). It is decremented when the `detach`
hook (`pc236_detach()`) is called to detach the device. However, when
the PCI device is attached automatically via the `attach_pci` hook
(`pc236_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `pc236_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 15:39:39 +0000 (16:39 +0100)]
staging: comedi: amplc_dio200: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`dio200_attach()`) (called by the comedi core for the
`COMEDI_DEVCONFIG` ioctl), its reference count is incremented in the
`for_each_pci_dev` loop (in `dio200_find_pci_dev()`). It is decremented
when the `detach` hook (`dio200_detach()`) is called to detach the
device. However, when the PCI device is attached automatically via the
`attach_pci` hook (`dio200_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `dio200_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 15:39:38 +0000 (16:39 +0100)]
staging: comedi: amplc_pci224: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`pci224_attach()`) (called by the comedi core for the
`COMEDI_DEVCONFIG` ioctl), its reference count is incremented in the
`for_each_pci_dev` loop (in `pci224_find_pci_dev()`). It is decremented
when the `detach` hook (`pci224_detach()`) is called to detach the
device. However, when the PCI device is attached automatically via the
`attach_pci` hook (`pci224_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `pci224_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
Cc: stable <stable@vger.kernel.org> # 3.5.x
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 22:05:23 +0000 (15:05 -0700)]
staging: comedi: comedi_test: convert attach message to dev_info
Convert the 'attach' message from a printk to a dev_info.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 22:05:02 +0000 (15:05 -0700)]
staging: comedi: comedi_test: remove boardinfo
This boardinfo for this driver is unneccesary. This driver is only
for testing the comedi subsystem. It defines two dummy subdevices,
an 8 channel analog input subdevice and an 8 channel analog output
subdevice. There is no "board" associated with it.
Remove the boardinfo to keep the driver simple.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 22:04:24 +0000 (15:04 -0700)]
staging: comedi: comedi_test: remove devpriv macro
This macro relies on a local variable having a specific name. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 21:31:10 +0000 (14:31 -0700)]
staging: comedi: comedi_parport: remove the printk noise
Remove the function trace message in parport_intr_cancel() and the
"bogus irq..." message is parport_interrupt(). They are just added
noise.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 21:30:53 +0000 (14:30 -0700)]
staging: comedi: comedi_parport: cleanup 'attach' printk's
Convert the printk messages in the 'attach' to dev_printk messages.
Consolidate the attach message into one message after the device
is attached.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 21:30:27 +0000 (14:30 -0700)]
staging: comedi: comedi_parport: cleanup dev->board_name
Use the 'dev->driver->driver_name' for the 'dev->board_name'. And use
the 'dev->board_name' for the resource name passed to request_region
and request_irq.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 21:30:08 +0000 (14:30 -0700)]
staging: comedi: comedi_parport: remove devpriv macro
This macro relies on a local variable having a specific name, Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 19:53:56 +0000 (12:53 -0700)]
staging: comedi: comedi_bond: remove MODULE_NAME macro
This macro is only used in the MODULE_DESCRIPTION. Just remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 19:53:36 +0000 (12:53 -0700)]
staging: comedi: comedi_bond: remove the STR macro
This macro is not used in the file. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 19:53:20 +0000 (12:53 -0700)]
staging: comedi: comedi_bond: remove private printk macros
Remove the macros LOG_MSG, DEBUG, WARNING, and ERROR. Convert
the printk's into dev_printk format.
The DEBUG macro is not being used in the file so the module
parameter 'debug' can also be removed.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 19:52:58 +0000 (12:52 -0700)]
staging: comedi: comedi_bond: remove devpriv macro
This macro relies on a local variable having a specific name.
Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 19:52:41 +0000 (12:52 -0700)]
staging: comedi: comedi_bond: remove boardinfo
The only field in the boardinfo for this driver is a pointer to the
board 'name'. This field is used by the comedi core to match against
the driver when doing a legacy attach. If a driver does not have any
boardinfo, the comedi core matches against the driver name.
Since the boardinfo name and driver name are identical we can simplify
this driver a bit bu just removing the boardinfo completely.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 18:29:16 +0000 (11:29 -0700)]
staging: comedi: aio_aio12_8: fix i/o region size
This board has jumpers to set the board base address. These
jumpers are marked A5 through A9 and A5 is the least significant
bit of the address. This makes the address reqion for the board
32 bytes not 24.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 18:28:52 +0000 (11:28 -0700)]
staging: comedi: aio_aio12_8: document the register map
Fully document the register map and add namespace to all the
defines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 18:28:28 +0000 (11:28 -0700)]
staging: comedi: aio_aio12_8: add ai and ao only card versions
Add the analog input and analog output only versions of the card
to the boardinfo. These cards all share the same i/o map.
Cleanup the attach so that the unsupported subdevices are not
initialized.
All of these boards also have an 8254 counter/timer. The 8254
device is not currently supported but stub in the subdevice
information so it can easily be added.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 20 Aug 2012 18:28:07 +0000 (11:28 -0700)]
staging: comedi: aio_aio12_8: remove devpriv macro
This macro relies on a local variable having a specific name. Remove
it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:21:12 +0000 (18:21 -0700)]
staging: comedi: adv_pci_dio: fix bug in 'detach'
The 'attach' function can fail between when the devpriv and
the comedi subdevices are allocated. If it does the 'detach'
will try to access unallocated memory when it goes thru the
subdevices.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:20:51 +0000 (18:20 -0700)]
staging: comedi: adv_pci_dio: simplify the 'detach'
Currently the 'detach' function in this driver walks thru the
boardinfo in order to find the subdevice index for any sdio
subdevices in order to call the subdev_8255_cleanup(). Then
it goes thru all the subdevices to clean the s->private pointer.
All the sdio subdevices are unique in that the s->type is
COMEDI_SUBD_DIO. Use that to know when to call the cleanup
for the 8255 subdevice.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:20:34 +0000 (18:20 -0700)]
staging: comedi: adv_pci_dio: add the number of subdevices to the boardinfo
Instead of calculating the number of subdevices in the 'attach'
simply add the number to the boardinfo.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:20:14 +0000 (18:20 -0700)]
staging: comedi: adv_pci_dio: remove '0' boardinfo data
Remove all the boardinfo data that is simply '0'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:19:56 +0000 (18:19 -0700)]
staging: comedi: adv_pci_dio: convert boardinfo initialization to C99 format
Convert the boardinfo initialization to C99 format to make it
less error prone.
The struct diosubd_data information is not converted to C99 format
yet because some of it will be removed.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:19:36 +0000 (18:19 -0700)]
staging: comedi: adv_pci_dio: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:19:18 +0000 (18:19 -0700)]
staging: comedi: adv_pci_dio: remove devpriv and this_board macros
These macros rely on a local variable having a specific name. Remove
them and use the comedi_board() helper to get the this_board pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:18:59 +0000 (18:18 -0700)]
staging: comedi: adv_pci_dio: remove function trace messages
Remove the DPRINTK function trace messages and associated
PCI_DIO_EXTDEBUG define. These should not be in the final driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:18:40 +0000 (18:18 -0700)]
staging: comedi: adv_pci1723: cleanup card reset
Only one 'reset' of the card is required in the attach. Remove the
one before setting up the subdevices and leave the one before
exiting the attach function.
The 'valid' variable in the private data is not needed. This variable
is used in the detach to determine if it's ok to call the 'reset'
function. Checking if dev->iobase is valid works just as well.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:18:16 +0000 (18:18 -0700)]
staging: comedi: adv_pci1723: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:17:57 +0000 (18:17 -0700)]
staging: comedi: adv_pci1723: remove boardinfo
This driver only supports one board type. Remove the boardinfo and
associated code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:17:38 +0000 (18:17 -0700)]
staging: comedi: adv_pci1723: fix initial dio subdevice state and io_bits
The initial state and io_bits for the dio subdevice is determined in
the pci1723_attach() but it's being saved in the wrong subdevice. Move
the code so it gets saved correctly.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:17:14 +0000 (18:17 -0700)]
staging: comedi: adv_pci1723: remove range_pci1723
This comedi_lrange is the same as the global range_bipolar10
exported by the comedi core. Use that range instead.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:16:53 +0000 (18:16 -0700)]
staging: comedi: adv_pci1723: remove devpriv and this_board macros
The devpriv macro relies on a local variable having a specific name.
Remove it.
The this_board macro in this driver is a bit different in this driver.
In other comedi drivers, this macro returns the dev->board_ptr. In this
driver its simply 'boardtypes' which returns the first boardinfo element.
Remove this macro also by making sure the dev->board_ptr is set in the
pci1723_find_pci_dev() function and using the comedi_board() helper
to get the pointer in pci1723_attach().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:16:18 +0000 (18:16 -0700)]
staging: comedi: adv_pci1723: remove function trace messages
Remove the DPRINTK function trace messages. These should not be
in the final driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:06:41 +0000 (18:06 -0700)]
staging: comedi: adv_pci1710: remove forward declarations
Move some of the functions to remove the need for the forward
declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:06:19 +0000 (18:06 -0700)]
staging: comedi: adv_pci1710: remove '0' and 'NULL' boardinfo data
Remove all the boardinfo data that is set to '0' or 'NULL'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:05:52 +0000 (18:05 -0700)]
staging: comedi: adv_pci1710: convert boardinfo initialization to C99 format
Convert the boardinfo initialization to C99 format to make it
less error prone.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:05:22 +0000 (18:05 -0700)]
staging: comedi: adv_pci1710: remove devpriv and this_board macros
These macros rely on a local variable having a specific name. Remove
them and use the comedi_board() helper to get the this_board pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Sat, 18 Aug 2012 01:05:01 +0000 (18:05 -0700)]
staging: comedi: adv_pci1710: remove function trace messages
The macros PCI171X_EXTDEBUG and DPRINTK enable a number of function
trace messages. These trace messages should not be in the final
driver. Remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Tue, 4 Sep 2012 15:04:36 +0000 (16:04 +0100)]
staging: gdm72xx: Fix bogus test
Test the return as we should
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=46921
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 25 Aug 2012 21:22:35 +0000 (02:52 +0530)]
staging: gdm72xx: use kzalloc to allocate usb_tx structure
the code under alloc_tx_struct does the allocation of usb_tx structure
using kmalloc, and memsets the allocated pointer, instead we can
directly use kzalloc so that the allocated memory is set with
zeros
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jonathan Cameron [Sun, 2 Sep 2012 20:34:59 +0000 (21:34 +0100)]
staging:iio: Update email address for Jonathan Cameron.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Jonathan Cameron [Sun, 2 Sep 2012 20:27:56 +0000 (21:27 +0100)]
IIO: Update email address for Jonathan Cameron.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Jean-Francois Dagenais [Tue, 21 Aug 2012 14:28:00 +0000 (15:28 +0100)]
iio:ad5446: get rid of private header file
Most of the defines in there were not even used, and the structs left are
private to the .c file. Makes the driver more in line with most of the
kernel drivers.
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Jean-Francois Dagenais [Tue, 21 Aug 2012 14:28:00 +0000 (15:28 +0100)]
iio:ad5446: Add support for I2C based DACs
This patch adds support for I2C based single channel DACs to the ad5446
driver. Specifically AD5602, AD5612 and AD5622.
V1: from Lars-Peter Clausen <lars@metafoo.de>
V2: Split the device IDs into two enums and move them to the c file.
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Mon, 27 Aug 2012 21:12:00 +0000 (22:12 +0100)]
iio: fix spelling of subsystem
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Sun, 26 Aug 2012 12:43:00 +0000 (13:43 +0100)]
iio: whitespace cleanup and removal of semicolon after functions
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Sun, 26 Aug 2012 12:43:00 +0000 (13:43 +0100)]
iio: fix typos
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Sun, 26 Aug 2012 12:43:00 +0000 (13:43 +0100)]
iio: document missing elements
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Julia Lawall [Sun, 26 Aug 2012 16:00:00 +0000 (17:00 +0100)]
drivers/iio/adc/at91_adc.c: use clk_prepare_enable and clk_disable_unprepare
Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and
clk_enable, and clk_disable and clk_unprepare. They make the code more
concise, and ensure that clk_unprepare is called when clk_enable fails.
A simplified version of the semantic patch that introduces calls to these
functions is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e;
@@
- clk_prepare(e);
- clk_enable(e);
+ clk_prepare_enable(e);
@@
expression e;
@@
- clk_disable(e);
- clk_unprepare(e);
+ clk_disable_unprepare(e);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Julia Lawall [Sun, 26 Aug 2012 16:00:00 +0000 (17:00 +0100)]
drivers/staging/iio/adc/spear_adc.c: use clk_prepare_enable and clk_disable_unprepare
Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and
clk_enable, and clk_disable and clk_unprepare. They make the code more
concise, and ensure that clk_unprepare is called when clk_enable fails.
A simplified version of the semantic patch that introduces calls to these
functions is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e;
@@
- clk_prepare(e);
- clk_enable(e);
+ clk_prepare_enable(e);
@@
expression e;
@@
- clk_disable(e);
- clk_unprepare(e);
+ clk_disable_unprepare(e);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Wed, 22 Aug 2012 19:42:00 +0000 (20:42 +0100)]
staging iio: lis3l02dq cleanup
fixes some typos, whitespace, comments
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Jonathan Cameron [Sat, 30 Jun 2012 12:52:00 +0000 (13:52 +0100)]
iio: kfifo - add poll support.
This buffer implementation was missing poll support.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: srinivas pandruvada <srinivas.pandruvada@intel.com>
Jonathan Cameron [Mon, 27 Aug 2012 17:40:04 +0000 (18:40 +0100)]
iio:kfifo_buf improve error handling in read_first_n.
These two elements were originally in the patch
iio:kfifo_buf Take advantage of the fixed record size used in IIO
but Lars-Peter Clausen pointed out they should not have been
so here they are.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Jonathan Cameron [Sat, 30 Jun 2012 12:52:00 +0000 (13:52 +0100)]
iio:kfifo_buf Take advantage of the fixed record size used in IIO
By bypassing the standard macros for setting up the kfifo we can
take advantage of the fixed record size implementation without
having to have a type to pass in (from which the size of an element
is normally established).
In IIO we have variable 'scans' as our records in which any element
can be present or not. They do not however vary when we are
actually filling or reading from the buffer. Thus we have a fixed
record size whenever we are actually running. As setup and tear
down are not in the fast path we can take the overhead of reinitializing
the kfifo every time.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Lars-Peter Clausen [Fri, 17 Aug 2012 17:29:00 +0000 (18:29 +0100)]
staging:iio: Add missing __devinit and __devexit annotations
Autogenerated using the following coccinelle semantic patch:
// <smpl>
@r1@
identifier driver;
identifier fn;
position p;
type T;
@@
T driver = {
.remove =
(
fn@p
|
__devexit_p(fn@p)
)
};
@r2@
identifier r1.fn;
position p != r1.p;
@@
fn@p
@r3@
identifier r1.fn;
position r1.p;
@@
(
__devexit_p(fn@p)
|
-fn@p
+__devexit_p(fn)
)
@depends on !r2@
identifier r1.fn;
@@
static
-int fn
+int __devexit fn
(...) { ... }
@r11@
identifier driver;
identifier fn;
position p;
type T;
@@
T driver = {
.probe = fn@p
};
@r12@
identifier r11.fn;
position p != r11.p;
@@
fn@p
@depends on !r12@
identifier r11.fn;
@@
static
-int fn
+int __devinit fn
(...) { ... }
// </smpl>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 17 Aug 2012 15:57:00 +0000 (16:57 +0100)]
iio:trigger_consumer.h: Add missing includes and forward declarations
Add includes and forward declarations for types used in this file. This avoids
compile errors if the other files have not been included before.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 17 Aug 2012 15:57:00 +0000 (16:57 +0100)]
iio: Add missing include guards to headers
Add include guards to the IIO headers where they are missing. This avoids
compile errors due to redefined types if a file is included more than once.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 17 Aug 2012 15:57:00 +0000 (16:57 +0100)]
iio:consumer.h: Fix include guard
The symbol name for the #ifndef and the #define of the include guard do not
match and thus it becomes quite ineffective. Add the missing '_' to fix this.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Kim, Milo [Thu, 16 Aug 2012 07:39:00 +0000 (08:39 +0100)]
iio: use IIO_CHAN_INFO_RAW rather than 0
(a) For better readability, replace 0 with IIO_CHAN_INFO_RAW.
(b) Make same line-format as other apis()
: iio_read_channel_scale() and iio_read_channel_offset()
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7793: Add ad7785 support
The ad7785 is similar to the ad7792/ad7793, but has 20 bit wide data samples.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7793: Add support for ad7794/ad7795
The ad7794/ad7795 are similar to the ad7792/ad7793, but have 6 channels instead
of 3.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7192: Use common Sigma Delta library
Convert the ad7192 driver to make use of the new common code for devices from
the Analog Devices Sigma Delta family.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7793: Use common Sigma Delta library
Convert the ad7793 driver to make use of the new common code for devices from
the Analog Devices Sigma Delta family.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7780: Use common Sigma Delta library
Convert the ad7780 driver to make use of the new common code for devices from
the Analog Devices Sigma Delta family.
As a bonus the ad7780 driver gains support for buffered mode. Although this is a
bit tricky. The ad7780 reports in the lower 4 unused bits of the data word the
internal gain used. The driver will update the scale attribute value depending
on the gain accordingly, but obviously this will only work if the gain does not
change while sampling. This is not perfect, but since we store the raw value in
the buffer an application which is aware of this can extract the gain factor
from the buffer as well an apply it accordingly.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
iio:adc: Add common code for ADI Sigma Delta devices
Most devices from the Analog Devices Sigma Delta family use a similar scheme for
communication with the device. This includes register access, as well as trigger
handling. But each device sub-family has different features and different
register layouts (some even have no registers at all) and thus it is impractical
to try to support all of the devices by the same driver. This patch adds a
common base library for Sigma Delta converter devices. It will be used by
individual drivers.
This code is mostly based on the three existing Sigma Delta drivers the AD7192,
AD7780 and AD7793, but has been improved for more robustness and flexibility.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
iio: Introduce iio_device_{set,get}_drvdata()
Introduce two new helper functions to attach a arbitrary pointer to a IIO
device. This is useful to get access to external non-global data from within a
IIO device callbacks where only the IIO device is available.
Internally these functions use dev_{set,get}_drvdata() on the struct device
embedded in the IIO device.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7192: Remove unused platform_data from device state struct
The platform data for the device is only used from within the drivers probe
callback, so there is no need to keep it around in the devices state struct.
While we are at it mark the platform data struct as const.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7793: Remove unused platform_data from device state struct
The platform data for the device is only used from within the drivers probe
callback, so there is no need to keep it around in the devices state struct.
While we are at it mark the platform data struct as const.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Greg Kroah-Hartman [Mon, 27 Aug 2012 14:10:40 +0000 (07:10 -0700)]
Merge 3.6-rc3 into staging-next
This picks up fixes we want in this branch to allow us to properly test.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>