#define pr_fmt(fmt) …
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/gpio/machine.h>
#include <linux/gpio/consumer.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/platform_data/x86/simatic-ipc-base.h>
#include <linux/sizes.h>
#include "simatic-ipc-batt.h"
#define BATT_DELAY_MS …
#define SIMATIC_IPC_BATT_LEVEL_FULL …
#define SIMATIC_IPC_BATT_LEVEL_CRIT …
#define SIMATIC_IPC_BATT_LEVEL_EMPTY …
static struct simatic_ipc_batt { … } priv;
static long simatic_ipc_batt_read_gpio(void)
{ … }
#define SIMATIC_IPC_BATT_PORT_BASE …
static struct resource simatic_ipc_batt_io_res = …;
static long simatic_ipc_batt_read_io(struct device *dev)
{ … }
static long simatic_ipc_batt_read_value(struct device *dev)
{ … }
static int simatic_ipc_batt_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static umode_t simatic_ipc_batt_is_visible(const void *data, enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static const struct hwmon_ops simatic_ipc_batt_ops = …;
static const struct hwmon_channel_info *simatic_ipc_batt_info[] = …;
static const struct hwmon_chip_info simatic_ipc_batt_chip_info = …;
void simatic_ipc_batt_remove(struct platform_device *pdev, struct gpiod_lookup_table *table)
{ … }
EXPORT_SYMBOL_GPL(…);
int simatic_ipc_batt_probe(struct platform_device *pdev, struct gpiod_lookup_table *table)
{ … }
EXPORT_SYMBOL_GPL(…);
static void simatic_ipc_batt_io_remove(struct platform_device *pdev)
{ … }
static int simatic_ipc_batt_io_probe(struct platform_device *pdev)
{ … }
static struct platform_driver simatic_ipc_batt_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;