All of lore.kernel.org
 help / color / mirror / Atom feed
* [v3 3/3] hwmon: (lm90) enable extended range according to DTS node
@ 2022-05-17  7:57 Holger Brunck
  2022-05-17 12:54 ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: Holger Brunck @ 2022-05-17  7:57 UTC (permalink / raw)
  To: linux-hwmon; +Cc: Jean Delvare, Guenter Roeck, Holger Brunck

Some lm90 compatible devices can operate in a extended temperature mode.
This feature is now enabled if the property is set in the corresponding
device tree node.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
---
changes for v3:
  - set config bit is property is set in DTS
  - rephrase commit msg
  - rename property

 drivers/hwmon/lm90.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 1c9493c70813..3820f0e61510 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -1707,6 +1707,7 @@ static void lm90_restore_conf(void *_data)
 
 static int lm90_init_client(struct i2c_client *client, struct lm90_data *data)
 {
+	struct device_node *np = client->dev.of_node;
 	int config, convrate;
 
 	convrate = lm90_read_reg(client, LM90_REG_R_CONVRATE);
@@ -1727,6 +1728,9 @@ static int lm90_init_client(struct i2c_client *client, struct lm90_data *data)
 
 	/* Check Temperature Range Select */
 	if (data->flags & LM90_HAVE_EXTENDED_TEMP) {
+		if (of_property_read_bool(np, "ti,extended-range-enable"))
+			config |= 0x04;
+
 		if (config & 0x04)
 			data->flags |= LM90_FLAG_ADT7461_EXT;
 	}
-- 
2.35.1.871.gab1f276


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

* Re: [v3 3/3] hwmon: (lm90) enable extended range according to DTS node
  2022-05-17  7:57 [v3 3/3] hwmon: (lm90) enable extended range according to DTS node Holger Brunck
@ 2022-05-17 12:54 ` Guenter Roeck
  2022-05-17 13:17   ` Holger Brunck
  0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2022-05-17 12:54 UTC (permalink / raw)
  To: Holger Brunck; +Cc: linux-hwmon, Jean Delvare

On Tue, May 17, 2022 at 09:57:38AM +0200, Holger Brunck wrote:
> Some lm90 compatible devices can operate in a extended temperature mode.
> This feature is now enabled if the property is set in the corresponding
> device tree node.
> 
> Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>

For my reference:

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> changes for v3:
>   - set config bit is property is set in DTS
>   - rephrase commit msg
>   - rename property
> 
>  drivers/hwmon/lm90.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
> index 1c9493c70813..3820f0e61510 100644
> --- a/drivers/hwmon/lm90.c
> +++ b/drivers/hwmon/lm90.c
> @@ -1707,6 +1707,7 @@ static void lm90_restore_conf(void *_data)
>  
>  static int lm90_init_client(struct i2c_client *client, struct lm90_data *data)
>  {
> +	struct device_node *np = client->dev.of_node;
>  	int config, convrate;
>  
>  	convrate = lm90_read_reg(client, LM90_REG_R_CONVRATE);
> @@ -1727,6 +1728,9 @@ static int lm90_init_client(struct i2c_client *client, struct lm90_data *data)
>  
>  	/* Check Temperature Range Select */
>  	if (data->flags & LM90_HAVE_EXTENDED_TEMP) {
> +		if (of_property_read_bool(np, "ti,extended-range-enable"))
> +			config |= 0x04;
> +
>  		if (config & 0x04)
>  			data->flags |= LM90_FLAG_ADT7461_EXT;
>  	}

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

* RE: [v3 3/3] hwmon: (lm90) enable extended range according to DTS node
  2022-05-17 12:54 ` Guenter Roeck
@ 2022-05-17 13:17   ` Holger Brunck
  2022-05-17 13:37     ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: Holger Brunck @ 2022-05-17 13:17 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-hwmon, Jean Delvare, Krzysztof Kozlowski

> On Tue, May 17, 2022 at 09:57:38AM +0200, Holger Brunck wrote:
> > Some lm90 compatible devices can operate in a extended temperature
> mode.
> > This feature is now enabled if the property is set in the
> > corresponding device tree node.
> >
> > Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
> 
> For my reference:
> 
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> 

thanks. As you now already applied 1/3 and I have to update 2/3 should
I send a v4 with the missing two patches, even if this one is reviewed?
Or should I only send a v4 for 2/3 and if this is applied you apply this
one?

Best regards
Holger


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

* Re: [v3 3/3] hwmon: (lm90) enable extended range according to DTS node
  2022-05-17 13:17   ` Holger Brunck
@ 2022-05-17 13:37     ` Guenter Roeck
  0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2022-05-17 13:37 UTC (permalink / raw)
  To: Holger Brunck; +Cc: linux-hwmon, Jean Delvare, Krzysztof Kozlowski

On 5/17/22 06:17, Holger Brunck wrote:
>> On Tue, May 17, 2022 at 09:57:38AM +0200, Holger Brunck wrote:
>>> Some lm90 compatible devices can operate in a extended temperature
>> mode.
>>> This feature is now enabled if the property is set in the
>>> corresponding device tree node.
>>>
>>> Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
>>
>> For my reference:
>>
>> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
>>
> 
> thanks. As you now already applied 1/3 and I have to update 2/3 should
> I send a v4 with the missing two patches, even if this one is reviewed?
> Or should I only send a v4 for 2/3 and if this is applied you apply this
> one?
> 

I applied the first patch because it is independent of the other two
and should be applied in the next commit window even if the other two
patches don't make it. Just send the remaining two patches in the next
version. Please keep my Reviewed-by: tag when you do that.

Thanks,
Guenter

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

end of thread, other threads:[~2022-05-17 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17  7:57 [v3 3/3] hwmon: (lm90) enable extended range according to DTS node Holger Brunck
2022-05-17 12:54 ` Guenter Roeck
2022-05-17 13:17   ` Holger Brunck
2022-05-17 13:37     ` Guenter Roeck

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.