i2c: nvvrs11: Remove header file

The header file for the NVIDIA I2C NVRS11 driver is only used by this
driver and so remove the header and include the necessary definitions in
the driver source. This avoids having to distribute a header file along
with the main source file.

Bug 4008099

Change-Id: I7ff0e426e74810e34e94ee9ffa28923f40485715
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2893965
(cherry picked from commit 6e467aeef7848ad55b55b176b89c7fd14c34586d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894562
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Shubhi Garg <shgarg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2023-04-25 15:13:15 +01:00
committed by mobile promotions
parent 71462faf01
commit a809f2cfb5
2 changed files with 25 additions and 38 deletions

View File

@@ -6,7 +6,6 @@
*/ */
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-nvvrs11.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/of.h> #include <linux/of.h>
@@ -14,11 +13,36 @@
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/types.h>
#include <linux/version.h> #include <linux/version.h>
#define VOLTAGE_OFFSET 200 // 0.2V #define VOLTAGE_OFFSET 200 // 0.2V
#define VOLTAGE_SCALE 5 // 5mV #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[] = { static const struct regmap_range nvvrs11_readable_ranges[] = {
regmap_reg_range(NVVRS11_REG_VENDOR_ID, NVVRS11_REG_MODEL_REV), regmap_reg_range(NVVRS11_REG_VENDOR_ID, NVVRS11_REG_MODEL_REV),
regmap_reg_range(NVVRS11_REG_VOUT_A, NVVRS11_REG_TEMP_B), regmap_reg_range(NVVRS11_REG_VOUT_A, NVVRS11_REG_TEMP_B),

View File

@@ -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 <linux/types.h>
/* 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_ */