Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24ae4472 authored by Amit Kucheria's avatar Amit Kucheria Committed by Eduardo Valentin
Browse files

drivers: thermal: tsens: Rename tsens_device



Rename to tsens_priv to denote that it is private data for each tsens
instance.

Signed-off-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 3c040ce0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
#define CAL_SEL_MASK	0xe0000000
#define CAL_SEL_SHIFT	29

static int calibrate_8916(struct tsens_device *tmdev)
static int calibrate_8916(struct tsens_priv *tmdev)
{
	int base0 = 0, base1 = 0, i;
	u32 p1[5], p2[5];
+7 −7
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@
#define TRDY_MASK		BIT(7)
#define TIMEOUT_US		100

static int suspend_8960(struct tsens_device *tmdev)
static int suspend_8960(struct tsens_priv *tmdev)
{
	int ret;
	unsigned int mask;
@@ -82,7 +82,7 @@ static int suspend_8960(struct tsens_device *tmdev)
	return 0;
}

static int resume_8960(struct tsens_device *tmdev)
static int resume_8960(struct tsens_priv *tmdev)
{
	int ret;
	struct regmap *map = tmdev->tm_map;
@@ -112,7 +112,7 @@ static int resume_8960(struct tsens_device *tmdev)
	return 0;
}

static int enable_8960(struct tsens_device *tmdev, int id)
static int enable_8960(struct tsens_priv *tmdev, int id)
{
	int ret;
	u32 reg, mask;
@@ -138,7 +138,7 @@ static int enable_8960(struct tsens_device *tmdev, int id)
	return 0;
}

static void disable_8960(struct tsens_device *tmdev)
static void disable_8960(struct tsens_priv *tmdev)
{
	int ret;
	u32 reg_cntl;
@@ -162,7 +162,7 @@ static void disable_8960(struct tsens_device *tmdev)
	regmap_write(tmdev->tm_map, CNTL_ADDR, reg_cntl);
}

static int init_8960(struct tsens_device *tmdev)
static int init_8960(struct tsens_priv *tmdev)
{
	int ret, i;
	u32 reg_cntl;
@@ -212,7 +212,7 @@ static int init_8960(struct tsens_device *tmdev)
	return 0;
}

static int calibrate_8960(struct tsens_device *tmdev)
static int calibrate_8960(struct tsens_priv *tmdev)
{
	int i;
	char *data;
@@ -243,7 +243,7 @@ static inline int code_to_mdegC(u32 adc_code, const struct tsens_sensor *s)
	return adc_code * slope + offset;
}

static int get_temp_8960(struct tsens_device *tmdev, int id, int *temp)
static int get_temp_8960(struct tsens_priv *tmdev, int id, int *temp)
{
	int ret;
	u32 code, trdy;
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@

#define BIT_APPEND		0x3

static int calibrate_8974(struct tsens_device *tmdev)
static int calibrate_8974(struct tsens_priv *tmdev)
{
	int base1 = 0, base2 = 0, i;
	u32 p1[11], p2[11];
+3 −3
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ char *qfprom_read(struct device *dev, const char *cname)
 * and offset values are derived from tz->tzp->slope and tz->tzp->offset
 * resp.
 */
void compute_intercept_slope(struct tsens_device *tmdev, u32 *p1,
void compute_intercept_slope(struct tsens_priv *tmdev, u32 *p1,
			     u32 *p2, u32 mode)
{
	int i;
@@ -95,7 +95,7 @@ static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s)
	return degc;
}

int get_temp_common(struct tsens_device *tmdev, int id, int *temp)
int get_temp_common(struct tsens_priv *tmdev, int id, int *temp)
{
	struct tsens_sensor *s = &tmdev->sensor[id];
	u32 code;
@@ -127,7 +127,7 @@ static const struct regmap_config tsens_srot_config = {
	.reg_stride	= 4,
};

int __init init_common(struct tsens_device *tmdev)
int __init init_common(struct tsens_priv *tmdev)
{
	void __iomem *tm_base, *srot_base;
	struct resource *res;
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
#define LAST_TEMP_MASK		0xfff
#define STATUS_VALID_BIT	BIT(21)

static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp)
static int get_temp_tsens_v2(struct tsens_priv *tmdev, int id, int *temp)
{
	struct tsens_sensor *s = &tmdev->sensor[id];
	u32 code;
Loading