1. 28 8月, 2013 1 次提交
  2. 29 6月, 2013 1 次提交
  3. 17 4月, 2013 2 次提交
  4. 07 2月, 2013 1 次提交
  5. 18 11月, 2012 1 次提交
  6. 05 11月, 2012 1 次提交
  7. 24 9月, 2012 1 次提交
  8. 18 6月, 2012 1 次提交
  9. 07 1月, 2012 1 次提交
  10. 06 1月, 2012 1 次提交
    • J
      power_supply: Assume mains power by default · 2530daa1
      Jean Delvare 提交于
      If no power class device is found in power_supply_is_system_supplied(),
      the function currently returns 0, which basically means that the system
      is supposed to be running on battery. In practice, mobile devices tend
      to always implement at least one power class device and more often two
      (battery and AC adapter). Systems with no registered power class
      devices are more likely to be desktop systems, where the system is
      always powered by mains.
      
      So, change the default return value of
      power_supply_is_system_supplied() from 0 (running on battery) to 1
      (running on mains.)
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      2530daa1
  11. 10 12月, 2011 1 次提交
  12. 22 2月, 2011 1 次提交
  13. 22 12月, 2010 2 次提交
  14. 19 5月, 2010 1 次提交
  15. 30 7月, 2009 2 次提交
  16. 17 10月, 2008 1 次提交
  17. 01 9月, 2008 1 次提交
  18. 22 7月, 2008 1 次提交
  19. 21 5月, 2008 1 次提交
    • G
      Power Supply: fix race in device_create · 54d29ad3
      Greg Kroah-Hartman 提交于
      There is a race from when a device is created with device_create() and
      then the drvdata is set with a call to dev_set_drvdata() in which a
      sysfs file could be open, yet the drvdata will be NULL, causing all
      sorts of bad things to happen.
      
      This patch fixes the problem by using the new function,
      device_create_drvdata().
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Anton Vorontsov <cbou@mail.ru>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      54d29ad3
  20. 29 4月, 2008 1 次提交
  21. 25 1月, 2008 1 次提交
  22. 16 7月, 2007 1 次提交
  23. 10 7月, 2007 1 次提交
    • A
      [BATTERY] Universal power supply class (was: battery class) · 4a11b59d
      Anton Vorontsov 提交于
      This class is result of "external power" and "battery" classes merge,
      as suggested by David Woodhouse. He also implemented uevent support.
      
      Here how userspace seeing it now:
      
          	# ls /sys/class/power\ supply/
          	ac  main-battery  usb
      
          	# cat /sys/class/power\ supply/ac/type
          	AC
      
          	# cat /sys/class/power\ supply/usb/type
          	USB
      
          	# cat /sys/class/power\ supply/main-battery/type
          	Battery
      
          	# cat /sys/class/power\ supply/ac/online
          	1
      
          	# cat /sys/class/power\ supply/usb/online
          	0
      
          	# cat /sys/class/power\ supply/main-battery/status
          	Charging
      
          	# cat /sys/class/leds/h5400\:red-left/trigger
          	none h5400-radio timer hwtimer ac-online usb-online
          	main-battery-charging-or-full [main-battery-charging]
          	main-battery-full
      Signed-off-by: NAnton Vorontsov <cbou@mail.ru>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      4a11b59d