linux/drivers/hwmon/smsc47b397.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * smsc47b397.c - Part of lm_sensors, Linux kernel modules
 * for hardware monitoring
 *
 * Supports the SMSC LPC47B397-NC Super-I/O chip.
 *
 * Author/Maintainer: Mark M. Hoffman <[email protected]>
 * Copyright (C) 2004 Utilitek Systems, Inc.
 *
 * derived in part from smsc47m1.c:
 * Copyright (C) 2002 Mark D. Studebaker <[email protected]>
 * Copyright (C) 2004 Jean Delvare <[email protected]>
 */

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/jiffies.h>
#include <linux/platform_device.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/mutex.h>
#include <linux/acpi.h>
#include <linux/io.h>

static unsigned short force_id;
module_param(force_id, ushort, 0);
MODULE_PARM_DESC();

static struct platform_device *pdev;

#define DRVNAME

/* Super-I/0 registers and commands */

#define REG
#define VAL

static inline void superio_outb(int reg, int val)
{}

static inline int superio_inb(int reg)
{}

/* select superio logical device */
static inline void superio_select(int ld)
{}

static inline int superio_enter(void)
{}

static inline void superio_exit(void)
{}

#define SUPERIO_REG_DEVID
#define SUPERIO_REG_DEVREV
#define SUPERIO_REG_BASE_MSB
#define SUPERIO_REG_BASE_LSB
#define SUPERIO_REG_LD8

#define SMSC_EXTENT

/* 0 <= nr <= 3 */
static u8 smsc47b397_reg_temp[] =;
#define SMSC47B397_REG_TEMP(nr)

/* 0 <= nr <= 3 */
#define SMSC47B397_REG_FAN_LSB(nr)
#define SMSC47B397_REG_FAN_MSB(nr)

struct smsc47b397_data {};

static int smsc47b397_read_value(struct smsc47b397_data *data, u8 reg)
{}

static struct smsc47b397_data *smsc47b397_update_device(struct device *dev)
{}

/*
 * TEMP: 0.001C/bit (-128C to +127C)
 * REG: 1C/bit, two's complement
 */
static int temp_from_reg(u8 reg)
{}

static ssize_t temp_show(struct device *dev, struct device_attribute *devattr,
			 char *buf)
{}

static SENSOR_DEVICE_ATTR_RO(temp1_input, temp, 0);
static SENSOR_DEVICE_ATTR_RO(temp2_input, temp, 1);
static SENSOR_DEVICE_ATTR_RO(temp3_input, temp, 2);
static SENSOR_DEVICE_ATTR_RO(temp4_input, temp, 3);

/*
 * FAN: 1 RPM/bit
 * REG: count of 90kHz pulses / revolution
 */
static int fan_from_reg(u16 reg)
{}

static ssize_t fan_show(struct device *dev, struct device_attribute *devattr,
			char *buf)
{}
static SENSOR_DEVICE_ATTR_RO(fan1_input, fan, 0);
static SENSOR_DEVICE_ATTR_RO(fan2_input, fan, 1);
static SENSOR_DEVICE_ATTR_RO(fan3_input, fan, 2);
static SENSOR_DEVICE_ATTR_RO(fan4_input, fan, 3);

static struct attribute *smsc47b397_attrs[] =;

ATTRIBUTE_GROUPS();

static int smsc47b397_probe(struct platform_device *pdev);

static struct platform_driver smsc47b397_driver =;

static int smsc47b397_probe(struct platform_device *pdev)
{}

static int __init smsc47b397_device_add(unsigned short address)
{}

static int __init smsc47b397_find(void)
{}

static int __init smsc47b397_init(void)
{}

static void __exit smsc47b397_exit(void)
{}

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

module_init();
module_exit(smsc47b397_exit);