#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/platform_data/mlxreg.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/string_helpers.h>
#include <linux/regmap.h>
#include <linux/workqueue.h>
#define MLXREG_HOTPLUG_EVENT_OFF …
#define MLXREG_HOTPLUG_MASK_OFF …
#define MLXREG_HOTPLUG_AGGR_MASK_OFF …
#define MLXREG_HOTPLUG_GOOD_HEALTH_MASK …
#define MLXREG_HOTPLUG_ATTRS_MAX …
#define MLXREG_HOTPLUG_NOT_ASSERT …
struct mlxreg_hotplug_priv_data { … };
static char *mlxreg_hotplug_udev_envp[] = …;
static int
mlxreg_hotplug_udev_event_send(struct kobject *kobj,
struct mlxreg_core_data *data, bool action)
{ … }
static void
mlxreg_hotplug_pdata_export(void *pdata, void *regmap)
{ … }
static int mlxreg_hotplug_device_create(struct mlxreg_hotplug_priv_data *priv,
struct mlxreg_core_data *data,
enum mlxreg_hotplug_kind kind)
{ … }
static void
mlxreg_hotplug_device_destroy(struct mlxreg_hotplug_priv_data *priv,
struct mlxreg_core_data *data,
enum mlxreg_hotplug_kind kind)
{ … }
static ssize_t mlxreg_hotplug_attr_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
#define PRIV_ATTR(i) …
#define PRIV_DEV_ATTR(i) …
static int mlxreg_hotplug_item_label_index_get(u32 mask, u32 bit)
{ … }
static int mlxreg_hotplug_attr_init(struct mlxreg_hotplug_priv_data *priv)
{ … }
static void
mlxreg_hotplug_work_helper(struct mlxreg_hotplug_priv_data *priv,
struct mlxreg_core_item *item)
{ … }
static void
mlxreg_hotplug_health_work_helper(struct mlxreg_hotplug_priv_data *priv,
struct mlxreg_core_item *item)
{ … }
static void mlxreg_hotplug_work_handler(struct work_struct *work)
{ … }
static int mlxreg_hotplug_set_irq(struct mlxreg_hotplug_priv_data *priv)
{ … }
static void mlxreg_hotplug_unset_irq(struct mlxreg_hotplug_priv_data *priv)
{ … }
static irqreturn_t mlxreg_hotplug_irq_handler(int irq, void *dev)
{ … }
static int mlxreg_hotplug_probe(struct platform_device *pdev)
{ … }
static void mlxreg_hotplug_remove(struct platform_device *pdev)
{ … }
static struct platform_driver mlxreg_hotplug_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;