#define pr_fmt(fmt) …
#include <linux/completion.h>
#include <linux/device.h>
#include <linux/hwmon.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/types.h>
#include <linux/usb.h>
#define DRIVER_NAME …
#define POWERZ_EP_CMD_OUT …
#define POWERZ_EP_DATA_IN …
struct powerz_sensor_data { … } __packed;
struct powerz_priv { … };
static const struct hwmon_channel_info *const powerz_info[] = …;
static umode_t powerz_is_visible(const void *data, enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static int powerz_read_string(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, const char **str)
{ … }
static void powerz_usb_data_complete(struct urb *urb)
{ … }
static void powerz_usb_cmd_complete(struct urb *urb)
{ … }
static int powerz_read_data(struct usb_device *udev, struct powerz_priv *priv)
{ … }
static int powerz_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static const struct hwmon_ops powerz_hwmon_ops = …;
static const struct hwmon_chip_info powerz_chip_info = …;
static int powerz_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void powerz_disconnect(struct usb_interface *intf)
{ … }
static const struct usb_device_id powerz_id_table[] = …;
MODULE_DEVICE_TABLE(usb, powerz_id_table);
static struct usb_driver powerz_driver = …;
module_usb_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;