diff --git a/drivers/i2c/busses/i2c-nvvrs11.c b/drivers/i2c/busses/i2c-nvvrs11.c index bdf30f6a..ec5a9899 100644 --- a/drivers/i2c/busses/i2c-nvvrs11.c +++ b/drivers/i2c/busses/i2c-nvvrs11.c @@ -6,7 +6,6 @@ */ #include -#include #include #include #include @@ -14,11 +13,36 @@ #include #include #include +#include #include #define VOLTAGE_OFFSET 200 // 0.2V #define VOLTAGE_SCALE 5 // 5mV +/* Vendor ID */ +#define NVVRS11_REG_VENDOR_ID 0x00 +#define NVVRS11_REG_MODEL_REV 0x01 + +/* Voltage Output registers */ +#define NVVRS11_REG_VOUT_A 0x30 +#define NVVRS11_REG_VOUT_B 0x33 + +/* Current Output registers */ +#define NVVRS11_REG_IOUT_A 0x31 +#define NVVRS11_REG_IOUT_B 0x34 + +/* Temperature registers */ +#define NVVRS11_REG_TEMP_A 0x32 +#define NVVRS11_REG_TEMP_B 0x35 + +struct nvvrs11_chip { + struct device *dev; + struct regmap *rmap; + struct i2c_client *client; + const char *loopA_rail_name; + const char *loopB_rail_name; +}; + static const struct regmap_range nvvrs11_readable_ranges[] = { regmap_reg_range(NVVRS11_REG_VENDOR_ID, NVVRS11_REG_MODEL_REV), regmap_reg_range(NVVRS11_REG_VOUT_A, NVVRS11_REG_TEMP_B), diff --git a/include/linux/i2c-nvvrs11.h b/include/linux/i2c-nvvrs11.h deleted file mode 100644 index a47ed74b..00000000 --- a/include/linux/i2c-nvvrs11.h +++ /dev/null @@ -1,37 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Defining registers address and its bit definitions of NVVRS11 - * - * Copyright (C) 2022-2023 NVIDIA CORPORATION. All rights reserved. - */ - -#ifndef _LINUX_I2C_NVVRS11_H_ -#define _LINUX_I2C_NVVRS11_H_ - -#include - -/* Vendor ID */ -#define NVVRS11_REG_VENDOR_ID 0x00 -#define NVVRS11_REG_MODEL_REV 0x01 - -/* Voltage Output registers */ -#define NVVRS11_REG_VOUT_A 0x30 -#define NVVRS11_REG_VOUT_B 0x33 - -/* Current Output registers */ -#define NVVRS11_REG_IOUT_A 0x31 -#define NVVRS11_REG_IOUT_B 0x34 - -/* Temperature registers */ -#define NVVRS11_REG_TEMP_A 0x32 -#define NVVRS11_REG_TEMP_B 0x35 - -struct nvvrs11_chip { - struct device *dev; - struct regmap *rmap; - struct i2c_client *client; - const char *loopA_rail_name; - const char *loopB_rail_name; -}; - -#endif /* _LINUX_I2C_NVVRS11_H_ */