public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Alan Jenkins <sourcejedi.lkml@googlemail.com>
Cc: linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Soeren Sonnenburg" <bugreports@nn7.de>,
	"Jérémie Huchet" <jeremie@lamah.info>,
	"Matthew Garrett" <mjg59@srcf.ucam.org>,
	"Jesse Barnes" <jbarnes@virtuousgeek.org>
Subject: Re: [PATCH] Samsung laptop driver
Date: Wed, 26 Aug 2009 09:18:27 -0700	[thread overview]
Message-ID: <20090826161827.GB22474@kroah.com> (raw)
In-Reply-To: <9b2b86520908220223v4bd58129sfcb22258896592b8@mail.gmail.com>

On Sat, Aug 22, 2009 at 10:23:16AM +0100, Alan Jenkins wrote:
> On 8/21/09, Greg KH <greg@kroah.com> wrote:
> > Well, it turns out that for the Samsung laptops, we aren't supposed to
> > be poking into the raw PCI config space to control the backlight,
> > there's a SMI way to do it instead (Matthew, you were right.)
> >
> > So here's an updated version of the driver, with lots of debugging still
> > left in it, that controls the backlight on a N130 through the "proper"
> > way.
> >
> > It's bigger than the last driver, as I've added lots of documenation
> > about this new interface.  I'm also working on adding wireless LED
> > support, as well as maybe CPU temperature monitoring to the driver, as
> > that can be controlled through this interface.
> >
> > Soeren and Jérémie, I took out support for both of your laptops, as I
> > didn't know if it supported this type of interface.  Could you load the
> > driver with the "force=1" parameter:
> > 	modprobe samsung-laptop force=1
> > and tell me what the kernel log shows for your laptop?  If it works,
> > I'll add the DMI values back to the driver.
> >
> > Jesse, I don't know how this is going to play with your recently added
> > backlight support for the i915 driver.  As you don't have control over
> > the LEDs and other stuff that this driver is going to support, I think
> > we need some way to keep the i915 driver from messing with the backlight
> > values, don't you think?
> >
> > thanks,
> >
> > greg k-h
> >
> > --------------
> >
> >
> > From: Greg Kroah-Hartman <gregkh@suse.de>
> > Subject: Samsung laptop driver
> >
> > This driver implements backlight controls for Samsung laptops that
> > currently do not have ACPI support for this control.
> >
> > It has been tested on the N130 laptop and properly works there.
> >
> > Many thanks to Dmitry Torokhov <dmitry.torokhov@gmail.com> for cleanups
> > and other suggestions on how to make the driver simpler.
> >
> > Cc: Soeren Sonnenburg <bugreports@nn7.de>
> > Cc: Jérémie Huchet <jeremie@lamah.info>
> > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> >
> > ---
> >  drivers/platform/x86/Kconfig          |   12
> >  drivers/platform/x86/Makefile         |    1
> >  drivers/platform/x86/samsung-laptop.c |  420
> > ++++++++++++++++++++++++++++++++++
> >  3 files changed, 433 insertions(+)
> 
> > +static struct dmi_system_id __initdata samsung_dmi_table[] = {
> > +	{
> > +		.ident = "N120",
> > +		.matches = {
> > +			DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
> > +			DMI_MATCH(DMI_PRODUCT_NAME, "N120"),
> > +			DMI_MATCH(DMI_BOARD_NAME, "N120"),
> > +		},
> > +		.callback = dmi_check_cb,
> > +	},
> > +	{
> > +		.ident = "N130",
> > +		.matches = {
> > +			DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
> > +			DMI_MATCH(DMI_PRODUCT_NAME, "N130"),
> > +			DMI_MATCH(DMI_BOARD_NAME, "N130"),
> > +		},
> > +		.callback = dmi_check_cb,
> > +	},
> > +	{ },
> > +};
> 
> ...
> 
> > +MODULE_ALIAS("dmi:*:svnSAMSUNGELECTRONICSCO.,LTD.:pnN120:*:rnN120:*");
> > +MODULE_ALIAS("dmi:*:svnSAMSUNGELECTRONICSCO.,LTD.:pnN130:*:rnN130:*");
> 
> Can't you just use MODULE_DEVICE_TABLE(dmi, samsung_dmi_table)?

Doh, I didn't realize that, nice.

Hm, it seems not many others realize it either, it's only used by 2
other drivers in the whole kernel.  Might be a good job for some janitor
project to go and clean up...

thanks,

greg k-h

  reply	other threads:[~2009-08-26 16:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-21 22:59 [PATCH] Samsung laptop driver Greg KH
2009-08-21 23:19 ` Jesse Barnes
2009-08-21 23:33   ` Greg KH
2009-08-22  9:23 ` Alan Jenkins
2009-08-26 16:18   ` Greg KH [this message]
2009-08-22 10:07 ` [Intel-gfx] " Bruno Prémont
2009-08-26 16:32   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090826161827.GB22474@kroah.com \
    --to=greg@kroah.com \
    --cc=bugreports@nn7.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=jeremie@lamah.info \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=sourcejedi.lkml@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox