1. 07 1月, 2011 2 次提交
    • R
      ACPI / PM: Use device wakeup flags for handling ACPI wakeup devices · f2b56bc8
      Rafael J. Wysocki 提交于
      There are ACPI devices (buttons and the laptop lid) that can wake up
      the system from sleep states and have no "physical" companion
      devices.  The ACPI subsystem uses two flags, wakeup.state.enabled and
      wakeup.flags.always_enabled, for handling those devices, but they
      are not accessible through the standard device wakeup infrastructure.
      User space can only control them via the /proc/acpi/wakeup interface
      that is not really convenient (e.g. the way in which devices are
      enabled to wake up the system is not portable between different
      systems, because it requires one to know the devices' "names" used in
      the system's ACPI tables).
      
      To address this problem, use standard device wakeup flags instead of
      the special ACPI flags for handling those devices.  In particular,
      use device_set_wakeup_capable() to mark the ACPI wakeup devices
      during initialization and use device_set_wakeup_enable() to allow
      or disallow them to wake up the system from sleep states.  Rework
      the /proc/acpi/wakeup interface to take these changes into account.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      f2b56bc8
    • R
      ACPI / PM: Do not enable multiple devices to wake up simultaneously · b014f4f1
      Rafael J. Wysocki 提交于
      If a device is enabled to wake up the system from sleep states via
      /proc/acpi/wakeup and there are other devices associated with the
      same wakeup GPE, all of these devices are automatically enabled to
      wake up the system.  This isn't correct, because the fact the GPE is
      shared need not imply that wakeup power has to be enabled for all the
      devices at the same time (i.e. it is possible that one device will
      have its wakeup power enabled and it will wake up the system from a
      sleep state if the shared wakeup GPE is enabled, while another device
      having its wakeup power disabled will not wake up the system even
      though the GPE is enabled).  Rework acpi_system_write_wakeup_device()
      so that it only enables wakeup for one device at a time.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      b014f4f1
  2. 15 8月, 2010 1 次提交
  3. 04 2月, 2010 1 次提交
  4. 28 10月, 2009 1 次提交
    • A
      ACPI: clean up video.c boundary checks and types · 52a2b11c
      Arjan van de Ven 提交于
      proc.c and video.c are a bit sloppy around types and style,
      confusing gcc for a new feature that'll be in 2.6.33 and will
      cause a warning on the current code.
      
      This patch changes
      
      if  (foo + 1 > sizeof bar)
      
      into
      
      if (foo >= sizeof(bar))
      
      which is more kernel-style.
      
      it also changes a variable in proc.c to unsigned; it gets assigned
      a value from an unsigned type, and is then only compared for > not
      for negative, so using unsigned is just outright the right type
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      52a2b11c
  5. 03 10月, 2009 1 次提交
  6. 07 4月, 2009 1 次提交
  7. 28 3月, 2009 1 次提交
    • B
      ACPI: call acpi_sleep_proc_init() explicitly rather than as initcall · 9cee43e0
      Bjorn Helgaas 提交于
      This patch makes acpi_init() call acpi_sleep_proc_init() directly.
      Previously, acpi_sleep_proc_init() was a late_initcall (sequence 7),
      apparently to make sure that the /proc hierarchy already exists:
      
          2003/02/13 12:38:03-06:00 mochel
          acpi sleep: demote sleep proc file creation.
      
          - Make acpi_sleep_proc_init() a late_initcall(), and not called from
            acpi_sleep_init(). This guarantees that the acpi proc hierarchy is at
            least there when we create the dang file.
      
      This should no longer be an issue because acpi_bus_init() (called early
      in acpi_init()) creates acpi_root_dir (/proc/acpi).
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      9cee43e0
  8. 09 1月, 2009 2 次提交
  9. 31 12月, 2008 1 次提交
  10. 10 12月, 2008 1 次提交
  11. 17 11月, 2008 1 次提交
  12. 07 11月, 2008 1 次提交
    • K
      ACPI: struct device - replace bus_id with dev_name(), dev_set_name() · 0794469d
      Kay Sievers 提交于
      This patch is part of a larger patch series which will remove
      the "char bus_id[20]" name string from struct device. The device
      name is managed in the kobject anyway, and without any size
      limitation, and just needlessly copied into "struct device".
      
      To set and read the device name dev_name(dev) and dev_set_name(dev)
      must be used. If your code uses static kobjects, which it shouldn't
      do, "const char *init_name" can be used to statically provide the
      name the registered device should have. At registration time, the
      init_name field is cleared, to enforce the use of dev_name(dev) to
      access the device name at a later time.
      
      We need to get rid of all occurrences of bus_id in the entire tree
      to be able to enable the new interface. Please apply this patch,
      and possibly convert any remaining remaining occurrences of bus_id.
      
      We want to submit a patch to -next, which will remove bus_id from
      "struct device", to find the remaining pieces to convert, and finally
      switch over to the new api, which will remove the 20 bytes array
      and does no longer have a size limitation.
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-Off-By: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      0794469d
  13. 20 10月, 2008 1 次提交
  14. 04 10月, 2008 1 次提交
  15. 05 7月, 2008 1 次提交
  16. 12 6月, 2008 1 次提交
  17. 29 4月, 2008 1 次提交
  18. 28 12月, 2007 2 次提交
    • S
      ACPI: detect invalid argument written to /proc/acpi/alarm · 975c3025
      Signed-off by Yi Yang 提交于
      /proc/acpi/alarm can't be set correctly, here is a sample:
      
      [root@localhost /]# echo "2006 09" > /proc/acpi/alarm
      [root@localhost /]# cat /proc/acpi/alarm
      2007-12-09 09:09:09
      [root@localhost /]# echo "2006 04" > /proc/acpi/alarm
      [root@localhost /]# cat /proc/acpi/alarm
      2007-12-04 04:04:04
      [root@localhost /]#
      
      Obviously, it is wrong, it should consider it as an invalid input.
      
      after this patch:
      
      [root@localhost /]# echo "2008 09" > /proc/acpi/alarm
      -bash: echo: write error: Invalid argument
      [root@localhost /]#
      Signed-off-by: NYi Yang <yi.y.yang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      975c3025
    • Y
      ACPI: /proc/acpi/alarm parsing: handle large numbers properly · 08798029
      Yi Yang 提交于
      In function acpi_system_write_alarm in file drivers/acpi/sleep/proc.c,
      big sec, min, hr, mo, day and yr are counted twice to get reasonable
      values, that is very superfluous, we can do that only once.
      
      In additon, /proc/acpi/alarm can set a related value which can be
      specified as YYYY years MM months DD days HH hours MM minutes SS
      senconds, it isn't a date, so you can specify as +0000-00-00 96:00:00
      , that means 3 days later, current code can't handle such a case.
      
      This patch removes unnecessary code and does with the aforementioned
      situation.
      
      Before applying this patch:
      
      [root@localhost /]# cat /proc/acpi/alarm
      2007-12-00 00:00:00
      [root@localhost /]# echo "0000-00-00 96:180:180" > /proc/acpi/alarm
      [root@localhost /]# cat /proc/acpi/alarm
      0007-12-02 **:**:**
      [root@localhost /]#
      
      After applying this patch:
      
      [root@localhost ~]# echo "2007-12-00 00:00:00" > /proc/acpi/alarm
      [root@localhost ~]# cat /proc/acpi/alarm
      2007-12-00 00:00:00
      [root@localhost ~]# echo "0000-00-00 96:180:180" > /proc/acpi/alarm
      [root@localhost ~]# cat /proc/acpi/alarm
      0007-12-04 03:03:00
      [root@localhost ~]#
      Signed-off-by: NYi Yang <yi.y.yang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      08798029
  19. 26 10月, 2007 1 次提交
    • L
      Fix /proc/acpi/alarm BCD alarm encodings · c67c36e4
      Linus Torvalds 提交于
      This fixes some totally illogical and wrong code that converts things to
      and from BCD mode essentially randomly, does math on values in BCD mode
      etc etc.  Introduce a few helper functions to make it a bit more obvious
      what is going on, and make sure that we always do all the arithmetic
      (and anythign else, for that matter) in binary, not BCD.
      
      Tested by Mark Lord, who found the problem originally, and also pushed
      the patch back and reminded me about it.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c67c36e4
  20. 29 8月, 2007 1 次提交
  21. 30 7月, 2007 3 次提交
  22. 24 7月, 2007 1 次提交
    • L
      ACPI: Kconfig: fold /proc/acpi/sleep under CONFIG_ACPI_PROCFS · 43532c8a
      Len Brown 提交于
      /proc/acpi/sleep has had its own "default n" option,
      ACPI_SLEEP_PROC_SLEEP, for many months.
      Time to delete ACPI_SLEEP_PROC_SLEEP.
      
      Users that still need /proc/acpi/sleep can still get it
      along with the other deprecated /proc/acpi files
      by enabling CONFIG_ACPI_PROCFS.
      
      Also delete ACPI_SLEEP_PROC_FS, which was an umbrella
      for /proc/acpi/sleep, wakeup, alarm, because it was
      effectively just a synonym for ACPI_SLEEP.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      43532c8a
  23. 10 5月, 2007 2 次提交
  24. 09 5月, 2007 1 次提交
  25. 08 5月, 2007 1 次提交
  26. 26 4月, 2007 1 次提交
    • D
      ACPI: make /proc/acpi/wakeup more useful · 8aa55591
      David Brownell 提交于
      This updates /proc/acpi/wakeup to be more informative, primarily by showing
      the sysfs node associated with each wakeup-enabled device.  Example:
      
      	Device	S-state	  Status   Sysfs node
      	PCI0	  S4	 disabled  no-bus:pci0000:00
      	PS2M	  S4	 disabled  pnp:00:05
      	PS2K	  S4	 disabled  pnp:00:06
      	UAR1	  S4	 disabled  pnp:00:08
      	USB1	  S3	 disabled  pci:0000:00:03.0
      	USB2	  S3	 disabled  pci:0000:00:03.1
      	USB3	  S3	 disabled
      	USB4	  S3	 disabled  pci:0000:00:03.3
      	S139	  S4	 disabled
      	LAN	  S4	 disabled  pci:0000:00:04.0
      	MDM	  S4	 disabled
      	AUD	  S4	 disabled  pci:0000:00:02.7
      	SLPB	  S4	*enabled
      
      Eventually this file should be removed, but until then it's almost the only
      way we have to tell how the relevant ACPI tables are broken (and cope).  In
      that example, two devices don't actually exist (USB3, S139), one can't issue
      wakeup events (PCI0), and two seem harmlessly (?) confused (MDM and AUD are
      the same PCI device, but it's the _modem_ that does wake-on-ring).
      
      In particular, we need to be sure driver model nodes are properly hooked
      up before we can get rid of this ACPI-only interface for wakeup events.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      8aa55591
  27. 03 2月, 2007 1 次提交
  28. 10 7月, 2006 1 次提交
  29. 11 9月, 2005 1 次提交
  30. 05 8月, 2005 2 次提交
  31. 12 7月, 2005 1 次提交
  32. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4