#include <linux/device.h>
#include <linux/devm-helpers.h>
#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <soc/bcm2835/raspberrypi-firmware.h>
#define UNDERVOLTAGE_STICKY_BIT …
struct rpi_hwmon_data { … };
static void rpi_firmware_get_throttled(struct rpi_hwmon_data *data)
{ … }
static void get_values_poll(struct work_struct *work)
{ … }
static int rpi_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static umode_t rpi_is_visible(const void *_data, enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static const struct hwmon_channel_info * const rpi_info[] = …;
static const struct hwmon_ops rpi_hwmon_ops = …;
static const struct hwmon_chip_info rpi_chip_info = …;
static int rpi_hwmon_probe(struct platform_device *pdev)
{ … }
static struct platform_driver rpi_hwmon_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;