1. 16 Jul, 2008 40 commits
    • Rafael J. Wysocki's avatar
      PCI ACPI: Drop the second argument of platform_pci_choose_state · a80a6da1
      Rafael J. Wysocki authored
      Since the second argument of acpi_pci_choose_state() and
      platform_pci_choose_state() is never used, remove it.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarPavel Machek <pavel@suse.cz>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      a80a6da1
    • David Brownell's avatar
      ACPI PM: acpi_pm_device_sleep_state() cleanup · 2fe2de5f
      David Brownell authored
      Get rid of a superfluous acpi_pm_device_sleep_state() parameter.  The
      only legitimate value of that parameter must be derived from the first
      parameter, which is what all the callers already do.  (However, this
      does not address the fact that ACPI still doesn't set up those flags.)
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      2fe2de5f
    • Len Brown's avatar
    • Vegard Nossum's avatar
      ACPI: don't walk tables if ACPI was disabled · d1857056
      Vegard Nossum authored
      Ingo Molnar wrote:
      > -tip auto-testing started triggering this spinlock corruption message
      > yesterday:
      >
      > [    3.976213] calling  acpi_rtc_init+0x0/0xd3
      > [    3.980213] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread F7C50000 could not acquire Mutex [3] [20080321]
      > [    3.992213] BUG: spinlock bad magic on CPU#0, swapper/1
      > [    3.992213]  lock: c2508dc4, .magic: 00000000, .owner: swapper/1, .owner_cpu: 0
      
      This is apparently because some parts of ACPI, including mutexes, are not
      initialized when acpi=off is passed to the kernel.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      d1857056
    • Carlos Corbacho's avatar
      acer-wmi: Remove version number · 860f0c6b
      Carlos Corbacho authored
      It doesn't make much sense these days.
      Signed-off-by: default avatarCarlos Corbacho <carlos@strangeworlds.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      860f0c6b
    • Carlos Corbacho's avatar
      acer-wmi: Add debugfs file for device detection · 81143522
      Carlos Corbacho authored
      Add a debugfs file for showing the full results of the method we use to
      detect devices on WMID laptops.
      
      This should be useful in the case that a Linux user gets an Acer laptop
      with 3G support (and/ or people who enjoy ripping their wireless cards out)
      so we can get some feedback on how this value changes in these cases.
      
      (At the moment, we always enable the wireless and 3G control. In the case
      of the former, this is fairly safe. In the case of the latter though,
      trying to toggle this device if it doesn't exist on a laptop causes ACPI
      warnings/ errors).
      
      To summarise: If you have an Acer laptop with a built in 3G card, please
      report back the value from this file.
      Signed-off-by: default avatarCarlos Corbacho <carlos@strangeworlds.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      81143522
    • Carlos Corbacho's avatar
      acer-wmi: Disable device autodetection on Fujitsu Siemens Amilo Li2732 · 5753dd53
      Carlos Corbacho authored
      The AMW0 (V1) device detection method doesn't work properly on this laptop,
      so disable it, and for other laptops that may have this problem, by
      switching on a strange GUID.
      Signed-off-by: default avatarCarlos Corbacho <carlos@strangeworlds.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      5753dd53
    • Carlos Corbacho's avatar
      acer-wmi: Add EC quirk for Fujitsu Siemens Amilo Li 1718 · 6f061ab5
      Carlos Corbacho authored
      This laptop needs a different EC quirk from the standard Acer one to read
      the wireless status.
      Signed-off-by: default avatarCarlos Corbacho <carlos@strangeworlds.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      6f061ab5
    • Carlos Corbacho's avatar
      acer-wmi: Respect framebuffer blanking in backlight · f2b585b4
      Carlos Corbacho authored
      If the framebuffer has requested blanking, turn the backlight down. Also
      offer the user the option to do this.
      Reported-by: default avatarMichal Pecio <michal.pecio@gmail.com>
      Signed-off-by: default avatarCarlos Corbacho <carlos@strangeworlds.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      f2b585b4
    • Carlos Corbacho's avatar
      acer-wmi: Blacklist backlight on Acer Aspire 1520 & 1360 series · 9991d9f2
      Carlos Corbacho authored
      A newer BIOS for these laptops adds ACPI-WMI support to them. However, it does
      not add support for the backlight via the EC, and we have no way to detect
      this on older machines, so blacklist it from them.
      Signed-off-by: default avatarCarlos Corbacho <carlos@strangeworlds.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      9991d9f2
    • Carlos Corbacho's avatar
      acer-wmi: Remove LED colour comment from documentation · a0bbaf83
      Carlos Corbacho authored
      This should have been removed when the colour was removed from the LED
      device name.
      Signed-off-by: default avatarCarlos Corbacho <carlos@strangeworlds.co.uk>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      a0bbaf83
    • Adrian Bunk's avatar
      eeepc-laptop: static · 14109461
      Adrian Bunk authored
      make the needlessly global cm_{g,s}etv[] static.
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      14109461
    • Vegard Nossum's avatar
      ACPICA: fix mutex names in debug code. · 47c00d2b
      Vegard Nossum authored
      Reorder the mutex names to match the preceding #defines
      Signed-off-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      47c00d2b
    • Bob Moore's avatar
      Make GPE disable more robust · e38e8a07
      Bob Moore authored
      Implemented another change for the GPE disable. We now perform a
      read-change-write of the enable register instead of simply writing out the
      cached enable mask. This will prevent inadvertent enabling of GPEs if a rogue
      GPE is received during initialization (before GPE handlers are installed.)
      
      http://bugzilla.kernel.org/show_bug.cgi?id=6217Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
      Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      e38e8a07
    • Cezary Jackiewicz's avatar
    • Randy Dunlap's avatar
      acpi: fix printk format warning · 12b2b34e
      Randy Dunlap authored
      Fix printk format warning:
      
      linux-next-20080617/drivers/acpi/processor_throttling.c:1258: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      12b2b34e
    • Yi Yang's avatar
      ACPI: fix processor throttling set error · 3d532d5e
      Yi Yang authored
      http://bugzilla.kernel.org/show_bug.cgi?id=9704
      
      When echo some invalid values to /proc/acpi/processor/*/throttling,
      there isn't any error info returned, on the contray, it sets
      throttling value to some T* successfully, obviously, this is incorrect,
      a correct way should be to let it fail and return error info.
      
      This patch fixed the aforementioned issue, it also enables
      /proc/acpi/processor/*/throttling to accept such values as 't0' and 'T0',
      it also strictly limits /proc/acpi/processor/*/throttling only to accept
       "*", "t*" and "T*", "*" is the throttling state value the processor can
      support, current, it is 0 - 7.
      
      Before applying this patch, the test result is below:
      
      [root@localhost acpi]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T1
      state available: T0 to T7
      states:
          T0:                  100%
         *T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost acpi]# echo "1xxxxxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost acpi]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T1
      state available: T0 to T7
      states:
          T0:                  100%
         *T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost acpi]# echo "0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost acpi]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost acpi]# cd /
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "T0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "T7" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "T100" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "xxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "2xxxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T2
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
         *T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "7777" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost /]# echo "7xxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost /]#
      
      After applying this patch, the test result is below:
      
      [root@localhost linux-2.6.24-rc6]# echo > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo "t0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo "T0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo "T7" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo "T8" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# vi drivers/acpi/processor_throttling.c
      [root@localhost linux-2.6.24-rc6]# echo "T8" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "t7" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo "t70" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "70" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "7000" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "70" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "xxx" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo -n > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo -n "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo $?
      0
      [root@localhost linux-2.6.24-rc6]# echo -n "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo -n "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo t0 > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo T0 > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo Tt0 > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo T > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]#
      Signed-off-by: default avatarYi Yang <yi.y.yang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      3d532d5e
    • Yi Yang's avatar
      ACPI: fix acpi fan state set error · 6594d87e
      Yi Yang authored
      Under /proc/acpi, there is a fan control interface, a user can
      set 0 or 3 to /proc/acpi/fan/*/state, 0 denotes D0 state, 3
      denotes D3 state, but in current implementation, a user can
      set a fan to D1 state by any char excluding '1', '2' and '3'.
      
      For example:
      
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost acpi]# echo "3" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "xxxxx" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  on
      
      Obviously, such inputs as "" and "xxxxx" are invalid for fan state.
      
      This patch fixes this issue, it strictly limits fan state only to
      accept 0, 1, 2 and 3, any other inputs are invalid.
      
      Before applying this patch, the test result is:
      
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost acpi]# echo "3" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "xxxxx" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost acpi]# echo "3" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "3x" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "-1x" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost acpi]#
      
      After applying this patch, the test result is:
      
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "" > /proc/acpi/fan/C31B/state
      -bash: echo: write error: Invalid argument
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "3" > /proc/acpi/fan/C31B/state
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "xxxxx" > /proc/acpi/fan/C31B/state
      -bash: echo: write error: Invalid argument
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "-1x" > /proc/acpi/fan/C31B/state
      -bash: echo: write error: Invalid argument
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "0" > //proc/acpi/fan/C31B/state
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost ~]# echo "4" > //proc/acpi/fan/C31B/state
      -bash: echo: write error: Invalid argument
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost ~]# echo "3" > //proc/acpi/fan/C31B/state
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "0" > //proc/acpi/fan/C31B/state
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost ~]# echo "3x" > //proc/acpi/fan/C31B/state
      -bash: echo: write error: Invalid argument
      [root@localhost ~]#
      Signed-off-by: default avatarYi Yang <yi.y.yang@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      6594d87e
    • Alok N Kataria's avatar
    • Jonathan Woithe's avatar
      Fujitsu-laptop update · 20b93734
      Jonathan Woithe authored
      Add additional capabilities to the Fujitsu-laptop driver.
      
       * Brightness hotkey actions are sent to userspace. This can be disabled
         using a module parameter if it causes issues with models which handle
         these keys transparently in the BIOS.
      
       * Actions of additional hotkeys found on some Fujitsu models (eg: the
         suspend key and the dedicated "power on passphrase" keys) are broadcast
         to userspace.
      
       * An alternative brightness control method used by some Fujitsu models
         (for example, the S6410) is now supported, enabling software brightness
         controls on models using this method.
      
       * DMI-based module aliases are configured for the S6410 and S7020.
      
       * The current LCD brightness after booting should now be reflected in the
         standard backlight interface sysfs file (previously it was always set to
         0).  The platform brightness sysfs interface has always been fine.
      
      Thanks go to Peter Gruber who provided a significant portion of this code
      and tested various iterations of the patch on his S6410.
      Signed-off-by: default avatarPeter Gruber <nokos@gmx.net>
      Signed-off-by: default avatarJonathan Woithe <jwoithe@physics.adelaide.edu.au>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      20b93734
    • Mike Travis's avatar
      ACPI: change processors from array to per_cpu variable · 706546d0
      Mike Travis authored
      Change processors from an array sized by NR_CPUS to a per_cpu variable.
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      706546d0
    • Cezary Jackiewicz's avatar
      misc,acpi,backlight: compal Laptop Extras · 5411552c
      Cezary Jackiewicz authored
      This is driver for Compal Laptop: FL90/IFL90, based on MSI driver.
      
      This driver exports a few files in /sys/devices/platform/compal-laptop/:
       lcd_level - screen brightness: contains a single integer in the range 0..7 (rw)
       wlan - wlan subsystem state: contains 0 or 1 (rw)
       bluetooth - bluetooth subsystem state: contains 0 or 1 (rw)
       raw - raw value taken from embedded controller register (ro)
      
      In addition to these platform device attributes the driver registers itself
      in the Linux backlight control subsystem and is available to userspace under
      /sys/class/backlight/compal-laptop/.
      Signed-off-by: default avatarCezary Jackiewicz <cezary.jackiewicz@gmail.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Alexey Starikovskiy <aystarik@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      5411552c
    • Zhang Rui's avatar
      create sysfs link from acpi device to sysdev for cpu · 9f1eb99c
      Zhang Rui authored
      Sys I/F under acpi device node and sysdev device node are both
      needed for cpu hot-removal. User space need this link so that
      they know they are poking the sys I/F for the same cpu.
      http://bugzilla.kernel.org/show_bug.cgi?id=9772Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      9f1eb99c
    • Zhang Rui's avatar
      force offline the processor during hot-removal · b62b8ef9
      Zhang Rui authored
      The ACPI device node for the cpu has already been unregistered
      when acpi_processor_handle_eject is called.
      Thus we should offline the cpu and continue, rather than a failure here.
      http://bugzilla.kernel.org/show_bug.cgi?id=9772Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      b62b8ef9
    • Zhang Rui's avatar
      fix a deadlock issue when poking "eject" file · 26d46867
      Zhang Rui authored
      "/sys/devices/LNXSYSTM:00/.../eject" is used to evaluate _EJx method
      and eject a device in user space.
      But system hangs when poking the "eject" file because that
      the device hot-removal code invoke the driver .remove method which will
      try to remove the "eject" file as a result.
      
      Queues the hot-removal function for deferred execution in this patch.
      http://bugzilla.kernel.org/show_bug.cgi?id=9772Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      26d46867
    • Linus Torvalds's avatar
      Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 · a3cf8593
      Linus Torvalds authored
      * 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: (44 commits)
        hwmon: (w83l786ng) Convert to a new-style i2c driver
        hwmon: (w83l785ts) Convert to a new-style i2c driver
        hwmon: (w83793) Convert to a new-style i2c driver
        hwmon: (w83792d) Convert to a new-style i2c driver
        hwmon: (w83791d) Convert to a new-style i2c driver
        hwmon: (thmc50) Convert to a new-style i2c driver
        hwmon: (smsc47m192) Convert to a new-style i2c driver
        hwmon: (max6650) Convert to a new-style i2c driver
        hwmon: (max1619) Convert to a new-style i2c driver
        hwmon: (lm93) Convert to a new-style i2c driver
        hwmon: (lm92) Convert to a new-style i2c driver
        hwmon: (lm90) Convert to a new-style i2c driver
        hwmon: (lm87) Convert to a new-style i2c driver
        hwmon: (lm83) Convert to a new-style i2c driver
        hwmon: (lm80) Convert to a new-style i2c driver
        hwmon: (lm77) Convert to a new-style i2c driver
        hwmon: (lm63) Convert to a new-style i2c driver
        hwmon: (gl520sm) Convert to a new-style i2c driver
        hwmon: (gl518sm) Convert to a new-style i2c driver
        hwmon: (fscpos) Convert to a new-style i2c driver
        ...
      a3cf8593
    • Randy Dunlap's avatar
      Fix compile issues in fs/compat_ioctl.c when CONFIG_BLOCK is disabled · 3c3622dc
      Randy Dunlap authored
      Fix fs/compat_ioctl.c to handle CONFIG_BLOCK=n, CONFIG_SCSI=n to avoid
      build errors:
      
      In file included from include/scsi/scsi.h:12,
                       from fs/compat_ioctl.c:71:
      include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
      include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
      In file included from include/scsi/scsi.h:12,
                       from fs/compat_ioctl.c:71:
      include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd':
      include/scsi/scsi_cmnd.h:182: error: implicit declaration of function 'blk_bidi_rq'
      include/scsi/scsi_cmnd.h:183: error: dereferencing pointer to incomplete type
      include/scsi/scsi_cmnd.h: In function 'scsi_in':
      include/scsi/scsi_cmnd.h:189: error: dereferencing pointer to incomplete type
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3c3622dc
    • Kumar Gala's avatar
      powerpc/ep8248e: Fix compile problem if !CONFIG_FS_ENET · e3621ee6
      Kumar Gala authored
      If we don't enable FS_ENET we get build issues:
      
      arch/powerpc/platforms/built-in.o: In function `ep8248e_mdio_probe':
      arch/powerpc/platforms/82xx/ep8248e.c:129: undefined reference to `alloc_mdio_bitbang'
      arch/powerpc/platforms/82xx/ep8248e.c:143: undefined reference to `mdiobus_register'
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e3621ee6
    • Ralf Baechle's avatar
      Fix MIPS cross-compile problem · bef5b54b
      Ralf Baechle authored
      Crosscompiling on a Fedora 9 machine running gcc 4.3.0 as its host compiler
      and gcc 3.4.6 for the mips-linux target results in the following build
      error:
      
      $ make malta_defconfig
      $ make
      cc1: error: unrecognized command line option "-fno-stack-protector"
      scripts/kconfig/conf -s arch/mips/Kconfig
      cc1: error: unrecognized command line option "-fno-stack-protector"
      
      The arch Makefile is included too late so the host compiler is feature
      tested, not the crosscompiler as intended and thus the Makefile applies
      adds -fno-stack-protector to crosscompiler's flags which fails for gcc
      3.4.6.  The bug was introduced by e06b8b98
      in 2.6.25; 35bb5b1e did add more flags
      testing before the arch Makefile inclusion.
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bef5b54b
    • Jean Delvare's avatar
      hwmon: (w83l786ng) Convert to a new-style i2c driver · 33468e76
      Jean Delvare authored
      The new-style w83l786ng driver implements the optional detect()
      callback to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Kevin Lo <kevlo@kevlo.org>
      33468e76
    • Jean Delvare's avatar
      hwmon: (w83l785ts) Convert to a new-style i2c driver · dc18a418
      Jean Delvare authored
      The new-style w83l785ts driver implements the optional detect()
      callback to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      dc18a418
    • Jean Delvare's avatar
      hwmon: (w83793) Convert to a new-style i2c driver · a7f13a6e
      Jean Delvare authored
      The new-style w83793 driver implements the optional detect()
      callback to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      a7f13a6e
    • Jean Delvare's avatar
      hwmon: (w83792d) Convert to a new-style i2c driver · 31d5d275
      Jean Delvare authored
      The new-style w83792d driver implements the optional detect()
      callback to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      31d5d275
    • Jean Delvare's avatar
      hwmon: (w83791d) Convert to a new-style i2c driver · cb0c1af3
      Jean Delvare authored
      The new-style w83791d driver implements the optional detect()
      callback to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Marc Hulsman <m.hulsman@tudelft.nl>
      cb0c1af3
    • Jean Delvare's avatar
      hwmon: (thmc50) Convert to a new-style i2c driver · ccf37488
      Jean Delvare authored
      The new-style thmc50 driver implements the optional detect()
      callback to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
      ccf37488
    • Jean Delvare's avatar
      hwmon: (smsc47m192) Convert to a new-style i2c driver · 8fb597bb
      Jean Delvare authored
      The new-style smsc47m192 driver implements the optional detect()
      callback to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Hartmut Rick <linux@rick.claranet.de>
      8fb597bb
    • Jean Delvare's avatar
      hwmon: (max6650) Convert to a new-style i2c driver · 0d57abd5
      Jean Delvare authored
      The new-style max6650 driver implements the optional detect() callback
      to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Hans J. Koch <hjk@linutronix.de>
      0d57abd5
    • Jean Delvare's avatar
      hwmon: (max1619) Convert to a new-style i2c driver · c6d3f6fa
      Jean Delvare authored
      The new-style max1619 driver implements the optional detect() callback
      to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Alexey Fisher <fishor@mail.ru>
      c6d3f6fa
    • Jean Delvare's avatar
      hwmon: (lm93) Convert to a new-style i2c driver · 70b72406
      Jean Delvare authored
      The new-style lm93 driver implements the optional detect() callback
      to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Mark M. Hoffman <mhoffman@lightlink.com>
      Cc: Eric J. Bowersox <ericb@aspsys.com>
      Cc: Carsten Emde <cbe@osadl.org>
      Cc: Hans J. Koch <hjk@linutronix.de>
      70b72406
    • Jean Delvare's avatar
      hwmon: (lm92) Convert to a new-style i2c driver · 910e8dcf
      Jean Delvare authored
      The new-style lm92 driver implements the optional detect() callback
      to cover the use cases of the legacy driver.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      910e8dcf