lenovo-sl-laptop : driver for review
Subsystems (3)
PATCH 1/1 lenovo-sl-laptop : driver for review
lenovo-sl-laptop is a new driver that adds support for hotkeys, bluetooth, LEDs, fan speed and screen brightness on the Lenovo ThinkPad SL series laptops. [1] These laptops are not supported by the normal thinkpad_acpi driver because their firmware is quite different from the "real" ThinkPads. [2] Based on advice from linux-thinkpad and linux-kernel mailing lists, I am posting it to linux-acpi for review and, hopefully, eventual inclusion.
Patch against current checkout of 2.6.29-rc5 is below.
Changes since previous post on linux-kernel: fan speed hwmon interface added.
One important note concerning the backlight. Currently, the ACPI video driver has poor support for the ThinkPad SL series because their _BCL and _BQC methods violate the ACPI spec. Thus, the lenovo-sl-laptop driver adds optional (controlled via module parameter, default off) support for setting the backlight brightness.
Zhang Rui has stated that he will be working on making the ACPI video driver properly support the ThinkPad SL series and other laptops with non-standard backlight brightness interfaces. When he is finished, backlight functionality can probably be safely removed from lenovo-sl-laptop. [3]
[1] homepage : http://github.com/tetromino/lenovo-sl-laptop/tree/master
[2] http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2009-January/046122.html
[3] http://bugzilla.kernel.org/show_bug.cgi?id=12249
Documentation/laptops/lenovo-sl-laptop.txt | 137 +++ drivers/platform/x86/Kconfig | 18 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/lenovo-sl-laptop.c | 1310 ++++++++++++++++++++++++++++ 4 files changed, 1466 insertions(+), 0 deletions(-)
Documentation/laptops/lenovo-sl-laptop.txt new file +137 -0
@@ -0,0 +1,137 @@ +Lenovo ThinkPad SL Series Laptop Extras driver +http://github.com/tetromino/lenovo-sl-laptop +Version 0.02 +16 February 2009 + +Copyright (C) 2008-2009 Alexandre Rostovtsev <[email protected]> + +lenovo-sl-laptop is a driver for controlling various parts of the Lenovo +ThinkPad SL series (SL300/400/500) laptops. The SL series is not supported +by the standard thinkpad_acpi driver. + +Reporting bugs +-------------- + +You can report bugs to me by email, or use the Linux ThinkPad mailing list: +http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad +You will need to subscribe to the mailing list to post. + +Disclaimer +--------- + +This driver was written with no help from Lenovo engineers, and is based on +my experiments with my SL300. It's possible that it could break your hardware +- of course, that is quite unlikely, but still, be aware of the possibility. + +Supported hardware +------------------ + +I have reports of the driver working on a number of SL300, 400, and 500 +laptops with Intel video. I do not know how well it works with Nvidia +video cards. + +There are rumors that with some modification, the driver can be used on +some IdeaPads. I know that it certainly does *not* work, and probably will +never work, on the IdeaPad S10e. + +If the driver does not work on your ThinkPad SL, please send me a copy of +your DSDT. In other words, +cat /proc/acpi/dsdt > dsdt +and send me the resulting dsdt file. + +Keymap +----- + +Lenovo Care : KEY_VENDOR (360) +Volume up : KEY_VOLUMEUP (115) +Volume down : KEY_VOLUMEDOWN (114) +Volume mute : KEY_MUTE (113) +Fn F2 (screensaver): KEY_COFFEE (152) +Fn F2 (battery): KEY_BATTERY (236) +Fn F4 (sleep): no input event; dispatches an ACPI event +Fn F5 (radio): KEY_WLAN (238) +Fn F7 (switch screen): no input event; dispatches an ACPI event +Fn F8 (Ultranav): KEY_PROG1 (148) +Fn F9 (eject): KEY_EJECTCD (161) +Fn F12 (hibernate): KEY_SUSPEND (205) +Fn Space (zoom): KEY_ZOOM (372) +Fn Home (brightness up): by default, only dispatches an ACPI event; + will dispatch an input event if + control_backlight parameter is on. +Fn End (brightness down): see above. + + +Sysfs interface +--------------- + +You may find the following sysfs files useful. NOTE: depending on your +hardware and module parameters, some of these will not be available. + +/sys/class/leds/lensl::lenovocare/ + The Lenovo Care LED. brightness can be 0 (off) or 255 (on). To make the LED + blink, make sure you have LED timer trigger support and + echo "timer" > /sys/class/leds/lensl::lenovocare/triggers + Afterwards, you will be able to adjust the blink frequency using delay_off + and delay_on (in milliseconds). + +/sys/devices/platform/lenovo-sl-laptop/rfkill/rfkill*/ + The bluetooth rfkill. state is the switch state (0 for bluetooth off, + 1 for bluetooth on). + Note that in case future versions of the driver add other rfkill switches, + userspace programs should check that the rfkill name is lensl_bluetooth_sw + +/sys/devices/platform/lenovo-sl-laptop/hwmon/hwmon*/ + Fan control. fan1_input is the fan speed, in RPM. If pwm1_enable is zero, + fan is in automatic mode; setting pwm1_enable to 1 lets you control fan + speed manually. Manual control is via pwm1 file; values are in the range + 0-255, where 0 is fan off, 255 is max (corresponds to ~ 4600 RPM), and + default is 126 (corresponds to ~ 2700 RPM). + +/sys/class/backlight/thinkpad_screen/ + The backlight brightness interface. Only available if the control_backlight + parameter is on. This interface will very likely disappear in a future + driver version, after the ACPI video driver properly supports the SL series. + I am using the same backlight device name as the thinkpad_acpi driver in + order to ensure support on existing versions of the xorg intel video driver. + +Module parameters +----------------- + +debug: + Controls the verbosity of messages printed to the kernel log. Values + range from 0 (print nothing) to 7 (print everything). + Default is 6. + +bluetooth_auto_enable: + If this parameter is set to 1 and your laptop supports bluetooth, then + bluetooth will be activated immediately when you load this driver. If + the parameter is set to 0, bluetooth will not be automatically activated, + and you will need to enable it manually: + cat 1 > /sys/devices/platform/lenovo-sl-laptop/rfkill/rfkill*/state + Default is 1. + +control_backlight: + If this parameter is set to 1, this driver will intercept brightness keys + (Fn+Home and Fn+End) and control the backlight brightness. This feature is + useful because the default ACPI video driver currently has poor support + for the Lenovo SL series. If you enable this feature, you should add + acpi_backlight=vendor + to the kernel boot parameters. Otherwise, lenovo-sl-laptop and the ACPI + video driver will both try to change screen brightness simultaneously, + causing interesting effects. + It's likely that this option will disappear in the next driver version + (I will remove it once the SL series are well supported by the ACPI video + driver). + Default is 0. + +debug_ec: + For debugging purposes, enables access to the ACPI embedded controller via + /proc/acpi/lenovo-sl-laptop/ec0 + Reading from this file will dump the contents of all EC registers. Doing + so could theoretically crash your computer. Writing to this file will + write data to the EC registers. + **WARNING** : WRITING THE WRONG VALUES TO THE EMBEDDED CONTROLLER + CAN *DESTROY* YOUR VALUABLE HARDWARE! Do not even think of doing it unless + you are quite certain about your actions. + Default is, of course, 0. +
drivers/platform/x86/Kconfig +18 -0
@@ -288,6 +288,24 @@ config THINKPAD_ACPI_HOTKEY_POLL If you are not sure, say Y here. The driver enables polling only if it is strictly necessary to do so. +config LENOVO_SL_LAPTOP + tristate "Lenovo ThinkPad SL Series Laptop Extras (EXPERIMENTAL)" + depends on ACPI + depends on EXPERIMENTAL + select BACKLIGHT_CLASS_DEVICE + select HWMON + select INPUT + select NEW_LEDS + select LEDS_CLASS + select RFKILL + ---help--- + This is a driver for the Lenovo ThinkPad SL series laptops + (SL300/400/500), which are not supported by the thinkpad_acpi + driver. This driver adds support for hotkeys, bluetooth control, + the Lenovo Care LED, fan speed, and (as an experimental feature) + for screen backlight brightness control. For more information, + see <file:Documentation/laptops/lenovo-sl-laptop.txt> + config INTEL_MENLOW tristate "Thermal Management driver for Intel menlow platform" depends on ACPI_THERMAL
drivers/platform/x86/Makefile +1 -0
@@ -18,3 +18,4 @@ obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o obj-$(CONFIG_ACPI_WMI) += wmi.o obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o +obj-$(CONFIG_LENOVO_SL_LAPTOP) += lenovo-sl-laptop.o
drivers/platform/x86/lenovo-sl-laptop.c new file +1310 -0
1,310 lines not on this page · raw message
Quoted 1 line · Alexandre Rostovtsev
+Fn F9 (eject):
KEY_EJECTCD(161)
No - this is a dock eject key, not a CD eject key.
Documentation/laptops/lenovo-sl-laptop.txt line 81
Quoted 7 lines
Documentation/laptops/lenovo-sl-laptop.txt new file +6
-0+Fn F12 (hibernate): KEY_SUSPEND (205) +/sys/devices/platform/lenovo-sl-laptop/rfkill/rfkill*/ + The bluetooth rfkill. state is the switch state (0 for bluetooth off, + 1 for bluetooth on). + Note that in case future versions of the driver add other rfkill switches, + userspace programs should check that the rfkill name is lensl_bluetooth_sw
Surely they should just be checking the rfkill type?
Quoted 6 lines
+control_backlight:
+ If this parameter is set to 1, this driver will intercept brightness keys
+ (Fn+Home and Fn+End) and control the backlight brightness. This feature is
+ useful because the default ACPI video driver currently has poor support
+ for the Lenovo SL series. If you enable this feature, you should add
+ acpi_backlight=vendor
Please don't do that - the kernel shouldn't be consuming the brightness events itself, that should be left up to userspace. The ACPI video driver is broken in this respect.
drivers/platform/x86/lenovo-sl-laptop.c line 311
Quoted 3 lines
drivers/platform/x86/lenovo-sl-laptop.c new file +3
-0+static struct device_attribute dev_attr_bluetooth_enable = +__ATTR (bluetooth_enable,S_IWUSR |S_IRUGO , + bluetooth_enable_show, bluetooth_enable_store);
You support rfkill, so I'm not sure there's a benefit in exposing the same functionality via a custom sysfs node.
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 7 lines · Matthew Garrett
drivers/platform/x86/lenovo-sl-laptop.c line 311
Quoted 3 lines · Alexandre Rostovtsev
drivers/platform/x86/lenovo-sl-laptop.c new file +3
-0+static struct device_attribute dev_attr_bluetooth_enable = +__ATTR (bluetooth_enable,S_IWUSR |S_IRUGO , + bluetooth_enable_show, bluetooth_enable_store);You support rfkill, so I'm not sure there's a benefit in exposing the same functionality via a custom sysfs node.
Not only there is no benefit, it won't work at all. The rfkill core will set the radio state to match the global state for that radio type during the rfkill_register() call.
Alexandre, if the thinkpad-sl can store rfkill state across shutdown in nvram or something like that, there is an API on the rfkill core that you can use. The current thinkpad-acpi code does it, you can use that as an example.
Signature · 4 lines
"One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Oh, yeah, is there really no notification when a hotkey is pressed? Polling is somewhat hostile to power management.
Signature · 1 line
Matthew Garrett | [email protected]
Hi!
Quoted 7 lines
lenovo-sl-laptop is a new driver that adds support for hotkeys, bluetooth, LEDs, fan speed and screen brightness on the Lenovo ThinkPad SL series laptops. [1] These laptops are not supported by the normal
thinkpad_acpidriver because their firmware is quite different from the "real" ThinkPads. [2] Based on advice from linux-thinkpad and linux-kernel mailing lists, I am posting it to linux-acpi for review and, hopefully, eventual inclusion.
Thanks for doing that.
Quoted 10 lines
One important note concerning the backlight. Currently, the ACPI video driver has poor support for the ThinkPad SL series because their
_BCLand_BQCmethods violate the ACPI spec. Thus, the lenovo-sl-laptop driver adds optional (controlled via module parameter, default off) support for setting the backlight brightness.
Zhang Rui has stated that he will be working on making the ACPI video driver properly support the ThinkPad SL series and other laptops with non-standard backlight brightness interfaces. When he is finished, backlight functionality can probably be safely removed from lenovo-sl-laptop. [3]
Well, it should probably be removed now so that a) we don't confuse users and b) keep the review easy. ...if users start to rely on lenovo-sl for their brightness and deconfigure acpi-video, it will be a regression when you remove that support...
Documentation/laptops/lenovo-sl-laptop.txt line 17
Quoted 6 lines
Documentation/laptops/lenovo-sl-laptop.txt new file +6
-0+Reporting bugs +-------------- + +You can report bugs to me by email, or use the Linux ThinkPad mailing list: +http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad +You will need to subscribe to the mailing list to post.
Add MAINTAINERS entry?
Quoted 6 lines
+/sys/devices/platform/lenovo-sl-laptop/hwmon/hwmon*/
+ Fan control.fan1_inputis the fan speed, in RPM. Ifpwm1_enableis zero,
+ fan is in automatic mode; settingpwm1_enableto 1 lets you control fan
+ speed manually. Manual control is via pwm1 file; values are in the range
+ 0-255, where 0 is fan off, 255 is max (corresponds to ~ 4600 RPM), and
+ default is 126 (corresponds to ~ 2700 RPM).
Maybe using /sys/class/hwmon here is cleaner?
Quoted 5 lines
+/sys/class/backlight/thinkpad_screen/
+ The backlight brightness interface. Only available if thecontrol_backlight
+ parameter is on. This interface will very likely disappear in a future
+ driver version, after the ACPI video driver properly supports the SL series.
...and this will change when acpi-video is fixed. Better remove that before merge.
Quoted 7 lines
+bluetooth_auto_enable:
+ If this parameter is set to 1 and your laptop supports bluetooth, then
+ bluetooth will be activated immediately when you load this driver. If
+ the parameter is set to 0, bluetooth will not be automatically activated,
+ and you will need to enable it manually:
+ cat 1 >/sys/devices/platform/lenovo-sl-laptop/rfkill/rfkill*/state
+ Default is 1.
Is this really needed?> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
Quoted 7 lines
index 9436311..be6faaa 100644
drivers/platform/x86/Kconfig +0
-0@@ -288,6 +288,24 @@ config THINKPAD_ACPI_HOTKEY_POLL If you are not sure, say Y here. The driver enables polling only if it is strictly necessary to do so.
drivers/platform/x86/Kconfig config THINKPAD_ACPI_HOTKEY_POLL · line 300
Quoted 10 lines
drivers/platform/x86/Kconfig +10
-0+config LENOVO_SL_LAPTOP + tristate "Lenovo ThinkPad SL Series Laptop Extras (EXPERIMENTAL)" + depends on ACPI + depends on EXPERIMENTAL + select BACKLIGHT_CLASS_DEVICE + select HWMON + select INPUT + select NEW_LEDS + select LEDS_CLASS + select RFKILL
The driver is huge... and I'm not sure if all those options can be simply selected. Maybe it should be split to parts?
...if (for example) LEDS_CLASS depends on something, you can't just select it...
drivers/platform/x86/Kconfig config THINKPAD_ACPI_HOTKEY_POLL · line 301
Quoted 1 line
drivers/platform/x86/Kconfig +1
-0+#define LENSL_LAPTOP_VERSION "0.02"
You should not need this in mainline.
Quoted 7 lines
drivers/platform/x86/Kconfig +7
-0+/* #define instead of enum needed for macro */ +#define LENSL_EMERG 0 +#define LENSL_ALERT 1 +#define LENSL_CRIT 2 +#define LENSL_ERR 3 +#define LENSL_WARNING 4 +#define LENSL_NOTICE 5
drivers/platform/x86/Kconfig config THINKPAD_ACPI_HOTKEY_POLL
Quoted 10 lines
drivers/platform/x86/Kconfig +10
-0+#define LENSL_INFO 6 +#define LENSL_DEBUG 7 + +#define vdbg_printk_(a_dbg_level, format, arg...) \ + do { if (dbg_level >= a_dbg_level) \ + printk("<" #a_dbg_level ">" LENSL_MODULE_NAME ": " \ + format, ## arg); \ + } while (0) +#define vdbg_printk(a_dbg_level, format, arg...) \ + vdbg_printk_(a_dbg_level, format, ## arg)
Custom debugging infrastructure. Please use generic one.
drivers/platform/x86/Kconfig
Quoted 4 lines
drivers/platform/x86/Kconfig +4
-0+module_param(debug_ec, bool, S_IRUGO); +MODULE_PARM_DESC(debug_ec, + "Present EC debugging interface in procfs. WARNING: writing to the " + "EC can hang your system and possibly damage your hardware.");
Sounds dangerous and clearly does not belong to /proc. Please drop it.
drivers/platform/x86/Kconfig
Quoted 3 lines
drivers/platform/x86/Kconfig +3
-0+/************************************************************************* + bluetooth sysfs - copied nearly verbatim from thinkpad_acpi.c + *************************************************************************/
That's quite a lot of code for verbatim copy; create shared helper?
drivers/platform/x86/Kconfig
Quoted 5 lines
drivers/platform/x86/Kconfig +5
-0+/************************************************************************* + LEDs + *************************************************************************/ + +#ifdef CONFIG_NEW_LEDS
I thought you SELECT-ed that?
Quoted 16 lines
drivers/platform/x86/Kconfig +16
-0+static void led_tv_worker(struct work_struct *work) +{ + if (!led_tv.supported) + return; + set_tvls(led_tv.new_code); + if (led_tv.new_code) + led_tv.brightness = LED_FULL; + else + led_tv.brightness = LED_OFF; +} + +static void led_tv_brightness_set_sysfs(struct led_classdev *led_cdev, + enum led_brightness brightness) +{ + switch (brightness) { + case LED_OFF:
drivers/platform/x86/Kconfig
Quoted 10 lines
drivers/platform/x86/Kconfig +10
-0+ led_tv.new_code = LENSL_LED_TV_OFF; + break; + case LED_FULL: + led_tv.new_code = LENSL_LED_TV_ON; + break; + default: + return; + } + queue_work(lensl_wq, &led_tv.work); +}
Can you use delayed-leds.h?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 6 lines · Pavel Machek
drivers/platform/x86/lenovo-sl-laptop.c line 100
Quoted 4 lines
drivers/platform/x86/lenovo-sl-laptop.c new file +4
-0+module_param (debug_ec, bool,S_IRUGO ); +MODULE_PARM_DESC (debug_ec, +"Present EC debugging interface in procfs. WARNING: writing to the " +"EC can hang your system and possibly damage your hardware." );Sounds dangerous and clearly does not belong to /proc. Please drop it.
ThinkPad ACPI also has one. OTOH, we are fairly sure one cannot damage the standard ThinkPad hardware through the "IBM thinkpad-style" EC firmware, the EC sanity-checks things. I suppose you could cause the box to go away for lunch and don't come back until a complete hardware reset, or hit one of the crash-the-EC-firmware bugs by accident, though.
It has been invaluable for debugging. I can well guess why the thinkpad-sl driver would want to add it as well.
What I am heavily considering is to taint the kernel when it is used (plus it is not enabled by default, requires a module parameter to enable, etc), plus output a big warning to syslog. That is probably enough to keep the users from abusing it.
Quoted 5 lines
drivers/platform/x86/lenovo-sl-laptop.c line 278
Quoted 3 lines
drivers/platform/x86/lenovo-sl-laptop.c new file +3
-0+/************************************************************************* +bluetooth sysfs - copied nearly verbatim from thinkpad_acpi.c +*************************************************************************/ That's quite a lot of code for verbatim copy; create shared helper?
Yeah, I am game. But let's do it later on and not delay anything because of it, please. I will start breaking thinkpad-acpi into multiple source files, and after that is done (should take a while, thinkpad-acpi is a big module with a LOT of subdriver interdependencies) we can look for the best way to reduce code duplication.
Signature · 4 lines
"One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Quoted 8 lines · Henrique de Moraes Holschuh
Quoted 6 lines · Pavel Machek
drivers/platform/x86/lenovo-sl-laptop.c line 100
Quoted 4 lines
drivers/platform/x86/lenovo-sl-laptop.c new file +4
-0+module_param (debug_ec, bool,S_IRUGO ); +MODULE_PARM_DESC (debug_ec, +"Present EC debugging interface in procfs. WARNING: writing to the " +"EC can hang your system and possibly damage your hardware." );Sounds dangerous and clearly does not belong to /proc. Please drop it.
Quoted 5 lines
ThinkPad ACPI also has one. OTOH, we are fairly sure one cannot damage the standard ThinkPad hardware through the "IBM thinkpad-style" EC firmware, the EC sanity-checks things. I suppose you could cause the box to go away for lunch and don't come back until a complete hardware reset, or hit one of the crash-the-EC-firmware bugs by accident, though.
Yeah but that interface still does not belong to /proc. Please drop it from merge version at least.
Quoted 11 lines
Quoted 5 lines
drivers/platform/x86/lenovo-sl-laptop.c line 278
Quoted 3 lines
drivers/platform/x86/lenovo-sl-laptop.c new file +3
-0+/************************************************************************* +bluetooth sysfs - copied nearly verbatim from thinkpad_acpi.c +*************************************************************************/ That's quite a lot of code for verbatim copy; create shared helper?
Yeah, I am game. But let's do it later on and not delay anything because of it, please. I will start breaking thinkpad-acpi into multiple source files, and after that is done (should take a while, thinkpad-acpi is a big module with a LOT of subdriver interdependencies) we can look for the best way to reduce code duplication.
Well, this monolith is quite long/hard to review. IMO it should be split to make review easy.
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 24 lines · Pavel Machek
Quoted 8 lines · Henrique de Moraes Holschuh
Quoted 6 lines · Pavel Machek
drivers/platform/x86/lenovo-sl-laptop.c line 100
Quoted 4 lines
drivers/platform/x86/lenovo-sl-laptop.c new file +4
-0+module_param (debug_ec, bool,S_IRUGO ); +MODULE_PARM_DESC (debug_ec, +"Present EC debugging interface in procfs. WARNING: writing to the " +"EC can hang your system and possibly damage your hardware." );Sounds dangerous and clearly does not belong to /proc. Please drop it.
Quoted 5 lines
ThinkPad ACPI also has one. OTOH, we are fairly sure one cannot damage the standard ThinkPad hardware through the "IBM thinkpad-style" EC firmware, the EC sanity-checks things. I suppose you could cause the box to go away for lunch and don't come back until a complete hardware reset, or hit one of the crash-the-EC-firmware bugs by accident, though.
Yeah but that interface still does not belong to /proc. Please drop it from merge version at least.
Quoted 6 lines
Quoted 5 lines
drivers/platform/x86/lenovo-sl-laptop.c line 278
Quoted 3 lines
drivers/platform/x86/lenovo-sl-laptop.c new file +3
-0+/************************************************************************* +bluetooth sysfs - copied nearly verbatim from thinkpad_acpi.c +*************************************************************************/ That's quite a lot of code for verbatim copy; create shared helper?
Quoted 8 lines
Quoted 5 lines
Yeah, I am game. But let's do it later on and not delay anything because of it, please. I will start breaking thinkpad-acpi into multiple source files, and after that is done (should take a while, thinkpad-acpi is a big module with a LOT of subdriver interdependencies) we can look for the best way to reduce code duplication.
Well, this monolith is quite long/hard to review. IMO it should be split to make review easy.
thinkpad-sl could be split, yes. But if you guys are going to wait for thinkpad-acpi to be split _as well_ to do some common-path merging, THAT is going to take quite a while...
An alternative is to submit a minimal thinkpad-sl, then add features to it patch-by-patch. That makes reviewing it easier.
Signature · 4 lines
"One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Hi!
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
That's quite a lot of code for verbatim copy; create shared helper?
Yeah, I am game. But let's do it later on and not delay anything because of it, please. I will start breaking thinkpad-acpi into multiple source files, and after that is done (should take a while, thinkpad-acpi is a big module with a LOT of subdriver interdependencies) we can look for the best way to reduce code duplication.
Quoted 6 lines
Quoted 2 lines
Well, this monolith is quite long/hard to review. IMO it should be split to make review easy.
thinkpad-sl could be split, yes. But if you guys are going to wait for thinkpad-acpi to be split
_aswell_to do some common-path merging, THAT is going to take quite a while...
I guess waiting is not neccessary; plus having split thinkpad-sl driver should make common-path merging easier for you later...
Quoted 2 lines
An alternative is to submit a minimal thinkpad-sl, then add features to it patch-by-patch. That makes reviewing it easier.
Yeah but as we are moving away from mega-driver, anyway, ...
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html