]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
authorAnton Vorontsov <cbouatmailru@gmail.com>
Sat, 18 Oct 2008 16:28:24 +0000 (20:28 +0400)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Sat, 18 Oct 2008 16:28:24 +0000 (20:28 +0400)
Conflicts:

drivers/power/Makefile

1  2 
drivers/power/Kconfig
drivers/power/Makefile
drivers/power/power_supply_core.c

diff --combined drivers/power/Kconfig
index ae095a498db4569f572a5acb843b2c4f059a9a33,63bb579104452f0c8228e7fbbf5bccedcb37f8f6..8e0c2b47803ce9f8b0670953eadefdc994ade68d
@@@ -51,21 -51,15 +51,21 @@@ config BATTERY_OLP
  
  config BATTERY_TOSA
        tristate "Sharp SL-6000 (tosa) battery"
 -      depends on MACH_TOSA && MFD_TC6393XB
 +      depends on MACH_TOSA && MFD_TC6393XB && TOUCHSCREEN_WM97XX
        help
          Say Y to enable support for the battery on the Sharp Zaurus
          SL-6000 (tosa) models.
  
- config BATTERY_PALMTX
-       tristate "Palm T|X battery"
-       depends on MACH_PALMTX
+ config BATTERY_WM97XX
+       bool "WM97xx generic battery driver"
+       depends on TOUCHSCREEN_WM97XX=y
        help
-         Say Y to enable support for the battery in Palm T|X.
+         Say Y to enable support for battery measured by WM97xx aux port.
  
 +config BATTERY_BQ27x00
 +      tristate "BQ27200 battery driver"
 +      depends on I2C
 +      help
 +        Say Y here to enable support for batteries with BQ27200(I2C) chip.
 +
  endif # POWER_SUPPLY
diff --combined drivers/power/Makefile
index 6cb301b779a79eebe7be6c993c60dab53bcee717,4e20026cc45aaa39550340526dc51ae66c35369e..e8f1ecec5d8fd2f5467ec1111061a96f0a1420d7
@@@ -21,5 -21,4 +21,5 @@@ obj-$(CONFIG_BATTERY_DS2760)  += ds2760_
  obj-$(CONFIG_BATTERY_PMU)     += pmu_battery.o
  obj-$(CONFIG_BATTERY_OLPC)    += olpc_battery.o
  obj-$(CONFIG_BATTERY_TOSA)    += tosa_battery.o
- obj-$(CONFIG_BATTERY_PALMTX)  += palmtx_battery.o
 -obj-$(CONFIG_BATTERY_WM97XX)  += wm97xx_battery.o
++obj-$(CONFIG_BATTERY_WM97XX)  += wm97xx_battery.o
 +obj-$(CONFIG_BATTERY_BQ27x00) += bq27x00_battery.o
index f44f5b608f6a451af9fa97f7b2ca99984cbeec15,3007695f90c822e067a31e3c44da67d4598ff2e7..5520040449c486e2cb6978cacdc0c4715a067974
@@@ -87,36 -87,12 +87,36 @@@ int power_supply_am_i_supplied(struct p
        return error;
  }
  
 +static int __power_supply_is_system_supplied(struct device *dev, void *data)
 +{
 +      union power_supply_propval ret = {0,};
 +      struct power_supply *psy = dev_get_drvdata(dev);
 +
 +      if (psy->type != POWER_SUPPLY_TYPE_BATTERY) {
 +              if (psy->get_property(psy, POWER_SUPPLY_PROP_ONLINE, &ret))
 +                      return 0;
 +              if (ret.intval)
 +                      return ret.intval;
 +      }
 +      return 0;
 +}
 +
 +int power_supply_is_system_supplied(void)
 +{
 +      int error;
 +
 +      error = class_for_each_device(power_supply_class, NULL, NULL,
 +                                    __power_supply_is_system_supplied);
 +
 +      return error;
 +}
 +
  int power_supply_register(struct device *parent, struct power_supply *psy)
  {
        int rc = 0;
  
-       psy->dev = device_create_drvdata(power_supply_class, parent, 0,
-                                        psy, "%s", psy->name);
+       psy->dev = device_create(power_supply_class, parent, 0, psy,
+                                "%s", psy->name);
        if (IS_ERR(psy->dev)) {
                rc = PTR_ERR(psy->dev);
                goto dev_create_failed;
@@@ -172,7 -148,6 +172,7 @@@ static void __exit power_supply_class_e
  
  EXPORT_SYMBOL_GPL(power_supply_changed);
  EXPORT_SYMBOL_GPL(power_supply_am_i_supplied);
 +EXPORT_SYMBOL_GPL(power_supply_is_system_supplied);
  EXPORT_SYMBOL_GPL(power_supply_register);
  EXPORT_SYMBOL_GPL(power_supply_unregister);