18 Mar, 2013

1 commit


22 Sep, 2012

1 commit

  • A previous patch added the ac_draw_failed goto and label to
    pda_power_probe(). The goto would be invoked after a failed call to
    regulator_get().

    However the way ac_draw is used - always after a check for NULL - suggests
    that a failed call to regulator_get() was not fatal.

    This patch removes the ac_draw_failed goto and label, partly reverting the
    previous patch.

    This patch also removes the assignment of an error code to ret after a
    failed call to regulator_get(), since the error code is now never used.

    Signed-off-by: Paul Parsons
    Cc: Philipp Zabel
    Signed-off-by: Anton Vorontsov

    Paul Parsons
     

21 Sep, 2012

1 commit

  • When I reboot my iPAQ hx4700 in its cradle, the battery will not begin
    to charge even though the AC supply is connected. Charging will start
    only after the PDA power driver is tickled by some other power event,
    such as reseating the iPAQ in its cradle or connecting the USB cable.

    The problem lies in pda_power_probe(), where ac_draw is used by the call
    to update_charger() before being set by the call to regulator_get().

    Moving the regulator_get() call to before the update_charger() call
    fixes the problem.

    Signed-off-by: Paul Parsons
    Cc: Philipp Zabel
    Signed-off-by: Anton Vorontsov

    Paul Parsons
     

01 Aug, 2012

2 commits

  • Pull random subsystem patches from Ted Ts'o:
    "This patch series contains a major revamp of how we collect entropy
    from interrupts for /dev/random and /dev/urandom.

    The goal is to addresses weaknesses discussed in the paper "Mining
    your Ps and Qs: Detection of Widespread Weak Keys in Network Devices",
    by Nadia Heninger, Zakir Durumeric, Eric Wustrow, J. Alex Halderman,
    which will be published in the Proceedings of the 21st Usenix Security
    Symposium, August 2012. (See https://factorable.net for more
    information and an extended version of the paper.)"

    Fix up trivial conflicts due to nearby changes in
    drivers/{mfd/ab3100-core.c, usb/gadget/omap_udc.c}

    * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: (33 commits)
    random: mix in architectural randomness in extract_buf()
    dmi: Feed DMI table to /dev/random driver
    random: Add comment to random_initialize()
    random: final removal of IRQF_SAMPLE_RANDOM
    um: remove IRQF_SAMPLE_RANDOM which is now a no-op
    sparc/ldc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    [ARM] pxa: remove IRQF_SAMPLE_RANDOM which is now a no-op
    board-palmz71: remove IRQF_SAMPLE_RANDOM which is now a no-op
    isp1301_omap: remove IRQF_SAMPLE_RANDOM which is now a no-op
    pxa25x_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    omap_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    goku_udc: remove IRQF_SAMPLE_RANDOM which was commented out
    uartlite: remove IRQF_SAMPLE_RANDOM which is now a no-op
    drivers: hv: remove IRQF_SAMPLE_RANDOM which is now a no-op
    xen-blkfront: remove IRQF_SAMPLE_RANDOM which is now a no-op
    n2_crypto: remove IRQF_SAMPLE_RANDOM which is now a no-op
    pda_power: remove IRQF_SAMPLE_RANDOM which is now a no-op
    i2c-pmcmsp: remove IRQF_SAMPLE_RANDOM which is now a no-op
    input/serio/hp_sdc.c: remove IRQF_SAMPLE_RANDOM which is now a no-op
    mfd: remove IRQF_SAMPLE_RANDOM which is now a no-op
    ...

    Linus Torvalds
     
  • Pull battery updates from Anton Vorontsov:
    "The tag contains just a few battery-related changes for v3.6. It's is
    all pretty straightforward, except one thing.

    One of our patches added thermal support for power supply class, but
    thermal/ subsystem changed under our feet. We (well, Stephen, that
    is) caught the issue and it was decided[1] that I'd just delay the
    battery pull request, and then will fix it up by merging upstream back
    into battery tree at the specific commit.

    That's not all though: another[2] small fixup for thermal subsystem
    was needed to get rid of a warning in power supply subsystem (the
    warning was not drivers/power's "fault", the thermal registration
    function just needed a proper const annotation, which is also done by
    a small commit on top of the merge.

    So, to sum this up:
    - The 'master' branch of the battery tree was in the -next tree for
    weeks, was never rebased, altered etc. It should be all OK;
    - Although, for-v3.6 tag contains the 'master' branch + merge + the
    warning fix.

    [1] http://lkml.org/lkml/2012/6/19/23
    [2] http://lkml.org/lkml/2012/6/18/28"

    * tag 'for-v3.6' of git://git.infradead.org/battery-2.6: (23 commits)
    thermal: Constify 'type' argument for the registration routine
    olpc-battery: update CHARGE_FULL_DESIGN property for BYD LiFe batteries
    olpc-battery: Add VOLTAGE_MAX_DESIGN property
    charger-manager: Fix build break related to EXTCON
    lp8727_charger: Move header file into platform_data directory
    power_supply: Add min/max alert properties for CAPACITY, TEMP, TEMP_AMBIENT
    bq27x00_battery: Add support for BQ27425 chip
    charger-manager: Set current limit of regulator for over current protection
    charger-manager: Use EXTCON Subsystem to detect charger cables for charging
    test_power: Add VOLTAGE_NOW and BATTERY_TEMP properties
    test_power: Add support for USB AC source
    gpio-charger: Use cansleep version of gpio_set_value
    bq27x00_battery: Add support for power average and health properties
    sbs-battery: Don't trigger false supply_changed event
    twl4030_charger: Allow charger to control the regulator that feeds it
    twl4030_charger: Add backup-battery charging
    twl4030_charger: Fix some typos
    max17042_battery: Support CHARGE_COUNTER power supply attribute
    smb347-charger: Add constant charge and current properties
    power_supply: Add constant charge_current and charge_voltage properties
    ...

    Linus Torvalds
     

19 Jul, 2012

1 commit

  • With the changes in the random tree, IRQF_SAMPLE_RANDOM is now a
    no-op; interrupt randomness is now collected unconditionally in a very
    low-overhead fashion; see commit 775f4b297b. The IRQF_SAMPLE_RANDOM
    flag was scheduled to be removed in 2009 on the
    feature-removal-schedule, so this patch is preparation for the final
    removal of this flag.

    Signed-off-by: "Theodore Ts'o"
    Acked-by: Anton Vorontsov
    Cc: David Woodhouse

    Theodore Ts'o
     

02 Jul, 2012

1 commit


25 Jun, 2012

2 commits


18 Jun, 2012

1 commit


13 Feb, 2012

2 commits


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
     

23 Aug, 2011

1 commit

  • commit 9ad63986c606c60e2e916b1b96f22991f966d9cc
    "pda_power: Add support for using otg transceiver events"
    introduces below build error if !CONFIG_USB_OTG_UTILS.

    CC drivers/power/pda_power.o
    drivers/power/pda_power.c: In function 'pda_power_probe':
    drivers/power/pda_power.c:322: error: 'otg_is_usb_online' undeclared (first use in this function)
    drivers/power/pda_power.c:322: error: (Each undeclared identifier is reported only once
    drivers/power/pda_power.c:322: error: for each function it appears in.)
    drivers/power/pda_power.c:325: error: 'otg_is_ac_online' undeclared (first use in this function)
    drivers/power/pda_power.c:371: error: 'otg_handle_notification' undeclared (first use in this function)
    make[2]: *** [drivers/power/pda_power.o] Error 1
    make[1]: *** [drivers/power] Error 2
    make: *** [drivers] Error 2

    This patch adds #ifdef CONFIG_USB_OTG_UTILS guards at necessary places to fix
    build errors.

    Signed-off-by: Axel Lin
    Signed-off-by: Anton Vorontsov

    Axel Lin
     

20 Aug, 2011

1 commit

  • If the platform data sets the use_otg_notifier flag,
    the driver will now register an otg notifier callback and listen
    to transceiver events for AC/USB plug-in events instead. This would
    normally be used by not specifying is_xx_online callbacks and
    not specifying any irqs so the state machine is completely driven
    from OTG xceiver events.

    Signed-off-by: Dima Zavin
    Signed-off-by: Anton Vorontsov

    Dima Zavin
     

16 Apr, 2010

1 commit


03 Feb, 2009

1 commit

  • This patch allows machines to use an OTG transceiver driver instead of
    supplying a custom is_usb_online callback to check USB power.
    Also, in the case that the OTG transceiver handles charger control when
    connected to USB, a regulator named "ac_draw" can be supplied instead of
    the custom set_charge callback to control the charger when connected to
    AC.

    The check for (transceiver->state == OTG_STATE_B_PERIPHERAL) in
    otg_is_usb_online is probably too simple, I'm just using this with a
    peripheral only device and gpio_vbus + bq24022. I'm not sure which other
    OTG states can supply power.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Anton Vorontsov

    Philipp Zabel
     

26 Jan, 2009

1 commit


01 Sep, 2008

1 commit

  • The recent change in commit 2db873211ba47ef704c301f9ecf4a33413a0b649
    forces the calls enable_irq_wake() and disable_irq_wake() to
    be balanced. But if in pda_power_suspend() the call to
    enable_irq_wake() fails (because attached gpio cannot wake
    up the CPU), the corresponding disable_irq_wake will WARN().
    Fix it by storing success/failure of enable_irq_wake().

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Anton Vorontsov

    Robert Jarzmik
     

26 Jul, 2008

1 commit

  • Since 43cc71eed1250755986da4c0f9898f9a635cb3bf ("platform: prefix MODALIAS
    with "platform:"), the platform modalias is prefixed with "platform:".
    Add MODULE_ALIAS() to the hotpluggable "power" drivers drivers, to
    re-enable auto loading.

    [dbrownell@users.sourceforge.net: one was missing]
    Signed-off-by: Kay Sievers
    Signed-off-by: David Brownell
    Cc: Greg KH
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kay Sievers
     

03 May, 2008

1 commit


02 Feb, 2008

4 commits


16 Jul, 2007

2 commits

  • Per Jeff Garzik request.

    Signed-off-by: Jeff Garzik
    Signed-off-by: Anton Vorontsov

    Anton Vorontsov
     
  • Clean up pda_power interrupt handling:

    Prior to this patch, the driver would pass information it needed
    to the interrupt handler dev_id pointer, and then prompt forget it
    ever did so, recreating that same information after a couple passes
    through the timer-based state machine.

    This patch removes the redundant checks by passing the
    pda_power_supply[] pointer through the state machine. The current
    code passed 'irq' through the state machine, as an index to recreate
    the pointer, when we could more simply pass around the pointer itself.

    This patch makes it easier to remove the 'irq' argument in the future,
    in addition to cleaning up the driver today.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

10 Jul, 2007

1 commit

  • Common power driver for PDAs and phones with one or two external
    power supplies (AC/USB) connected to main and backup batteries,
    and optional builtin charger.

    It's used to stop logic duplication through different embedded
    devices. So, power supply *logic* is here. pda_power register
    power supplies, and will take care about notifying batteries
    about power changes through external power interface.

    Currently, power consumption legal limits (including USB power
    consumption) should be handled by platform code, inside set_charge
    function.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Roman Moravcik
    Signed-off-by: David Woodhouse

    Anton Vorontsov