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)
commit67bd22c09ac1b54b5f42445783d2dc8e011f7a71
treebc62f6f2bbd31546c88fe7ed22feea3659767574
parentc8143b72888c551bc4119f52d818343945f969d4
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