04 Jan, 2012

1 commit

  • This patch converts the drivers in drivers/power/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Cc: Mike Rapoport
    Cc: Lars-Peter Clausen
    Cc: Nithish Mahalingam
    Cc: MyungJoo Ham
    Cc: Haojian Zhuang
    Cc: Balaji Rao
    Cc: Mark Brown
    Signed-off-by: Axel Lin
    Acked-by: Clifton Barnes
    Signed-off-by: Anton Vorontsov

    Axel Lin
     

25 Nov, 2011

2 commits

  • It is no longer used, so we can safely remove it.

    Signed-off-by: Anton Vorontsov

    Anton Vorontsov
     
  • This patch fixes the following noise (by renaming _drv to _driver):

    WARNING: drivers/power/olpc_battery.o(.data+0x100): Section mismatch in reference from the variable olpc_battery_drv to the function .devinit.text:olpc_battery_probe()
    The variable olpc_battery_drv references
    the function __devinit olpc_battery_probe()
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    WARNING: drivers/power/olpc_battery.o(.data+0x104): Section mismatch in reference from the variable olpc_battery_drv to the function .devexit.text:olpc_battery_remove()
    The variable olpc_battery_drv references
    the function __devexit olpc_battery_remove()
    If the reference is valid then annotate the
    variable with __exit* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    WARNING: drivers/power/olpc_battery.o(.data+0x128): Section mismatch in reference from the variable olpc_battery_drv to the variable .devinit.rodata:olpc_battery_ids
    The variable olpc_battery_drv references
    the variable __devinitconst olpc_battery_ids
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    Signed-off-by: Anton Vorontsov

    Anton Vorontsov
     

20 Aug, 2011

2 commits


13 Jan, 2011

5 commits

  • The patches adding support for CURRENT_NOW, VOLTAGE_NOW, CHARGE_NOW and
    CHARGE_FULL_DESIGN were based on a tree not including c566d299
    ("olpc_battery: Ambient temperature is not available on XO-1.5") and
    therefore only modified the then-common, now-XO-1 properties list. This
    patch adds the new properties to XO-1.5 as well.

    Signed-off-by: Sascha Silbe
    Signed-off-by: Anton Vorontsov

    Sascha Silbe
     
  • {CURRENT,VOLTAGE}_AVG are actually {CURRENT,VOLTAGE}_NOW (the EC code
    directly passes through the value from the gas gauge instead of the
    internally used average). We retain {CURRENT,VOLTAGE}_AVG as an alias
    for compatibility reasons, it will be removed later.

    Signed-off-by: Sascha Silbe
    [ pgf@laptop.org: added VOLTAGE_NOW, aliased to VOLTAGE_AVG ]
    Signed-off-by: Paul Fox
    Signed-off-by: Anton Vorontsov

    Sascha Silbe
     
  • CHARGE_NOW is needed by some user space software (read: UPower) for
    internal calculations.

    This patch violates the power supply class definition (as we already
    do for CAPACITY though it isn't as obvious there), but this is the best
    we can do without adding rather sophisticated algorithms to either the EC
    or UPower.

    Signed-off-by: Sascha Silbe
    Signed-off-by: Paul Fox
    Signed-off-by: Anton Vorontsov

    Sascha Silbe
     
  • Some user space software (read: UPower) uses CHARGE_FULL_DESIGN for internal
    calculations. The design capacity of the OLPC batteries is effectively fixed
    and only needs to be exported.

    Signed-off-by: Sascha Silbe
    Signed-off-by: Paul Fox
    Signed-off-by: Anton Vorontsov

    Sascha Silbe
     
  • The XO-1.5 does not support the ambient temperature property.
    Create a separate list of properties for that configuration where
    ambient temperature is not included, and apply the correct property
    list at runtime.

    Signed-off-by: Daniel Drake
    Signed-off-by: Anton Vorontsov

    Daniel Drake
     

28 Sep, 2010

1 commit

  • When the driver was updated to be endian neutral (8e9c7716c)
    the signed part of the s16 values was lost. This is because be16_to_cpu()
    returns an unsigned value. This patch casts the values back to a s16
    number prior to the the implicit cast up to an int.

    Signed-off-by: Richard A. Smith
    Signed-off-by: Daniel Drake
    Cc:
    Signed-off-by: Anton Vorontsov

    Richard A. Smith
     

10 Aug, 2010

1 commit

  • drivers/power/olpc_battery.c:387: error: unknown field 'owner' specified in initializer
    drivers/power/olpc_battery.c:387: warning: excess elements in struct initializer
    drivers/power/olpc_battery.c:387: warning: (near initialization for 'olpc_bat_eeprom.attr')

    The .owner field has been dropped from the attr struct.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

22 May, 2010

1 commit


02 Jul, 2009

1 commit


01 Jul, 2009

4 commits


17 Oct, 2008

1 commit


19 May, 2008

1 commit


13 May, 2008

1 commit

  • This adds PROP_CHARGE_COUNTER to the power supply class (documenting it
    as well). The OLPC battery driver uses this for spitting out its ACR
    values (in uAh). We have some rounding errors (the data sheet claims
    416.7, the math actually works out to 416.666667, so we're forced to
    choose between overflows or precision loss. I chose precision loss,
    and stuck w/ data sheet values), but I don't think anyone will care
    that much.

    Signed-off-by: Andres Salomon
    Signed-off-by: Anton Vorontsov

    Andres Salomon
     

04 May, 2008

4 commits


29 Apr, 2008

1 commit

  • This adds support for OLPC XO hardware. Open Firmware on XOs don't contain
    the VSA, so it is necessary to emulate the PCI BARs in the kernel. This also
    adds functionality for running EC commands, and a CONFIG_OLPC.

    A number of OLPC drivers depend upon CONFIG_OLPC.

    olpc_ec_timeout is a hack to work around Embedded Controller bugs.

    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: geode_has_vsa build fix]
    [akpm@linux-foundation.org: olpc_register_battery_callback doesn't exist]
    Signed-off-by: Andres Salomon
    Acked-by: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Cc: Jordan Crouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     

02 Feb, 2008

1 commit

  • 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: Andres Salomon
    Signed-off-by: David Woodhouse

    Andres Salomon
     

16 Jul, 2007

1 commit


10 Jul, 2007

1 commit