]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: bq27xxx: move platform driver code into bq27xxx_battery_hdq.c
authorAndrew F. Davis <afd@ti.com>
Wed, 19 Jul 2017 17:04:07 +0000 (12:04 -0500)
committerSebastian Reichel <sre@kernel.org>
Tue, 25 Jul 2017 13:31:21 +0000 (15:31 +0200)
commit1bf60cb6679cb24cfeb2c3f5ce013b56b1f8d358
treebc62f6f2bbd31546c88fe7ed22feea3659767574
parent4f34b17882d20a95b6072bd2fa08a5ae70dfd4cb
power: supply: bq27xxx: move platform driver code into bq27xxx_battery_hdq.c

When the BQ27xxx driver was originally written the w1 subsystem only
allowed device drivers for w1 attached devices to live in the w1
subsystem. Kernel driver subsystems expect that the driver for a device
live in the directory of the subsystem for which it implements
functionality, not in the directory of the bus that it is attached. To
work around this, the BQ27xxx driver was implemented as a platform device
driver and the interface driver would instantiate this device from within
the w1 directory, then pass a w1 read callback as platform data.

As we can now have the w1 interface driver in the power/supply directory
(like we do already with the i2c interface driver) we can remove this
middle-layer platform driver.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/bq27xxx_battery.c
drivers/power/supply/bq27xxx_battery_hdq.c
include/linux/power/bq27xxx_battery.h