Header file should only have register defines, moved non-register
defines to et131x.c
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The function declarations in et131x.h are no longer used now all
functions are in one file. Removed declarations from et131x.h and
added any required forward declarations to et131x.c.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Created one big .c file for the driver, moving the contents of all
driver .c files into it.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Currently it is possible to write negative values to the ad5686's raw attribute.
This will cause undefined behaviour, so reject negative values.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Scale is currently reported in volts instead of millivolts. This patch fixes it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The ad5791 currently assumes that the negative and positive supply have the
same absolute value, which is not necessarily true. This patch introduces a
offset attribute which will contain the negative supply voltage scaled
according to the iio spec. The raw attribute now accepts values in the range
of 0 to max instead of -max/2 to max/2.
While we are at it also fix the vref span calculation. Since both positive and
negative reference voltages are specificed as absolute values we need to add
them and not subtract them to get the reference voltage span.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commit c5b99396 ("staging:iio:dac:ad5791 chan spec conversion.") introduced a
small bug, using storagebits instead of realbits throughout the driver, which
causes the driver to work incorrectly. This patch fixes it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for the Analog Devices AD6064, AD6064-1, AD6044, AD6024
quad channel digital-to-analog converter devices.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
According to OMAP3 TRM access to MMU registers shall be strictly 32-bit
aligned.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The original code left it up to the user to decide how much data to
copy, but that doesn't work with a fixed size array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There's a lot of unused and unneeded things in this makefile, so delete
it all.
Reported-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There's a lot of unused and unneeded things in this makefile, so delete
it all.
Reported-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There's a lot of unused and unneeded things in this makefile, so delete
it all.
Reported-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Previously, the device-driver matching mechanism depended on the
vme_device_id structure due to the need for a bind table per driver.
This method of matching is no longer used so this patch merges the
fields of struct vme_device_id into struct vme_dev. Since this also
renders the slot field meaningless, it has also been removed in this
patch.
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
For jumper based boards (non VME64x), there is no mechanism
for detecting the card that is plugged into a specific slot. This
leads to issues in non-autodiscovery crates/cards when a card is
plugged into a slot that is "claimed" by a different driver. In
reality, there is no problem, but the driver rejects such a
configuration due to its dependence on the concept of slots.
This patch makes the concept of slots less critical and pushes the
driver match() to individual drivers (similar to what happens in the
ISA bus in driver/base/isa.c). This allows drivers to register the
number of devices that they expect without any restrictions. Devices
in this new model are now formatted as $driver_name-$bus_id.$device_id
(as compared to the earlier vme-$bus_id.$slot_number).
This model also makes the device model more logical as devices
are only registered when they actually exist whereas earlier,
a set of devices were being created automatically regardless of
them actually being there.
Another change introduced in this patch is that devices are now created
within the VME driver structure rather than in the VME bridge structure.
This way, things don't go haywire if the bridge driver is removed while
a driver is using it.
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Instead of using a vanilla 'struct device' for VME devices, add new
'struct vme_dev'. Modifications have been made to the VME framework
API as well as all in-tree VME drivers.
The new vme_dev structure has the following advantages from the
current model used by the driver:
* Driver functions (probe, remove) now receive a VME device
instead of a pointer to the bridge device (cleaner design)
* It's easier to differenciate API calls as bridge-based or
device-based (ie. cleaner interface).
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Very simple buffered reading. Did not provide a trigger as
the sysfs trigger already meets that requirement.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The event generator is not very pretty but does the job and
allows this driver to look a lot more like a normal driver
than it otherwise would.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The documenation explaining how to go about writing a driver is lagging
horribly, so here is another approach; an actual driver with
lots of explanatory comments.
Note it is currently minimal in that there are no events and no
buffer. With care they can probably be added in additional files
without messing up the clarity of what we have here.
V2: Addressed some of Manuel Stahl's feedback.
Fixed up kernel doc.
Added more general description.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix a dumb lack of consideration of the effect of combining
the iio_device_unregister and iio_free_device calls into
one. There is no valid place to free some of the sysfs
array elements.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Numerous drivers either had pointless includes of gpio.h
or should have been dependent on GENERIC_GPIO and were not.
Conversion of ads1210 to use array registration triggered
build failures that highlighted all was not well.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
zcache_do_preload() currently does a spin_trylock() on the
zcache_direct_reclaim_lock. Holding this lock intends to prevent
shrink_zcache_memory() from evicting zbud pages as a result
of a preload.
However, it also prevents two threads from
executing zcache_do_preload() at the same time. The first
thread will obtain the lock and the second thread's spin_trylock()
will fail (an aborted preload) causing the page to be either lost
(cleancache) or pushed out to the swap device (frontswap). It
also doesn't ensure that the call to shrink_zcache_memory() is
on the same thread as the call to zcache_do_preload().
Additional, there is no need for this mechanism because all
zcache_do_preload() calls that come down from cleancache already
have PF_MEMALLOC set in the process flags which prevents
direct reclaim in the memory manager. If the zcache_do_preload()
call is done from the frontswap path, we _want_ reclaim to be
done (which it isn't right now).
This patch removes the zcache_direct_reclaim_lock and related
statistics in zcache.
Based on v3.1-rc8
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Reviewed-by: Dave Hansen <dave@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes a compilation error in nvec.c due to the missing module.h include.
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Cc: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
timeval[0-9] were not used or used in a ready only code
so we can remove them safely and so the code
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Setting the key management scheme is done in SIOCSIWAUTH, so
no need to do anything in SIOCSIWGENIE.
Fix up function name.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Handle more cases in IW_AUTH.
Avoid reporting errors (invalid parameter) on operations that we
can't do anything with.
Return -EINPROGRESS from some operations to get wpa_supplicant to
batch and commit changes.
In other operations apply the changes immediately.
Avoid writing WEP keys from the commit handler when WEP is not
being used.
Accept WPA_VERSION_DISABLED, which is received from wpa_supplicant
during WEP.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Share logic between encodeext and encode, so that we can handle
subtle differences between them (implied set_tx), and clear the
appropriate keys if you attempt to switch straight from WPA to
WEP and vice versa.
Also reinstate the TX buffer flush, and ensure the key index is
written to the card little endian.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Report the IE using the appropriate event instead of a custom one.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
These macros don't map to anything different. Just remove them.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WPA has been disabled in the HCF layer. The firmware does
support it (it is used on other platforms). Enable it so
we can work through the issues.
Note that we also enable this for the HERMES 2.5 non-WARP
firmware cards.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The function returns 0 on success and non-zero on error. So
correctly record the status so it is freed appropriately.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixed the checkpatch warnings in rtsx.c/.h, mostly braces and spaces
before tabs issues. Also fixed warning about not using
DEFINE_PCI_DEVICE_TABLE(...) macro.
Signed-off-by: Pelle Windestam <pelle@windestam.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix a bug that SDIO and SD normal card would appear simultaneously if a SDIO card inserted.
Signed-off-by: wwang <wei_wang@realsil.com.cn>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_atmio.c file which fixes a brace and whitespace warning found by the checkpatch.pl tool
Signed-off-by: Jake Burton <jake5991@live.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>