Commit graph

233037 commits

Author SHA1 Message Date
Dan Magenheimer
9cc06bf88d staging: zcache: host services and PAM services
[PATCH V2 2/3] drivers/staging: zcache: host services and PAM services

Zcache provides host services (memory allocation) for tmem,
a "shim" to interface cleancache and frontswap to tmem, and
two different page-addressable memory implemenations using
lzo1x compression.  The first, "compression buddies" ("zbud")
compresses pairs of pages and supplies a shrinker interface
that allows entire pages to be reclaimed.  The second is
a shim to xvMalloc which is more space-efficient but
less receptive to page reclamation.  The first is used
for ephemeral pools and the second for persistent pools.
All ephemeral pools share the same memory, that is, even
pages from different pools can share the same page.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 15:07:13 -08:00
Dan Magenheimer
daa6afa6d9 staging: zcache: in-kernel tmem code
[PATCH V2 1/3] drivers/staging: zcache: in-kernel tmem code

Transcendent memory ("tmem") is a clean API/ABI that provides
for an efficient address translation and a set of highly
concurrent access methods to copy data between a page-oriented
data source (e.g. cleancache or frontswap) and a page-addressable
memory ("PAM") data store.  Of critical importance, the PAM data
store is of unknown (and possibly varying) size so any individual
access may succeed or fail as defined by the API/ABI.

Tmem exports a basic set of access methods (e.g. put, get,
flush, flush object, new pool, and destroy pool) which are
normally called from a "host" (e.g. zcache).

To be functional, two sets of "ops" must be registered by the
host, one to provide "host services" (memory allocation) and
one to provide page-addressable memory ("PAM") hooks.

Tmem supports one or more "clients", each which can provide
a set of "pools" to partition pages.  Each pool contains
a set of "objects"; each object holds pointers to some number
of PAM page descriptors ("pampd"), indexed by an "index" number.
This triple <pool id, object id, index> is sometimes referred
to as a "handle".  Tmem's primary function is to essentially
provide address translation of handles into pampds and move
data appropriately.

As an example, for cleancache, a pool maps to a filesystem,
an object maps to a file, and the index is the page offset
into the file.  And in this patch, zcache is the host and
each PAM descriptor points to a compressed page of data.

Tmem supports two kinds of pages: "ephemeral" and "persistent".
Ephemeral pages may be asynchronously reclaimed "bottoms up"
so the data structures and concurrency model must allow for
this.  For example, each pampd must retain sufficient information
to invalidate tmem's handle-to-pampd translation.
its containing object so that, on reclaim, all tmem data
structures can be made consistent.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 15:06:52 -08:00
Michael Hennerich
ea707584ba Staging: IIO: DDS: AD9832 / AD9835 driver
This is a complete rewrite of the AD9832/35 driver.
Purpose was to move this driver to the recently
created API for such devices.

Changes since V1:
IIO: DDS: AD9832 / AD9835 driver: Apply review feedback

Save a few bytes, use union for data allocated for spi buffers.
Remove use of device IDs.
Fix comments.
Make master clock mclk always type unsigned long.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:58:57 -08:00
Michael Hennerich
f9a7e9b2f0 Staging: IIO: TRIGGER: New sysfs based trigger
This patch adds a new trigger that can be invoked by writing
the sysfs file: trigger_now. This approach can be valuable during
automated testing or in situations, where other trigger methods
are not applicable. For example no RTC or spare GPIOs.
Last but not least we can allow user space applications to produce triggers.

IIO: TRIGGER: Apply review feedback by Greg Kroah-Hartman

Changes since v1:

Add sysfs documentation.
Change license notice.
Add module alias.
Add more Kconfig help text

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:56:42 -08:00
Marek Belisko
bcd2d92e62 staging: ft1000: Remove unnecessary check in write_blk_fifo().
byte_length = word_length * 4;

if (byte_length % 4) ...

word_length * 4 is always aligned at 4 bytes. Remove pointless
check.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:51 -08:00
Marek Belisko
677aaa4306 staging: ft1000: Fix coding style in card_reset_dsp function.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:51 -08:00
Marek Belisko
8bfef50259 staging: ft1000: Fix coding style in fix_ft1000_write_dpram32 fucntion.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:51 -08:00
Marek Belisko
71e3335d55 staging: ft1000: Fix coding style in fix_ft1000_read_dpram32 function.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:51 -08:00
Marek Belisko
460bd5ddab staging: ft1000: Fix coding style in ft1000_read/write_dpram16 functions.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:50 -08:00
Marek Belisko
e3fc923d4d staging: ft1000: Fix coding style in ft1000_read/write_dpram32 functions.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:50 -08:00
Marek Belisko
31da7c09de staging: ft1000: Fix coding style in ft1000_write/read_register functions.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:50 -08:00
Marek Belisko
4a526fca84 staging: ft1000: Fix return values type.
Change return values type from u16 to int because all functions
use ft1000_control function which return int.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:49 -08:00
Marek Belisko
dc080fdaca staging: ft1000: Remove unused header ft1000_hw.h
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:49 -08:00
Marek Belisko
537a20aba6 staging: ft1000: Fix coding style in ft1000_control function.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 14:55:49 -08:00
Greg Kroah-Hartman
aa72eb0778 Staging: samsung-laptop: add a bunch more laptop DMI signatures
Taken from the fork of the driver at:
	http://code.google.com/p/easy-slow-down-manager/
which should no longer be needed now that the in-kernel driver now
supports these laptops.

Cc: Kobelkov Sergey <sergeyko81@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 13:19:03 -08:00
Greg Kroah-Hartman
78a2fcb4fe Staging: samsung-laptop: add support for NP-Q45
Support for the Samsung NP-Q45 from Jérémie Huchet added

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 13:09:26 -08:00
Greg Kroah-Hartman
d3c291169e Staging: samsung-laptop: Added support for Samsung NC10 laptop
Info was provided by Soeren Sonnenburg <bugreports@nn7.de>

Cc: Soeren Sonnenburg <bugreports@nn7.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 13:07:23 -08:00
Greg Kroah-Hartman
5bf8b724d2 Staging: samsung-laptop: fix up some variable nameing
No camelcase in the Linux kernel please.

Cc: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:39:01 -08:00
Greg Kroah-Hartman
55bb5f4bf2 Staging: samsung-laptop: fix up a few more minor coding style issues
Cc: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:34:28 -08:00
Greg Kroah-Hartman
1540e350dd Staging: samsung-laptop: change sabi_configs to be in C99 format
This makes the coding style checker a lot happier.

Cc: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:30:00 -08:00
Greg Kroah-Hartman
3e55eb376e Staging: samsung-laptop: fix up brace coding style issues
These were introduced with the patch, "staging: samsung-laptop: Extend
samsung-laptop platform driver to support another flavor of its platform
BIOS."

Cc: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:22:41 -08:00
Greg Kroah-Hartman
27f55e920d Staging: samsung-laptop: fix up space/tab coding style issues
These were introduced with the patch, "staging: samsung-laptop: Extend
samsung-laptop platform driver to support another flavor of its platform
BIOS."

Cc: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:19:45 -08:00
Ingmar Steen
837b03cd18 staging: samsung-laptop: Added Samsung X125 DMI info.
Signed-off-by: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:16:29 -08:00
Ingmar Steen
988a29bf3d staging: samsung-laptop: Extend samsung-laptop platform driver to support another flavor of its platform BIOS.
There are currently two implementations of the Samsung BIOS that controls the rfkill
switch, backlight brightness / power and performance level. The samsung-laptop driver
implements the BIOS flavor with the SECLINUX signature, this patch implements talking
to the other BIOS with 'SwSmi@' signature. Both expose very similar functionality and
way of accessing the commands. The differences are mostly offsets, command identifiers
and some values.

This patch introduces a sabi_config structure that contains information on identifying
and accessing specific SABI flavors.

Signed-off-by: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:15:34 -08:00
Timo von Holtz
f94fdeaa58 Staging: quickstart: fixed coding style issues
Fixed the Following coding Style Issues:
drivers/staging/quickstart/quickstart.c:8: ERROR: trailing whitespace
drivers/staging/quickstart/quickstart.c:144: ERROR: spaces required around that '?' (ctx:VxV)
drivers/staging/quickstart/quickstart.c:144: ERROR: spaces required around that ':' (ctx:VxV)

Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:55 -08:00
Dan Carpenter
7e79f78b33 Staging: rts_pstor: fix read past end of buffer
We read one space past the end of the buffer because we add 1.

Also I changed it to use ARRAY_SIZE() instead of manually calculating
the size.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:55 -08:00
Timo von Holtz
581de3b0a5 Staging: hv: moved assignments out of if conditions
Moved all assignments in if conditions to the preceeding line

Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:55 -08:00
Timo von Holtz
3c4a94132b Staging: hv: replaced __attribute((packed)) with __packed
Replaced __attribute((packed)) with __packed as it's preferred

Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:54 -08:00
Andres Salomon
56463de05a staging: olpc_dcon: actually return the value of i2c_add_driver
It's nice to actually check for errors. :)

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:54 -08:00
Andres Salomon
bada46e5ab staging: olpc_dcon: move more variables into dcon_priv
Global variables for display mode and the current sleep state
can go into dcon_priv as well.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:54 -08:00
Andres Salomon
bb4103544e staging: olpc_dcon: change sysfs 'output' toggle to be clearer...
..and store it in dcon_priv.  This renames it to 'monochrome',
which I think is much clearer.  Previously, "echo 1 > output"
toggled mono mode, while "echo 0 > output" enabled color.
"Echo 1 > monochrome" makes more sense to me.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:54 -08:00
Andres Salomon
8d2d3dd1b4 staging: olpc_dcon: get rid of global i2c_client, create a dcon_priv struct
Rather than using the global i2c_client variable, create a dcon_priv
struct, store in the drvdata portion of the dev, and pass that around.

In order to access dcon struct from various callbacks, include
the reboot notifier and source switching work struct in the dcon struct.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:54 -08:00
Andres Salomon
fe2d5b4380 staging: olpc_dcon: revert strtoul change
On Fri, 4 Feb 2011 15:44:43 -0800

From: Andres Salomon <dilinger@queued.net>

The s/simple_strtoul/strict_strtoul/ from commit e107e6eb added a build
warning, as well as an oops.  This reverts that change.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:53 -08:00
Tomas Winkler
2ef0c05e80 staging/easycap: replace NOREADBACK with moduel parameter
NOREADBACK doesn't justify Kconfig option so we use module
paramter for it.

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:07 -08:00
Tomas Winkler
32851b325e staging/easycap: use regget for register back reading
Use regget to reading back what was written to a register.
This required changning size argument to regget signature

On the way remove usless variable casting

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:07 -08:00
Tomas Winkler
73132ce45a stagine/easycap: make functions regset and regget static
regget and regset functions are used only from within
easycap_low.c so they can be static
Move the functions to avoid forward declarations
Move GET and SET macro definitions into the c-file

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:07 -08:00
Tomas Winkler
4d59fde3d1 staging/easycap: add first level indentation to regget/set functions
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:06 -08:00
Tomas Winkler
5e7a55c30b staging/easycap: remove TESTONE and EASYCAP_TESTTONE
No longer needed feature for testing driver's handling of
the audio stream independently of the urb completion routine

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:06 -08:00
Tomas Winkler
a78392aa34 staging/easycap: remove EASYCAP_SILENT option
This has simulated a fault condition of probing for audio capability

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:06 -08:00
Tomas Winkler
6ae2dbec4d staging/easycap: remove AUDIOTIME feature
remove code guarded by AUDIOTIME define
This was experimental code in which I tried  improve audio-video
synchronization but it didn't work well

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:06 -08:00
Tomas Winkler
f62bc44e05 staging/easycap: remove obsolete VIDIOC_S_CTRL_OLD ioctl
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:05 -08:00
Tomas Winkler
5dd00908be staging/easycap: replace one more EASYCAP_NEEDS_ALSA with CONFIG_EASYCAP_OSS
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:05 -08:00
Tomas Winkler
8d6139547c stagine/easycap: use module paramter for default encoding instead of ifdef
remove PREFER_NTSC ifdef as it cannot be possible put into Kconfig

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:05 -08:00
Tomas Winkler
aff512c8a4 staging/easycap: prefer printk over SAY in module entry functions
Use INFO level when registering driver and ERR for error.
Drop messages from oneliner exit function

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:04 -08:00
Tomas Winkler
ee99aa4928 staging/easycap: remove paranoid argument checks in usb probe/disconnect
remove checks for NULL for usb_interface. USB bus won't call these
functions with NULL

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:04 -08:00
Tomas Winkler
66681fb74e staging/easycap: fix build when SND is not enabled
Fix easycap build when CONFIG_SOUND is enabled but CONFIG_SND is
not enabled.

use choice construct to select between ALSA and OSS API binding

drivers/built-in.o: In function `easycap_usb_disconnect':
easycap_main.c:(.text+0x2aba20): undefined reference to `snd_card_free'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b784b): undefined reference to `snd_card_create'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b78fb): undefined reference to `snd_pcm_new'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b7916): undefined reference to `snd_pcm_set_ops'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b795b): undefined reference to `snd_card_register'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b79d8): undefined reference to `snd_card_free'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b7a78): undefined reference to `snd_card_free'
drivers/built-in.o: In function `easycap_alsa_complete':
(.text+0x2b7e68): undefined reference to `snd_pcm_period_elapsed'
drivers/built-in.o:(.data+0x2cae8): undefined reference to `snd_pcm_lib_ioctl'

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: R.M. Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:56:21 -08:00
Dan Carpenter
d936435f20 Staging: rtl8712: fix math errors in snprintf()
The original code had calls to snprintf(p, 7, "wpa_ie=") but that string
is 8 characters (because snprintf() puts a NUL terminator on the end).
So instead of an '=' the what gets written to buf is a NUL terminator
followed by the rest of the string.

And actually the %02x formats are three chars as well when you include
the terminator.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:51:27 -08:00
Mike McCormack
ec42dc2c7f staging: rtl8192e: Factor out common code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:21 -08:00
Mike McCormack
11a861d9de staging: rtl8192e: Remove dead code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:21 -08:00
Mike McCormack
ec984e0cab staging: rtl8192e: Clean up MlmeDisassociateRequest
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:21 -08:00