Re: [PATCH] Platform: add Samsung Laptop platform driver

From: Tommaso Massimi
Date: Fri Mar 11 2011 - 12:57:58 EST


On 03/10/2011 08:09 PM, Greg KH wrote:
>On Thu, Mar 10, 2011 at 07:28:00PM +0200, Nikolai Kondrashov wrote:
> > On 03/10/2011 07:19 PM, Greg KH wrote:
> > >Can you provide me the output of:
> > > grep . /sys/class/dmi/id/*
> > >so I can try to add support for this machine to the driver?
> > Sure, here it is.
>
> Great, here's a new version of the samsung-laptop.c file, can you
> replace it whereever you were building the previous one, rebuild it and
> test it for this machine to see if it works?

Hi,
here the output you required from my laptop:

tom@localhost tom_samsung]$ grep . /sys/class/dmi/id/*
/sys/class/dmi/id/bios_date:09/21/2009
/sys/class/dmi/id/bios_vendor:Phoenix Technologies Ltd.
/sys/class/dmi/id/bios_version:04IA.M005.20090921.KSY
/sys/class/dmi/id/board_name:X420/X520
grep: /sys/class/dmi/id/board_serial: Permission denied
/sys/class/dmi/id/board_vendor:SAMSUNG ELECTRONICS CO., LTD.
/sys/class/dmi/id/board_version:Not Applicable
/sys/class/dmi/id/chassis_asset_tag:No Asset Tag
grep: /sys/class/dmi/id/chassis_serial: Permission denied
/sys/class/dmi/id/chassis_type:10
/sys/class/dmi/id/chassis_vendor:SAMSUNG ELECTRONICS CO., LTD.
/sys/class/dmi/id/chassis_version:N/A
/sys/class/dmi/id/modalias:dmi:bvnPhoenixTechnologiesLtd.:bvr04IA.M005.20090921.KSY:bd09/21/2009:svnSAMSUNGELECTRONICSCO.,LTD.:pnX420/X520:pvrNotApplicable:rvnSAMSUNGELECTRONICSCO.,LTD.:rnX420/X520:rvrNotApplicable:cvnSAMSUNGELECTRONICSCO.,LTD.:ct10:cvrN/A:
/sys/class/dmi/id/product_name:X420/X520
grep: /sys/class/dmi/id/product_serial: Permission denied
grep: /sys/class/dmi/id/product_uuid: Permission denied
/sys/class/dmi/id/product_version:Not Applicable
/sys/class/dmi/id/sys_vendor:SAMSUNG ELECTRONICS CO., LTD.
/sys/class/dmi/id/uevent:MODALIAS=dmi:bvnPhoenixTechnologiesLtd.:bvr04IA.M005.20090921.KSY:bd09/21/2009:svnSAMSUNGELECTRONICSCO.,LTD.:pnX420/X520:pvrNotApplicable:rvnSAMSUNGELECTRONICSCO.,LTD.:rnX420/X520:rvrNotApplicable:cvnSAMSUNGELECTRONICSCO.,LTD.:ct10:cvrN/A:

I have added these lines to your source file

668a669,677
> {
> .ident = "X520",
> .matches = {
> DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
> DMI_MATCH(DMI_PRODUCT_NAME, "X520"),
> DMI_MATCH(DMI_BOARD_NAME, "X520"),
> },
> .callback = dmi_check_cb,
> },

When I load the module with the option debug=1,
it turns on and off my backligth and my wireless card,
so I think it is working fine.
Here what dmesg says:

samsung_laptop: module is from the staging directory, the quality is
unknown, you have been warned.
samsung_laptop: found laptop model 'X520'
This computer supports SABI==f48b4
SABI header:
SMI Port Number = 0x00b2
SMI Interface Function = 0xc0
SMI enable memory buffer = 0xc1
SMI restore memory buffer = 0xc2
SABI data offset = 0x0f00
SABI data segment = 0xdf01
ifaceP = 0x000dff10
sabi_iface = ffff8800000dff10
backlight = 0x01
backlight should be off
backlight = 0x00
backlight should be on
backlight = 0x01
wireless led = 0x01
wireless led should be off
wireless led = 0x00
wireless led should be on
wireless led = 0x01
brightness = 0x08
atkbd serio0: Unknown key pressed (translated set 2, code 0x89 on
isa0060/serio0).
atkbd serio0: Use 'setkeycodes e009 <keycode>' to make it known.

Now I think I need only to use the setkeycodes command to have
these new commands under my fingers :)

Thanks for that!!

Tom

PS: I'm not subscribed to the list, so please CC me if you need some other info
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/