All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH 50/82] hwmon: (max6650) Fix multi-line comments
@ 2012-01-19 23:55 Guenter Roeck
  2012-01-20  0:45 ` Hans J. Koch
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2012-01-19 23:55 UTC (permalink / raw)
  To: lm-sensors

Cc: Hans J Koch <hjk@hansjkoch.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/max6650.c |   51 +++++++++++++++++++++++++---------------------
 1 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c
index 159ce02..0998094 100644
--- a/drivers/hwmon/max6650.c
+++ b/drivers/hwmon/max6650.c
@@ -159,13 +159,13 @@ static ssize_t get_fan(struct device *dev, struct device_attribute *devattr,
 	int rpm;
 
 	/*
-	* Calculation details:
-	*
-	* Each tachometer counts over an interval given by the "count"
-	* register (0.25, 0.5, 1 or 2 seconds). This module assumes
-	* that the fans produce two pulses per revolution (this seems
-	* to be the most common).
-	*/
+	 * Calculation details:
+	 *
+	 * Each tachometer counts over an interval given by the "count"
+	 * register (0.25, 0.5, 1 or 2 seconds). This module assumes
+	 * that the fans produce two pulses per revolution (this seems
+	 * to be the most common).
+	 */
 
 	rpm = ((data->tach[attr->index] * 120) / DIV_FROM_REG(data->count));
 	return sprintf(buf, "%d\n", rpm);
@@ -219,12 +219,12 @@ static ssize_t get_target(struct device *dev, struct device_attribute *devattr,
 	int kscale, ktach, rpm;
 
 	/*
-	* Use the datasheet equation:
-	*
-	*    FanSpeed = KSCALE x fCLK / [256 x (KTACH + 1)]
-	*
-	* then multiply by 60 to give rpm.
-	*/
+	 * Use the datasheet equation:
+	 *
+	 *    FanSpeed = KSCALE x fCLK / [256 x (KTACH + 1)]
+	 *
+	 * then multiply by 60 to give rpm.
+	 */
 
 	kscale = DIV_FROM_REG(data->config);
 	ktach = data->speed;
@@ -248,11 +248,11 @@ static ssize_t set_target(struct device *dev, struct device_attribute *devattr,
 	rpm = SENSORS_LIMIT(rpm, FAN_RPM_MIN, FAN_RPM_MAX);
 
 	/*
-	* Divide the required speed by 60 to get from rpm to rps, then
-	* use the datasheet equation:
-	*
-	*     KTACH = [(fCLK x KSCALE) / (256 x FanSpeed)] - 1
-	*/
+	 * Divide the required speed by 60 to get from rpm to rps, then
+	 * use the datasheet equation:
+	 *
+	 *     KTACH = [(fCLK x KSCALE) / (256 x FanSpeed)] - 1
+	 */
 
 	mutex_lock(&data->update_lock);
 
@@ -286,8 +286,10 @@ static ssize_t get_pwm(struct device *dev, struct device_attribute *devattr,
 	int pwm;
 	struct max6650_data *data = max6650_update_device(dev);
 
-	/* Useful range for dac is 0-180 for 12V fans and 0-76 for 5V fans.
-	   Lower DAC values mean higher speeds. */
+	/*
+	 * Useful range for dac is 0-180 for 12V fans and 0-76 for 5V fans.
+	 * Lower DAC values mean higher speeds.
+	 */
 	if (data->config & MAX6650_CFG_V12)
 		pwm = 255 - (255 * (int)data->dac)/180;
 	else
@@ -657,7 +659,8 @@ static int max6650_init_client(struct i2c_client *client)
 	dev_info(&client->dev, "Prescaler is set to %d.\n",
 		 1 << (config & MAX6650_CFG_PRESCALER_MASK));
 
-	/* If mode is set to "full off", we change it to "open loop" and
+	/*
+	 * If mode is set to "full off", we change it to "open loop" and
 	 * set DAC to 255, which has the same effect. We do this because
 	 * there's no "full off" mode defined in hwmon specifcations.
 	 */
@@ -711,9 +714,11 @@ static struct max6650_data *max6650_update_device(struct device *dev)
 							MAX6650_REG_COUNT);
 		data->dac = i2c_smbus_read_byte_data(client, MAX6650_REG_DAC);
 
-		/* Alarms are cleared on read in case the condition that
+		/*
+		 * Alarms are cleared on read in case the condition that
 		 * caused the alarm is removed. Keep the value latched here
-		 * for providing the register through different alarm files. */
+		 * for providing the register through different alarm files.
+		 */
 		data->alarm |= i2c_smbus_read_byte_data(client,
 							MAX6650_REG_ALARM);
 
-- 
1.7.5.4


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [lm-sensors] [PATCH 50/82] hwmon: (max6650) Fix multi-line comments
  2012-01-19 23:55 [lm-sensors] [PATCH 50/82] hwmon: (max6650) Fix multi-line comments Guenter Roeck
@ 2012-01-20  0:45 ` Hans J. Koch
  0 siblings, 0 replies; 2+ messages in thread
From: Hans J. Koch @ 2012-01-20  0:45 UTC (permalink / raw)
  To: lm-sensors

On Thu, Jan 19, 2012 at 03:55:44PM -0800, Guenter Roeck wrote:
> Cc: Hans J Koch <hjk@hansjkoch.de>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Thanks for having an eye on these little things...

Acked-by: Hans J. Koch <hjk@hansjkoch.de>


> ---
>  drivers/hwmon/max6650.c |   51 +++++++++++++++++++++++++---------------------
>  1 files changed, 28 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c
> index 159ce02..0998094 100644
> --- a/drivers/hwmon/max6650.c
> +++ b/drivers/hwmon/max6650.c
> @@ -159,13 +159,13 @@ static ssize_t get_fan(struct device *dev, struct device_attribute *devattr,
>  	int rpm;
>  
>  	/*
> -	* Calculation details:
> -	*
> -	* Each tachometer counts over an interval given by the "count"
> -	* register (0.25, 0.5, 1 or 2 seconds). This module assumes
> -	* that the fans produce two pulses per revolution (this seems
> -	* to be the most common).
> -	*/
> +	 * Calculation details:
> +	 *
> +	 * Each tachometer counts over an interval given by the "count"
> +	 * register (0.25, 0.5, 1 or 2 seconds). This module assumes
> +	 * that the fans produce two pulses per revolution (this seems
> +	 * to be the most common).
> +	 */
>  
>  	rpm = ((data->tach[attr->index] * 120) / DIV_FROM_REG(data->count));
>  	return sprintf(buf, "%d\n", rpm);
> @@ -219,12 +219,12 @@ static ssize_t get_target(struct device *dev, struct device_attribute *devattr,
>  	int kscale, ktach, rpm;
>  
>  	/*
> -	* Use the datasheet equation:
> -	*
> -	*    FanSpeed = KSCALE x fCLK / [256 x (KTACH + 1)]
> -	*
> -	* then multiply by 60 to give rpm.
> -	*/
> +	 * Use the datasheet equation:
> +	 *
> +	 *    FanSpeed = KSCALE x fCLK / [256 x (KTACH + 1)]
> +	 *
> +	 * then multiply by 60 to give rpm.
> +	 */
>  
>  	kscale = DIV_FROM_REG(data->config);
>  	ktach = data->speed;
> @@ -248,11 +248,11 @@ static ssize_t set_target(struct device *dev, struct device_attribute *devattr,
>  	rpm = SENSORS_LIMIT(rpm, FAN_RPM_MIN, FAN_RPM_MAX);
>  
>  	/*
> -	* Divide the required speed by 60 to get from rpm to rps, then
> -	* use the datasheet equation:
> -	*
> -	*     KTACH = [(fCLK x KSCALE) / (256 x FanSpeed)] - 1
> -	*/
> +	 * Divide the required speed by 60 to get from rpm to rps, then
> +	 * use the datasheet equation:
> +	 *
> +	 *     KTACH = [(fCLK x KSCALE) / (256 x FanSpeed)] - 1
> +	 */
>  
>  	mutex_lock(&data->update_lock);
>  
> @@ -286,8 +286,10 @@ static ssize_t get_pwm(struct device *dev, struct device_attribute *devattr,
>  	int pwm;
>  	struct max6650_data *data = max6650_update_device(dev);
>  
> -	/* Useful range for dac is 0-180 for 12V fans and 0-76 for 5V fans.
> -	   Lower DAC values mean higher speeds. */
> +	/*
> +	 * Useful range for dac is 0-180 for 12V fans and 0-76 for 5V fans.
> +	 * Lower DAC values mean higher speeds.
> +	 */
>  	if (data->config & MAX6650_CFG_V12)
>  		pwm = 255 - (255 * (int)data->dac)/180;
>  	else
> @@ -657,7 +659,8 @@ static int max6650_init_client(struct i2c_client *client)
>  	dev_info(&client->dev, "Prescaler is set to %d.\n",
>  		 1 << (config & MAX6650_CFG_PRESCALER_MASK));
>  
> -	/* If mode is set to "full off", we change it to "open loop" and
> +	/*
> +	 * If mode is set to "full off", we change it to "open loop" and
>  	 * set DAC to 255, which has the same effect. We do this because
>  	 * there's no "full off" mode defined in hwmon specifcations.
>  	 */
> @@ -711,9 +714,11 @@ static struct max6650_data *max6650_update_device(struct device *dev)
>  							MAX6650_REG_COUNT);
>  		data->dac = i2c_smbus_read_byte_data(client, MAX6650_REG_DAC);
>  
> -		/* Alarms are cleared on read in case the condition that
> +		/*
> +		 * Alarms are cleared on read in case the condition that
>  		 * caused the alarm is removed. Keep the value latched here
> -		 * for providing the register through different alarm files. */
> +		 * for providing the register through different alarm files.
> +		 */
>  		data->alarm |= i2c_smbus_read_byte_data(client,
>  							MAX6650_REG_ALARM);
>  
> -- 
> 1.7.5.4
> 
> 

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-20  0:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-19 23:55 [lm-sensors] [PATCH 50/82] hwmon: (max6650) Fix multi-line comments Guenter Roeck
2012-01-20  0:45 ` Hans J. Koch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.