linux/drivers/hwmon/cros_ec_hwmon.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  ChromeOS EC driver for hwmon
 *
 *  Copyright (C) 2024 Thomas Weißschuh <[email protected]>
 */

#include <linux/device.h>
#include <linux/hwmon.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/platform_data/cros_ec_commands.h>
#include <linux/platform_data/cros_ec_proto.h>
#include <linux/types.h>
#include <linux/units.h>

#define DRV_NAME

struct cros_ec_hwmon_priv {};

static int cros_ec_hwmon_read_fan_speed(struct cros_ec_device *cros_ec, u8 index, u16 *speed)
{}

static int cros_ec_hwmon_read_temp(struct cros_ec_device *cros_ec, u8 index, u8 *temp)
{}

static bool cros_ec_hwmon_is_error_fan(u16 speed)
{}

static bool cros_ec_hwmon_is_error_temp(u8 temp)
{}

static long cros_ec_hwmon_temp_to_millicelsius(u8 temp)
{}

static int cros_ec_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
			      u32 attr, int channel, long *val)
{}

static int cros_ec_hwmon_read_string(struct device *dev, enum hwmon_sensor_types type,
				     u32 attr, int channel, const char **str)
{}

static umode_t cros_ec_hwmon_is_visible(const void *data, enum hwmon_sensor_types type,
					u32 attr, int channel)
{}

static const struct hwmon_channel_info * const cros_ec_hwmon_info[] =;

static const struct hwmon_ops cros_ec_hwmon_ops =;

static const struct hwmon_chip_info cros_ec_hwmon_chip_info =;

static void cros_ec_hwmon_probe_temp_sensors(struct device *dev, struct cros_ec_hwmon_priv *priv,
					     u8 thermal_version)
{}

static void cros_ec_hwmon_probe_fans(struct cros_ec_hwmon_priv *priv)
{}

static int cros_ec_hwmon_probe(struct platform_device *pdev)
{}

static const struct platform_device_id cros_ec_hwmon_id[] =;

static struct platform_driver cros_ec_hwmon_driver =;
module_platform_driver();

MODULE_DEVICE_TABLE(platform, cros_ec_hwmon_id);
MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();