summaryrefslogtreecommitdiffstats
path: root/drivers/staging
Commit message (Collapse)AuthorAgeFilesLines
* staging: brcm80211: simple changes to softmac phy variablesRoland Vossen2011-10-033-38/+1
| | | | | | | | | | Code cleanup resulting in less sparse warnings. Reported-by: Johannes Berg <johannes@sipsolutions.net> 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>
* staging: brcm80211: use d11rxhdr structure in brcms_c_recover_tsf64()Arend van Spriel2011-10-033-24/+3
| | | | | | | | | | | All information needed for this function is available in the d11rxhdr structure. This is the last place where the brcms_d11rxhdr structure so it can be removed. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: move rssi computation to place we need itArend van Spriel2011-10-031-6/+1
| | | | | | | | | | | | The rssi computation was done upon getting the frame from the queue, but the value is needed when filling in the receive status data for mac80211. The call to wlc_phy_rssi_compute() has been deferred. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: use endian annotated structures in brcmsmacArend van Spriel2011-10-037-105/+126
| | | | | | | | | | | | | Structures interfacing with the device have a specific endianess and structures exchanged between host and device have been annotated so sparse checking can be done. The Makefile has been modified to add the __CHECK_ENDIAN__ flag. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: convert endianess before handling the frameArend van Spriel2011-10-033-21/+20
| | | | | | | | | | | | | The received frame from the device is in little-endian order and converted in the receive path. However, the phy code was doing the rssi calculation with packet in LE order. This has been changed to do the le_to_cpu conversion before doing the rssi computation and further receive processing. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: change interface for common rssi compute functionArend van Spriel2011-10-033-7/+8
| | | | | | | | | | The function wlc_phy_rssi_compute() now uses d11rxhdr struct as purely input parameter and returns the computed rssi value. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: changing interface to n-phy rssi compute functionArend van Spriel2011-10-033-8/+3
| | | | | | | | | | | | The function wlc_phy_rssi_compute_nphy() was called with pointer to brcms_d11rxhdr structure in which it filled in the received power per antenna. However, these are not used further in the driver so it only needs the d11rxhdr structure as input for rssi calculation. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: removed global variable in softmac otpRoland Vossen2011-10-032-133/+18
| | | | | | | | | | | | Placed variable on the stack instead and deleted unused functions. Softmac was tested to function properly with multiple adapters in one system. Reported-by: Johannes Berg <johannes@sipsolutions.net> 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>
* staging: brcm80211: various global var related changes in softmacRoland Vossen2011-10-035-20/+13
| | | | | | | | Reported-by: Johannes Berg <johannes@sipsolutions.net> 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>
* staging: brcm80211: removed global var global_scb from softmacRoland Vossen2011-10-035-27/+24
| | | | | | | | | | | | Global variables are undesirable unless they are read only. Removed by instead using an already defined Station Control Block variable in a per-device structure. Reported-by: Johannes Berg <johannes@sipsolutions.net> 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>
* staging: brcm80211: removed band related global vars from softmacRoland Vossen2011-10-032-12/+18
| | | | | | | | | | | Global variables are undesirable unless they are read only. Variables are now maintained in a device specific structure. Reported-by: Johannes Berg <johannes@sipsolutions.net> 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>
* staging: brcm80211: remove unnecessary mac80211 callbacksArend van Spriel2011-10-031-61/+0
| | | | | | | | | | | | Several callback were implemented without executing any further function calls into the driver. Review feedback indicated that these could be removed. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: remove dongle firmware related debug codeArend van Spriel2011-10-031-258/+1
| | | | | | | | | | | | | | When the device dies the driver could extract cpu registers on the device to analyze the trap handling on the dongle. As the firmware with this driver is stable this code does not belong in the brcmfmac driver. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Roland Vossen <rvossen@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>
* staging: brcm80211: make device initializer table for wme constantArend van Spriel2011-10-031-2/+2
| | | | | | | | | For chip initialisation of the wme parameters a table is used, but it was not marked as constant. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: remove unused function si_pmu_ilp_clock()Arend van Spriel2011-10-032-23/+0
| | | | | | | | The function is not used in the driver and has been removed. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: use fragment number provided in transmit frameArend van Spriel2011-10-031-1/+1
| | | | | | | | | | In the transmit path the field seq_ctrl is filled in, but the fragment number was not properly determined. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: remove ht_cap field from brcms_c_info structureArend van Spriel2011-10-033-34/+0
| | | | | | | | | | | | The field ht_cap was typed ieee80211_ht_cap from ieee80211.h. This contained little endian annotated field cap_info resulting in sparse endian warnings. It turned out the driver was setting the field, but it was actually never used. Therefore it has been removed. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: removed unused softmac workaroundRoland Vossen2011-10-035-49/+1
| | | | | | | | | | WAR16165 is only used on older PCI chips, the driver does not support these chips. 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>
* staging: brcm80211: removed global vars in softmac ucode handlingRoland Vossen2011-10-035-95/+106
| | | | | | | | | Moved global vars into a per-device structure. 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>
* staging: brcm80211: removed global var from aiutils.cRoland Vossen2011-10-031-5/+1
| | | | | | | 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>
* staging: brcm80211: removed redundant wlc->cfg struct memberRoland Vossen2011-10-032-28/+20
| | | | | | | | | | After initialization ('attach'), this struct member always pointed at the same memory as wlc->bsscfg. 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>
* staging: brcm80211: deleted unused array of bss configurations in softmacRoland Vossen2011-10-033-103/+43
| | | | | | | | | List always had one element. Converted the array to a scalar. 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>
* staging: brcm80211: removed unused argument from softmac functionsRoland Vossen2011-10-032-194/+188
| | | | | | | | | | | Parameter 's2' was unused. Affected function was only used internally to main.c and has been made static and moved above its callers. Reported-by: Johannes Berg <johannes@sipsolutions.net> 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>
* staging: brcm80211: remove uncoditional code blocks from brcmsmacArend van Spriel2011-10-033-83/+63
| | | | | | | | | | | | Using a block statement to scope function variables is not common in linux kernel development. Browsed through the brcmsmac 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> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: add module.h to various iio driversPaul Gortmaker2011-10-032-0/+2
| | | | | | | | | | | | | | Since they are assuming it is there implicitly and will fail otherwise with things like: drivers/staging/iio/impedance-analyzer/ad5933.c:816: warning: type defaults to ‘int’ in declaration of ‘MODULE_AUTHOR’ drivers/staging/iio/adc/ad7280a.c:990: warning: type defaults to ‘int’ in declaration of ‘MODULE_AUTHOR’ Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: intel_sst: fix compile errorLu Guanqun2011-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include module.h to fix the following compile errors: drivers/staging/intel_sst/intelmid.c:52: error: expected declaration specifiers or '...' before string constant drivers/staging/intel_sst/intelmid.c:52: warning: data definition has no type or storage class drivers/staging/intel_sst/intelmid.c:52: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/staging/intel_sst/intelmid.c:52: warning: function declaration isn't a prototype drivers/staging/intel_sst/intelmid.c:53: error: expected declaration specifiers or '...' before string constant drivers/staging/intel_sst/intelmid.c:53: warning: data definition has no type or storage class drivers/staging/intel_sst/intelmid.c:53: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/staging/intel_sst/intelmid.c:53: warning: function declaration isn't a prototype drivers/staging/intel_sst/intelmid.c:54: error: expected declaration specifiers or '...' before string constant drivers/staging/intel_sst/intelmid.c:54: warning: data definition has no type or storage class drivers/staging/intel_sst/intelmid.c:54: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/staging/intel_sst/intelmid.c:54: warning: function declaration isn't a prototype drivers/staging/intel_sst/intelmid.c:55: error: expected declaration specifiers or '...' before string constant drivers/staging/intel_sst/intelmid.c:55: warning: data definition has no type or storage class drivers/staging/intel_sst/intelmid.c:55: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/staging/intel_sst/intelmid.c:55: warning: function declaration isn't a prototype drivers/staging/intel_sst/intelmid.c:56: error: expected declaration specifiers or '...' before string constant drivers/staging/intel_sst/intelmid.c:56: warning: data definition has no type or storage class drivers/staging/intel_sst/intelmid.c:56: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/staging/intel_sst/intelmid.c:56: warning: function declaration isn't a prototype drivers/staging/intel_sst/intelmid.c:57: error: expected declaration specifiers or '...' before string constant drivers/staging/intel_sst/intelmid.c:57: warning: data definition has no type or storage class drivers/staging/intel_sst/intelmid.c:57: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/staging/intel_sst/intelmid.c:57: warning: function declaration isn't a prototype drivers/staging/intel_sst/intelmid.c:58: error: expected declaration specifiers or '...' before string constant drivers/staging/intel_sst/intelmid.c:58: warning: data definition has no type or storage class drivers/staging/intel_sst/intelmid.c:58: warning: type defaults to 'int' in declaration of 'MODULE_SUPPORTED_DEVICE' drivers/staging/intel_sst/intelmid.c:58: warning: function declaration isn't a prototype drivers/staging/intel_sst/intelmid.c:64: error: expected ')' before 'int' drivers/staging/intel_sst/intelmid.c:65: error: expected ')' before string constant drivers/staging/intel_sst/intelmid.c:66: error: expected ')' before numeric constant drivers/staging/intel_sst/intelmid.c:67: error: expected ')' before string constant drivers/staging/intel_sst/intelmid.c:461: warning: data definition has no type or storage class drivers/staging/intel_sst/intelmid.c:461: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' drivers/staging/intel_sst/intelmid.c:461: warning: parameter names (without types) in function declaration drivers/staging/intel_sst/intelmid.c:475: warning: data definition has no type or storage class drivers/staging/intel_sst/intelmid.c:475: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' drivers/staging/intel_sst/intelmid.c:475: warning: parameter names (without types) in function declaration drivers/staging/intel_sst/intelmid.c: In function 'snd_intelmad_probe': drivers/staging/intel_sst/intelmid.c:859: error: 'THIS_MODULE' undeclared (first use in this function) drivers/staging/intel_sst/intelmid.c:859: error: (Each undeclared identifier is reported only once drivers/staging/intel_sst/intelmid.c:859: error: for each function it appears in.) drivers/staging/intel_sst/intelmid.c: At top level: drivers/staging/intel_sst/intelmid.c:989: error: 'THIS_MODULE' undeclared here (not in a function) Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:imu:adis16400 rename adis16344 -> adis16334.Jonathan Cameron2011-10-032-10/+10
| | | | | | | Part never existed under that name. Ooops Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:adc:ad7887 stop using IIO_CHAN macro.Jonathan Cameron2011-10-031-8/+18
| | | | | | | | 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>
* staging:iio:adc:ad7606 remove unused chip info elements.Jonathan Cameron2011-10-031-2/+0
| | | | | | | | | 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>
* staging:iio:adc:ad7606 refactor to remove st->irq and st->id.Jonathan Cameron2011-10-034-11/+7
| | | | | | | | | | 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>
* staging;iio:adc:ad7606 use iio_sw_buffer_preenable rather than local equivJonathan Cameron2011-10-032-36/+7
| | | | | | | | | 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>
* staging:iio:adc:ad7606 make gpio request failures more consistentJonathan Cameron2011-10-033-56/+86
| | | | | | | | | | | | | | | | | 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>
* staging:iio:adc:ad7606 trivial code style fix.Jonathan Cameron2011-10-031-2/+1
| | | | | | 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>
* staging:iio:adc:ad7606 add local define for chan_spec structures.Jonathan Cameron2011-10-031-54/+28
| | | | | | | | | 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>
* staging:iio:adc:ad799x address and scan_index always match so stop using addressJonathan Cameron2011-10-031-39/+1
| | | | | | | | | 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>
* staging:iio:adc:ad799x set the device name only once.Jonathan Cameron2011-10-031-1/+0
| | | | | | 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>
* staging:iio:adc:ad799x use the core handling for as much of the events as ↵Jonathan Cameron2011-10-031-60/+82
| | | | | | | | 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>
* staging:iio:adc:ad799x avoid bouncing back and forth from iio_priv space.Jonathan Cameron2011-10-033-5/+5
| | | | | | 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>
* staging:iio:adc:ad799x use a table for frequency values rather than big switch.Jonathan Cameron2011-10-031-57/+17
| | | | | | 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>
* staging:iio:adc:ad799x trivial: use the convenient chan struct.Jonathan Cameron2011-10-031-4/+3
| | | | | | | | | 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>
* staging:iio:adc:ad799x stop using IIO_CHAN macro.Jonathan Cameron2011-10-031-123/+329
| | | | | | | | | 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>
* staging:iio:adc:ad799x fix incorrect scan_type descriptions.Jonathan Cameron2011-10-031-20/+20
| | | | | | | | | | 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>
* staging: nvec: send suspend messages synchronouslyMarc Dietrich2011-09-291-2/+8
| | | | | | | | | | | 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>
* staging: nvec: Add a udelay(100) to nvec_interruptJulian Andres Klode2011-09-291-0/+9
| | | | | | | | | | 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>
* staging: nvec: Add missing includes and reorder themJulian Andres Klode2011-09-292-14/+17
| | | | | | | | | 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>
* staging: nvec: Add battery quirk to ignore incomplete responsesJulian Andres Klode2011-09-291-0/+5
| | | | | | | | | | | | 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>
* staging: nvec: ps2: Always sample 4 bytes instead of just 1Julian Andres Klode2011-09-291-2/+3
| | | | | | | | | | 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>
* staging: nvec: Return error in PS2 driver if write failsJulian Andres Klode2011-09-291-5/+2
| | | | | | | | | 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>
* staging: nvec: Reject incomplete messagesJulian Andres Klode2011-09-291-1/+6
| | | | | | | | | | 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>
* staging: nvec: Handle filled up RX buffersJulian Andres Klode2011-09-291-0/+5
| | | | | | | | | | 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>
OpenPOWER on IntegriCloud