linux/drivers/hwmon/sch56xx-common.c

// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
 *   Copyright (C) 2010-2012 Hans de Goede <[email protected]>           *
 *                                                                         *
 ***************************************************************************/

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/watchdog.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include "sch56xx-common.h"

/* Insmod parameters */
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC();

#define SIO_SCH56XX_LD_EM
#define SIO_UNLOCK_KEY
#define SIO_LOCK_KEY

#define SIO_REG_LDSEL
#define SIO_REG_DEVID
#define SIO_REG_ENABLE
#define SIO_REG_ADDR

#define SIO_SCH5627_ID
#define SIO_SCH5636_ID

#define REGION_LENGTH

#define SCH56XX_CMD_READ
#define SCH56XX_CMD_WRITE

/* Watchdog registers */
#define SCH56XX_REG_WDOG_PRESET
#define SCH56XX_REG_WDOG_CONTROL
#define SCH56XX_WDOG_TIME_BASE_SEC
#define SCH56XX_REG_WDOG_OUTPUT_ENABLE
#define SCH56XX_WDOG_OUTPUT_ENABLE

struct sch56xx_watchdog_data {};

struct sch56xx_bus_context {};

static struct platform_device *sch56xx_pdev;

/* Super I/O functions */
static inline int superio_inb(int base, int reg)
{}

static inline int superio_enter(int base)
{}

static inline void superio_select(int base, int ld)
{}

static inline void superio_exit(int base)
{}

static int sch56xx_send_cmd(u16 addr, u8 cmd, u16 reg, u8 v)
{}

int sch56xx_read_virtual_reg(u16 addr, u16 reg)
{}
EXPORT_SYMBOL();

int sch56xx_write_virtual_reg(u16 addr, u16 reg, u8 val)
{}
EXPORT_SYMBOL();

int sch56xx_read_virtual_reg16(u16 addr, u16 reg)
{}
EXPORT_SYMBOL();

int sch56xx_read_virtual_reg12(u16 addr, u16 msb_reg, u16 lsn_reg,
			       int high_nibble)
{}
EXPORT_SYMBOL();

/*
 * Regmap support
 */

int sch56xx_regmap_read16(struct regmap *map, unsigned int reg, unsigned int *val)
{}
EXPORT_SYMBOL();

int sch56xx_regmap_write16(struct regmap *map, unsigned int reg, unsigned int val)
{}
EXPORT_SYMBOL();

static int sch56xx_reg_write(void *context, unsigned int reg, unsigned int val)
{}

static int sch56xx_reg_read(void *context, unsigned int reg, unsigned int *val)
{}

static void sch56xx_free_context(void *context)
{}

static const struct regmap_bus sch56xx_bus =;

struct regmap *devm_regmap_init_sch56xx(struct device *dev, struct mutex *lock, u16 addr,
					const struct regmap_config *config)
{}
EXPORT_SYMBOL();

/*
 * Watchdog routines
 */

static int watchdog_set_timeout(struct watchdog_device *wddev,
				unsigned int timeout)
{}

static int watchdog_start(struct watchdog_device *wddev)
{}

static int watchdog_trigger(struct watchdog_device *wddev)
{}

static int watchdog_stop(struct watchdog_device *wddev)
{}

static const struct watchdog_ops watchdog_ops =;

void sch56xx_watchdog_register(struct device *parent, u16 addr, u32 revision,
			       struct mutex *io_lock, int check_enabled)
{}
EXPORT_SYMBOL();

/*
 * platform dev find, add and remove functions
 */

static int __init sch56xx_find(int sioaddr, const char **name)
{}

static int __init sch56xx_device_add(int address, const char *name)
{}

static int __init sch56xx_init(void)
{}

static void __exit sch56xx_exit(void)
{}

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

module_init();
module_exit(sch56xx_exit);