diff options
author | 2017-07-19 12:04:07 -0500 | |
---|---|---|
committer | 2017-07-25 15:31:21 +0200 | |
commit | 67bd22c09ac1b54b5f42445783d2dc8e011f7a71 (patch) | |
tree | bc62f6f2bbd31546c88fe7ed22feea3659767574 /include/linux/power | |
parent | Merge branch 'psy-w1-for-v4.14-immutable' into for-next (diff) | |
download | linux-67bd22c09ac1b54b5f42445783d2dc8e011f7a71.tar.gz linux-67bd22c09ac1b54b5f42445783d2dc8e011f7a71.tar.bz2 linux-67bd22c09ac1b54b5f42445783d2dc8e011f7a71.zip |
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>
Diffstat (limited to 'include/linux/power')
-rw-r--r-- | include/linux/power/bq27xxx_battery.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h index 11e11685dd1d..89890437f9ab 100644 --- a/include/linux/power/bq27xxx_battery.h +++ b/include/linux/power/bq27xxx_battery.h @@ -20,23 +20,6 @@ enum bq27xxx_chip { BQ27421, /* bq27421, bq27425, bq27441, bq27621 */ }; -/** - * struct bq27xxx_plaform_data - Platform data for bq27xxx devices - * @name: Name of the battery. - * @chip: Chip class number of this device. - * @read: HDQ read callback. - * This function should provide access to the HDQ bus the battery is - * connected to. - * The first parameter is a pointer to the battery device, the second the - * register to be read. The return value should either be the content of - * the passed register or an error value. - */ -struct bq27xxx_platform_data { - const char *name; - enum bq27xxx_chip chip; - int (*read)(struct device *dev, unsigned int); -}; - struct bq27xxx_device_info; struct bq27xxx_access_methods { int (*read)(struct bq27xxx_device_info *di, u8 reg, bool single); |