summaryrefslogtreecommitdiffstats
path: root/drivers/power
Commit message (Collapse)AuthorAgeFilesLines
...
* | power: supply: bq24735: bring down the noise levelPeter Rosin2017-01-041-1/+1
| | | | | | | | | | | | | | | | | | If there is no ti,ac-detect-gpios configured, it is normal to have failed reads of the options register. So, hold back on the log spamming. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: bq24735: allow polling even if there is no ac-detect gpioPeter Rosin2017-01-041-1/+1
| | | | | | | | | | | | | | | | | | It is possible to verify AC adapter presence via a register read, without any physical connection to the ACOK pin on the charger. Allow this. Signed-off-by: Peter Rosin <peda@axentia.se> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Use one notifier_block per extcon cableHans de Goede2017-01-041-9/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this commit the code was using 1 notifier_block for all types of charger cable, this is incorrect as the notifier_block becomes part of a linked-list and now the same notifier_block is part of 3 linked lists. This commit fixes this by using a separate nb per extcon cable. Note this happened to work fine sofar because axp288_charger was the only listener, so when added to each of the 3 notifier chains, the next pointer in the nb would be set to 0, so we've 3 heads pointing to the same nb, with its next pointing to NULL. But as soon as we mix in a second extcon consumer things will go boom. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Fix the module not auto-loadingHans de Goede2017-01-041-0/+7
| | | | | | | | | | | | | | Add a MODULE_DEVICE_TABLE to fix the module not auto-loading. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Remove unnecessary irq?_en register writesHans de Goede2017-01-041-32/+0
| | | | | | | | | | | | | | | | | | Setting the irq_enable bits is taken care of by the irq chip when we request the irqs and the driver should not be meddling with the irq?_en registers itself. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Fix wrong regmap_update_bitsHans de Goede2017-01-041-1/+1
| | | | | | | | | | | | | | | | To set a bit to 1 one needs to pass the mask for the bit to set as second argument into regmap_update_bits, not "1". Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Get and process initial hardware-stateHans de Goede2017-01-041-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | Do not wait for an extcon notification before processing the cable states, instead queue the otg / cable work on probe to make sure we immediately process the initial hardware state. Note this also requiree moving the getting of the USB_HOST cable state from the extcon notifier to the workqueue function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Some minor cleanupsHans de Goede2017-01-041-18/+5
| | | | | | | | | | | | | | | | | | | | | | | | Remove info->health, info->present and info->online caching, as no code is reading the cached values. Remove if (changed) check before calling power_supply_changed(), we return early from axp288_charger_extcon_evt_worker if nothing has changed, so the check is not needed. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Handle charger type changing without disconnectHans de Goede2017-01-041-18/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deal with the charger type changing without a vbus-disconnect being reported in between the 2 charger type states: -Do not return from axp288_charger_extcon_evt_worker early in this case (track old_chg_type) -Make calling axp288_charger_enable_charger with the same value as before a nop, to avoid the need for the caller to check this -Do no do a dev_err when axp288_charger_enable_charger returns an error, axp288_charger_enable_charger already returns an error itself -Disable the charger before changing the charge-current setting (nop if vbus was seen as disconnected before the change) Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Actually get and use the USB_HOST extcon deviceHans de Goede2017-01-041-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing was setting info->otg.cable, so the extcon_get_cable_state_ calls on it would always return -EINVAL. This commit fixes this by actually setting info->otg.cable using the new extcon_get_extcon_dev_by_cable_id function. This commit also makes failing to register the extcon notifier for the USB_HOST cable an error rather then a warning, because we MUST have this notfier to properly disable the VBUS path when in host mode so that we're not drawing current from the 5V boost converter which is supplying power to the otg port when in host mode. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Move init_hw_regs call before supply registrationHans de Goede2017-01-041-4/+4
| | | | | | | | | | | | | | | | | | Move the charger_init_hw_regs() above the power_supply_register call, the axp288_charger_usb_set_property() uses axp288_chrg_info.max_cv and .max_cc which get set by charger_init_hw_regs(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Register extcon notifers after power_supplyHans de Goede2017-01-041-27/+15
| | | | | | | | | | | | | | | | | | | | | | | | The extcon notifier work calls power_supply_changed on the power_supply we register, so the extcon notifiers should be registered after we register the power_supply. While touching this code anyways, refactor the code for the 3 cable types into a loop to avoid code repetition. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Use devm_power_supply_registerHans de Goede2017-01-041-23/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Use devm_power_supply_register instead of power_supply_register, this avoids the need to do manual cleanup and results in quite a nice code cleanup. Note it may seem excessive to add a "struct device *dev" helper local variable for the 1 time it is used in this patch, but future patches in this series also use it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | Merge branch 'psy-mfd-axp288-immutable' into psy-nextSebastian Reichel2017-01-042-441/+96
|\ \
| * | power: supply: axp288_fuel_gauge: Drop platform_data dependencyHans de Goede2017-01-041-372/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the axp288_faul_gauge driver was originally merged, it was merged with a dependency on some other driver providing platform data for it. However the battery-data-framework which should provide that data never got merged, resulting in x86 tablets / laptops with an axp288 having no working battery monitor, as before this commit the driver would simply return -ENODEV if there is no platform data. This commit removes the dependency on the platform_data instead checking that the firmware has initialized the fuel-gauge and reading the info back from the pmic. What is missing from the read-back info is the table to map raw adc values to temperature, so this commit drops the temperature and temperature limits properties. The min voltage, charge design and model name info is also missing. Note that none of these are really important for userspace to have. All other functionality is preserved and actually made available by this commit. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=88471 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * | power: supply: axp288_charger: Drop platform_data dependencyHans de Goede2017-01-041-58/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the axp288_charger driver was originally merged, it was merged with a dependency on some other driver providing platform data for it. However the battery-data-framework which should provide that data never got merged, so the axp288_charger as merged upstream has never worked, its probe method simply always returns -ENODEV. This commit removes the dependency on the platform_data instead reading back the charging current and charging voltage that the firmware has set and using those values as the maximum values the user may set. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * | power: supply: axp288_charger: Make charger_init_hw_regs propagate i2c errorsHans de Goede2017-01-041-20/+42
| |/ | | | | | | | | | | | | | | Make charger_init_hw_regs propagate i2c errors, instead of only warning about them and then ignoring them. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: add sbs-charger driverNicolas Saenz Julienne2017-01-043-0/+281
| | | | | | | | | | | | | | | | | | | | | | This adds support for sbs-charger compilant chips as defined here: http://sbs-forum.org/specs/sbc110.pdf This was tested on a arm board connected to an LTC4100 battery charger chip. Signed-off-by: Nicolas Saenz Julienne <nicolas.saenz@prodys.net> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: bq24735: always check for AC adapter presence in probePeter Rosin2017-01-041-4/+1
| | | | | | | | | | | | | | | | | | | | | | So what if there is a status_gpio specified? bq24735_charger_is_present() do have a working fallback for the case of no status_gpio. Simplify this by not special casing setups w/o status_gpio, folding two consecutive if-blocks in the process. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: bq24735: configure the charger as part of enabling itPeter Rosin2017-01-041-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During probe, it makes no sense to take care to first not issue any i2c commands to verify if the connected part really is a bq24735, to later simply fail the probe in the next step when trying to configure the charger. So, delay configuration of the charging parameters until the charger is accessible (i.e. when the AC adapter is present) as part of enabling the charging. This also fixes the rather serious issue that the charging parameters are lost when the AC adapter is disconnected. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: bq24735: move down bq24735_{en,dis}able_chargingPeter Rosin2017-01-041-19/+19
| | | | | | | | | | | | | | | | bq24735_enable_charging() needs to call bq24735_config_charging(), which is something to change later, this is just a preparatory patch. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: tps65217: Use generic charger nameMilo Kim2017-01-041-1/+1
| | | | | | | | | | | | | | | | "tps65217-charger" is more appropriate name because the driver supports not only AC but also USB charger. Signed-off-by: Milo Kim <woogyom.kim@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: tps65217: Use generic name for get_property()Milo Kim2017-01-041-4/+4
| | | | | | | | | | | | | | Rename it as tps65217_charger_get_property(). Signed-off-by: Milo Kim <woogyom.kim@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: tps65217: Use generic name for power supply propertyMilo Kim2017-01-041-3/+3
| | | | | | | | | | | | | | Replace 'ac_props' with 'charger_props'. Signed-off-by: Milo Kim <woogyom.kim@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: tps65217: Use generic name for power supply structureMilo Kim2017-01-041-7/+7
| | | | | | | | | | | | | | Replace 'ac' of tps65217_charger structure with 'psy'. Signed-off-by: Milo Kim <woogyom.kim@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: tps65217: Use generic name for charger onlineMilo Kim2017-01-041-8/+8
| | | | | | | | | | | | | | | | This driver supports AC and USB chargers. Generic name is preferred. Replace 'ac_online' with 'online'. Signed-off-by: Milo Kim <woogyom.kim@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: tps65217: Support USB charger interruptMilo Kim2017-01-041-24/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TPS65217 has two charger interrupts - AC and USB power status change. Interrupt number in the TPS65217 driver data: IRQ number is only used on requesting the interrupt, so no need to keep it inside the driver data. Interrupt handler: Check not only AC but also USB charger status. In both cases, enable charging operation. Interrupt request: If an interrupt number is invalid, then use legacy polling thread. Otherwise, create IRQ threads to handle AC and USB charger event. Signed-off-by: Milo Kim <woogyom.kim@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: tps65217: Use 'poll_task' on unloading the moduleMilo Kim2017-01-041-5/+8
| | | | | | | | | | | | | | | | | | | | Use the task_struct variable for running polling thread. If polling task is activated, then use it to stop running thread. This is a preceding step of supporting two interrupts of TPS65217 charger, so checking single IRQ number is not appropriate when the module is removed. Signed-off-by: Milo Kim <woogyom.kim@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: qcom_smbb: Replace the deprecated extcon APIChanwoo Choi2017-01-041-1/+1
| | | | | | | | | | | | | | | | This patch replaces the deprecated extcon API as following: - extcon_set_cable_state_() -> extcon_set_state_sync() Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_charger: Replace the extcon APIChanwoo Choi2017-01-041-38/+13
| | | | | | | | | | | | | | | | | | This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: max8997_charger: Using device managed API and remove OOM printSrikant Ritolia2017-01-041-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Use managed resource function devm_power_supply_register instead of power_supply_register to simplify the error path by allowing unregistering to happen automatically on error and remove. Removing max8997_battery_remove function also as it is now redundant. Also removing out of memory printk message after kzalloc as there is already enough information on failure. Signed-off-by: Srikant Ritolia <s.ritolia@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp20x_usb_power: add 100mA max current limit for AXP223Quentin Schulz2017-01-041-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | The X-Powers AXP223 shares most of its behaviour with the AXP221 PMIC but allows the VBUS power supply max current to be set to 100mA (like the AXP209 PMIC). This basically adds a new compatible to the VBUS power supply driver and adds a check on the compatible when setting current max limit. Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp20x_usb_power: set min voltage and max current from sysfsQuentin Schulz2017-01-041-0/+81
| | | | | | | | | | | | | | | | | | AXP20X and AXP22X PMICs allow setting the min voltage and max current of VBUS power supply. This adds entries in sysfs to allow to do so. Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp20x_usb_power: use of_device_id data field instead of ↵Quentin Schulz2017-01-041-11/+15
| | | | | | | | | | | | | | | | | | | | | | device_is_compatible This replaces calls to of_device_is_compatible to check data field of of_device_id matched when probing the driver. Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: bq24735-charger: optionally poll the ac-detect gpioPeter Rosin2017-01-041-5/+44
| | | | | | | | | | | | | | | | | | If the ac-detect gpio does not support interrupts, provide a fallback to poll the gpio at a configurable interval. Signed-off-by: Peter Rosin <peda@axentia.se> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_fuel_gauge: Read 12 bit values 2 registers at a timeHans de Goede2017-01-041-18/+22
| | | | | | | | | | | | | | | | | | | | In order for the MSB -> LSB latching to work correctly we must read the 2 8 bit registers of a 12 bit value in one consecutive read. This fixes voltage_ocv reporting inconsistent values on my tablet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_fuel_gauge: Read 15 bit values 2 registers at a timeHans de Goede2017-01-041-29/+34
| | | | | | | | | | | | | | | | | | | | | | In order for the MSB -> LSB latching to work correctly we must read the 2 8 bit registers of a 15 bit value in one consecutive read. This fixes charge_full reporting 3498768 on some reads and 3354624 one other reads on my tablet (for the 3354624 value the raw LSB is 0x00). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: axp288_fuel_gauge: Fix fuel_gauge_reg_readb return on errorHans de Goede2017-01-041-1/+3
| | | | | | | | | | | | | | | | If reading the register fails, return the actual error code, instead of the uninitialized val variable; Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: supply: bq24735-charger: simplify register update to stop chargingPeter Rosin2017-01-041-2/+1
|/ | | | | | | Providing value bits outside of the mask is pointless. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* ktime: Cleanup ktime_set() usageThomas Gleixner2016-12-251-1/+1
| | | | | | | | | | ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
* Merge tag 'for-v4.10' of ↵Linus Torvalds2016-12-1419-63/+214
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - new driver for Intel PIIX4 - lots of module autoload fixes - misc fixes * tag 'for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power_supply: wm97xx_battery: use power_supply_get_drvdata wm8350_power: use permission-specific DEVICE_ATTR variants power: ipaq_micro_battery: fix alias power: supply: bq27xxx_battery: Fix register map for BQ27510 and BQ27520 bq24190_charger: Fix PM runtime use for bq24190_battery_set_property power: supply: lp8788: remove an unneeded NULL check power: reset: zx-reboot: Fix module autoload power: reset: syscon-reboot-mode: Fix module autoload power: reset: at91-poweroff: Fix module autoload power: reset: at91-reset: Fix module autoload power: supply: axp288_fuel_gauge: Fix module autoload power: supply: max8997_charger: Fix module autoload power: supply: max17040: Change register transaction length from 8 bits to 16 bits power: supply: bq27xxx_battery: don't update poll_interval param if same power: supply: improve function-level documentation power: reset: Add Intel PIIX4 poweroff driver
| * power_supply: wm97xx_battery: use power_supply_get_drvdataRobert Jarzmik2016-11-231-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | As the power supply framework provides a way to store and retrieve private supply data, use it. In the process, change the platform data for wm97xx_battery from a container of a single struct wm97xx_batt_pdata to the direct point to wm97xx_batt_pdata. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * wm8350_power: use permission-specific DEVICE_ATTR variantsJulia Lawall2016-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use DEVICE_ATTR_RO for read only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @ro@ declarer name DEVICE_ATTR; identifier x,x_show; @@ DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); @script:ocaml@ x << ro.x; x_show << ro.x_show; @@ if not (x^"_show" = x_show) then Coccilib.include_match false @@ declarer name DEVICE_ATTR_RO; identifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power: ipaq_micro_battery: fix aliasRussell King2016-11-231-1/+1
| | | | | | | | | | | | | | | | The alias for the ipaq_micro_battery driver is incorrect, fix it so the module can be auto-loaded. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power: supply: bq27xxx_battery: Fix register map for BQ27510 and BQ27520Andrew F. Davis2016-11-232-3/+42
| | | | | | | | | | | | | | | | | | | | The BQ27510 and BQ27520 use a slightly different register map than the BQ27500, add a new type enum and add these gauges to it. Fixes: d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices") Based-on-patch-by: Kenneth R. Crudup <kenny@panix.com> Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * bq24190_charger: Fix PM runtime use for bq24190_battery_set_propertyTony Lindgren2016-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | There's a typo, it should do pm_runtime_get_sync, not put. Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger") Cc: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power: supply: lp8788: remove an unneeded NULL checkDan Carpenter2016-10-191-3/+0
| | | | | | | | | | | | | | | | | | We checked that "pdata->chg_params" is non-NULL earlier in this function so when we add "i" to it, it's still non-NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power: reset: zx-reboot: Fix module autoloadJavier Martinez Canillas2016-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/power/reset/zx-reboot.ko | grep alias $ After this patch: $ modinfo drivers/power/reset/zx-reboot.ko | grep alias alias: of:N*T*Czte,sysctrlC* alias: of:N*T*Czte,sysctrl Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power: reset: syscon-reboot-mode: Fix module autoloadJavier Martinez Canillas2016-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/power/reset/syscon-reboot-mode.ko | grep alias $ After this patch: $ modinfo drivers/power/reset/syscon-reboot-mode.ko | grep alias alias: of:N*T*Csyscon-reboot-modeC* alias: of:N*T*Csyscon-reboot-mode Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power: reset: at91-poweroff: Fix module autoloadJavier Martinez Canillas2016-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/power/reset/at91-poweroff.ko | grep alias $ After this patch: $ modinfo drivers/power/reset/at91-poweroff.ko | grep alias alias: of:N*T*Catmel,at91sam9x5-shdwcC* alias: of:N*T*Catmel,at91sam9x5-shdwc alias: of:N*T*Catmel,at91sam9rl-shdwcC* alias: of:N*T*Catmel,at91sam9rl-shdwc alias: of:N*T*Catmel,at91sam9260-shdwcC* alias: of:N*T*Catmel,at91sam9260-shdwc Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
OpenPOWER on IntegriCloud