summaryrefslogtreecommitdiff
path: root/drivers/power
AgeCommit message (Collapse)Author
2012-03-26lp8727_charger: Add MODULE_DEVICE_TABLEAxel Lin
Add MODULE_DEVICE_TABLE to setup modalias for lp8727. Allows auto modprobing. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26charger-manager: Simplify charger_get_property(), get rid of a warningAnton Vorontsov
This patch fixes the following warning and makes the code a little bit more simpler: CC drivers/power/charger-manager.o charger-manager.c: In function 'charger_get_property': charger-manager.c:429:15: warning: 'i' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26charger-manager: Clean up for better readabilityAxel Lin
This patch includes below changes: * Some code change for better readability. * Current code in probe already ensures desc->charger_regulators is not NULL. No need to check if it is NULL or not before calling regulator_bulk_free(). * Use dev_get_drvdata() in cm_suspend_prepare() and cm_suspend_complete() Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26da9052-battery: Convert to use module_platform_driverAxel Lin
Use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26da9052-battery: Fix a memory leak when unload the moduleAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26da9052-battery: Add missing platform_set_drvdataAxel Lin
Add missing platform_set_drvdata in da9052_bat_probe. Otherwise, calling platform_get_drvdata in da9052_bat_remove returns NULL. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26ab8500: Turn unneeded global symbols into local onesAnton Vorontsov
The patch fixes the following sparse warning: drivers/power/ab8500_charger.c:1619:6: warning: symbol 'ab8500_charger_detect_usb_type_work' was not declared. Should it be static? drivers/power/abx500_chargalg.c:1709:24: warning: symbol 'abx500_chargalg_sysfs_ops' was not declared. Should it be static? drivers/power/ab8500_fg.c:2328:24: warning: symbol 'ab8500_fg_sysfs_ops' was not declared. Should it be static? Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26ab8500_fg: Fix copy-paste errorAnton Vorontsov
ab8500_fg_discharge_state_to() function should accept 'enum ab8500_fg_discharge_state' argument, not 'enum ab8500_fg_charge_state'. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26ab8500_fg: Get rid of 'struct battery_type'Anton Vorontsov
The struct is duplicated, plus causes the following flood: CC drivers/power/ab8500_fg.o ab8500_fg.c: In function ‘ab8500_fg_get_ext_psy_data’: b8500_fg.c:2081:8: warning: assignment from incompatible pointer type [enabled by default] Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26ab8500_fg: Get rid of 'struct v_to_cap'Anton Vorontsov
The struct is duplicated, plus when used it causes the following warnings: CHECK drivers/power/ab8500_fg.c ab8500_fg.c:818:13: warning: incorrect type in assignment (different base types) ab8500_fg.c:818:13: expected struct v_to_cap *tbl ab8500_fg.c:818:13: got struct abx500_v_to_cap *const v_to_cap_tbl CC drivers/power/ab8500_fg.o ab8500_fg.c: In function 'ab8500_fg_volt_to_capacity': ab8500_fg.c:818:6: warning: assignment from incompatible pointer type [enabled by default] Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26ab8500_btemp: Get rid of 'enum adc_therm'Anton Vorontsov
This is the same as abx500_adc_therm, but when the former is used, the following warning flood pops up: drivers/power/ab8500_btemp.c: In function 'ab8500_btemp_batctrl_volt_to_res': ab8500_btemp.c:150:25: warning: comparison between 'enum abx500_adc_therm' and 'enum adc_therm' [-Wenum-compare] ab8500_btemp.c: In function 'ab8500_btemp_curr_source_enable': ab8500_btemp.c:212:25: warning: comparison between 'enum abx500_adc_therm' and 'enum adc_therm' [-Wenum-compare] ab8500_btemp.c:244:32: warning: comparison between 'enum abx500_adc_therm' and 'enum adc_therm' [-Wenum-compare] ab8500_btemp.c: In function 'ab8500_btemp_measure_temp': ab8500_btemp.c:462:25: warning: comparison between 'enum abx500_adc_therm' and 'enum adc_therm' [-Wenum-compare] ab8500_btemp.c: In function 'ab8500_btemp_id': ab8500_btemp.c:528:121: warning: comparison between 'enum abx500_adc_therm' and 'enum adc_therm' [-Wenum-compare] ab8500_btemp.c:551:25: warning: comparison between 'enum abx500_adc_therm' and 'enum adc_therm' [-Wenum-compare] This patch fixes the issue by switching the driver to use more namespace-friendly enum. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26ab8500_charger: Convert to the new USB OTG callsAnton Vorontsov
This patch fixes the following build errors: ab8500_charger.c: In function 'ab8500_charger_remove': ab8500_charger.c:2519:2: error: implicit declaration of function 'otg_unregister_notifier' [-Werror=implicit-function-declaration] ab8500_charger.c:2520:2: error: implicit declaration of function 'otg_put_transceiver' [-Werror=implicit-function-declaration] ab8500_charger.c: In function 'ab8500_charger_probe': ab8500_charger.c:2688:2: error: implicit declaration of function 'otg_get_transceiver' [-Werror=implicit-function-declaration] ab8500_charger.c:2688:10: warning: assignment makes pointer from integer without a cast [enabled by default] ab8500_charger.c:2695:2: error: implicit declaration of function 'otg_register_notifier' [-Werror=implicit-function-declaration] Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
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-26ab8500-fg: A8500 fuel gauge driverArun Murthy
This driver is responsible for provide battery parameters to user space via sysfs by registers to power supply class. It uses fuel gauge and gpadc driver in obtaining the battery parameters. These battery properties are used by abx500 charging algorithm driver to monitor the battery. 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-26ab8500-charger: AB8500 charger driverArun Murthy
This driver is responsible for detecting the ac/usb plugin and also includes function to enable ac/usb charging and re-kick the watchdog. It registers with the power supply class and provides information to the user space. The information include status of ac/usb charger device. This information in turn will be used by the abx500 charging algorithm driver to enable/disable and monitor charging. 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-26abx500-chargalg: Add abx500 charging algorithmArun Murthy
This is a charging algorithm driver for abx500 variants. It is the central entity for battery driver and is responsible for charging and monitoring the battery driver. It is a hardware independant driver and also monitors other abx500 power supply devices. 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-26isp1704_charger: Fix probe error pathFelipe Contreras
We enable power, but don't disable it in case of an error. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26lp8727_charger: Correct typos on the commentKim, Milo
intergrated charger -> integrated charger ^ Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26lp8727_charger: Fix wrong code styleKim, Milo
Definition of STATUS2 : remove space before tabs. Return code of lp8727_is_dedicated_charger(), lp8727_is_usb_charger() : remove parentheses when return is not a function. MODULE_AUTHOR section : remove space at the start of a line. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26lp8727_charger: Change i2c functionsKim, Milo
On writing single byte via i2c, use i2c_smbus_write_byte_data() rather than i2c_smbus_write_i2c_block_data(). Name changes : lp8727_i2c_read() -> lp8727_read_bytes() lp8727_i2c_write() -> removed lp8727_i2c_read_byte() -> lp8727_read_byte() lp8727_i2c_write_byte() -> lp8727_write_byte() Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26lp8727_charger: Add error check routine on probe()Kim, Milo
Add error checking on initializing registers and interrupt handler. Initializing registers - lp8727_init_device() : check i2c error during probing the driver. Initializing interrupt handler - lp8727_intr_config() : check an error on creating the irq thread. If an error occurs on probing lp8727 driver, allocated lp8727 driver memory is freed. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.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-26max17042_battery: Make it possible to instantiate driver from DTKarol Lewandowski
Allow both device tree (preferred) and platform data-based driver instantiation. Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26max17042_battery: Use devm_kzalloc() where applicableKarol Lewandowski
This allows us to simplify probe and exit function. Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26max17042: Change capacity property to use reported SOC registerDirk Brandewie
The SOC register (0dh) reports the state of charge before empty compensation adjustments are applied. The max value reported by this register will decrease as the battery ages. Use the RepSOC register (06h) to report the capacity of the battery. RepSOC contains a filtered version of the battery capacity after empty compensation adjustments have been applied. Reported-by: Gary Keyes <gary.e.keyes@intel.com> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26max17042: Add support for signalling change in SOCRamakrishna Pallala
If platform has the alert pin attached to an interrupt source have the driver signal a change in the SOC every 1 percent. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26max17042: Add POR init procedure from Maxim appnoteRamakrishna Pallala
Add power on reset (POR) init procedure defined by the maxim appnote. Using this procedure ensures that the part is configured/initialized correctly at POR and improves early accuracy of the fuel gauge and informs the fuel gauge with the battery characterization parameters. The battery characterization parameters come from the maxim characterization procedure. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-24Merge tag 'device-for-3.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull <linux/device.h> avoidance patches from Paul Gortmaker: "Nearly every subsystem has some kind of header with a proto like: void foo(struct device *dev); and yet there is no reason for most of these guys to care about the sub fields within the device struct. This allows us to significantly reduce the scope of headers including headers. For this instance, a reduction of about 40% is achieved by replacing the include with the simple fact that the device is some kind of a struct. Unlike the much larger module.h cleanup, this one is simply two commits. One to fix the implicit <linux/device.h> users, and then one to delete the device.h includes from the linux/include/ dir wherever possible." * tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: device.h: audit and cleanup users in main include dir device.h: cleanup users outside of linux/include (C files)
2012-03-24Merge tag 'module-for-3.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull cleanup of fs/ and lib/ users of module.h from Paul Gortmaker: "Fix up files in fs/ and lib/ dirs to only use module.h if they really need it. These are trivial in scope vs the work done previously. We now have things where any few remaining cleanups can be farmed out to arch or subsystem maintainers, and I have done so when possible. What is remaining here represents the bits that don't clearly lie within a single arch/subsystem boundary, like the fs dir and the lib dir. Some duplicate includes arising from overlapping fixes from independent subsystem maintainer submissions are also quashed." Fix up trivial conflicts due to clashes with other include file cleanups (including some due to the previous bug.h cleanup pull). * tag 'module-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: lib: reduce the use of module.h wherever possible fs: reduce the use of module.h wherever possible includecheck: delete any duplicate instances of module.h
2012-03-20Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree from Jiri Kosina: "It's indeed trivial -- mostly documentation updates and a bunch of typo fixes from Masanari. There are also several linux/version.h include removals from Jesper." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits) kcore: fix spelling in read_kcore() comment constify struct pci_dev * in obvious cases Revert "char: Fix typo in viotape.c" init: fix wording error in mm_init comment usb: gadget: Kconfig: fix typo for 'different' Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c" writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header writeback: fix typo in the writeback_control comment Documentation: Fix multiple typo in Documentation tpm_tis: fix tis_lock with respect to RCU Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c" Doc: Update numastat.txt qla4xxx: Add missing spaces to error messages compiler.h: Fix typo security: struct security_operations kerneldoc fix Documentation: broken URL in libata.tmpl Documentation: broken URL in filesystems.tmpl mtd: simplify return logic in do_map_probe() mm: fix comment typo of truncate_inode_pages_range power: bq27x00: Fix typos in comment ...
2012-03-20Merge tag 'usb-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbLinus Torvalds
Pull USB merge for 3.4-rc1 from Greg KH: "Here's the big USB merge for the 3.4-rc1 merge window. Lots of gadget driver reworks here, driver updates, xhci changes, some new drivers added, usb-serial core reworking to fix some bugs, and other various minor things. There are some patches touching arch code, but they have all been acked by the various arch maintainers." * tag 'usb-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (302 commits) net: qmi_wwan: add support for ZTE MF820D USB: option: add ZTE MF820D usb: gadget: f_fs: Remove lock is held before freeing checks USB: option: make interface blacklist work again usb/ub: deprecate & schedule for removal the "Low Performance USB Block" driver USB: ohci-pxa27x: add clk_prepare/clk_unprepare calls USB: use generic platform driver on ath79 USB: EHCI: Add a generic platform device driver USB: OHCI: Add a generic platform device driver USB: ftdi_sio: new PID: LUMEL PD12 USB: ftdi_sio: add support for FT-X series devices USB: serial: mos7840: Fixed MCS7820 device attach problem usb: Don't make USB_ARCH_HAS_{XHCI,OHCI,EHCI} depend on USB_SUPPORT. usb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH USB: ohci-nxp: Remove i2c_write(), use smbus USB: ohci-nxp: Support for LPC32xx USB: ohci-nxp: Rename symbols from pnx4008 to nxp USB: OHCI-HCD: Rename ohci-pnx4008 to ohci-nxp usb: gadget: Kconfig: fix typo for 'different' usb: dwc3: pci: fix another failure path in dwc3_pci_probe() ...
2012-03-11device.h: cleanup users outside of linux/include (C files)Paul Gortmaker
For files that are actively using linux/device.h, make sure that they call it out. This will allow us to clean up some of the implicit uses of linux/device.h within include/* without introducing build regressions. Yes, this was created by "cheating" -- i.e. the headers were cleaned up, and then the fallout was found and fixed, and then the two commits were reordered. This ensures we don't introduce build regressions into the git history. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-03-09Merge 3.3-rc6 into driver-core-nextGreg Kroah-Hartman
This was done to resolve a conflict in the drivers/base/cpu.c file. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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-03-07Revert "power, max8998: Include linux/module.h just once in ↵Jiri Kosina
drivers/power/max8998_charger.c" This reverts commit ce64b8d85de96a1a9538f6dbc960ef592ca05fe8. It is done via moduleh tree as part of a larger cleanup. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
2012-03-01Merge tag 'xceiv-for-v3.4' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next USB: transceiver changes for 3.4 Here we have a big rework done by Heikki Krogerus (thanks) which splits OTG functionality away from transceivers. We have known for quite a long time that struct otg_transceiver was a bad name for the structure, considering transceiver is far from being OTG-specific (see 4e67185).
2012-02-28includecheck: delete any duplicate instances of module.hPaul Gortmaker
Different tree maintainers picked up independently generated trivial compile fixes based on linux-next testing, resulting in some cases where a file would have got more than one addition of module.h once everything was all merged together. Delete any duplicates so includecheck isn't complaining about anything related to module.h/export.h changes. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-02-27usb: otg: mv_otg: Start using struct usb_otgHeikki Krogerus
Use struct usb_otg members with OTG specific functions instead of usb_phy members. [ balbi@ti.com : fixed a compile error on isp1704_charger.c ] Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-21power: bq27x00: Fix typos in commentThomas Weber
Fix two typos in comments. Signed-off-by: Thomas Weber <weber@corscience.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-02-13power_supply: Convert all users to new usb_phyHeikki Krogerus
Use the new usb_phy_* functions instead of the old otg_* ones. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-13usb: otg: Rename otg_transceiver to usb_phyHeikki Krogerus
This is the first step in separating USB transceivers from USB OTG utilities. Includes fixes to IMX code from Sascha Hauer. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Acked-by: Li Yang <leoli@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-10power, max8998: Include linux/module.h just once in ↵Jesper Juhl
drivers/power/max8998_charger.c Remove the duplicate. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-02-01lp8727_charger: Add terminating entry for i2c_device_id tableAxel Lin
The i2c_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-02-01power_supply: Fix modalias for charger-managerAxel Lin
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Current code has the id_table, thus add MODULE_DEVICE_TABLE will automatically setup the modalias. Also make charger_manager_id static as it is only used in this driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-02-01bq27x00_battery: Fix flag register readGrazvydas Ignotas
When reading flags, bq27x00_read() argument is inverted and causes reads 2 of bytes for bq27200 and 1 byte for bq27500, while their register sizes are 1 and 2 bytes respectively. This causes bq27500 upper flag bits always to be returned as 0, causing full charge state to never be reported correctly, so fix it. Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-02-01Revert "bq27x00_battery: Fix reporting status value for bq27500 battery"Anton Vorontsov
This reverts commit 270968c0984aeed096da3cfffb0e131f4c416166. Grazvydas Ignotas wrote: After 270968c0984ae "bq27x00_battery: Fix reporting status value for bq27500 battery" status doesn't seem to be reported correctly when the battery is close to fully charged state. It reports "Not charging" while in fact there is >130mA current flowing to the battery according to current_now. This status report seems to be based on CHG bit in status register, but looking at the datasheet the description says "(Fast) charging allowed", which I guess means that the chip recommends charging and not that charging is actually going on? If you check the bit while battery is discharging and it's not full, the bit is also set. Suggested-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-01-13module_param: make bool parameters really bool (drivers & misc)Rusty Russell
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-01-11Merge git://git.infradead.org/battery-2.6Linus Torvalds
* git://git.infradead.org/battery-2.6: (68 commits) power_supply: Mark da9052 driver as broken power_supply: Drop usage of nowarn variant of sysfs_create_link() s3c_adc_battery: Average over more than one adc sample power_supply: Add DA9052 battery driver isp1704_charger: Fix missing check jz4740-battery: Fix signedness bug power_supply: Assume mains power by default sbs-battery: Fix devicetree match table ARM: rx51: Add bq27200 i2c board info sbs-battery: Change power supply name devicetree-bindings: Propagate bq20z75->sbs rename to dt bindings devicetree-bindings: Add vendor entry for Smart Battery Systems sbs-battery: Rename internals to new name bq20z75: Rename to sbs-battery wm97xx_battery: Use DEFINE_MUTEX() for work_lock max8997_charger: Remove duplicate module.h lp8727_charger: Some minor fixes for the header lp8727_charger: Add header file power_supply: Convert drivers/power/* to use module_platform_driver() power_supply: Add "unknown" in power supply type ...
2012-01-10Merge git://git.infradead.org/users/cbou/battery-urgentAnton Vorontsov