24 Dec, 2013

4 commits

  • This patch introduces device tree support to the isp1704 charger driver.
    Adding support involved moving the handling of the enable GPIO from board
    code into the driver.

    Signed-off-by: Sebastian Reichel
    Signed-off-by: Anton Vorontsov

    Sebastian Reichel
     
  • This patch removing set_mode_hook function from board data and replacing
    it with new string variable of notifier power supply device. After this
    change it is possible to add DT support because driver does not need
    specific board function anymore. Only static data and name of power supply
    device is required.

    Signed-off-by: Pali Rohár
    Reviewed-by: Pavel Machek
    Signed-off-by: Anton Vorontsov

    Pali Rohár
     
  • Charger-manager can parse charger_desc data from devicetree which is used
    to register charger manager.

    Signed-off-by: Jonghwa Lee
    Signed-off-by: Myungjoo Ham
    Signed-off-by: Anton Vorontsov

    Jonghwa Lee
     
  • Charger-manager driver used to check battery temperature through the
    callback function passed by platform data. Unfortunatley, without that
    pre-defined callback function, charger-manager can't get battery's
    temperature at all. Also passing callback function through platform data
    ruins DT support for charger-manager.

    This patch mondifies charger-manager driver to get temperature of battery
    without pre-defined callback function. Now, charger-manager can use either
    of battery thermometer in fuel-gauge and ouside of battery. It uses
    thermal framework interface for outer thermometer if thermal fw is
    enabled. Otherwise, it tries to use fuel-gauge's through the power supply
    interface.

    Signed-off-by: Jonghwa Lee
    Signed-off-by: Myungjoo Ham
    Signed-off-by: Anton Vorontsov

    Jonghwa Lee
     

26 Oct, 2013

1 commit

  • Adds support for the bq24735 charger chipset. The bq24735 is a
    high-efficiency, synchronous battery charger.

    It allows control of the charging current, input current, and the charger
    voltage DAC's through SMBus.

    Signed-off-by: Darbha Sriharsha
    Signed-off-by: Rhyland Klein
    Thanks-to: Stephen Warren
    Thanks-to: Thierry Reding
    Thanks-to: Manish Badarkhe
    Signed-off-by: Anton Vorontsov

    Darbha Sriharsha
     

31 Aug, 2013

1 commit

  • This driver is used and tested on gta04 phone. It's using twl4030_madc
    (similar to rx51 existing driver). Driver also implement charging and
    discharging calibration data so user can define ranges and level.

    Signed-off-by: Marek Belisko
    Signed-off-by: Lukas Märdian
    Signed-off-by: Anton Vorontsov

    Marek BElisko
     

28 Aug, 2013

1 commit

  • Add driver support for the Texas Instruments BQ24190 battery charger.
    Some of the information provided by the device is about the charger and
    other information is about the battery so create two power_supply objects
    (one for each) and provide the appropriate information for each one.

    The device has many fields that go beyond what is reasonable to report or
    modify using the existing 'POWER_SUPPLY_PROP_*' properties so the driver
    exports the register fields via sysfs. They are prefixed by 'f_' (for
    'field') to make it easier to distinguish between a register field and a
    "normal" sysfs file exported by the power_supply infrastructure.

    Signed-off-by: Mark A. Greer
    Signed-off-by: Anton Vorontsov

    Mark A. Greer
     

11 Jun, 2013

3 commits

  • SmartReflex driver interface is natively divided to two parts:

    - external SmartReflex interface
    - interface between SmartReflex driver and SmartReflex Class

    Functions which belong to AVS class interface can use
    struct omap_sr* instead of struct voltatedomain*, to provide a
    direct connection between SR driver and SR class. This allows
    us to optimize and not do additional lookups where none is
    required.

    sr_enable() and sr_disable() are interface functions between
    SR driver and SR class. They are typically used by Class driver
    to enable/disable SmartReflex hardware module.
    Now they take struct omap_sr* as input parameter.

    Signed-off-by: Andrii Tseglytskyi
    Acked-by: Nishanth Menon
    Signed-off-by: Kevin Hilman

    Andrii Tseglytskyi
     
  • SmartReflex driver interface is natively divided to two parts:

    - external SmartReflex interface
    - interface between SmartReflex driver and SmartReflex Class

    Functions which belong to AVS class interface can use
    struct omap_sr* instead of struct voltatedomain*, to provide a
    direct connection between SR driver and SR class. This allows
    us to optimize and not do additional lookups where none is
    required.

    sr_configure_minmax() is interface function between SR driver
    and SR class. It is typically used by Class driver to
    configure MINMAXAVG module inside SmartReflex module.
    Now it takes struct omap_sr* as input parameter.

    Signed-off-by: Andrii Tseglytskyi
    Acked-by: Nishanth Menon
    Signed-off-by: Kevin Hilman

    Andrii Tseglytskyi
     
  • SmartReflex driver interface is natively divided to two parts:

    - external SmartReflex interface
    - interface between SmartReflex driver and SmartReflex Class

    Functions which belong to AVS class interface can use
    struct omap_sr* instead of struct voltatedomain*, to provide a
    direct connection between SR driver and SR class. This allows
    us to optimize and not do additional lookups where none is
    required.

    sr_disable_errgen() and sr_configure_errgen() are interface
    functions between SR driver and SR class. They are typically
    used by Class driver to configure error generator module during
    SmartReflex enable/disable sequence.
    Now they take struct omap_sr* as input parameter.

    Signed-off-by: Andrii Tseglytskyi
    Acked-by: Nishanth Menon
    Signed-off-by: Kevin Hilman

    Andrii Tseglytskyi
     

17 Apr, 2013

1 commit


17 Feb, 2013

1 commit


14 Dec, 2012

1 commit

  • Pull battery subsystem updates from Anton Vorontsov:
    "Highlights:

    - Two new drivers from Pali Rohár and N900 hackers: rx51_battery and
    bq2415x_charger. The drivers are a part of a solution to replace
    the proprietary Nokia BME stack

    - Power supply core now registers devices with a thermal cooling
    subsystem, so we can now automatically throttle charging. Thanks
    to Ramakrishna Pallala!

    - Device tree support for ab8500 and max8925_power drivers

    - Random fixups and enhancements for a bunch of drivers."

    * tag 'for-v3.8-merged' of git://git.infradead.org/battery-2.6: (22 commits)
    max8925_power: Add support for device-tree initialization
    ab8500: Add devicetree support for chargalg
    ab8500: Add devicetree support for charger
    ab8500: Add devicetree support for btemp
    ab8500: Add devicetree support for fuelgauge
    twl4030_charger: Change TWL4030_MODULE_* ids to TWL_MODULE_*
    jz4740-battery: Use devm_request_and_ioremap
    jz4740-battery: Use devm_kzalloc
    bq27x00_battery: Fixup nominal available capacity reporting
    bq2415x_charger: Fix style issues
    bq2415x_charger: Add Kconfig/Makefile entries
    power_supply: Add bq2415x charger driver
    power_supply: Add new Nokia RX-51 (N900) power supply battery driver
    max17042_battery: Fix missing verify_model_lock() return value check
    ds2782_battery: Fix signedness bug in ds278x_read_reg16()
    lp8788-charger: Fix ADC channel names
    lp8788-charger: Fix wrong ADC conversion
    lp8788-charger: Use consumer device name on setting IIO channels
    power_supply: Register power supply for thermal cooling device
    power_supply: Add support for CHARGE_CONTROL_* attributes
    ...

    Linus Torvalds
     

19 Nov, 2012

2 commits


16 Oct, 2012

1 commit

  • Remove the device dependent code (ex. cpu_is_xxx()) and settings
    from the driver code and instead pass them via the platform
    data. This allows a clean separation of the driver code and the platform
    code, as required by the move of the platform header files to
    include/linux/platform_data.

    Note about the smartreflex functional clocks: the smartreflex fclks
    are derived from sys_clk and have the same name as the main_clk from
    the hwmod entry, in order for the SmartReflex driver to request the
    fclk (using clk_get(dev, "fck")).

    Signed-off-by: Jean Pihet
    Signed-off-by: Kevin Hilman

    Jean Pihet
     

07 Oct, 2012

1 commit

  • Pull battery updates from Anton Vorontsov:
    "1. New drivers:
    - Marvell 88pm860x charger and battery drivers;
    - Texas Instruments LP8788 charger driver;
    2. Two new power supply properties: whether a battery is authentic,
    and chargers' maximal currents and voltages;
    3. A lot of TI LP8727 Charger cleanups;
    4. New features for Charger Manager, mainly now we can disable
    specific regulators;
    5. Random fixes and cleanups for other drivers."

    Fix up trivial conflicts in

    * tag 'for-v3.7' of git://git.infradead.org/battery-2.6: (52 commits)
    pda_power: Remove ac_draw_failed goto and label
    charger-manager: Add support sysfs entry for charger
    charger-manager: Support limit of maximum possible
    charger-manager: Check fully charged state of battery periodically
    lp8727_charger: More pure cosmetic improvements
    lp8727_charger: Fix checkpatch warning
    lp8727_charger: Add description in the private data
    lp8727_charger: Fix a typo - chg_parm to chg_param
    lp8727_charger: Make some cosmetic changes in lp8727_delayed_func()
    lp8727_charger: Clean up lp8727_charger_changed()
    lp8727_charger: Return if the battery is discharging
    lp8727_charger: Make lp8727_charger_get_propery() simpler
    lp8727_charger: Make lp8727_ctrl_switch() inline
    lp8727_charger: Make lp8727_init_device() shorter
    lp8727_charger: Clean up lp8727_is_charger_attached()
    lp8727_charger: Use specific definition
    lp8727_charger: Clean up lp8727 definitions
    lp8727_charger: Use the definition rather than enum
    lp8727_charger: Fix code for getting battery temp
    lp8727_charger: Clear interrrupts at inital time
    ...

    Linus Torvalds
     

02 Oct, 2012

1 commit

  • Pull ARM soc general cleanups from Olof Johansson:
    "This is a large branch that contains a handful of different cleanups:

    - Fixing up the I/O space remapping on PCI on ARM. This is a series
    from Rob Herring that restructures how all pci devices allocate I/O
    space, and it's part of the work to allow multiplatform kernels.
    - A number of cleanup series for OMAP, moving and removing some
    headers, sparse irq rework and in general preparation for
    multiplatform.
    - Final removal of all non-DT boards for Tegra, it is now
    device-tree-only!
    - Removal of a stale platform, nxp4008. It's an old mobile chipset
    that is no longer in use, and was very likely never really used
    with a mainline kernel. We have not been able to find anyone
    interested in keeping it around in the kernel.
    - Removal of the legacy dmaengine driver on tegra

    + A handful of other things that I haven't described above."

    Fix up some conflicts with the staging tree (and because nxp4008 was
    removed)

    * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (184 commits)
    ARM: OMAP2+: serial: Change MAX_HSUART_PORTS to 6
    ARM: OMAP4: twl-common: Support for additional devices on i2c1 bus
    ARM: mmp: using for_each_set_bit to simplify the code
    ARM: tegra: harmony: fix ldo7 regulator-name
    ARM: OMAP2+: Make omap4-keypad.h local
    ARM: OMAP2+: Make l4_3xxx.h local
    ARM: OMAP2+: Make l4_2xxx.h local
    ARM: OMAP2+: Make l3_3xxx.h local
    ARM: OMAP2+: Make l3_2xxx.h local
    ARM: OMAP1: Move irda.h from plat to mach
    ARM: OMAP2+: Make hdq1w.h local
    ARM: OMAP2+: Make gpmc-smsc911x.h local
    ARM: OMAP2+: Make gpmc-smc91x.h local
    ARM: OMAP1: Move flash.h from plat to mach
    ARM: OMAP2+: Make debug-devices.h local
    ARM: OMAP1: Move board-voiceblue.h from plat to mach
    ARM: OMAP1: Move board-sx1.h from plat to mach
    ARM: OMAP2+: Make omap-wakeupgen.h local
    ARM: OMAP2+: Make omap-secure.h local
    ARM: OMAP2+: Make ctrl_module_wkup_44xx.h local
    ...

    Linus Torvalds
     

22 Sep, 2012

2 commits

  • Driver to allow use of the ADC drivers supported by the IIO
    subsystem for battery status monitoring. Connecting this
    driver to the relevant IIO device requires registration of
    the appropriate iio_map structure array by the IIO device
    driver (usually from platform data). If specified the driver
    will also make use of a gpio to provide interrupt driven
    notification that the battery is fully charged.

    In last version:
    Addressed concerns raised by lars:
    a. made the adc_bat per device.
    b. get the IIO channel using hardcoded channel names.
    c. Minor issues related to gpio_is_valid and some code
    refactoring.

    In V1:
    Addressed concerns raised by Anton:
    a. changed the struct name to gab(generic adc battery).
    b. Added some functions to neaten the code.
    c. Some minor coding guidelines changes.
    d. Used the latest function introduce by lars:
    iio_read_channel_processed to streamline the code.

    In V2:
    Addressed concerns by lars:
    a. No need of allocating memory for channels.Make it array.
    b. Code restructring, coding style and following kernel guidelines changes
    suggested by him.

    In V3:
    Addressed conerns by Anton:
    a. Added the copyright.
    b. Coding guidelines changes suggested by him.
    c. Added Makefile and Kconfig

    Signed-off-by: anish kumar
    Acked-by: Anton Vorontsov
    Signed-off-by: Jonathan Cameron

    anish kumar
     
  • This patch add support sysfs entry for each charger(regulator).
    Charger-manager use one or more chargers for charging battery but some
    charger isn't necessary on specific scenario. So, if some charger isn't
    needed, can disable specific charger through 'externally_control' entry
    while system is on state and confirm the information(name, state) of
    charger.

    The list of added sysfs entry
    - /sys/class/power_supply/battery/chargers/charger.[index]/name
    show name of charger(regulator)
    - /sys/class/power_supply/battery/chargers/charger.[index]/state
    show either enabled or disabled state of charger
    - /sys/class/power_supply/battery/chargers/charger.[index]/externally_control

    If 'externally_control' of specific charger is 1, Charger-manager cannot
    enable regulator for charging when charger cable is attached and charger
    must be maintained with disabled state. If 'externally_control' is zero,
    Charger-manager usually can control to enable/disable regulator.

    Signed-off-by: Chanwoo Choi
    Signed-off-by: Myungjoo Ham
    Signed-off-by: Kyungmin Park
    Signed-off-by: Anton Vorontsov

    Chanwoo Choi
     

21 Sep, 2012

2 commits

  • This patch check maximum possible duration of charging/discharging.

    If whole charging duration exceed 'desc->charging_max_duration_ms', cm
    stop charging to prevent overcharge/overheat. And if discharging duration
    exceed, charger cable is attached, after full-batt, cm start charging to
    maintain fully charged state for battery.

    Signed-off-by: Chanwoo Choi
    Signed-off-by: Myungjoo Ham
    Signed-off-by: Kyungmin Park
    Signed-off-by: Anton Vorontsov

    Chanwoo Choi
     
  • This patch check periodically fully charged state of battery to protect
    overcharge and overheat. If battery is fully charged, stop charging and
    check droped voltage with 'fullbatt_vchkdrop_ms' period. When voltage of
    battery is more droped than 'fullbatt_vchkdrop_uV' voltage,
    charger-manager will restart charging for battery.

    Signed-off-by: Chanwoo Choi
    Signed-off-by: Myungjoo Ham
    Signed-off-by: Kyungmin Park
    Signed-off-by: Anton Vorontsov

    Chanwoo Choi
     

19 Sep, 2012

1 commit

  • Platform data for device drivers should be defined in
    include/linux/platform_data/*.h, not in the architecture
    and platform specific directories.

    This moves such data out of the omap include directories

    Signed-off-by: Arnd Bergmann
    Acked-by: Mark Brown
    Acked-by: Greg Kroah-Hartman
    Acked-by: Nicolas Pitre
    Acked-by: Tony Lindgren
    Cc: Kevin Hilman
    Cc: "Benoît Cousson"
    Cc: Dmitry Torokhov
    Cc: David Woodhouse
    Cc: Kyungmin Park
    Cc: Ohad Ben-Cohen
    Cc: Grant Likely
    Cc: Omar Ramirez Luna
    Cc: Tomi Valkeinen
    Cc: Florian Tobias Schandinat
    Cc: Peter Ujfalusi
    Cc: Jarkko Nikula
    Cc: Liam Girdwood
    Cc: Artem Bityutskiy
    Cc: Jean Pihet
    Cc: J Keerthy
    Cc: linux-omap@vger.kernel.org

    Arnd Bergmann
     

23 Aug, 2012

2 commits


01 Aug, 2012

1 commit

  • 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
     

14 Jul, 2012

2 commits


26 Jun, 2012

1 commit


01 Jun, 2012

6 commits

  • Add a Kconfig menu (POWER_AVS) and rename the Kconfig options
    for the OMAP SmartReflex implementation:
    CONFIG_OMAP_SMARTREFLEX renames to CONFIG_POWER_AVS_OMAP
    CONFIG_OMAP_SMARTREFLEX_CLASS3 renames to CONFIG_POWER_AVS_OMAP_CLASS3

    This change makes the SmartReflex implementation ready for the move
    to drivers/.

    Signed-off-by: Jean Pihet
    Signed-off-by: J Keerthy
    Reviewed-by: Kevin Hilman
    Signed-off-by: Kevin Hilman

    Jean Pihet
     
  • The SmartReflex driver incorrectly treats some per-OPP data as data
    common to all OPPs (e.g., ERRMINLIMIT). Move this data into a per-OPP
    data structure.

    Furthermore, in order to make the SmartReflex implementation ready for
    the move to drivers/, remove the dependency from the SR driver code
    to the voltage layer by querying the data tables only from the SR device
    init code.

    Based on Paul's original code for the SmartReflex driver conversion.

    Signed-off-by: Jean Pihet
    Signed-off-by: J Keerthy
    Reviewed-by: Kevin Hilman
    Signed-off-by: Kevin Hilman

    Jean Pihet
     
  • Now that omap_test_timeout is only accessible from mach-omap2/,
    introduce a similar function for SR.

    This change makes the SmartReflex implementation ready for the move
    to drivers/.

    Signed-off-by: Jean Pihet
    Signed-off-by: J Keerthy
    Reviewed-by: Kevin Hilman
    Signed-off-by: Kevin Hilman

    Jean Pihet
     
  • Associate a name with each SmartReflex instance from the hwmod data,
    rather than attempting to reuse the name of a voltage domain. The name
    from hwmod better reflects the smartreflex integration in the system.

    Also have the name passed to the drivers using pdata, which helps to remove
    any dependencies on SoC-specific structures.

    Signed-off-by: Jean Pihet
    Signed-off-by: J Keerthy
    Reviewed-by: Kevin Hilman
    Signed-off-by: Kevin Hilman

    Jean Pihet
     
  • Convert SmartReflex "class" functions to take a struct omap_sr *, rather than
    a struct voltagedomain *. SmartReflex code should be driver code and not
    tightly coupled to OMAP subarchitecture-specific structures.

    Based on Paul's original code for the SmartReflex driver conversion.

    Signed-off-by: Jean Pihet
    Signed-off-by: J Keerthy
    Reviewed-by: Kevin Hilman
    Signed-off-by: Kevin Hilman

    Jean Pihet
     
  • Move the smartreflex header file
    (arch/arm/mach-omap2/smartreflex.h) in a new header file
    include/linux/power/smartreflex.h.

    This change makes the SmartReflex implementation ready for the move
    to drivers/.

    Signed-off-by: Jean Pihet
    Signed-off-by: J Keerthy
    Reviewed-by: Kevin Hilman
    Signed-off-by: Kevin Hilman

    Jean Pihet
     

06 May, 2012

3 commits

  • max17047 is improved version of max17042 chip. It has few HW bug
    fixes with minor changes in register set.

    max17050 is same as max17047 chip except its silicon packging. So from
    driver's point of view there is no difference btw max1047 and max1050.

    This patch adds the support to dynamically detect the chip type and
    adds steps to initialize the max17047 chip.

    Signed-off-by: Ramakrishna Pallala
    Signed-off-by: Anton Vorontsov

    Ramakrishna Pallala
     
  • By using cm_notify_event function, charger driver can report several
    charger events (e.g. battery full and external power in/out, etc) to
    Charger-Manager. Charger-Manager can properly and immediately control
    chargers by the reported event.

    Signed-off-by: MyungJoo Ham
    Signed-off-by: Donggeun Kim
    Signed-off-by: Kyungmin Park
    Signed-off-by: Anton Vorontsov

    Chanwoo Choi
     
  • Charger-Manager needs to check battery health in normal state
    as well as suspend-to-RAM state. When the battery is fully charged,
    Charger-Manager needs to determine when the chargers restart charging.

    This patch allows Charger-Manager to monitor battery health in normal
    state and handle operation for chargers after battery is fully charged.

    Signed-off-by: MyungJoo Ham
    Signed-off-by: Donggeun Kim
    Signed-off-by: Kyungmin Park
    Signed-off-by: Anton Vorontsov

    Chanwoo Choi
     

27 Mar, 2012

2 commits