backlight: mbp_nvidia_bl - add five more MacBook variants
Subsystems (2)
PATCH 1/1 backlight: mbp_nvidia_bl - add five more MacBook variants
This adds the MacBook 1,1 2,1 3,1 4,1 and 4,2 to the DMI tables.
--- drivers/video/backlight/mbp_nvidia_bl.c | 45 +++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-)
drivers/video/backlight/mbp_nvidia_bl.c +45 -0
@@ -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." ),
Signature · 1 line
1.7.0
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,1ciao,
Mario
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?
Signature · 1 line
Matthew Garrett | [email protected]
Hi,
Quoted 3 lines · Matthew Garrett
Acked in principle, but at this point it probably needs to be renamed and have the
Kconfigentry 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
Quoted 3 lines · Mario Schwalbe
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.
Signature · 1 line
Matthew Garrett | [email protected]
Hi,
Quoted 8 lines · Matthew Garrett
Quoted 3 lines · Mario Schwalbe
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
Quoted 3 lines · Matthew Garrett
Acked in principle, but at this point it probably needs to be renamed and have the
Kconfigentry 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
Signature · 4 lines
Evan McClain Aerospace Engineering Graduate Student Senator . [email protected] ..: