All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lennart Poettering <mzxreary@0pointer.de>
To: Dmitry Torokhov <dtor@insightbb.com>
Cc: len.brown@intel.com, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH] misc,acpi,backlight: MSI S270 Laptop support
Date: Wed, 4 Oct 2006 03:53:34 +0200	[thread overview]
Message-ID: <20061004015333.GA6356@tango.0pointer.de> (raw)
In-Reply-To: <200610032137.29844.dtor@insightbb.com>

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/

      reply	other threads:[~2006-10-04  1:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-03  1:10 [PATCH] misc,acpi,backlight: MSI S270 Laptop support Lennart Poettering
2006-10-03  1:48 ` Andrew Morton
2006-10-03  2:27 ` Dmitry Torokhov
2006-10-04  1:28   ` Lennart Poettering
2006-10-04  1:37     ` Dmitry Torokhov
2006-10-04  1:53       ` Lennart Poettering [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061004015333.GA6356@tango.0pointer.de \
    --to=mzxreary@0pointer.de \
    --cc=dtor@insightbb.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.