linux/drivers/hwmon/pmbus/fsp-3y.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Hardware monitoring driver for FSP 3Y-Power PSUs
 *
 * Copyright (c) 2021 Václav Kubernát, CESNET
 *
 * This driver is mostly reverse engineered with the help of a tool called pmbus_peek written by
 * David Brownell (and later adopted by Jan Kundrát). The device has some sort of a timing issue
 * when switching pages, details are explained in the code. The driver support is limited. It
 * exposes only the values, that have been tested to work correctly. Unsupported values either
 * aren't supported by the devices or their encondings are unknown.
 */

#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include "pmbus.h"

#define YM2151_PAGE_12V_LOG
#define YM2151_PAGE_12V_REAL
#define YM2151_PAGE_5VSB_LOG
#define YM2151_PAGE_5VSB_REAL
#define YH5151E_PAGE_12V_LOG
#define YH5151E_PAGE_12V_REAL
#define YH5151E_PAGE_5V_LOG
#define YH5151E_PAGE_5V_REAL
#define YH5151E_PAGE_3V3_LOG
#define YH5151E_PAGE_3V3_REAL

enum chips {};

struct fsp3y_data {};

#define to_fsp3y_data(x)

static int page_log_to_page_real(int page_log, enum chips chip)
{}

static int set_page(struct i2c_client *client, int page_log)
{}

static int fsp3y_read_byte_data(struct i2c_client *client, int page, int reg)
{}

static int fsp3y_read_word_data(struct i2c_client *client, int page, int phase, int reg)
{}

static struct pmbus_driver_info fsp3y_info[] =;

static int fsp3y_detect(struct i2c_client *client)
{}

static const struct i2c_device_id fsp3y_id[] =;

static int fsp3y_probe(struct i2c_client *client)
{}

MODULE_DEVICE_TABLE(i2c, fsp3y_id);

static struct i2c_driver fsp3y_driver =;

module_i2c_driver();

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