summaryrefslogtreecommitdiffstats
path: root/drivers/power
Commit message (Collapse)AuthorAgeFilesLines
* Remove GENERIC_HARDIRQ config optionMartin Schwidefsky2013-09-131-2/+1
| | | | | | | | 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>
* Merge tag 'for-v3.12' of git://git.infradead.org/battery-2.6Linus Torvalds2013-09-1016-17/+2054
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull battery/power supply driver updates from Anton Vorontsov: "New drivers: - APM X-Gene system reboot driver by Feng Kan and Loc Ho (APM). - Qualcomm MSM reboot/poweroff driver by Abhimanyu Kapur (Codeaurora). - Texas Instruments BQ24190 charger driver by Mark A. Greer (Animal Creek Technologies). - Texas Instruments TWL4030 MADC battery driver by Lukas Märdian and Marek Belisko (Golden Delicious Computers). The driver is used on Freerunner GTA04 phones. Highlighted fixes and improvements: - Suspend/wakeup logic improvements: power supply objects will block system suspend until all power supply events are processed. Thanks to Zoran Markovic (Linaro), Arve Hjonnevag and Todd Poynor (Google)" * tag 'for-v3.12' of git://git.infradead.org/battery-2.6: rx51_battery: Fix channel number when reading adc value power: Add twl4030_madc battery driver. bq24190_charger: Workaround SS definition problem on i386 builds power_supply: Prevent suspend until power supply events are processed vexpress-poweroff: Should depend on the required infrastructure twl4030-charger: Fix compiler warning with regulator_enable() rx51_battery: Replace hardcoded channels values. bq24190_charger: Add support for TI BQ24190 Battery Charger ab8500-charger: We print an unintended error message max8925_power: Fix missing of_node_put power_supply: Replace strict_strtol() with kstrtol() power: Add APM X-Gene system reboot driver power_supply: tosa_battery: Get rid of irq_to_gpio usage power supply: collie_battery: Convert to use dev_pm_ops power_supply: Make goldfish_battery depend on GOLDFISH || COMPILE_TEST power: reset: Add msm restart support MAINTAINERS: drivers/power: add entry for SmartReflex AVS drivers
| * rx51_battery: Fix channel number when reading adc valueMarek Belisko2013-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This issue was introduced in commit 8e2747f031bd "power: rx51_battery: Replace hardcoded channels values." Original code use channel as argument which was shifted by one in function. After mentioned commit argument is already shifted so we need to get index back. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power: Add twl4030_madc battery driver.Marek Belisko2013-08-303-0/+253
| | | | | | | | | | | | | | | | | | | | 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>
| * bq24190_charger: Workaround SS definition problem on i386 buildsAnton Vorontsov2013-08-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For __i386__ builds we have: arch/x86/include/uapi/asm/ptrace-abi.h:#define SS 16 And in the driver: BQ24190_SYSFS_FIELD_RO(vbus_stat, SS, VBUS_STAT) That breaks the build like this: drivers/power/bq24190_charger.c:375:138: error: ‘BQ24190_REG_16’ undeclared here (not in a function) drivers/power/bq24190_charger.c:375:162: error: ‘BQ24190_REG_16_THERM_STAT_MASK’ undeclared here (not in a function) drivers/power/bq24190_charger.c:375:203: error: ‘BQ24190_REG_16_THERM_STAT_SHIFT’ undeclared here (not in a function) With this commit we workaround the problem by undefining 'SS'. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power_supply: Prevent suspend until power supply events are processedZoran Markovic2013-08-271-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch, originally authored by Arve Hjonnevag and Todd Poynor, prevents the system from entering suspend mode until the power supply plug, unplug, or any other change of state event is fully processed. This guarantees that the screen lights up and displays the battery charging state. The implementation uses the power supply wakeup_source object. Cc: David Woodhouse <dwmw2@infradead.org> Cc: Arve Hjonnevag <arve@android.com> Cc: Todd Poynor <toddpoynor@google.com> Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: Zoran Markovic <zoran.markovic@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * vexpress-poweroff: Should depend on the required infrastructurePawel Moll2013-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM Versatile Express reset driver requires platform-specific config infrastructure to be present in the kernel. When VEXPRESS_CONFIG is not selected, the build will fail like this: drivers/built-in.o: In function `vexpress_reset_do.clone.0': iio-trig-interrupt.c:(.text+0x1aff38): undefined reference to `__vexpress_config_func_get' iio-trig-interrupt.c:(.text+0x1aff4c): undefined reference to `vexpress_config_write' Added required dependency to the Kconfig entry. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * twl4030-charger: Fix compiler warning with regulator_enable()Peter Ujfalusi2013-08-271-1/+6
| | | | | | | | | | | | | | | | | | | | The return value of regulator_enable need to be checked. This patch fixes the following warning: drivers/power/twl4030_charger.c: In function ‘twl4030_charger_enable_usb’: drivers/power/twl4030_charger.c:192:20: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * rx51_battery: Replace hardcoded channels values.Marek Belisko2013-08-271-4/+8
| | | | | | | | | | | | | | | | In twl4030_madc header exist defines for fixed channels + add rx51 specific channels and replace all hardcoded channels values. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * bq24190_charger: Add support for TI BQ24190 Battery ChargerMark A. Greer2013-08-273-0/+1553
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ab8500-charger: We print an unintended error messageDan Carpenter2013-08-271-0/+1
| | | | | | | | | | | | | | | | | | There is a missing break statement here, so we print an error message that the USB type is invalid. The original code still works fine though except for the error message. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * max8925_power: Fix missing of_node_putLibo Chen2013-08-271-0/+1
| | | | | | | | | | | | | | Decrease np device_node refcount after we are done with the node. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power_supply: Replace strict_strtol() with kstrtol()Jingoo Han2013-08-091-1/+1
| | | | | | | | | | | | | | | | The usage of strict_strtol() is not preferred, because strict_strtol() is obsolete. Thus, kstrtol() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power: Add APM X-Gene system reboot driverLoc Ho2013-08-093-0/+111
| | | | | | | | | | | | | | | | | | | | | | Add APM X-Gene SoC system reboot driver. This driver handles only system reboot. System shutdown is board specific and can be handled by board driver or GPIO based shutdown driver. Signed-off-by: Loc Ho <lho@apm.com> Signed-off-by: Feng Kan <fkan@apm.com> Signed-off-by: Kumar Sankaran <ksankaran@apm.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power_supply: tosa_battery: Get rid of irq_to_gpio usageAndrea Adami2013-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes the following error: linux/drivers/power/tosa_battery.c:153:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration] Since 9d08d5d77a355510c2f5657c86b0a4b25acfe72c, irq_to_gpio() is no longer available but still in use by collie_battery.c. As it's just for a debug message, just get rid of this call. Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power supply: collie_battery: Convert to use dev_pm_opsAndrea Adami2013-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes the following warnings: linux/drivers/power/collie_battery.c:372:2: warning: initialization from incompatible pointer type [enabled by default] linux/drivers/power/collie_battery.c:372:2: warning: (near initialization for 'collie_bat_driver.suspend') [enabled by default] Referencess: MFD: ucb1x00-core: convert to use dev_pm_ops https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/include/linux/mfd?id=5a09b7120a965a7d7e8494d0ed509135bbce0118 MFD: mcp-core: remove legacy driver suspend/resume methods https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/include/linux/mfd?id=cf4abfcc0df2985ff6061f74e63b8353f2a1d0bc Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power_supply: Make goldfish_battery depend on GOLDFISH || COMPILE_TESTPaul Gortmaker2013-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: reset: Add msm restart supportAbhimanyu Kapur2013-08-093-0/+80
| | | | | | | | | | | | | | | | | | | | Add support for restart and poweroff functionality present on MSM chipsets with the MPM2 ps-hold hardware. Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org> Tested-by: Ivan T. Ivanov <iivanov@mm-sol.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
* | treewide: Fix typo in printkMasanari Iida2013-08-202-3/+3
|/ | | | | | | | Correct spelling typo in printk Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge tag 'for-v3.11' of git://git.infradead.org/battery-2.6Linus Torvalds2013-07-1021-124/+191
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull battery subsystem update from Anton Vorontsov: "Nothing exciting this time, just assorted fixes and cleanups" * tag 'for-v3.11' of git://git.infradead.org/battery-2.6: (25 commits) charger-manager: Fix regulator_get() return check charger-manager: Fix a bug when it unregisters notifier block of extcon tps65090-charger: Add dt node to power_supply sbs-battery: Add dt to power_supply struct power_supply: Add of_node_put to fix refcount power_supply: Move of_node out of the #ifdef CONFIG_OF power/reset: Make the vexpress driver optional on arm and arm64 charger-manager: Add missing newlines, fix a couple of typos, add pr_fmt tps65090-charger: Fix AC detect MAINTAINERS: Update email address for Anton Vorontsov charger-manager: Ensure event is not used as format string power_supply: Replace strict_strtoul() with kstrtoul() generic-adc-battery: Fix checking if none of the channels are supported power: Use platform_{get,set}_drvdata() pm2301_charger: Return error if create_singlethread_workqueue fails pm2301_charger: Fix NULL pointer dereference lp8727_charger: Support the device tree feature twl4030_charger: Remove unnecessary platform_set_drvdata() rx51_battery: Remove unnecessary platform_set_drvdata() jz4740-battery: Remove unnecessary platform_set_drvdata() ...
| * charger-manager: Fix regulator_get() return checkJonghwa Lee2013-06-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | This patch fixes return value checking of regulator_get() in charger-manager driver. The API, regulator_get(), returns ERR_PTR() when it fails to get regulator with given name, not NULL. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * charger-manager: Fix a bug when it unregisters notifier block of extconJonghwa Lee2013-06-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch prevents NULL pointer error cauesed by unregistering unregistered exton notifier block. At the probing time of charger manager, it tries to remove extcon notifier block when it fails to initialize them. It has to be applied for only registered one. Otherwise, it'd make kernel panic. To make it work right, it checks extcon_specific_cable_nb's extcon_dev node. If extcon cable notifier block was registered successfully, it has proper extcon_dev pointer if not so it has NULL pointer. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * tps65090-charger: Add dt node to power_supplyRhyland Klein2013-06-281-0/+1
| | | | | | | | | | | | | | | | | | Passing in the dt node for this charger enables the logic in the core to lookup this device, to see if it is supplying another power_supply, through dt. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * sbs-battery: Add dt to power_supply structRhyland Klein2013-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | By passing in the dt node of this device, we enable the logic for linking power_supplies together from dt. This is specified by adding a "power-supplies" property with a phandle to the charger for a given supply. Enable this logic now for the sbs-battery driver. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power_supply: Add of_node_put to fix refcountRhyland Klein2013-06-281-0/+4
| | | | | | | | | | | | | | | | | | of_parse_phandle increments the refcount for a dt node before returning it. Add of_node_put where needed to properly decrement the refcount when we are done using a given node. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power/reset: Make the vexpress driver optional on arm and arm64Pawel Moll2013-06-211-1/+2
| | | | | | | | | | | | | | | | | | | | The driver can be used on either arm or arm64 platforms, but the latter doesn't have any platform-specific configuration options, so it must be possible to manually enable the driver. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * charger-manager: Add missing newlines, fix a couple of typos, add pr_fmtJoe Perches2013-06-091-80/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that dev_<level> calls are newline terminated. Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt to prefix all pr_<level> calls with "charger-manager: " Fix a couple of typos. Fix formats with terminating n that should be \n. Coalesce formats for easier grep. Align arguments to open parenthesis for these dev_<level> calls. Add missing spaces after coalescing multiple string segments. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * tps65090-charger: Fix AC detectAndrew Chew2013-06-091-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VACG interrupt was not being enabled. Thus, interrupts were never generated when AC status changes. In addition, interrupts were never cleared after taking and processing the interrupt. Added the register offset for the INTR_MASK register, since this is needed to unmask the VACG interrupt. Enabled the VACG interrupt in tps65090_config_charger(). Cleared interrupts after processing, in tps65090_charger_isr(). Also removed unused variable "enable" in tps65090_enable_charging(), and fixed a typo in one of the dev_err() prints. Signed-off-by: Andrew Chew <achew@nvidia.com> Tested-by: Rhyland Klein <rklein@nvidia.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * charger-manager: Ensure event is not used as format stringKees Cook2013-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The exposed interface for cm_notify_event() could result in the event msg string being parsed as a format string. Make sure it is only used as a literal string. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power_supply: Replace strict_strtoul() with kstrtoul()Jingoo Han2013-06-062-7/+7
| | | | | | | | | | | | | | | | | | The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * generic-adc-battery: Fix checking if none of the channels are supportedAxel Lin2013-06-061-1/+3
| | | | | | | | | | | | | | | | | | If none of the channels are supported, index is 0. Also ensure to return error code instead of 0 in goto second_mem_fail path. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: anish kumar <anish198519851985@gmail.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * power: Use platform_{get,set}_drvdata()Jingoo Han2013-06-062-3/+3
| | | | | | | | | | | | | | | | | | Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * pm2301_charger: Return error if create_singlethread_workqueue failsAxel Lin2013-06-061-2/+2
| | | | | | | | | | | | | | | | Return error instead of 0 if create_singlethread_workqueue call fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * pm2301_charger: Fix NULL pointer dereferenceAxel Lin2013-06-061-1/+6
| | | | | | | | | | | | | | | | | | | | Add checking pl_data in probe, this prevent possible NULL pointer dereference. Also fix NULL pointer deference in dev_err when allocate memory for pm2 fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * lp8727_charger: Support the device tree featureKim, Milo2013-06-061-0/+68
| | | | | | | | | | | | | | | | | | The interrupt and charging parameters are configurable in the device tree structure. In the board test, a GPIO is used for handling LP8727 interrupts. The device tree binding documentation is added also. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * twl4030_charger: Remove unnecessary platform_set_drvdata()Jingoo Han2013-06-061-2/+0
| | | | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * rx51_battery: Remove unnecessary platform_set_drvdata()Jingoo Han2013-06-061-4/+1
| | | | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * jz4740-battery: Remove unnecessary platform_set_drvdata()Jingoo Han2013-06-061-3/+1
| | | | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * gpio-charger: Remove unnecessary platform_set_drvdata()Jingoo Han2013-06-061-2/+0
| | | | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * bq27x00_battery: Remove unnecessary platform_set_drvdata()Jingoo Han2013-06-061-2/+0
| | | | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * ab8500_bm: Remove unnecessary platform_set_drvdata()Jingoo Han2013-06-064-5/+0
| | | | | | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * 88pm860x_charger: Remove unnecessary platform_set_drvdata()Jingoo Han2013-06-061-1/+0
| | | | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
| * 88pm860x_battery: Remove unnecessary platform_set_drvdata()Jingoo Han2013-06-061-1/+0
| | | | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
* | reboot: arm: change reboot_mode to use enum reboot_modeRobin Holt2013-07-092-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preparing to move the parsing of reboot= to generic kernel code forces the change in reboot_mode handling to use the enum. [akpm@linux-foundation.org: fix arch/arm/mach-socfpga/socfpga.c] Signed-off-by: Robin Holt <holt@sgi.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Russ Anderson <rja@sgi.com> Cc: Robin Holt <holt@sgi.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | PM / AVS: SmartReflex: use devm_* API to initialize SmartReflexAndrii Tseglytskyi2013-06-101-55/+21
| | | | | | | | | | | | | | | | | | | | | | Use of of devm_* API for resource allocation provides benefits such as auto handling of resource free. This reduces possibility have memory leaks in case of wrong error handling. All direct release calls should be removed to avoid races. Reported-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com> Signed-off-by: Kevin Hilman <khilman@linaro.org>
* | PM / AVS: SmartReflex: use omap_sr * for enable/disable interfaceAndrii Tseglytskyi2013-06-101-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <andrii.tseglytskyi@ti.com> Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Kevin Hilman <khilman@linaro.org>
* | PM / AVS: SmartReflex: use omap_sr * for minmax interfacesAndrii Tseglytskyi2013-06-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <andrii.tseglytskyi@ti.com> Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Kevin Hilman <khilman@linaro.org>
* | PM / AVS: SmartReflex: use omap_sr * for errgen interfacesAndrii Tseglytskyi2013-06-101-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <andrii.tseglytskyi@ti.com> Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Kevin Hilman <khilman@linaro.org>
* | PM / AVS: SmartReflex: fix driver nameAndrii Tseglytskyi2013-06-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | DRIVER_NAME was undefined for SmartReflex. Now it is defined with valid value "smartreflex". It is needed to define proper value for: MODULE_ALIAS("platform:" DRIVER_NAME); Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com> Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Kevin Hilman <khilman@linaro.org>
* | PM / AVS: SmartReflex: disable runtime PM on driver removeAndrii Tseglytskyi2013-06-101-0/+1
| | | | | | | | | | | | | | | | | | | | Runtime PM should be disabled for device on driver remove, otherwise runtime PM will be not balanced, and this will cause an error message, on next driver probe. Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com> Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Kevin Hilman <khilman@linaro.org>
OpenPOWER on IntegriCloud