30 May, 2018

1 commit

  • [ Upstream commit 66ec32fc7cd116dab5c02603ea8ec28ff92da3b5 ]

    max17042_get_status uses the core power_supply_am_i_supplied. That
    function relies on DT properties to figure out the power supply
    topology, and will error out without DT.

    Fixes max17042 battery status being reported as "unknown".

    Signed-off-by: Pierre Bourdon
    Signed-off-by: Andre Heider
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Pierre Bourdon
     

29 Aug, 2017

3 commits

  • Fix drivers/power/supply/max17042_battery.c:1059:6:
    warning: 'acpi_id' may be used uninitialized in this function.

    No idea why my gcc version did not catch this.

    Reported-by: kbuild test robot
    Signed-off-by: Hans de Goede
    Signed-off-by: Sebastian Reichel

    Hans de Goede
     
  • On some x86/ACPI boards the DSDT defines an ACPI event handler for
    the max17047 IRQ, this causes several problems:

    1) We need to share the IRQ to avoid an error getting it

    2) Even of we are willing to share, we may fail to share because some
    DSDTs claim it exclusivly

    3) If we are unable to share the IRQ, or the IRQ is only listed as an
    ACPI event source and not in the max1704 firmware node, then the
    charge threshold IRQ (which is used to give an IRQ every 1 percent
    charge change) becomes a problem, the ACPI event handler will not
    update this to the next 1 percent threshold, so the IRQ keeps firing
    and we get an IRQ storm pegging 1 CPU core.

    This happens despite the max17042 driver not setting the charge
    threshold because Windows uses it and leaves it set on reboot.

    So if we are unable to get the IRQ we need to reprogram the
    charge threshold to its disabled setting.

    This commit fixes al of the above, while at it it also makes the error
    msg when being unable to get the IRQ consistent with other messages.

    Signed-off-by: Hans de Goede
    Signed-off-by: Sebastian Reichel

    Hans de Goede
     
  • Some x86 devices enumerate a max17047 fuel-gauge through a MAX17047
    ACPI firmware-node, add support for this.

    Signed-off-by: Hans de Goede
    Signed-off-by: Sebastian Reichel

    Hans de Goede
     

01 May, 2017

11 commits


16 Aug, 2016

1 commit


11 Aug, 2016

1 commit