Commit Graph

31 Commits

Author SHA1 Message Date
Matthew Garrett
bb7ca747f8 backlight: add backlight type
There may be multiple ways of controlling the backlight on a given
machine.  Allow drivers to expose the type of interface they are
providing, making it possible for userspace to make appropriate policy
decisions.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:43:59 -07:00
Greg Kroah-Hartman
0789b00331 Staging: samsung-laptop: add support for N230 model
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-11 14:32:01 -08:00
Alberto Mardegan
d542f180cd staging: samsung-laptop: Samsung R410P backlight driver
Here's a trivial patch which adds support to the backlight device found
in Samsung R410 Plus laptops.

Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-07 13:55:04 -08:00
Nils Faerber
50d1ae2f80 Staging: samsung-laptop: fix brightness level and add new device ids
The patch is against the 2.6.37 drivers/staging/samsung-laptop
driver and implements some extra enhancements.

It fixes an issue that the brightness would not change the level at
once as well as and some other oddities. It was resolved by
reallocated the SABI memory reagion using the "nocache" option.

The patch also introduces a new set of supported netbook models,
especially the NC10plus which was used for testing this patch. This new
set of models also offer 9 instead of just 8 brightness levels so it
also introduces an additional parameter for the models struct so that
models can define their own brightness range.

Signed-off-by: Nils Faerber <nils.faerber@kernelconcepts.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-27 07:24:10 -08:00
Riccardo Magliocchetti
8aa2bb4364 Staging: samsung-laptop: Add P460 to supported laptops
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-27 07:16:26 -08:00
Joe Perches
dc5ecf45f3 Staging: samsung-laptop: Constify samsung-laptop.c
Change sabi_config to const.
Reduces data, increases text ~200 bytes.

$ size drivers/platform/x86/samsung-laptop.o*
   text	   data	    bss	    dec	    hex	filename
   6933	   5084	   1560	  13577	   3509	drivers/platform/x86/samsung-laptop.o.new
   6765	   5252	   1560	  13577	   3509	drivers/platform/x86/samsung-laptop.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-27 07:16:26 -08:00
Greg Kroah-Hartman
00bfe272bb staging: samsung-laptop: address review comments
Fixed up the printk stuff to use pr_XXX where applicable, and reversed
the logic when testing for commands to complete properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 14:41:06 -08:00
Greg Kroah-Hartman
189b5d559c Staging: samsung-laptop: fix header address for N128
When doing the conversion to the "support more than one model" the
header address of the N128 was incorrectly copied.

This fixes the driver to work properly now on this laptop model.

Cc: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 14:32:26 -08:00
Roman Grebennikov
db559b079a staging: samsung-laptop: Add support for Samsung NP-X120/X170 laptop
Add Samsung NP-X120/X170 laptop DMI signature to samsung-laptop DMI table.

Signed-off-by: Roman Grebennikov <grebennikov.roman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 13:37:52 -08:00
Greg Kroah-Hartman
9b5040be47 staging: samsung-laptop: add support for R519 laptops
Reported-by: Piotr Mitas <yabolus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 13:36:01 -08:00
Greg Kroah-Hartman
e20b6f359a staging: samsung-laptop: add support for r70 laptops
Reported-by: Evgeny Bobkin <stwooe@mail.tu-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 13:32:42 -08:00
Richard Schütz
5f5b5c5185 staging: samsung-laptop: add support for N145P/N250P/N260P machines
Add DMI data for Samsung N145P/N250P/N260P

Signed-off-by: Richard Schütz <r.schtz@t-online.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 13:01:01 -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
Jiri Kosina
4b7bd36470 Merge branch 'master' into for-next
Conflicts:
	MAINTAINERS
	arch/arm/mach-omap2/pm24xx.c
	drivers/scsi/bfa/bfa_fcpim.c

Needed to update to apply fixes for which the old branch was too
outdated.
2010-12-22 18:57:02 +01:00
Greg Kroah-Hartman
4d7bc388b4 Staging: samsung-laptop: fix up my fixup for some sysfs attribute permissions
They should be writable by root, not readable.
Doh, stupid me with the wrong flags.

Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-18 11:27:19 -08:00
Greg Kroah-Hartman
90c05b97fd Staging: samsung-laptop: fix up some sysfs attribute permissions
They should not be writable by any user

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 11:21:03 -08:00
Lionel Debroux
acc2472ed3 backlight: constify backlight_ops
backlight_device_register has been expecting a const "ops" argument, and using
it as such, since 9905a43b2d. Let's make the
remaining backlight_ops instances const.

Inspired by hunks of the grsecurity patch, updated for newer kernels.

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-11-16 14:14:02 +01:00
Matthew Garrett
a19a6ee6ca backlight: Allow properties to be passed at registration
Values such as max_brightness should be set before backlights are
registered, but the current API doesn't allow that. Add a parameter to
backlight_device_register and update drivers to ensure that they
set this correctly.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-16 19:47:54 +00:00
Chihau Chau
d3c796fd57 Staging: samsung-laptop: fix coding style issues
This fixes some lines over 80 characters coding style issues.

Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
Greg Kroah-Hartman
7f1f6e72e2 Staging: samsung-laptop: add TODO file
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:23 -08:00
Greg Kroah-Hartman
5b4c4dc61d Staging: samsung-laptop: remove old kernel code
Don't test for the kernel version, we know what version we are in,
the latest.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00
Greg Kroah-Hartman
d189164a24 Staging: add Samsung Laptop driver
This is a drive for the Samsung N128 laptop to control the wireless LED
and backlight.

Many thanks to Joey Lee for his help in testing and finding all of my
bugs in the development of this driver, it has been invaluable.

Cc: Joey Lee <jlee@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00