aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/Kconfig
AgeCommit message (Collapse)Author
2013-09-13Remove GENERIC_HARDIRQ config optionMartin Schwidefsky
After the last architecture switched to generic hard irqs the config options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code for !CONFIG_GENERIC_HARDIRQS can be removed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-08-30power: Add twl4030_madc battery driver.Marek Belisko
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 <marek@goldelico.com> Signed-off-by: Lukas Märdian <lukas@goldelico.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-08-27bq24190_charger: Add support for TI BQ24190 Battery ChargerMark A. Greer
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 <mgreer@animalcreek.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-08-09power_supply: Make goldfish_battery depend on GOLDFISH || COMPILE_TESTPaul Gortmaker
Nearly all the other goldfish peripherals (mtd, keyboard, etc) have a dependency on the main platform's GOLDFISH Kconfig item, but this one got skipped. Even with consistency as a justification, there was initial resistance[1] from some people to adding it however, as they wanted the extra compile coverage. Now, with CONFIG_COMPILE_TEST, we have the middle ground that will give people the coverage who want it, and let those who don't want it to skip ever seeing the option presented. [1] https://lkml.org/lkml/2013/2/27/333 Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-05-25Merge tag 'for-v3.10-fixes' of git://git.infradead.org/battery-2.6Linus Torvalds
Pull bettery fixes from Anton Vorontsov: "Last minute one-liners: wrong kfree usage fix, module alias fixup and kconfig adjustments" * tag 'for-v3.10-fixes' of git://git.infradead.org/battery-2.6: pm2301_charger: Fix module alias prefix wm831x_backup: Fix wrong kfree call for devdata->backup.name bq27x00: Fix I2C dependency in KConfig lp8788-charger: Fix kconfig dependency
2013-05-10bq27x00: Fix I2C dependency in KConfigXiong Zhou
This patch fixes build failure(randconfig) of next-20130501. When config I2C as m, BATTERY_BQ27x00 as y, here comes the failure. The driver depends on I2C only if I2C is not disabled, as Lars commented. Last version of this patch make the driver depend on I2C unconditionally. Failure message: drivers/built-in.o: In function `bq27x00_read_i2c': bq27x00_battery.c:(.text+0x1082a7): undefined reference to `i2c_transfer' drivers/built-in.o: In function `bq27x00_battery_init': bq27x00_battery.c:(.init.text+0x6085): undefined reference to `i2c_register_driver' bq27x00_battery.c:(.init.text+0x60c7): undefined reference to `i2c_del_driver' drivers/built-in.o: In function `bq27x00_battery_exit': bq27x00_battery.c:(.exit.text+0xbf0): undefined reference to `i2c_del_driver' make: *** [vmlinux] Error 1 Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-05-02lp8788-charger: Fix kconfig dependencyRandy Dunlap
Fix build errors in lp8788-charger by making it depend on IIO. Fixes errors when CONFIG_IIO=m and CHARGER_LP8788=y. lp8788-charger.c:(.text+0x2146b5): undefined reference to `iio_channel_get' lp8788-charger.c:(.text+0x2146ce): undefined reference to `iio_channel_get' lp8788-charger.c:(.text+0x214a86): undefined reference to `iio_read_channel_processed' lp8788-charger.c:(.text+0x214b51): undefined reference to `iio_read_channel_processed' lp8788-charger.c:(.text+0x214c30): undefined reference to `iio_read_channel_processed' lp8788-charger.c:(.text+0x214d93): undefined reference to `iio_channel_release' lp8788-charger.c:(.text+0x214dac): undefined reference to `iio_channel_release' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-04-30Merge tag 'for-v3.10' of git://git.infradead.org/battery-2.6Linus Torvalds
Pull battery updates from Anton Vorontsov: "Highlights: - OpenFirmware/DeviceTree support for the Power Supply core: the core now automatically populates supplied_from hierarchy from the device tree. With these patches chargers and batteries can now lookup each other without the board files support shim. Rhyland Klein at NVIDIA did the work - New ST-Ericsson ABX500 hwmon driver. The driver is heavily using the AB85xx core and depends on some recent changes to it, so that is why the driver comes through the battery tree. It has an appropriate ack from the hwmon maintainer (i.e. Guenter Roeck). Martin Persson at ST-Ericsson and Hongbo Zhang at Linaro authored the driver - Final bits to sync AB85xx ST-Ericsson changes into mainline. The changes touch mfd parts, but these were acked by the appropriate MFD maintainer (ie Samuel Ortiz). Lee Jones at Linaro did most of the work and lead the submission process. Minor changes, but still worth mentioning: - Battery temperature reporting fix for Nokia N900 phones - Versatile Express poweroff driver moved into drivers/power/reset/ - Tree-wide: use devm_kzalloc() where appropriate - Tree-wide: dev_pm_ops cleanups/fixes" * tag 'for-v3.10' of git://git.infradead.org/battery-2.6: (112 commits) pm2301-charger: Fix suspend/resume charger-manager: Use kmemdup instead of kzalloc + memcpy power_supply: Populate supplied_from hierarchy from the device tree power_supply: Add core support for supplied_from power_supply: Define Binding for power-supplies rx51_battery: Fix reporting temperature hwmon: Add ST-Ericsson ABX500 hwmon driver ab8500_bmdata: Export abx500_res_to_temp tables for hwmon ab8500_{bmdata,fg}: Add const attributes to some data arrays ab8500_bmdata: Eliminate CamelCase warning of some variables ab8500_btemp: Make ab8500_btemp_get* interfaces public goldfish_battery: Use resource_size() lp8788-charger: Use PAGE_SIZE for the sysfs read operation max8925_power: Use devm_kzalloc() da9030_battery: Use devm_kzalloc() da9052-battery: Use devm_kzalloc() ds2760_battery: Use devm_kzalloc() ds2780_battery: Use devm_kzalloc() gpio-charger: Use devm_kzalloc() isp1704_charger: Use devm_kzalloc() ...
2013-03-18power_supply: Add support for tps65090-chargerRhyland Klein
This patch adds support for the tps65090 charger driver. This driver is responsible for controlling the charger aspect of the tps65090 mfd. Currently, this mainly consists of turning on and off the charger, but some features of the charger can be supported through this driver including: - Enable Auto Recharge based on Battery voltage - Fast Charge Safety Timer - Maximum battery discharge current - Maximum battery adapter current - Enable External Charge - Disable charging termination based on low charger current (supported) Once the driver is accepted, later patches can add support for the features above which are not yet supported. Based on work by: Syed Rafiuddin <srafiuddin@nvidia.com> Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-03-18usb: phy: remove CONFIG_USB_OTG_UTILSFelipe Balbi
there are no more users of CONFIG_USB_OTG_UTILS left in tree, we can remove it just fine. [ kishon@ti.com : fixed a linking error due to original patch forgetting to change drivers/usb/Makefile ] Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-07pm2301-charger: Always compile the PM2301 Charger driver with AB8500 Battery ↵Marcus Cooper
Mgnt The PM2301 Charger should always be available when using the AB8500 Battery Management system, we're ensuring this will be the case. Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Hakan BERG <hakan.berg@stericsson.com> Reviewed-by: Mian Yousaf KAUKAB <mian.yousaf.kaukab@stericsson.com>
2013-02-16goldfish_battery: Add missing GENERIC_HARDIRQS dependencyHeiko Carstens
Fix this link error on s390: ERROR: "devm_request_threaded_irq" [drivers/power/goldfish_battery.ko] undefined! Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-02-02Merge branch 'tb-power-2' of git://git.linaro.org/people/ljones/linux-3.0-ux500Anton Vorontsov
Pull a huge ab8500/pm2301 pile of changes from Lee Jones. Lee did an awesome job cleaning this stuff up and thus brought ab8500 Stericsson's development tree much closer to the mainline. Even more changes to come, though. Conflicts: drivers/power/Kconfig
2013-02-02power: Add battery driver for goldfish emulatorMike Lockwood
Add the emulated power driver for the Goldfish platform. This folds together the code from the Google tree, Jun Nakajima's cleanups and x86 porting work, and then a tidy up to pass checkpatch. Signed-off-by: Mike A. Chan <mikechan@google.com> [cleanup and x86 support] Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> [ported to 3.4] Signed-off-by: Tom Keel <thomas.keel@intel.com> [ported to 3.7 and final tidy] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-01-23pm2301: Provide u9540 support for the pm2301 chargerMichel JAOUEN
AC charger driver for the DB9540 based platforms. Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com> Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com> Tested-by: Michel JAOUEN <michel.jaouen@stericsson.com>
2012-12-13Merge tag 'for-v3.8-merged' of git://git.infradead.org/battery-2.6Linus Torvalds
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 ...
2012-11-24power: Add simple poweroff-gpio driverJamie Lentin
Given appropriate devicetree bindings, this driver registers a pm_power_off function to set a GPIO line high/low to power down your board. Signed-off-by: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by:Simon Baatz <gmbnomis@gmail.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-11-18ab8500: Add devicetree support for btempRajanikanth H.V
This patch adds device tree support for battery-temperature-monitor driver Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-11-18bq2415x_charger: Add Kconfig/Makefile entriesAnton Vorontsov
This commit adds Kconfig and Makefile entries so that we could actually build the driver. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-11-18power_supply: Add new Nokia RX-51 (N900) power supply battery driverPali Rohár
This driver exporting battery design capacity, temperature and voltage for battery in Nokia RX-51. This driver is needed for open source battery management on Nokia RX-51 (N900). Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-10-07Merge tag 'for-v3.7' of git://git.infradead.org/battery-2.6Linus Torvalds
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 <linux/mfd/88pm860x.h> * 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 ...
2012-09-22power: battery: Generic battery driver using IIOanish kumar
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 <anish198519851985@gmail.com> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-20power_supply: Enable battery-charger for 88pm860xJett.Zhou
There are charger and battery measurement feature for 88pm860x PMIC. For charger, it can support pre-charge with small current when battery is nearly exausted and then changed into fast-charge with CC&CV mode. For battery monitor, it can support battery measurement such as vbat,vsys,vchg and ibat etc,it can aslo accumulating the Coulomb value charged or discharged from battery based on Conlomb Counter, we use it to estimate battery capacity. Signed-off-by: Jett.Zhou <jtzhou@marvell.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-09-20power_supply: Add new lp8788 charger driverKim, Milo
TI LP8788 PMU supports regulators, battery charger, RTC, ADC, backlight driver and current sinks. This patch supports the charger operations including the charger interrupt handling. The LP8788 charger driver provides configurable platform data. The charger platform data includes ADC input ID, maximum battery voltage, charging parameters and etc. The ADC input is used for getting the battery voltage and temperature. Charging parameters are used for updating the charger operations such like setting charging current and setting End-of-charge conditions. When the charging interrupt occurs, power supply uevents are generated in order to update the user-space information. For platform specific charger action, the charger_event() function can be used in the platform side. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-08-22power_supply: Remove broken mark for da9052-batteryAxel Lin
The fix for MFD part is already merged so we can remove the broken mark for da9052-battery. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-07-31Merge tag 'for-v3.6' of git://git.infradead.org/battery-2.6Linus 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 ...
2012-07-24Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree from Jiri Kosina: "Trivial updates all over the place as usual." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (29 commits) Fix typo in include/linux/clk.h . pci: hotplug: Fix typo in pci iommu: Fix typo in iommu video: Fix typo in drivers/video Documentation: Add newline at end-of-file to files lacking one arm,unicore32: Remove obsolete "select MISC_DEVICES" module.c: spelling s/postition/position/g cpufreq: Fix typo in cpufreq driver trivial: typo in comment in mksysmap mach-omap2: Fix typo in debug message and comment scsi: aha152x: Fix sparse warning and make printing pointer address more portable. Change email address for Steve Glendinning Btrfs: fix typo in convert_extent_bit via: Remove bogus if check netprio_cgroup.c: fix comment typo backlight: fix memory leak on obscure error path Documentation: asus-laptop.txt references an obsolete Kconfig item Documentation: ManagementStyle: fixed typo mm/vmscan: cleanup comment error in balance_pgdat mm: cleanup on the comments of zone_reclaim_stat ...
2012-07-15charger-manager: Fix build break related to EXTCONChanwoo Choi
This patch select CONFIG_EXTCON to resolve below build break of charger-manager because charger-manager use API of EXTCON subsystem. drivers/built-in.o: In function `charger_manager_probe': charger-manager.c:(.text+0x11d61a): undefined reference to `extcon_register_interest' charger-manager.c:(.text+0x11d7b6): undefined reference to `extcon_unregister_interest' drivers/built-in.o: In function `charger_manager_remove': charger-manager.c:(.devexit.text+0x8f3): undefined reference to `extcon_unregister_interest' Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-06-28ab8500-btemp: Fix typo 'AB5500'Paul Bolle
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-06-26Merge branch 'for_3.6/pm/sr-move' of ↵Tony Lindgren
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into devel-driver
2012-05-31ARM: OMAP: SmartReflex: Move smartreflex driver to drivers/Jean Pihet
After a clean-up of the interfaces the OMAP Smartreflex IP driver is now a generic driver. Move it to drivers/power/avs/. The build is controlled by the following Kconfig options: . CONFIG_POWER_AVS: general knob for Adaptive Voltage Scaling support, . CONFIG_POWER_AVS_OMAP: AVS(Adaptive Voltage Scaling) support on OMAP containing the version 1 or version 2 of the SmartReflex IP, . CONFIG_POWER_AVS_OMAP_CLASS3: Class 3 implementation of Smartreflex. Signed-off-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: J Keerthy <j-keerthy@ti.com> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-05-05max17042_battery: Add support for max17047/50 chipRamakrishna Pallala
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 <ramakrishna.pallala@intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-05-05power_supply: Fix a typo in BATTERY_DS2781 Kconfig entryAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-05-05smb347-charger: Convert to regmap APIMika Westerberg
The smb347-charger driver does a lot of read-modify-write to the device registers. Instead of open-coding everything we can take advantage of regmap API which provides nice functions to do this kind of things. In addition there is no need for custom debugfs file for dumping registers as this is already provided by the regmap API. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-05-04power_supply: Make the core a boolean instead of a tristateAnton Vorontsov
On Mon, Apr 02, 2012 at 01:53:23PM +1000, Benjamin Herrenschmidt wrote: > > drivers/built-in.o: In function `.nouveau_pm_trigger': > > (.text+0xa56e8): undefined reference to `.power_supply_is_system_supplied' > > > > nouveau probably needs to depends on CONFIG_POWER_SUPPLY to force a module > > build with the latter is =m > > Ok, not that trivial... > > The problem is more like POWER_SUPPLY should be a bool, not a tristate. > > If you think about it: you don't want things like nouveau to depend on a > random subsystem like that, people will never get it. In fact, > POWER_SUPPLY provides empty inline stubs when not enabled, so that's > really designed to not have depends... > > However that -cannot- work if POWER_SUPPLY is modular and the drivers > who use it are not. > > The only fixes here that make sense I can think of > that don't also involve Kconfig horrors are: > > - Ugly: in power_supply.h, use the extern variant if > > defined(CONFIG_POWER_SUPPLY) || > (defined(CONFIG_POWER_SUPPLY_MODULE) && defined(MODULE)) > > IE. use the stub if power supply is a module and what is being built is > built-in. Of course that's not only ugly, it somewhat sucks from a user > perspective as the subsystem now exists but can't be used by some > drivers... > > - Better: Just make the bloody thing a bool :-) The power supply > framework itself is small enough, just make it a boolean option and > avoid the problem entirely. The actual power supply sub drivers can > remain modular of course. Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-03-30Merge tag 'for-v3.4-rc1' of git://git.infradead.org/battery-2.6Linus Torvalds
Pull battery updates from Anton Vorontsov: "Various small bugfixes and enhancements, plus two new drivers: - A quite complex ab8500 charger driver, submitted by Arun Murthy @ ST-Ericsson; - Summit Microelectronics SMB347 Battery Charger, submitted by Bruce E Robertson and Alan Cox @ Intel. And that's all." * tag 'for-v3.4-rc1' of git://git.infradead.org/battery-2.6: (36 commits) max17042_battery: Clean up interrupt handling Revert "max8998_charger: Include linux/module.h just once" ab8500_fg: Fix some build warnings on x86_64 max17042_battery: Fix CHARGE_FULL representation. max8998_charger: Include linux/module.h just once power_supply: Convert i2c drivers to module_i2c_driver lp8727_charger: Add MODULE_DEVICE_TABLE charger-manager: Simplify charger_get_property(), get rid of a warning charger-manager: Clean up for better readability da9052-battery: Convert to use module_platform_driver da9052-battery: Fix a memory leak when unload the module da9052-battery: Add missing platform_set_drvdata ab8500: Turn unneeded global symbols into local ones ab8500_fg: Fix copy-paste error ab8500_fg: Get rid of 'struct battery_type' ab8500_fg: Get rid of 'struct v_to_cap' ab8500_btemp: Get rid of 'enum adc_therm' ab8500_charger: Convert to the new USB OTG calls ab8500-btemp: AB8500 battery temperature driver ab8500-fg: A8500 fuel gauge driver ...
2012-03-26ab8500-btemp: AB8500 battery temperature driverArun Murthy
This driver is responsible for battery detection, obtaining battery temperature and monitor the battery temperature by taking precautionary measurements when battery temperature goes beyond or below the thresholds. Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26Add I2C driver for Summit Microelectronics SMB347 Battery Charger.Bruce E. Robertson
Driver support for the Summit I²C battery charger. This is used in some Intel devices. Signed-off-by: Bruce E. Robertson <bruce.e.robertson@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26lp8727_charger: Add company name and descriptionKim, Milo
Add 'Texas Instruments' because TI acquired National semiconductor at 2011. And the driver information is added in the header file. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-08DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave driversRenata Sayakhova
Signed-off-by: Renata Sayakhova <rsayakhova@gmail.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-01-10power_supply: Mark da9052 driver as brokenAnton Vorontsov
There are some problems with MFD part of this driver, so the driver fails to build: drivers/power/da9052-battery.c: In function 'da9052_bat_read_volt': drivers/power/da9052-battery.c:293:2: error: implicit declaration of function 'da9052_adc_manual_read' [-Werror=implicit-function-declaration] drivers/power/da9052-battery.c: In function 'da9052_bat_check_presence': drivers/power/da9052-battery.c:306:2: error: implicit declaration of function 'da9052_adc_read_temp' [-Werror=implicit-function-declaration] drivers/power/da9052-battery.c: In function 'da9052_determine_vc_tbl_index': drivers/power/da9052-battery.c:348:1: warning: control reaches end of non-void function [-Wreturn-type] cc1: some warnings being treated as errors The fix for MFD part will probably go post -rc1 (or in the next merge window), so let's disable the driver for now. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-01-06power_supply: Add DA9052 battery driverAshish Jangam
Driver for DA9052 battery charger. This driver depends on DA9052 MFD core dirver for definitions and methods. This patch is functionally tested on Samsung SMDKV6410. Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-01-06bq20z75: Rename to sbs-batteryRhyland Klein
This driver for the bq20z75 implemented the register spec defined by the SBS standard. As this is not unique to this the TI part this was originally written for, we can generalize this driver to show its support for any SBS compliant battery. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-01-04Merge branch 'power-supply-scope' of ↵Anton Vorontsov
git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
2012-01-04power_supply: Add LP8727 charger driverWoogyom Kim
National Semiconductor LP8727 is the battery charger with Micro/Mini USB interface. This IC includes below functions: - I2C interface for accessing user registers - Single input Li-Ion battery charger - Charger input ID detection from Micro/Mini USB - Multiplexing switches on USB, UART Signed-off-by: Woogyom Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-01-04power_supply: Add initial Charger-Manager driverDonggeun Kim
Because battery health monitoring should be done even when suspended, it needs to wake up and suspend periodically. Thus, userspace battery monitoring may incur too much overhead; every device and task is woken up periodically. Charger Manager uses suspend-again to provide in-suspend monitoring. This patch allows to monitor battery health in-suspend state. Signed-off-by: Donggeun Kim <dg77.kim@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2011-11-02um: switch to use of drivers/KconfigAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
2011-07-31Merge git://git.infradead.org/battery-2.6Linus Torvalds
* git://git.infradead.org/battery-2.6: gpio-charger: Fix checking return value of request_any_context_irq power_supply: MAX17042: Support additional properties max8903_charger: Allow platform data to be __initdata power_supply: Add charger driver for MAX8998/LP3974 power_supply: Add charger driver for MAX8997/8966 max17042_battery: Remove obsolete cleanup for clientdata twl4030_charger: Fix warnings wm831x_power: Support multiple instances wm831x_backup: Support multiple instances apm_power: Fix style error in macros s3c_adc_battery: Fix annotation for s3c_adc_battery_probe() bq20z75: Enable detection after registering bq20z75: Add support for external notification
2011-07-08power_supply: Add charger driver for MAX8998/LP3974Donggeun Kim
This patch supports power supply APIs for MAX8998/LP3974. Signed-off-by: Donggeun Kim <dg77.kim@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: KyungMin Park <kyungmin.park@samsung.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2011-07-08power_supply: Add charger driver for MAX8997/8966Donggeun Kim
MAX8997/8966 chip is a multi-function device which includes PMIC, RTC, Fuel Gauge, MUIC, Haptic, Flash control, and Battery charging control. The driver for it is located at drivers/mfd. This patch supports battery charging control of MAX8997/8966 chip and provides power supply class information to userspace. Signed-off-by: Donggeun Kim <dg77.kim@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: KyungMin Park <kyungmin.park@samsung.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>