#include <linux/delay.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/iio/consumer.h>
#include <linux/iio/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
struct lego_ev3_battery { … };
static int lego_ev3_battery_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static int lego_ev3_battery_set_property(struct power_supply *psy,
enum power_supply_property psp,
const union power_supply_propval *val)
{ … }
static int lego_ev3_battery_property_is_writeable(struct power_supply *psy,
enum power_supply_property psp)
{ … }
static enum power_supply_property lego_ev3_battery_props[] = …;
static const struct power_supply_desc lego_ev3_battery_desc = …;
static int lego_ev3_battery_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id of_lego_ev3_battery_match[] = …;
MODULE_DEVICE_TABLE(of, of_lego_ev3_battery_match);
static struct platform_driver lego_ev3_battery_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;