lkml.org 
[lkml]   [2006]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] misc,acpi,backlight: MSI S270 Laptop support
On Tue, 03.10.06 21:37, Dmitry Torokhov (dtor@insightbb.com) wrote:

> > If auto_brightness is 2 we assume that the user doesn't want the
> > module to fiddle with the automatic brightness control
> > automatically. So we don't do it, neither when loading nor when
> > unloading the module. However, if the user wants to fiddle with the
> > setting through sysfs he may do so and we will not reset his changes
> > when unloading the module. This allows the user to do something like
> > this to disable the brightness control without having the the driver
> > loaded the whole time:
> >
> > modprobe msi-laptop auto_brightness=2 && echo 0 > /sys/devices/platform/msi-laptop-pf/auto_brightness && modprobe -r msi-laptop
> >
> > If auto_brightness is 1 or 0, we do as requested but reset the control
> > to the bootup default when unloading. (i.e. enable it again)
>
> Normally drivers clean up after themselves as if they were never loaded,
> taht is why I questioned partial cleanup.

Sure. But "normally" the user wouldn't bother to pass
auto_brightness=2 to the module in which case we *do* "clean up" after
ourselves and reenable automatic brightness control on module unload.

The special behaviour when auto_brightness=2 is passed is merely a
special feature for those who need it. It was useful to me and was
trivial to implement, and hence I did it.

Lennart

--
Lennart Poettering; lennart [at] poettering [dot] net
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-04 03:57    [W:0.035 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site