#include <linux/iio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/property.h>
struct ingenic_battery { … };
static int ingenic_battery_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static int ingenic_battery_set_scale(struct ingenic_battery *bat)
{ … }
static enum power_supply_property ingenic_battery_properties[] = …;
static int ingenic_battery_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id ingenic_battery_of_match[] = …;
MODULE_DEVICE_TABLE(of, ingenic_battery_of_match);
#endif
static struct platform_driver ingenic_battery_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;