[v2,07/14] thermal: mvebu: Rename kirkwood definitions to mvebu
diff mbox

Message ID 1363991114-4225-8-git-send-email-ezequiel.garcia@free-electrons.com
State Rejected
Delegated to: Zhang Rui
Headers show

Commit Message

Ezequiel Garcia March 22, 2013, 10:25 p.m. UTC
This definitions will be also valid for other SoC,
such as Armada 370 and Armada XP. Therefore we rename them as 'mvebu'.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/thermal/mvebu_thermal.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

Comments

Eduardo Valentin April 11, 2013, 4:43 p.m. UTC | #1
On 22-03-2013 18:25, Ezequiel Garcia wrote:
> This definitions will be also valid for other SoC,
> such as Armada 370 and Armada XP. Therefore we rename them as 'mvebu'.
>

I believe it is appropriated to squash this one to your patch v2 02/14.

> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
>
> ---
> drivers/thermal/mvebu_thermal.c |   16 ++++++++--------
>   1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/thermal/mvebu_thermal.c b/drivers/thermal/mvebu_thermal.c
> index 0c9344d..39ddded 100644
> --- a/drivers/thermal/mvebu_thermal.c
> +++ b/drivers/thermal/mvebu_thermal.c
> @@ -22,10 +22,10 @@
>   #include <linux/platform_device.h>
>   #include <linux/thermal.h>
>
> -#define KIRKWOOD_THERMAL_VALID_OFFSET	9
> -#define KIRKWOOD_THERMAL_VALID_MASK	0x1
> -#define KIRKWOOD_THERMAL_TEMP_OFFSET	10
> -#define KIRKWOOD_THERMAL_TEMP_MASK	0x1FF
> +#define MVEBU_THERMAL_VALID_OFFSET	9
> +#define MVEBU_THERMAL_VALID_MASK	0x1
> +#define MVEBU_THERMAL_TEMP_OFFSET	10
> +#define MVEBU_THERMAL_TEMP_MASK		0x1FF
>
>   /* Marvell EBU Thermal Sensor Dev Structure */
>   struct mvebu_thermal_priv {
> @@ -41,8 +41,8 @@ static int mvebu_get_temp(struct thermal_zone_device *thermal,
>   	reg = readl_relaxed(priv->sensor);
>
>   	/* Valid check */
> -	if (!((reg >> KIRKWOOD_THERMAL_VALID_OFFSET) &
> -	    KIRKWOOD_THERMAL_VALID_MASK)) {
> +	if (!((reg >> MVEBU_THERMAL_VALID_OFFSET) &
> +	    MVEBU_THERMAL_VALID_MASK)) {
>   		dev_err(&thermal->device,
>   			"Temperature sensor reading not valid\n");
>   		return -EIO;
> @@ -53,8 +53,8 @@ static int mvebu_get_temp(struct thermal_zone_device *thermal,
>   	 * documentation the formula for this is:
>   	 * Celsius = (322-reg)/1.3625
>   	 */
> -	reg = (reg >> KIRKWOOD_THERMAL_TEMP_OFFSET) &
> -		KIRKWOOD_THERMAL_TEMP_MASK;
> +	reg = (reg >> MVEBU_THERMAL_TEMP_OFFSET) &
> +		MVEBU_THERMAL_TEMP_MASK;
>   	*temp = ((3220000000UL - (10000000UL * reg)) / 13625);
>
>   	return 0;
>

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/thermal/mvebu_thermal.c b/drivers/thermal/mvebu_thermal.c
index 0c9344d..39ddded 100644
--- a/drivers/thermal/mvebu_thermal.c
+++ b/drivers/thermal/mvebu_thermal.c
@@ -22,10 +22,10 @@ 
 #include <linux/platform_device.h>
 #include <linux/thermal.h>
 
-#define KIRKWOOD_THERMAL_VALID_OFFSET	9
-#define KIRKWOOD_THERMAL_VALID_MASK	0x1
-#define KIRKWOOD_THERMAL_TEMP_OFFSET	10
-#define KIRKWOOD_THERMAL_TEMP_MASK	0x1FF
+#define MVEBU_THERMAL_VALID_OFFSET	9
+#define MVEBU_THERMAL_VALID_MASK	0x1
+#define MVEBU_THERMAL_TEMP_OFFSET	10
+#define MVEBU_THERMAL_TEMP_MASK		0x1FF
 
 /* Marvell EBU Thermal Sensor Dev Structure */
 struct mvebu_thermal_priv {
@@ -41,8 +41,8 @@  static int mvebu_get_temp(struct thermal_zone_device *thermal,
 	reg = readl_relaxed(priv->sensor);
 
 	/* Valid check */
-	if (!((reg >> KIRKWOOD_THERMAL_VALID_OFFSET) &
-	    KIRKWOOD_THERMAL_VALID_MASK)) {
+	if (!((reg >> MVEBU_THERMAL_VALID_OFFSET) &
+	    MVEBU_THERMAL_VALID_MASK)) {
 		dev_err(&thermal->device,
 			"Temperature sensor reading not valid\n");
 		return -EIO;
@@ -53,8 +53,8 @@  static int mvebu_get_temp(struct thermal_zone_device *thermal,
 	 * documentation the formula for this is:
 	 * Celsius = (322-reg)/1.3625
 	 */
-	reg = (reg >> KIRKWOOD_THERMAL_TEMP_OFFSET) &
-		KIRKWOOD_THERMAL_TEMP_MASK;
+	reg = (reg >> MVEBU_THERMAL_TEMP_OFFSET) &
+		MVEBU_THERMAL_TEMP_MASK;
 	*temp = ((3220000000UL - (10000000UL * reg)) / 13625);
 
 	return 0;