summaryrefslogtreecommitdiff
path: root/drivers/power/supply
AgeCommit message (Collapse)AuthorFilesLines
2016-11-24power_supply: wm97xx_battery: use power_supply_get_drvdataRobert Jarzmik1-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>
2016-11-24wm8350_power: use permission-specific DEVICE_ATTR variantsJulia Lawall1-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>
2016-11-24power: ipaq_micro_battery: fix aliasRussell King1-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>
2016-11-24power: supply: bq27xxx_battery: Fix register map for BQ27510 and BQ27520Andrew F. Davis2-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>
2016-11-24bq24190_charger: Fix PM runtime use for bq24190_battery_set_propertyTony Lindgren1-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>
2016-10-19power: supply: lp8788: remove an unneeded NULL checkDan Carpenter1-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>
2016-10-19power: supply: axp288_fuel_gauge: Fix module autoloadJavier Martinez Canillas1-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/supply/axp288_fuel_gauge.ko | grep alias $ After this patch: $ modinfo drivers/power/supply/axp288_fuel_gauge.ko | grep alias alias: platform:axp288_fuel_gauge Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-10-19power: supply: max8997_charger: Fix module autoloadJavier Martinez Canillas1-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/supply/max8997_charger.ko | grep alias $ After this patch: $ modinfo drivers/power/supply/max8997_charger.ko | grep alias alias: platform:max8997-battery Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-10-19power: supply: max17040: Change register transaction length from 8 bits to ↵Liu Xiang1-32/+20
16 bits According to the datasheet, MAX17040 has six 16-bit registers. Register reads and writes are only valid if all 16 bits are transferred. Any write command that is terminated early is ignored. So it's better to change register transacton length from 8 bits to 16 bits. Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-10-19power: supply: bq27xxx_battery: don't update poll_interval param if sameMatt Ranostay1-1/+2
To avoid canceling the delayed workqueue needlessly, and scheduling an immediate polling. Check if the new poll_interval value is different than the previous setting. Cc: Tony Lindgren <tony@atomide.com> Cc: Sebastian Reichel <sre@kernel.org> Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-10-19power: supply: improve function-level documentationJulia Lawall2-6/+6
In drivers/power/supply/ab8500_fg.c, fix two typos and adjust the function name in two cases to correspond to the names of the defined functions. In drivers/power/supply/power_supply_core.c, change two variable names to the names of the corresponding parameters. Issue detected using Coccinelle (http://coccinelle.lip6.fr/) Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-09-21power: supply: bq27xxx_battery: allow kernel poll_interval parameter runtime ↵Matt Ranostay1-1/+37
update Fix issue with poll_interval being not updated till the previous interval expired. Cc: Tony Lindgren <tony@atomide.com> Cc: Liam Breck <liam@networkimprov.net> Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-09-21power: supply: sbs-battery: Cleanup removal of chip->pdataPhil Reid1-13/+9
There where still a few lingering references to pdata after commit power: supply: sbs-battery: simplify DT parsing. Remove pdata from struct·sbs_info and conditional checks to ser if this was set from the i2c read / write functions. Instead of call max in each function for incrementing poll_retry_count do it once in the probe function. Fixup null pointer dereference in to pdata in sbs_external_power_changed. Change retry counts to u32 to avoid need for max. Signed-off-by: Phil Reid <preid@electromag.com.au> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-09-19power: supply: ab8500: cleanup with list_first_entry_or_null()Masahiro Yamada1-7/+2
The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-09-19sbs-battery: make writes to ManufacturerAccess optionalGuenter Roeck1-14/+15
According to the Smart Battery Data Specification, the use of ManufacturerAcess (register 0x0) is implementation-defined. It appears that some batteries use writes to this register in order to implement certain functionality, but others may simply NAK all writes to it. As a result, write failures to ManufacturerAccess should not be used as an indicator of battery presence, nor as a failure to enter sleep mode. The failed write access was seen with SANYO AP13J3K. Cc: Brian Norris <briannorris@chromium.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-09-19power: bq24257: Fix use of uninitialized pointer bq->chargerGeorges Savoundararadj1-6/+6
bq->charger is initialized in bq24257_power_supply_init. Therefore, bq24257_power_supply_init should be called before the registration of the IRQ handler bq24257_irq_handler_thread that calls power_supply_changed(bq->charger). Signed-off-by: Georges Savoundararadj <savoundg@gmail.com> Cc: Aurelien Chanot <chanot.a@gmail.com> Cc: Andreas Dannenberg <dannenberg@ti.com> Cc: Sebastian Reichel <sre@kernel.org> Cc: David Woodhouse <dwmw2@infradead.org> Fixes: 2219a935963e ("power_supply: Add TI BQ24257 charger driver") Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-09-07power: supply: sbs-battery: simplify DT parsingArnd Bergmann1-67/+31
After the change to use the gpio descriptor interface, we get a warning if -Wmaybe-uninitialized is added back to the build flags (it is currently disabled: drivers/power/supply/sbs-battery.c: In function 'sbs_probe': drivers/power/supply/sbs-battery.c:760:28: error: 'pdata' may be used uninitialized in this function [-Werror=maybe-uninitialized] The problem is that if neither the DT properties nor a platform_data pointer are provided, the chip->pdata pointer gets set to an uninitialized value. Looking at the code some more, I found that the sbs_of_populate_pdata function is more complex than necessary and has confusing calling conventions of possibly returning a valid pointer, a NULL pointer or an ERR_PTR pointer (in addition to the uninitialized pointer). To fix all of that, this gets rid of the chip->pdata pointer and simply moves the two integers into the sbs_info structure. This makes it much clearer from reading sbs_probe() what the precedence of the three possible values are (pdata, DT, hardcoded defaults) and completely avoids the #ifdef CONFIG_OF guards as of_property_read_u32() gets replaced with a compile-time stub when that is disabled, and returns an error if passed a NULL of_node pointer. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 3b5dd3a49496 ("power: supply: sbs-battery: Use gpio_desc and sleeping calls for battery detect") Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-09-05power: supply: bq24735-charger: Request status GPIO with initial input setupPaul Kocialkowski1-27/+12
This requests the status GPIO with initial input setup. It is required to read the GPIO status at probe time and thus correctly avoid sending I2C messages when AC is not plugged. When requesting the GPIO without initial input setup, it always reads 0 which causes probe to fail as it assumes the charger is connected, sends I2C messages and fails. While at it, this switches the driver over to gpiod API. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-09-01power: supply: sbs-battery: Use gpio_desc and sleeping calls for battery detectPhil Reid1-67/+34
Switch to using new gpio_desc interface and devm gpio get calls to automatically manage gpio resource. Use gpiod_get_value which handles active high / low calls. If gpio_detect is set then force loading of the driver as it is reasonable to assume that the battery may not be present. Update the is_present flag immediately in the IRQ. Remove legacy gpio specification from platform data. Signed-off-by: Phil Reid <preid@electromag.com.au> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-09-01power: supply: act8945a_charger: Add max current propertyWenyou Yang1-9/+80
Add the power supply's current max property, POWER_SUPPLY_PROP_CURRENT_MAX. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-09-01power: supply: act8945a_charger: Add capacity level propertyWenyou Yang1-1/+78
Add the power supply capacity level property, it corresponds to POWER_SUPPLY_CAPACITY_LEVEL_*. It also utilizes the precision voltage detector function module to catch the low battery voltage. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-31power: supply: act8945a_charger: Fix the power supply typeWenyou Yang1-9/+39
The power supply type property is varying as the external power supply changes. It is not a constant. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-31power: supply: act8945a_charger: Add status change update supportWenyou Yang1-7/+88
Add the charger status change interrupt support, it will report the power supply changed event. This interrupt is generated by one of the conditions as below: - the state machine jumps out of or into the EOC state - the CHGIN input voltage goes out of or into the valid range. - the battery temperature goes out of or into the valid range. - the PRECHARGE time-out occurs. - the total charge time-out occurs. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-31power: supply: act8945a_charger: Improve state handlingWenyou Yang1-16/+70
When get the property, first check the charger state machine, then check the status bit to decide what value is assigned to the corresponding property. Retain the SUSCHG bit of REG 0x71 when configure the timers to avoid losting the charger suspending info after boot. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-31power: supply: act8945a_charger: Remove "battery_temperature"Wenyou Yang1-9/+3
Remove "battery_temperature" member, it is redundant, it is the hardware's responsibility to handle TH pin properly. It is unnecessary to use the dt property to check if there is a battery temperature monitor or not. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-31power: supply: act8945a_charger: Achieve properties from its nodeWenyou Yang1-2/+2
Since the act8945a_charger is regarded as a sub-device, all properties will be assigned to its own device node. All properties can be achieved from its own node, instead of from its parent device. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-29power: bq24735-charger: Assume not charging when charger is missingPaul Kocialkowski1-1/+5
When the charger is missing (disconnected), it is safe to assume that the charger chip is no charging. This is especially relevant when a status GPIO is present and the charger is getting disconnected. bq24735_charger_is_charging will be triggered due to the interrupt then, it will attempt to read whether it is charging through i2c, which will fail as the charger is disconnected. This also fixes that specific issue. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-17power: supply: Change Krzysztof Kozlowski's email to kernel.orgKrzysztof Kozlowski2-4/+4
Change my email address to kernel.org instead of Samsung one for the purpose of any future contact. The copyrights remain untouched and are attributed to Samsung. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16Merge tag 'for-v4.8-rc' into psy-nextSebastian Reichel2-6/+10
Power Supply Fixes for 4.8 cycle
2016-08-16power: ds2760_battery: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-1/+2
alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "monitor_wqueue" is used to monitor the battery status. It has been identity converted. It queues multiple work items viz &di->monitor_work, &di->set_charged_work, which require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16power: ab8500_fg: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-1/+1
alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "fg_wq" is used for running the FG algorithm periodically. It has been identity converted. It has multiple work items viz fg_periodic_work, fg_low_bat_work, fg_reinit_work, fg_work, fg_acc_cur_work and fg_check_hw_failure_work, which require execution ordering. Hence, a dedicated ordered workqueue has been used here. The WQ_MEM_RECLAIM flag has been set to guarantee forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16power: ipaq_micro_battery: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-1/+1
The workqueue "wq" is used for handling battery related tasks. It has a single work item viz &mb->update and hence it doesn't require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Since there is a single work item, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16power: ab8500_charger: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-2/+2
alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "charger_wq" is used for the IRQs and checking HW state of the charger. It has been identity converted. It has multiple work items viz usb_charger_attached_work, kick_wd_work, check_vbat_work, check_hw_failure_work, usb_charger_attached_work, ac_work, ac_charger_attached_work, attach_work and check_usbchgnotok_work, which require execution ordering. Hence, a dedicated ordered workqueue has been used here. The WQ_MEM_RECLAIM flag has also been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16power: intel_mid_battery: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-2/+1
The workqueue "monitor_wqueue" is used to monitor the PMIC battery status. It queues a single work item (pbi->monitor_battery) and hence doesn't require ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. Since PMIC battery status needs to be monitored for any change, the WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Since there is a single work item, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16power: pm2301_charger: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-1/+2
alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "charger_wq" is used for running all the charger related tasks. This involves charger detection, checking for HW failure and HW status. This workqueue has been identity converted. It queues multiple workitems viz &pm2->check_main_thermal_prot_work, &pm2->check_hw_failure_work, &pm2->ac_work. Hence, the deprecated create_singlethread_workqueue() instance has been replaced with a dedicated ordered workqueue. The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16power: ab8500_btemp: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-1/+1
The workqueue "btemp_wq" is used for measuring the temperature periodically. It queues a single workitem (btemp_periodic_work) and hence doesn't require ordering. Thus, the deprecated create_singlethread_workqueue() instance has been replaced with alloc_workqueue(). The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Since there is a single work item, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16power: abx500_chargalg: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar1-2/+2
alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "chargalg_wq" is used for running the charging algorithm. It has multiple workitems viz &di->chargalg_periodic_work, &di->chargalg_wd_work, &di->chargalg_work per abx500_chargalg, which require ordering. It has been identity converted. Also, WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16power: axp288_charger: remove duplicated include from axp288_charger.cWei Yongjun1-1/+0
Remove duplicated include. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16power: axp288_fuel_gauge: remove duplicated include from axp288_fuel_gauge.cWei Yongjun1-1/+0
Remove duplicated include. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16power: z2_battery: remove .owner field for driverWei Yongjun1-1/+0
Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-16sbs-battery: add ability to get battery capacityJoshua Clayton1-1/+22
Battery capacity level is a standard feature of sbs battery That can be used to tell what the remainig battery capacity is, and can tell if the battery has not been calibrated/initialized, which makes the capacity and charging/discharging percentages invalid. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-15power: sbs-battery: Use devm_power_supply_registerPhil Reid1-3/+1
Use devm_power_supply_register instead of power_supply_register. Remove call to power_supply_unregister. Signed-off-by: Phil Reid <preid@electromag.com.au> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-15power: sbs-battery: Request threaded irq and fix dev callback cookiePhil Reid1-10/+4
Currently the battery detect gpio can not be used with a chained interrupt controller that requires threaded irq handlers. Use threaded irq instead. In addition this was not going to be working at present because chip->power_supply is assigned after the request irq call. Signed-off-by: Phil Reid <preid@electromag.com.au> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-15power: sbs-battery: Use devm_kzalloc to alloc dataPhil Reid1-6/+1
Use devm_kzalloc to allow memory to be freed automatically on driver probe failure or removal. Signed-off-by: Phil Reid <preid@electromag.com.au> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-15power:bq27xxx: 27000/10 read FLAGS register as singleH. Nikolaus Schaller1-2/+3
The bq27000 and bq27010 have a single byte FLAGS register. Other gauges have 16 bit FLAGS registers. For reading the FLAGS register it is sufficient to read the single register instead of reading RSOC at the next higher address as well and then ignore the high byte. This does not change functionality but optimizes i2c and hdq traffic. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-15power_supply: tps65217-charger: Add support for IRQsMarcin Niestroj1-7/+33
Make use of IRQ resources defined in tps65217 mfd code. If they are valid we use them instead separate poll task, in order to define AC power state. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-08-11power: move power supply drivers to power/supplySebastian Reichel77-0/+57275
This moves all power supply drivers from drivers/power/ to drivers/power/supply/. The intention is a cleaner source tree, since drivers/power/ also contains frameworks unrelated to power supply, like adaptive voltage scaling. Signed-off-by: Sebastian Reichel <sre@kernel.org>