public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] backlight: mbp_nvidia_bl - add five more MacBook variants
@ 2010-03-10  0:20 Evan McClain
  2010-03-10 12:10 ` Mario Schwalbe
  2010-03-10 14:24 ` Matthew Garrett
  0 siblings, 2 replies; 7+ messages in thread
From: Evan McClain @ 2010-03-10  0:20 UTC (permalink / raw)
  To: rpurdie, akpm, schwalbe, mjg; +Cc: linux-kernel, Evan McClain

This adds the MacBook 1,1 2,1 3,1 4,1 and 4,2 to the DMI tables.

Signed-off-by: Evan McClain <evan.mcclain@gatech.edu>
---
 drivers/video/backlight/mbp_nvidia_bl.c |   45 +++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/drivers/video/backlight/mbp_nvidia_bl.c b/drivers/video/backlight/mbp_nvidia_bl.c
index 2e78b07..9804ee9 100644
--- a/drivers/video/backlight/mbp_nvidia_bl.c
+++ b/drivers/video/backlight/mbp_nvidia_bl.c
@@ -139,6 +139,51 @@ static int mbp_dmi_match(const struct dmi_system_id *id)
 static const struct dmi_system_id __initdata mbp_device_table[] = {
 	{
 		.callback	= mbp_dmi_match,
+		.ident		= "MacBook 1,1",
+		.matches	= {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBook1,1"),
+		},
+		.driver_data	= (void *)&intel_chipset_data,
+	},
+	{
+		.callback	= mbp_dmi_match,
+		.ident		= "MacBook 2,1",
+		.matches	= {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBook2,1"),
+		},
+		.driver_data	= (void *)&intel_chipset_data,
+	},
+	{
+		.callback	= mbp_dmi_match,
+		.ident		= "MacBook 3,1",
+		.matches	= {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBook3,1"),
+		},
+		.driver_data	= (void *)&intel_chipset_data,
+	},
+	{
+		.callback	= mbp_dmi_match,
+		.ident		= "MacBook 4,1",
+		.matches	= {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBook4,1"),
+		},
+		.driver_data	= (void *)&intel_chipset_data,
+	},
+	{
+		.callback	= mbp_dmi_match,
+		.ident		= "MacBook 4,2",
+		.matches	= {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBook4,2"),
+		},
+		.driver_data	= (void *)&intel_chipset_data,
+	},
+	{
+		.callback	= mbp_dmi_match,
 		.ident		= "MacBookPro 3,1",
 		.matches	= {
 			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] backlight: mbp_nvidia_bl - add five more MacBook variants
  2010-03-10  0:20 [PATCH] backlight: mbp_nvidia_bl - add five more MacBook variants Evan McClain
@ 2010-03-10 12:10 ` Mario Schwalbe
  2010-03-10 14:24 ` Matthew Garrett
  1 sibling, 0 replies; 7+ messages in thread
From: Mario Schwalbe @ 2010-03-10 12:10 UTC (permalink / raw)
  To: Evan McClain; +Cc: rpurdie, akpm, mjg, linux-kernel

What about finally adding all machines to the list?
As far as I know, we have:

* already present in Linus'/Richard Purdie's tree:
     Intel chipset:
         MacBookAir 1,1
         MacBookPro 3,1
         MacBookPro 3,2
         MacBookPro 4,1

     Nvidia chipset:
         MacBook 5,1
         MacBook 5,2
         MacBookAir 2,1
         MacBookPro 5,1
         MacBookPro 5,2
         MacBookPro 5,3
         MacBookPro 5,4
         MacBookPro 5,5

* recently proposed to add by Evan McClain:
     Intel chipset:
         MacBook 1,1
         MacBook 2,1
         MacBook 3,1
         MacBook 4,1
         MacBook 4,2

* still missing:
     Intel chipset:
         MacBookPro 1,1
         MacBookPro 1,2
         MacBookPro 2,1
         MacBookPro 2,2

     Nvidia chipset:
         MacBook 6,1

ciao,
Mario

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] backlight: mbp_nvidia_bl - add five more MacBook variants
  2010-03-10  0:20 [PATCH] backlight: mbp_nvidia_bl - add five more MacBook variants Evan McClain
  2010-03-10 12:10 ` Mario Schwalbe
@ 2010-03-10 14:24 ` Matthew Garrett
  2010-03-10 15:45   ` Mario Schwalbe
  2010-03-10 22:05   ` Evan McClain
  1 sibling, 2 replies; 7+ messages in thread
From: Matthew Garrett @ 2010-03-10 14:24 UTC (permalink / raw)
  To: Evan McClain; +Cc: rpurdie, akpm, schwalbe, linux-kernel

Acked in principle, but at this point it probably needs to be renamed 
and have the Kconfig entry updated if it's going to be used for other 
hardware. Does it actually work on non-nvidia Macs?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] backlight: mbp_nvidia_bl - add five more MacBook variants
  2010-03-10 14:24 ` Matthew Garrett
@ 2010-03-10 15:45   ` Mario Schwalbe
  2010-03-10 15:47     ` Matthew Garrett
  2010-03-10 22:05   ` Evan McClain
  1 sibling, 1 reply; 7+ messages in thread
From: Mario Schwalbe @ 2010-03-10 15:45 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Evan McClain, rpurdie, akpm, linux-kernel

Hi,

On 10.03.2010 15:24, Matthew Garrett wrote:
> Acked in principle, but at this point it probably needs to be renamed
> and have the Kconfig entry updated if it's going to be used for other
> hardware. Does it actually work on non-nvidia Macs?

I assume you mean non-Nvidia chipset. Yes, it works, because the driver
uses the firmware interface. This is what Apple's Windows (bootcamp) drivers
do as well.

Tested using a simple program that writes the ports from userland.
And ack: it should probably be renamed to something more reasonable.
Something like apple_bl?

ciao,
Mario

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] backlight: mbp_nvidia_bl - add five more MacBook variants
  2010-03-10 15:45   ` Mario Schwalbe
@ 2010-03-10 15:47     ` Matthew Garrett
  2010-03-10 15:57       ` Mario Schwalbe
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2010-03-10 15:47 UTC (permalink / raw)
  To: Mario Schwalbe; +Cc: Evan McClain, rpurdie, akpm, linux-kernel

On Wed, Mar 10, 2010 at 04:45:43PM +0100, Mario Schwalbe wrote:

> Tested using a simple program that writes the ports from userland.
> And ack: it should probably be renamed to something more reasonable.
> Something like apple_bl?

Sure. Want to do a patch for that and Kconfig? It probably wants a 
module alias line for backwards compatibility.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] backlight: mbp_nvidia_bl - add five more MacBook variants
  2010-03-10 15:47     ` Matthew Garrett
@ 2010-03-10 15:57       ` Mario Schwalbe
  0 siblings, 0 replies; 7+ messages in thread
From: Mario Schwalbe @ 2010-03-10 15:57 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Evan McClain, rpurdie, akpm, linux-kernel

Hi,

On 10.03.2010 16:47, Matthew Garrett wrote:
> On Wed, Mar 10, 2010 at 04:45:43PM +0100, Mario Schwalbe wrote:
>
>> Tested using a simple program that writes the ports from userland.
>> And ack: it should probably be renamed to something more reasonable.
>> Something like apple_bl?
>
> Sure. Want to do a patch for that and Kconfig? It probably wants a
> module alias line for backwards compatibility.

Why not? How should the module alias line look like?
MODULE_ALIAS("mbp_nvidia_bl");
Or prefixed with some subsystem identifier? I've never used it before.

Thanks & ciao,
Mario

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] backlight: mbp_nvidia_bl - add five more MacBook variants
  2010-03-10 14:24 ` Matthew Garrett
  2010-03-10 15:45   ` Mario Schwalbe
@ 2010-03-10 22:05   ` Evan McClain
  1 sibling, 0 replies; 7+ messages in thread
From: Evan McClain @ 2010-03-10 22:05 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: rpurdie, akpm, schwalbe, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

On Wed, Mar 10, 2010 at 02:24:24PM +0000, Matthew Garrett wrote:
> Acked in principle, but at this point it probably needs to be renamed 
> and have the Kconfig entry updated if it's going to be used for other 
> hardware. Does it actually work on non-nvidia Macs?

I have applied it locally and tested on my MacBook 3,1 for several weeks
now. The intel X driver requires a small patch to use the mbp_backlight
class, but I'll let them know once this patch has been applied upstream.

There are several bugreports related to this issue at the ubuntu,
opensuse, and freedesktop bugzillas (see
https://bugzilla.novell.com/show_bug.cgi?id=581474 with links to the
other reports as well).

Thanks
-- 
Evan McClain
Aerospace Engineering
Graduate Student Senator  .
evan.mcclain@gatech.edu  ..:

[-- Attachment #2: Type: application/pgp-signature, Size: 271 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-10 22:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-10  0:20 [PATCH] backlight: mbp_nvidia_bl - add five more MacBook variants Evan McClain
2010-03-10 12:10 ` Mario Schwalbe
2010-03-10 14:24 ` Matthew Garrett
2010-03-10 15:45   ` Mario Schwalbe
2010-03-10 15:47     ` Matthew Garrett
2010-03-10 15:57       ` Mario Schwalbe
2010-03-10 22:05   ` Evan McClain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox