1. 09 Dec, 2009 12 commits
    • Alan Jenkins's avatar
      eeepc-laptop: fix value of pwm1_enable to match documentation · 48718688
      Alan Jenkins authored
      Documentation/hwmon/sysfs-interface tells us that automatic fan speed
      control should be represented by a value of 2 or above for pwm1_enable.
      Fix eeepc_get_fan_ctrl() to return 2 for automatic fan control.
      
      Setting "1" for manual control is already consistent with the
      documentation, so this remains unchanged.
      
      Let's preserve the ABI for this specific driver, so that writing "0"
      will still invoke automatic control.
      
      (The documentation says setting "0" should leave the fan at full speed
      all the time.  This mode is not directly supported by our hardware. Full
      speed is rather noisy on my 701 and the automatic control has never used
      it.  If you really want this e.g. to prolong the life of an EeePC used
      as a server, you can always use manual mode.  hwmon has always been
      fairly machine-specific, and you're in a tiny minority (or elite :-).
      I'm sure you're smart enough to notice that the fan doesn't turn on to
      full speed when you try this mode, either by ear or checking
      fan_input1.
      
      We could even claim to be honouring the spirit of the documentation.
      "0" really means "safe mode".  EeePCs default to automatic mode, ie that
      is what Asus will actually test.  Since we do not provide any way to
      tamper with the temperature threshold, automatic mode _is_ the safe
      option).
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      48718688
    • Alan Jenkins's avatar
      eeepc-laptop: set acpi_driver.owner · eacec303
      Alan Jenkins authored
      The owner field provides the link between drivers and modules in sysfs,
      but no ACPI driver was setting it.
      
      After setting the owner field, we can see which module provides which
      driver and vice versa by looking at /sys/bus/acpi/driver/*/module and
      /sys/module/*/drivers/acpi:*.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      eacec303
    • Alan Jenkins's avatar
      eeepc-laptop: Remove uneccesary acpi_disabled check · 2adb8bd3
      Alan Jenkins authored
      acpi_bus_register_driver() already checks acpi_disabled, so acpi bus
      drivers don't need to.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      2adb8bd3
    • Alan Jenkins's avatar
      eeepc-laptop: Remove redundant NULL checks · fbe3d894
      Alan Jenkins authored
      The acpi device callbacks add, start, remove, suspend and resume can
      never be called with a NULL acpi_device. Each callsite in acpi/scan.c
      has to dereference the device in order to get the ops structure, e.g.
      
          struct acpi_device *acpi_dev = to_acpi_device(dev);
          struct acpi_driver *acpi_drv = acpi_dev->driver;
      
          if (acpi_drv && acpi_drv->ops.suspend)
              return acpi_drv->ops.suspend(acpi_dev, state);
      
      Remove all checks for acpi_dev == NULL within these callbacks.
      
      Also remove the checks for acpi_driver_data(acpi_dev) == NULL. None of
      these checks could fail unless the driver does something strange
      (which none of them do), the acpi core did something terribly wrong,
      or we have a memory corruption issue. If this does happen then it's
      best to dereference the pointer and crash noisily.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      fbe3d894
    • Corentin Chary's avatar
      eeepc-laptop: add touchpad led · 3c0eb510
      Corentin Chary authored
      This led can be found on Eeepc 1005 series.
      Signed-off-by: default avatarCorentin Chary <corentincj@iksaif.net>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      3c0eb510
    • Alan Jenkins's avatar
      asus-laptop: set acpi_driver.owner · edf62452
      Alan Jenkins authored
      The owner field provides the link between drivers and modules in sysfs,
      but no ACPI driver was setting it.
      
      After setting the owner field, we can see which module provides which
      driver and vice versa by looking at /sys/bus/acpi/driver/*/module and
      /sys/module/*/drivers/acpi:*.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      edf62452
    • Alan Jenkins's avatar
      asus-acpi: set acpi_driver.owner · db7c554a
      Alan Jenkins authored
      The owner field provides the link between drivers and modules in sysfs,
      but no ACPI driver was setting it.
      
      After setting the owner field, we can see which module provides which
      driver and vice versa by looking at /sys/bus/acpi/driver/*/module and
      /sys/module/*/drivers/acpi:*.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      db7c554a
    • Alan Jenkins's avatar
      asus-acpi: Remove uneccesary acpi_disabled checks · 5a4a9f6f
      Alan Jenkins authored
      acpi_bus_register_driver() already checks acpi_disabled, so acpi bus
      drivers don't need to.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      5a4a9f6f
    • Alan Jenkins's avatar
      asus-laptop: Remove uneccesary acpi_disabled check · b7fab7a0
      Alan Jenkins authored
      acpi_bus_register_driver() already checks acpi_disabled, so acpi bus
      drivers don't need to.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      b7fab7a0
    • Alan Jenkins's avatar
      asus-acpi: Remove redundant NULL checks · 2d5db0be
      Alan Jenkins authored
      The acpi device callbacks add, start, remove, suspend and resume can
      never be called with a NULL acpi_device. Each callsite in acpi/scan.c
      has to dereference the device in order to get the ops structure, e.g.
      
          struct acpi_device *acpi_dev = to_acpi_device(dev);
          struct acpi_driver *acpi_drv = acpi_dev->driver;
      
          if (acpi_drv && acpi_drv->ops.suspend)
              return acpi_drv->ops.suspend(acpi_dev, state);
      
      Remove all checks for acpi_dev == NULL within these callbacks.
      
      Also remove the checks for acpi_driver_data(acpi_dev) == NULL. None of
      these checks could fail unless the driver does something strange
      (which none of them do), the acpi core did something terribly wrong,
      or we have a memory corruption issue. If this does happen then it's
      best to dereference the pointer and crash noisily.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      2d5db0be
    • Alan Jenkins's avatar
      asus-laptop: Remove redundant NULL checks · 1df8d8d4
      Alan Jenkins authored
      The acpi device callbacks add, start, remove, suspend and resume can
      never be called with a NULL acpi_device. Each callsite in acpi/scan.c
      has to dereference the device in order to get the ops structure, e.g.
      
          struct acpi_device *acpi_dev = to_acpi_device(dev);
          struct acpi_driver *acpi_drv = acpi_dev->driver;
      
          if (acpi_drv && acpi_drv->ops.suspend)
              return acpi_drv->ops.suspend(acpi_dev, state);
      
      Remove all checks for acpi_dev == NULL within these callbacks.
      
      Also remove the checks for acpi_driver_data(acpi_dev) == NULL. None of
      these checks could fail unless the driver does something strange
      (which none of them do), the acpi core did something terribly wrong,
      or we have a memory corruption issue. If this does happen then it's
      best to dereference the pointer and crash noisily.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      1df8d8d4
    • Alan Jenkins's avatar
      eeepc-laptop: disp attribute should be write-only · 6dff29b6
      Alan Jenkins authored
      Currently, reading from the disp attribute fails with "No such device",
      which is misleading. According to CMSG table on acpi4asus project site,
      no models have a getter method corresponding to SDSP. Change the file
      permission to disallow reads.
      
      If some joker changes the permission to permit reads, then return -EIO
      to be consistent with sysfs' behaviour when no show() method is
      provided.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarCorentin Chary <corentincj@iksaif.net>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      6dff29b6
  2. 03 Dec, 2009 1 commit
  3. 02 Dec, 2009 26 commits
  4. 01 Dec, 2009 1 commit