Commit Graph

122839 Commits

Author SHA1 Message Date
Jonathan Cameron 31bf47d518 staging:iio:adc:ad7887 stop using IIO_CHAN macro.
It's going away.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:05 -07:00
Jonathan Cameron 3f0676a874 staging:iio:adc:ad7606 remove unused chip info elements.
These are now handled through the chan_spec arrays and no one
is using them anymore.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:05 -07:00
Jonathan Cameron 8cbb36a023 staging:iio:adc:ad7606 refactor to remove st->irq and st->id.
id wasn't used anywhere and st->irq can be removed by simply
passing it into the core remove function (trivially available in
the two bus implementations).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:05 -07:00
Jonathan Cameron 4f5495d0a5 staging;iio:adc:ad7606 use iio_sw_buffer_preenable rather than local equiv
Other than a few slight refactorings the local version was pretty standard
so replace it and rework to get rid of st->d_size which it setup.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:04 -07:00
Jonathan Cameron 68b41aefa3 staging:iio:adc:ad7606 make gpio request failures more consistent
To my mind, if a gpio is specified in the board file, yet fails
to be successfully requested, that is an error condidtion and
the driver should not muddle on regardless.

This does mean unwinding the gpios on error. Also the free_gpios
function is reordered so that it is consistent with the request one
(reverse order obviously).

This patch is the category of not technically fixing anything, just
making the driver be more in line with what a reviewer will expect.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:04 -07:00
Jonathan Cameron 0b89525dfc staging:iio:adc:ad7606 trivial code style fix.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:04 -07:00
Jonathan Cameron 50ac23be39 staging:iio:adc:ad7606 add local define for chan_spec structures.
IIO_CHAN is being phased out and in this case things are so
simple it makes sense to have a local one parameter equivalent.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:03 -07:00
Jonathan Cameron 58dffaeddd staging:iio:adc:ad799x address and scan_index always match so stop using address
Saves on setting the value of address for the simple situation seen in this
device. They are already used interchangably to get data from the buffer.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:03 -07:00
Jonathan Cameron b79c9a3c1e staging:iio:adc:ad799x set the device name only once.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:03 -07:00
Jonathan Cameron 231c5c3b8b staging:iio:adc:ad799x use the core handling for as much of the events as possible.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:02 -07:00
Jonathan Cameron f2a634291e staging:iio:adc:ad799x avoid bouncing back and forth from iio_priv space.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:02 -07:00
Jonathan Cameron 24cba40615 staging:iio:adc:ad799x use a table for frequency values rather than big switch.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:02 -07:00
Jonathan Cameron 5357ba3df4 staging:iio:adc:ad799x trivial: use the convenient chan struct.
This is much cleaner than bouncing through the various structures
to get to the same thing.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:02 -07:00
Jonathan Cameron 7c626f58ab staging:iio:adc:ad799x stop using IIO_CHAN macro.
Preparation for moving driver out of staging.
That macro is a nightmare to maintain so it is going away.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:01 -07:00
Jonathan Cameron dcacccc54f staging:iio:adc:ad799x fix incorrect scan_type descriptions.
A few of these had the wrong shifts, which would lead to
userspace hacking off the top couple of bits.  Also, one
part had the wrong accuracy.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:01 -07:00
Marc Dietrich 9feeb0147f staging: nvec: send suspend messages synchronously
The suspend commands need to be sent using the
synchronous method, otherwise the power gets
disabled before the messages are transferred.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
[jak@jak-linux.org: Rewrote commit message]
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:40 -07:00
Julian Andres Klode de839b8f06 staging: nvec: Add a udelay(100) to nvec_interrupt
As the comment indicates, adding that udelay seems to
improve the stability of the communication, although
it is not known why this is the case.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:39 -07:00
Julian Andres Klode 12b5a55d72 staging: nvec: Add missing includes and reorder them
Add the includes that are currently missing in nvec.h
and nvec.c and reorder them alphabetically.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:39 -07:00
Julian Andres Klode d6bdcf2e10 staging: nvec: Add battery quirk to ignore incomplete responses
The nvec_power system polls nvec for battery information. In some
cases, that part seems to be overloaded and unable to respond
fast in which case it sends an incomplete response. We need to
mark the transfer as completed, though, in order to prevent
endless retries which can kill nvec.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:38 -07:00
Julian Andres Klode 1e46e6273b staging: nvec: ps2: Always sample 4 bytes instead of just 1
Get 4 bytes of data from nvec at once instead of just a single
byte. This makes the driver more similar to nvidias and might
improve reliability.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:38 -07:00
Julian Andres Klode ff006d1266 staging: nvec: Return error in PS2 driver if write fails
Return the return value of nvec_write_async() in the methods
returning an int.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:38 -07:00
Julian Andres Klode 210ceb4f68 staging: nvec: Reject incomplete messages
Reject incomplete messages, causing the request to be
transmitted again. This should fix various problems
out there.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:37 -07:00
Julian Andres Klode 8da7986343 staging: nvec: Handle filled up RX buffers
If no RX buffer is available in state 1, jump to state
0 again. This will produce an incredible amount of
warnings, but it is not supposed to happen anyway.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:37 -07:00
Julian Andres Klode bb0590e272 staging: nvec: Allow TX buffers only in the upper 75% of the pool
Allow TX buffers to be allocated only in the upper 75% of the pool
to avoid a completely filled buffer preventing the driver from
processing responses. This also improves performance, as RX
allocations do not require checking buffers allocated for TX
unless there are more than 16 incoming messages -- which is
highly unlikely.

An earlier version used the lower 75% for TX messages, but
that was considered to be not that effective due to the
overlaps of RX and TX buffers mentioned above.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:36 -07:00
Julian Andres Klode 198dd26714 staging: nvec: Export nvec_msg_free() to clients
Client code wishing to make use of nvec_write_sync() must
have a way to free the returned pointer, otherwise we run
out of poool memory fairly soon.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:36 -07:00
Julian Andres Klode 391d2fa95c staging: nvec: Move implementation-only macros out of the header
Those macros are needed only for implementation purposes and
do not have any use for other code wishing to use nvec.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:36 -07:00
Julian Andres Klode bdf034d986 staging: nvec: Document public and private API
Add kernel-doc comments describing the functions
and structs we currently have.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:35 -07:00
Julian Andres Klode 1b9bf629ea staging: nvec: Have nvec_write_async() return -ENOMEM on OOM
Change nvec_write_async() to return an integer, 0 by default,
a negative error on failure. Change nvec_write_sync() to
check the return value and abort if it is negative.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:35 -07:00
Julian Andres Klode ff169c1487 staging: nvec: Enable the capslock LED in the keyboard driver
When the caps lock key is pressed, toggle the associated
LED. According to Nvidia code, we should send 0x01 where
we sent 0x07, but this does not appear to work correctly
on the AC100.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:34 -07:00
Julian Andres Klode 791c4a6427 staging: nvec: Add myself to copyright and authors list
Forgotten in the last commit(s) which contained the copyrightable
material, so let's add it now. I believe that only my nvec.c
contributions are copyrightable, nvec.h is just interface naming,
so does not deserve that yet.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:34 -07:00
Julian Andres Klode 7b77065793 staging: nvec: Do not print free message for tx_scratch
The scratch area is not part of the pool and thus gets
no allocation message. Printing a free message would
be confusing, and the pointer subtraction would be
undefined behavior.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:33 -07:00
Julian Andres Klode 0cab4cb852 staging: nvec: Rewrite the interrupt handler
Rewrite the interrupt handler to use a state machine similar to
that found in the various kernels for the Advent Vega. This also
changes the code to use the new functions introduced in the
previous commits.

This also merges the rewrite sent in August 2011 by Marc
Dietrich, and thus also includes code by him. His original
patch can be found on the mailing list.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:33 -07:00
Julian Andres Klode 8517e879e0 staging: nvec: Add is_event() and size() functions for nvec_msg
Add functions nvec_msg_is_event() and nvec_msg_size() which
do just what the say: tell whether the message is an event,
and getting the size of the message.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:33 -07:00
Julian Andres Klode e7c40851fd staging: nvec: Introduce nvec_gpio_set_value()
Introduce nvec_gpio_set_value(), which works like
gpio_set_value(), but also creates a debugging
message, if that's enabled.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:41:32 -07:00
Julian Andres Klode 0b1076c4b2 staging: nvec: Introduce new internal API for msg alloc/free
Introduce two new functions nvec_msg_alloc() and nvec_msg_free()
that allocate and free message buffers from the internal pool
of messages.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:40:40 -07:00
Marc Dietrich b414e2eb3a staging: nvec: fix Kconfig dependencies
This patch adds config dependencies for the NVEC keyboard, mouse,
and power drivers.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:40:40 -07:00
Marc Dietrich 8cdeff497a staging: nvec: update ToDo list
Mostly small stuff only. Hopefully completed during the next
release cycle.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
[jak@jak-linux.org: Removed some items no longer valid]
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:40:39 -07:00
Ilya Petrov 97cc26576f staging: nvec: add LED support
This patch adds support for LEDs connect to a nvec. A single brightness
property is exported to sysfs. LEDs are selected via bitfields in the
brightness value. Also the blinking behavior is selected through this
method. Vendors may use different values for different HW designs.

Signed-off-by: Ilya Petrov <ilya.muromec@gmail.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
[jak@jak-linux.org: Fixed checkpatch warnings]
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:40:38 -07:00
Marc Dietrich 6dca320c8f staging: nvec: fix unmute of speakers
The ec command used was for muting, not unmuting.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:40:38 -07:00
Marc Dietrich ac8107599e staging: nvec: rework the nvec slave init
Rework the tegra slave controller init to look more like in
tegra-i2c.c. This makes the nvec init reliable. Also add de-init of
the slave to be used during suspend.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:40:38 -07:00
Marc Dietrich a3a9aa1a41 staging: nvec: Use print_hex_dump() where appropriate
Split of the previous patch and the next by Marc, as that
patch is not strictly a coding style fix only.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:40:37 -07:00
Marc Dietrich 162c7d8c4b staging: nvec: coding style fixes / add copyright notice
This patch fixes coding style and adds copyright notices.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
[jak@jak-linux.org: Merge later cleanup into that patch]
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:40:37 -07:00
Julian Andres Klode 7974035c00 staging: nvec: Include missing headers
Those headers were apparently included by other headers
previously, but are not anymore.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:39:30 -07:00
Kevin McKinney 2505aa6ce4 Staging: bcm: Alter LOC for readability/understandability purposes
This patch alters a line of code to make it more readable
and easier to understand. The purpose of the original line
of code was to compute the amount of memory to request from
kmalloc. This mulit-step algorithm was being done in one
line of code, thus making it more difficult to understand.
Therefore, I split this algorithm into three logical steps.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:34:51 -07:00
Kevin McKinney 0a2cc4977f Staging: bcm: Add min/max restrictions for IOCTL_BCM_REGISTER_READ_PRIVATE
This patch fixes two issues within bcm/Bcmchar.c. The
first condition in the or statement checks if variable
IoBuffer.OutputLength, defined from user space, is
greater than the maximum value allowed for an
unsigned short. IoBuffer.OutputLength is then used
in a kmalloc call to return a pointer to memory. If
this size is greater than an unsigned short, it
becomes useless. The second condition in the or statement
checks if the same variable, IoBuffer.OutputLength is
equal to zero before invoking the kmalloc call. In
this case, if a zero size is sent to kmalloc, a valid
pointer to memory is returned instead of the expected NULL.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:34:51 -07:00
Haiyang Zhang d515d0ff36 staging: hv: remove the carrier status check from netvsc_open()
Checking carrier status in netvsc_open() is not necessary.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:34:50 -07:00
Dan Carpenter 657d1b0dfc Staging: vt6656: potential memory corruption
param->u.wpa_key.key_len comes from the user.  If it's too large we
would write past the end of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:34:50 -07:00
Jonathan Cameron 6835cb6b43 staging:iio: unwind the IIO_IN -> IIO_VOLTAGE define
This was originally there to avoid churn during a complex change.
Now everything is stable lets get rid of this as it is missleading
and confusing.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:32:07 -07:00
K. Y. Srinivasan 6519ad6e6f Staging: hv: Update the TODO file
Now that all vmbus audit related comments have been addressed,
update the TODO file to reflect this.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:52:24 -07:00
David Kilroy bc79be9b38 staging: wlags49_h2: Use IW_HANDLER macro
to declare wireless handlers.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:46:32 -07:00
David Kilroy e7751b6384 staging: wlags49_h2: Stop playing with length in GIWESSID handler
WE21 clarified that ESSID should not be NULL terminated.
The existing code didn't NULL terminate, but did play with length
and then reset it again. Just stop it.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:46:32 -07:00
David Kilroy 145a401fc4 staging: wlags49_h2: Declare support for WEXT 21
WEXT changes between versions 15 and 21 have been taken care of,
so update the declared support.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:46:31 -07:00
David Kilroy 870634604e staging: wlags49_h2: Fixup WEXT capabilities
Add recently added events to the capabilities reported in iw_range.
Use capability macros instead of assuming the array offsets.

Explicitly list scan capabilities.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:46:31 -07:00
Christopher Rice 589cabe1b1 drivers:staging:comedi:drivers:cb_das_cs.c codeing style issue
drivers: staging: comedi: cb_das16_cs.c
fixed over 80 line issue, and removed a space before tab issue.

Signed-off-by: Christopher Rice <rice.christopher.a@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:43:45 -07:00
Johannes Thumshirn bcd9a1e91f staging: comedi: Added log subjects to printk()s in pcmmio
Added log subject to printk()s in drivers/staging/comedi/drivers/pcmmio.c.

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:43:44 -07:00
Dan Carpenter de0920b1fe Staging: vt6655-6: potential info leak in private_ioctl()
Smatch has a new check for Rosenberg type information leaks where
structs are copied to the user with uninitialized stack data in them.

In this path, the .uLinkRate member doesn't get initialized so I've
set it to zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:43:44 -07:00
Marcos Paulo de Souza 43664e14a0 drivers/staging/bcm/InterfaceDld.c: Fix checkpatch warnings
In the source file there are a lot of warnings. I will send it in parts to be more easy to
review. All the changes in this file its just alignment, and things like that.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:43:43 -07:00
Mark Einon c28a613316 staging: et131x: Bugfix - driver doesn't autoreneg after cable unplug/plug events
This driver has a long standing bug where removing and inserting the ethernet cable results in no packets being
trnasmitted / received and hence no autonegotiation occurring.

Fixed by resetting the rx/tx engines and queue on detecting a cable being removed.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:39:17 -07:00
Mark Einon 2c2815aee7 staging: et131x: Remove header declaration of et131x_check_mii()
et131x_check_mii no longer exists, remove its declaration from the header file

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:39:16 -07:00
Mark Einon 7fabca4d91 staging: et131x: Create et131x_[dis|en]able_txrx() calls
In et131x_netdev.c, a series of calls to enable and diasble the rx/tx engine and queue are being used in several different places.
Create two functions to encapsulate these calls, and replace many calls with just the one.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:39:16 -07:00
Mark Einon 268420aa84 staging: et131x: Remove et131x_check_mii() and move functionality into et131x_adjust_link()
et131x_check_mii() is now only being called from et131x_adjust_link.
Removed this call and associated subroutines, putting the functionality directly into et131x_adjust_link(), in preparation for further simplification.
Changed register checks from bare BMSR checks to use phydev/netif versions, also now uses adapter->link to track link state changes.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:39:15 -07:00
Mark Einon 66a0cc1a02 staging: et131x: Add link status to adapter struct
This will be used to determine if the link state has changed when the phydev
informs the et131x that a change has occurred (in et131x_adjust_link)

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:39:15 -07:00
Mark Einon 8e0ae3d55a staging: et131x: support register dump in ethtool ops
Not an exhaustive dump of the et131x registers, used while debugging a specific problem - seems a shame not to keep it around.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:39:15 -07:00
Alan Cox ef86de5832 staging: gma500: gtt based hardware scrolling console
Add support for GTT based scrolling. Instead of pushing bits around we simply
use the GTT to change the mappings. This provides us with a very fast way to
scroll the display providing we have enough memory to allocate on 4K line
boundaries. In practice this seems to be the case except for very big displays
such as HDMI. It works out nicely on the usual configurations are netbooks and
tablets.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:32:54 -07:00
Alan Cox c7e285bedb staging: gma500: frame buffer locking
If we are the console then a printk can hit us with a spin lock held (and
in fact the kernel will do its best to take printing lock).

In that case we cannot politely sleep when synching after an accelerated op
but must behave obnixously to be sure of getting the bits out.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:32:53 -07:00
Jonathan Cameron 30eb82f05d staging:iio: Prevent reading from buffer chrdev when device has no buffer.
Silly bug introduced during the chrdev merge series.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:56 -07:00
Stephen Warren ad31d250bf staging:iio:magnetometer:ak8975: Fix probe() error-handling
Fix ak8975_probe() to jump to the appropriate exit labels when an error
occurs. With the previous code, some cleanup actions were being skipped
for some error conditions.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:55 -07:00
Stephen Warren 7c6c936832 staging:iio:magnetometer:ak8975: Don't assume 0 is an invalid GPIO
gpio_is_valid() is the defined mechanism to determine whether a GPIO is
valid. Use this instead of assuming that 0 is an invalid GPIO.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:55 -07:00
Jonathan Cameron f6d838d7fe staging:iio:magnetometer:ak8975 use platform_data to pass the gpio number.
Tegra doesn't have irq_to_gpio() any more, and ak8975 is included in
tegra_defconfig. This causes a build failure. Instead, pass the GPIO name
through platform data.

[swarren: Rewrote commit description when I squashed this with my patch
to remove the irq_to_gpio() call]

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:54 -07:00
Jonathan Cameron 6ddbb08af0 staging:iio:accel:lis3l02dq ring->buffer renames.
This driver already supports kfifo usage, so the term ring is
misleading and hence replaced.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:54 -07:00
Jonathan Cameron 14555b1445 staging:iio: replacing term ring with buffer in the IIO core.
They aren't always ring buffers, so just use buffer for all naming.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:53 -07:00
Jonathan Cameron 3811cd6291 staging:iio: rename ring_generic.h -> buffer_generic.h
Nothing in this file is specific to RING buffers so rename it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:53 -07:00
Jonathan Cameron f2a96245ba staging:iio: tree wide IIO_RING_BUFFER config symbol to IIO_BUFFER
Functionality is generic, so name is missleading.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:53 -07:00
Jonathan Cameron ec3afa40c6 staging:iio: tree wide IIO_RING_TRIGGERED -> IIO_BUFFER_TRIGGERED
also, IIO_RING_HARDWARE_BUFFER -> IIO_BUFFER_HARDWARE

These aren't always rings so the naming should not imply that.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:52 -07:00
Jonathan Cameron 3b99fb7656 staging:iio: treewide rename iio_triggered_ring_* to iio_triggered_buffer_*
Not always a ring so naming is missleading.
Also, kfifo_buf is probably first buffer to take out of staging and it
definitely isn't a ring.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:52 -07:00
Jonathan Cameron 0baf29d658 staging:iio:documentation Add abi docs for capacitance adcs.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:51 -07:00
Jonathan Cameron 15739cd2d6 staging:iio:documentation general refresh of abi docs.
Numerous small fixes and additions of missing elements.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:50 -07:00
Manuel Stahl 0aeac51d1b staging: iio: Move sensor drivers to sub menus
We have a lot of drivers now, so the iio sub menu becomes quite large.
This patch creates sub menus for the different sensors.

Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:50 -07:00
Michael Hennerich 83e416f458 staging: iio: adc: Replace, rewrite ad7745 from scratch.
The existing ad7745 driver didn't conform with the IIO spec for such devices.
It was way simpler to rewrite the existing driver, than actually fixing it.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:31:49 -07:00
Jaap Crezee 5bf8ebc5c6 Staging: intel_sst: instel_sst: fixed some coding style issues.
Fixed a coding style issue.

Signed-off-by: Jaap Crezee <jaap@jcz.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:29:30 -07:00
Oren Weil abc51b6de5 staging: mei: Organize the initialization state machine.
moving the final state, clearing of the client maps and
updating of mei state out from mei_host_client_properties function.

Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:26:03 -07:00
Dan Carpenter 8f019bfe0a Staging: rtl8192e: off by one in rtl8192_get_channel_map()
COUNTRY_CODE_MAX is not a valid country code.  We're off by one here.
This gets passed to Dot11d_Channelmap() where it's used as an offset
into the ChannelPlan[] array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:26:03 -07:00
Roland Vossen 06bc69691b staging: brcm80211: simplified internal ioctl function once more
Code cleanup. Merged two functions.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:37 -07:00
Roland Vossen 4fa819beca staging: brcm80211: consistent naming of struct net_device *ndev
Code cleanup. Various names (ndev, net, dev) were used for the
same structure. Settled for 'ndev'.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:36 -07:00
Roland Vossen 3229827ec3 staging: brcm80211: clarified fullmac io and event codes
Added comments to make code more readable.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:36 -07:00
Roland Vossen 3428fc4922 staging: brcm80211: removed log after kzalloc()/kmalloc() failure
kzalloc/kmalloc already reports an allocation failure themselves.

Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:35 -07:00
Roland Vossen bb7410b2fd staging: brcm80211: removed likely/unlikely calls
There was no performance rationale to use these guys.

Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:35 -07:00
Roland Vossen 12e139ff6b staging: brcm80211: added endianness check flag to fullmac Makefile
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:35 -07:00
Roland Vossen 201d7a38e6 staging: brcm80211: removed two fullmac sparse spinlock warnings
By deleting three redundant functions. The spinlock was related to
event queue operation. Event queue data members were also renamed
to make their function more clear.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:34 -07:00
Franky Lin 191e2becd0 staging: brcm80211: remove global variables for data frame boundary
Put boundary settings in brcmf_bus structure

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:33 -07:00
Franky Lin c5d3cc0288 staging: brcm80211: remove fullmac module_param brcmf_idletime
Use constant for idle time setting.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:33 -07:00
Franky Lin 823a937e36 staging: brcm80211: remove fullmac module_param for watchdog
Use constant to replace global variable used for watchdog polling

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:33 -07:00
Franky Lin ab8c7bf545 staging: brcm80211: remove fullmac module_param brcmf_sdiod_drive_strength
Replaced the global variable with constant

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:33 -07:00
Franky Lin 9ca59c6f70 staging: brcm80211: remove fullmac module_param brcmf_dongle_memsize
remove unused module parameter brcmf_dongle_memsize and related code

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:32 -07:00
Franky Lin 6a5e1e00ba staging: brcm80211: remove event handler thread from fullmac
Use work queue to defer cfg80211 event handle jobs

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:31 -07:00
Arend van Spriel 6fc1fbc004 staging: brcm80211: remove unconditional code blocks from brcmfmac
Using a block statement to scope function variables is not
common in linux kernel development. Browsed through the brcmfmac
to remove those.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:31 -07:00
Roland Vossen d6a66afcf0 staging: brcm80211: more fullmac sparse endianness scan related changes
Annotated endianness on structures send/received to/from dongle.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:31 -07:00
Roland Vossen bd370bd731 staging: brcm80211: sparse endianness warnings for struct sdpcm_shared
Structure that is received from dongle has been annotated.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:30 -07:00
Roland Vossen 6e8e1264ee staging: brcm80211: sparse endianness warnings for struct brcmf_proto_cdc_ioctl
Structure that is send/received to/from dongle has been annotated.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:29 -07:00
Roland Vossen 33db085d1e staging: brcm80211: various fulmac sparse endianness fixes
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 16:55:29 -07:00