14 Dec, 2020

1 commit


02 Oct, 2020

1 commit

  • Add support for new device: the TI bq34z100-G1, a Wide Range Fuel Gauge
    for Li-Ion, PbA, NiMH, and NiCd batteries. The device shares a lot with
    other models, although it has its own differences requiring new quirks.

    This patch was tested on a system equipped with NiMH batteries.

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Sebastian Reichel

    Krzysztof Kozlowski
     

29 Aug, 2020

3 commits

  • In commit 830ae442202e ("extcon: Remove the deprecated extcon functions")
    the function extcon_register_interest became a no-op returning an error,
    leading to non-functional behaviour in charger-manager.

    Additionally, a translation table is needed between the text representation
    of the extcon cable names and their IDs is needed. In order to retain DT
    compatibility, TA and CHARGE-DOWNSTREAM are added as they were present up
    until commit 11eecf910bd8 ("extcon: Modify the id and name of external
    connector")

    Signed-off-by: Jonathan Bakker
    Signed-off-by: Sebastian Reichel

    Jonathan Bakker
     
  • cm_monitor(), where charging management starts, checks various charging
    condition sequentially to decide next charging operation. However, as it
    follows sequential process, cascaded if statements, it does some
    jobs which have already done in the previous stage. This results in a
    delay in decision making. Moreover, starting point of charging is spread
    all around which makes maintain code and debugging difficult.

    Both of the problems mentioned above become clean if it manages battery
    charging focusing on battery status not following sequential condition
    checking. Now, cm_monitor() moves battery state diagram and does the
    optimal operation for current state. As a result, it reduces whole
    monitoring time almost in half.

    Signed-off-by: Jonghwa Lee
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Jonathan Bakker
    Signed-off-by: Sebastian Reichel

    Jonghwa Lee
     
  • cm_notify_event() was introduced to get an event associated with the
    battery status externally (ie in board files), but no one ever used it.
    Moreover it makes charger manager driver more complicated. Drop the
    function and all data related to it to simplify the driver.

    Signed-off-by: Jonghwa Lee
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Jonathan Bakker
    Signed-off-by: Sebastian Reichel

    Jonghwa Lee
     

28 Aug, 2020

1 commit


27 Aug, 2020

1 commit


30 Jul, 2020

2 commits


27 Jul, 2020

1 commit


11 Apr, 2020

1 commit

  • For security reasons I stopped using gmail account and kernel address is
    now up-to-date alias to my personal address.

    People periodically send me emails to address which they found in source
    code of drivers, so this change reflects state where people can contact
    me.

    [ Added .mailmap entry as per Joe Perches - Linus ]
    Signed-off-by: Pali Rohár
    Signed-off-by: Andrew Morton
    Cc: Greg Kroah-Hartman
    Cc: Joe Perches
    Link: http://lkml.kernel.org/r/20200307104237.8199-1-pali@kernel.org
    Signed-off-by: Linus Torvalds

    Pali Rohár
     

07 Mar, 2020

1 commit


19 Dec, 2019

1 commit


13 Nov, 2019

1 commit


19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

31 May, 2019

3 commits

  • Based on 1 normalized pattern(s):

    license terms gnu general public license v2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 37 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Steve Winslow
    Reviewed-by: Alexios Zavras
    Reviewed-by: Richard Fontana
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190528170027.724130665@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version you should have received a copy of the
    gnu general public license along with this program if not write to
    the free software foundation inc 675 mass ave cambridge ma 02139 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 35 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Armijn Hemel
    Reviewed-by: Richard Fontana
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.655028468@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    51 franklin street fifth floor boston ma 02110 1301 usa

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option [no]_[pad]_[ctrl] any later version this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this program if not write to the free
    software foundation inc 51 franklin street fifth floor boston ma
    02110 1301 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 176 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Jilayne Lovejoy
    Reviewed-by: Steve Winslow
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190519154040.652910950@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 Jan, 2019

1 commit

  • This migrates isp1704 driver from old GPIO API to new descriptor
    based GPIO API and drops useless platform data as a side-effect.

    Migration is simple, since all mainline users are DT based and
    DT API does not change. Out of tree users of the platform data
    need to migrate to gpiod_lookup_table as described here:

    Documentation/driver-api/gpio/board.rst

    Reviewed-by: Linus Walleij
    Acked-by: Pavel Machek
    Signed-off-by: Sebastian Reichel

    Sebastian Reichel
     

29 Dec, 2018

1 commit

  • Pull power supply and reset updates from Sebastian Reichel:

    - New core support:
    - battery internal resistance
    - battery OCV capacity lookup table
    - support for custom sysfs attributes

    - Convert all drivers to use power-supply core support for custom sysfs
    attributes

    - bq24190-charger: bq24196 support

    - axp20x-charger: AXP813 support

    - sc27xx-battery: new fuel gauge driver

    - gpio-poweroff: support for specific active and inactive delays

    - Misc fixes

    * tag 'for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (53 commits)
    power: supply: bq25890: fix BAT_COMP field definition
    power: supply: gpio-charger: Do not use deprecated POWER_SUPPLY_TYPE_USB_*
    power: supply: ds2781: switch to devm_power_supply_register
    power: supply: ds2780: switch to devm_power_supply_register
    power: supply: ds2781: fix race-condition in bin attribute registration
    power: supply: ds2780: fix race-condition in bin attribute registration
    power: supply: pcf50633: fix race-condition in sysfs registration
    power: supply: charger-manager: fix race-condition in sysfs registration
    power: supply: charger-manager: simplify generation of sysfs attribute group name
    power: supply: bq24257: fix race-condition in sysfs registration
    power: supply: bq24190_charger: fix race-condition in sysfs registration
    power: supply: lp8788: fix race-condition in sysfs registration
    power: supply: ds2781: fix race-condition in sysfs registration
    power: supply: ds2780: fix race-condition in sysfs registration
    power: supply: bq2415x: fix race-condition in sysfs registration
    power: supply: core: add support for custom sysfs attributes
    power: supply: sc27xx: Save last battery capacity
    power: reset: at91-poweroff: move shdwc related data to one structure
    power: supply: sc27xx: Add suspend/resume interfaces
    power: supply: sc27xx: Add fuel gauge low voltage alarm
    ...

    Linus Torvalds
     

13 Dec, 2018

1 commit


12 Dec, 2018

1 commit


11 Dec, 2018

1 commit


09 Oct, 2018

1 commit

  • omap_sr_register_pmic() was introduced in 2010 in commit

    984aa6dbf4ca ("OMAP3: PM: Adding smartreflex driver support.")

    . There was never any caller of this function in mainline resulting in a
    warning

    sr_init: No PMIC hook to init smartreflex

    for each machine where this driver is enabled. So remove the unused
    function and the pr_warn.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Rafael J. Wysocki

    Uwe Kleine-König
     

20 Sep, 2018

1 commit


26 Apr, 2018

1 commit


23 Feb, 2018

1 commit

  • We are still initializing smartreflex with platform data using
    omap_device_build(). We can instead pass the platform data in
    with auxdata in pdata-quirks.c and make the driver use that
    in later patches.

    Note that we cannot enable the auxdata use yet, this is done
    in the last patch of the series.

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     

09 Dec, 2017

1 commit

  • This adds basic support for BQ27521 battery monitor, used in Nokia N9
    and N950. In particular, battery voltage is important to be able to
    tell when the battery is almost empty. Emptying battery on N950 is
    pretty painful, as flasher needs to be used to recover phone in such case.

    Signed-off-by: Pavel Machek
    Acked-by: Andrew F. Davis
    Acked-by: Rob Herring
    Signed-off-by: Sebastian Reichel

    Pavel Machek
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

30 Aug, 2017

1 commit


29 Aug, 2017

2 commits

  • Support data memory update on BQ27425. Parameters from TI datasheets are also
    provided for BQ27500, 545, 421, 441, 621; however these are commented out,
    as they are not tested.

    Add BQ27XXX_O_CFGUP & _O_RAM for use in bq27xxx_chip_data[n].opts
    and by data memory update functions.

    Signed-off-by: Liam Breck
    Signed-off-by: Sebastian Reichel

    Liam Breck
     
  • For the existing features, these chips act like others already ID'd,
    so they had false but functional IDs. We will be adding features
    which require correct IDs, so the following IDs are added:
    BQ2752X, 531, 542, 546, 742, 425, 441, 621

    Chip-specific features are now tracked by BQ27XXX_O_* flags in di->opts.

    No functional changes to the driver.

    Signed-off-by: Liam Breck
    Signed-off-by: Sebastian Reichel

    Liam Breck
     

25 Jul, 2017

1 commit

  • When the BQ27xxx driver was originally written the w1 subsystem only
    allowed device drivers for w1 attached devices to live in the w1
    subsystem. Kernel driver subsystems expect that the driver for a device
    live in the directory of the subsystem for which it implements
    functionality, not in the directory of the bus that it is attached. To
    work around this, the BQ27xxx driver was implemented as a platform device
    driver and the interface driver would instantiate this device from within
    the w1 directory, then pass a w1 read callback as platform data.

    As we can now have the w1 interface driver in the power/supply directory
    (like we do already with the i2c interface driver) we can remove this
    middle-layer platform driver.

    Signed-off-by: Andrew F. Davis
    Acked-by: Pali Rohár
    Signed-off-by: Sebastian Reichel

    Andrew F. Davis
     

08 Jun, 2017

3 commits

  • Previously there was no way to configure these chips in the event that the
    defaults didn't match the battery in question.

    For chips with RAM data memory (and also those with flash/NVM data memory
    if CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is defined and the user has not
    set module param dt_monitored_battery_updates_nvm=0) we now call
    power_supply_get_battery_info(), check its values, and write battery
    properties to chip data memory if there is a dm_regs table for the chip.

    Signed-off-by: Matt Ranostay
    Signed-off-by: Liam Breck
    Signed-off-by: Sebastian Reichel

    Liam Breck
     
  • Add these to enable read/write of chip data memory RAM/NVM/flash:
    bq27xxx_battery_seal()
    bq27xxx_battery_unseal()
    bq27xxx_battery_set_cfgupdate()
    bq27xxx_battery_soft_reset()
    bq27xxx_battery_read_dm_block()
    bq27xxx_battery_write_dm_block()
    bq27xxx_battery_checksum_dm_block()

    Signed-off-by: Matt Ranostay
    Signed-off-by: Liam Breck
    Signed-off-by: Sebastian Reichel

    Liam Breck
     
  • Declare bus.write/read_bulk/write_bulk().
    Add I2C write/read_bulk/write_bulk() to implement the above.
    Add bq27xxx_write/read_block/write_block() helpers to call the above.

    Signed-off-by: Matt Ranostay
    Signed-off-by: Liam Breck
    Acked-by: "Andrew F. Davis"
    Signed-off-by: Sebastian Reichel

    Matt Ranostay
     

01 May, 2017

2 commits

  • Userspace prefers the driver having a status property over having to guess
    itself. Specifically this will properly make the GNOME3 UI (and likely
    others) properly show discharging / charging / full status, instead
    of always showing discharging as status.

    Note that in the case there is no charger driver supplying the max17042,
    then a status of unknown will get returned. At least upower treats
    this the same as not having a status attribute, so in this case nothing
    changes from a userspace pov.

    Signed-off-by: Hans de Goede
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Sebastian Reichel

    Hans de Goede
     
  • Some x86 machines use a max17047 fuel-gauge and x86 might be missing
    platform_data if not provided by SFI.

    This commit adds default platform_data as fallback option so that the
    driver can work on boards where no platform_data is provided.

    Since not all boards have a thermistor hooked up, set temp_min to 0 and
    change the health checks from temp < temp_min to
    not trigger on such boards (where temp reads 0).

    Signed-off-by: Hans de Goede
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Sebastian Reichel

    Hans de Goede
     

14 Apr, 2017

1 commit

  • The i2c-core already maps of irqs before calling the driver's probe
    function and there are no in tree users of
    bq24190_platform_data->gpio_int.

    Remove the redundant custom irq-mapping code and just use client->irq.

    Cc: Liam Breck
    Cc: Tony Lindgren
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Acked-by: Tony Lindgren
    Signed-off-by: Sebastian Reichel

    Hans de Goede