1. 18 11月, 2012 2 次提交
  2. 23 8月, 2012 2 次提交
  3. 14 7月, 2012 1 次提交
  4. 20 6月, 2012 1 次提交
  5. 18 6月, 2012 1 次提交
  6. 05 5月, 2012 2 次提交
    • A
      power_supply: Make the core a boolean instead of a tristate · 0d4ed4e2
      Anton Vorontsov 提交于
      On Mon, Apr 02, 2012 at 01:53:23PM +1000, Benjamin Herrenschmidt wrote:
      > > drivers/built-in.o: In function `.nouveau_pm_trigger':
      > > (.text+0xa56e8): undefined reference to `.power_supply_is_system_supplied'
      > >
      > > nouveau probably needs to depends on CONFIG_POWER_SUPPLY to force a module
      > > build with the latter is =m
      >
      > Ok, not that trivial...
      >
      > The problem is more like POWER_SUPPLY should be a bool, not a tristate.
      >
      > If you think about it: you don't want things like nouveau to depend on a
      > random subsystem like that, people will never get it. In fact,
      > POWER_SUPPLY provides empty inline stubs when not enabled, so that's
      > really designed to not have depends...
      >
      > However that -cannot- work if POWER_SUPPLY is modular and the drivers
      > who use it are not.
      >
      > The only fixes here that make sense I can think of
      > that don't also involve Kconfig horrors are:
      >
      >  - Ugly: in power_supply.h, use the extern variant if
      >
      >       defined(CONFIG_POWER_SUPPLY) ||
      >        (defined(CONFIG_POWER_SUPPLY_MODULE) && defined(MODULE))
      >
      > IE. use the stub if power supply is a module and what is being built is
      > built-in. Of course that's not only ugly, it somewhat sucks from a user
      > perspective as the subsystem now exists but can't be used by some
      > drivers...
      >
      >  - Better: Just make the bloody thing a bool :-) The power supply
      > framework itself is small enough, just make it a boolean option and
      > avoid the problem entirely. The actual power supply sub drivers can
      > remain modular of course.
      Suggested-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      0d4ed4e2
    • R
      power_supply: Add voltage_ocv property and use it for max17042 driver · a2ebfe2f
      Ramakrishna Pallala 提交于
      This adds a new sysfs file called 'voltage_ocv' which gives the
      Open Circuit Voltage of the battery.
      
      This property can be used for platform shutdown policies and
      can be useful for initial capacity estimations.
      
      Note: This patch is generated against linux-next branch.
      Signed-off-by: NRamakrishna Pallala <ramakrishna.pallala@intel.com>
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      a2ebfe2f
  7. 16 3月, 2012 1 次提交
    • P
      device.h: audit and cleanup users in main include dir · 313162d0
      Paul Gortmaker 提交于
      The <linux/device.h> header includes a lot of stuff, and
      it in turn gets a lot of use just for the basic "struct device"
      which appears so often.
      
      Clean up the users as follows:
      
      1) For those headers only needing "struct device" as a pointer
      in fcn args, replace the include with exactly that.
      
      2) For headers not really using anything from device.h, simply
      delete the include altogether.
      
      3) For headers relying on getting device.h implicitly before
      being included themselves, now explicitly include device.h
      
      4) For files in which doing #1 or #2 uncovers an implicit
      dependency on some other header, fix by explicitly adding
      the required header(s).
      
      Any C files that were implicitly relying on device.h to be
      present have already been dealt with in advance.
      
      Total removals from #1 and #2: 51.  Total additions coming
      from #3: 9.  Total other implicit dependencies from #4: 7.
      
      As of 3.3-rc1, there were 110, so a net removal of 42 gives
      about a 38% reduction in device.h presence in include/*
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      313162d0
  8. 04 1月, 2012 1 次提交
  9. 10 12月, 2011 2 次提交
    • J
      power_supply: allow a power supply to explicitly point to powered device · 83516651
      Jeremy Fitzhardinge 提交于
      If a power supply has a scope of "Device", then allow the power supply
      to indicate what device it actually powers. This is represented in the
      power supply's sysfs directory as a symlink named "powers", which points to
      the sysfs directory of the powered device.
      
      If the device has children, then the sub-devices are also powered by
      the same power supply.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Cc: Richard Hughes <richard@hughsie.com>
      83516651
    • J
      power_supply: add SCOPE attribute to power supplies · 25a0bc2d
      Jeremy Fitzhardinge 提交于
      This adds a "scope" attribute to a power_supply, which indicates how
      much of the system it powers.  It appears in sysfs as "scope" or in
      the uevent file as POWER_SUPPLY_SCOPE=.  There are presently three
      possible values:
      	Unknown - unknown power topology
      	System - the power supply powers the whole system
      	Device - it powers a specific device, or tree of devices
      
      A power supply which doesn't have a "scope" attribute should be assumed to
      have "System" scope.
      
      In general, usermode should assume that loss of all System-scoped power
      supplies will power off the whole system, but any single one is sufficient
      to power the system.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Cc: Richard Hughes <richard@hughsie.com>
      25a0bc2d
  10. 02 3月, 2011 1 次提交
  11. 31 1月, 2011 2 次提交
  12. 06 10月, 2010 2 次提交
  13. 19 5月, 2010 2 次提交
  14. 16 1月, 2010 1 次提交
  15. 30 7月, 2009 1 次提交
    • D
      power_supply: get_by_name and set_charged functionality · e5f5ccb6
      Daniel Mack 提交于
      This adds a function that indicates that a battery is fully charged.
      It also includes functions to get a power_supply device from the class
      of registered devices by name reference. These can be used to find a
      specific battery to call power_supply_set_battery_charged() on.
      
      Some battery drivers might need this information to calibrate
      themselves.
      Signed-off-by: NDaniel Mack <daniel@caiaq.de>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Anton Vorontsov <cbou@mail.ru>
      Cc: Matt Reimer <mreimer@vpop.net>
      Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      e5f5ccb6
  16. 02 7月, 2009 1 次提交
  17. 01 7月, 2009 1 次提交
  18. 28 3月, 2009 1 次提交
  19. 04 1月, 2009 1 次提交
  20. 01 9月, 2008 1 次提交
  21. 13 5月, 2008 1 次提交
  22. 06 2月, 2008 1 次提交
  23. 02 2月, 2008 2 次提交
    • D
      power_supply: add few more values and props · c7cc930f
      Dmitry Baryshkov 提交于
      Add LiMn (one of the most common for small non-rechargable batteries)
      battery technology and voltage_min/_max properties support.
      Signed-off-by: NDmitry Baryshkov <dbaryshkov@gmail.com>
      Signed-off-by: NAnton Vorontsov <cbou@mail.ru>
      c7cc930f
    • A
      power: remove POWER_SUPPLY_PROP_CAPACITY_LEVEL · 8efe4440
      Andres Salomon 提交于
      The CAPACITY_LEVEL stuff defines various levels of charge; however, what
      is the difference between them?  What differentiates between HIGH and NORMAL,
      LOW and CRITICAL, etc?
      
      As it appears that these are fairly arbitrary, we end up making such policy
      decisions in the kernel (or in hardware).  This is the sort of decision that
      should be made in userspace, not in the kernel.
      
      If the hardware does not support _CAPACITY and it cannot be easily calculated,
      then perhaps the driver should register a custom CAPACITY_LEVEL attribute;
      however, userspace should not become accustomed to looking for such a thing,
      and we should certainly not encourage drivers to provide CAPACITY_LEVEL
      stubs.
      
      The following removes support for POWER_SUPPLY_PROP_CAPACITY_LEVEL.  The
      OLPC battery driver is the only driver making use of this, so it's
      removed from there as well.
      Signed-off-by: NAndres Salomon <dilinger@debian.org>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      8efe4440
  24. 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