#include <linux/module.h>
#include <linux/power_supply.h>
#include <linux/slab.h>
#include <linux/usb.h>
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
#define TRICKLE_CURRENT_MA …
#define FAST_CURRENT_MA …
#define APPLE_VENDOR_ID …
static const struct usb_device_id mfi_fc_id_table[] = …;
MODULE_DEVICE_TABLE(usb, mfi_fc_id_table);
struct mfi_device { … };
static int apple_mfi_fc_set_charge_type(struct mfi_device *mfi,
const union power_supply_propval *val)
{ … }
static int apple_mfi_fc_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static int apple_mfi_fc_set_property(struct power_supply *psy,
enum power_supply_property psp,
const union power_supply_propval *val)
{ … }
static int apple_mfi_fc_property_is_writeable(struct power_supply *psy,
enum power_supply_property psp)
{ … }
static enum power_supply_property apple_mfi_fc_properties[] = …;
static const struct power_supply_desc apple_mfi_fc_desc = …;
static bool mfi_fc_match(struct usb_device *udev)
{ … }
static int mfi_fc_probe(struct usb_device *udev)
{ … }
static void mfi_fc_disconnect(struct usb_device *udev)
{ … }
static struct usb_device_driver mfi_fc_driver = …;
static int __init mfi_fc_driver_init(void)
{ … }
static void __exit mfi_fc_driver_exit(void)
{ … }
module_init(…) …;
module_exit(mfi_fc_driver_exit);