All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add support for Atmel AT30TS74
@ 2022-04-25  5:58 Peter Rosin
  2022-04-25  5:59 ` [PATCH 1/2] dt-bindings: hwmon: Add " Peter Rosin
  2022-04-25  5:59 ` [PATCH 2/2] hwmon: (lm75) Add Atmel AT30TS74 support Peter Rosin
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Rosin @ 2022-04-25  5:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	linux-hwmon, devicetree

Hi!

Yet another LM75 temperature sensor. Add it to the list of
supported chips.

Cheers,
Peter

Peter Rosin (2):
   dt-bindings: hwmon: Add Atmel AT30TS74
   hwmon: (lm75) Add Atmel AT30TS74 support

  Documentation/devicetree/bindings/hwmon/lm75.yaml |  1 +
  drivers/hwmon/Kconfig                             |  1 +
  drivers/hwmon/lm75.c                              | 14 ++++++++++++++
  3 files changed, 16 insertions(+)

-- 
2.20.1


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

* [PATCH 1/2] dt-bindings: hwmon: Add Atmel AT30TS74
  2022-04-25  5:58 [PATCH 0/2] Add support for Atmel AT30TS74 Peter Rosin
@ 2022-04-25  5:59 ` Peter Rosin
  2022-04-25 16:22   ` Rob Herring
  2022-04-25 18:49   ` Krzysztof Kozlowski
  2022-04-25  5:59 ` [PATCH 2/2] hwmon: (lm75) Add Atmel AT30TS74 support Peter Rosin
  1 sibling, 2 replies; 8+ messages in thread
From: Peter Rosin @ 2022-04-25  5:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	linux-hwmon, devicetree

Document the Atmel (now Microchip) AT30TS74 which is an LM75 based
temperature sensor.

Signed-off-by: Peter Rosin <peda@axentia.se>
---
  Documentation/devicetree/bindings/hwmon/lm75.yaml | 1 +
  1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/hwmon/lm75.yaml b/Documentation/devicetree/bindings/hwmon/lm75.yaml
index 72980d083c21..8226e3b5d028 100644
--- a/Documentation/devicetree/bindings/hwmon/lm75.yaml
+++ b/Documentation/devicetree/bindings/hwmon/lm75.yaml
@@ -14,6 +14,7 @@ properties:
    compatible:
      enum:
        - adi,adt75
+      - atmel,at30ts74
        - dallas,ds1775
        - dallas,ds75
        - dallas,ds7505
-- 
2.20.1


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

* [PATCH 2/2] hwmon: (lm75) Add Atmel AT30TS74 support
  2022-04-25  5:58 [PATCH 0/2] Add support for Atmel AT30TS74 Peter Rosin
  2022-04-25  5:59 ` [PATCH 1/2] dt-bindings: hwmon: Add " Peter Rosin
@ 2022-04-25  5:59 ` Peter Rosin
  2022-04-25 18:29   ` Guenter Roeck
  1 sibling, 1 reply; 8+ messages in thread
From: Peter Rosin @ 2022-04-25  5:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	linux-hwmon, devicetree

Atmel (now Microchip) AT30TS74 is an LM75 compatible sensor. Add it.

Signed-off-by: Peter Rosin <peda@axentia.se>
---
  drivers/hwmon/Kconfig |  1 +
  drivers/hwmon/lm75.c  | 14 ++++++++++++++
  2 files changed, 15 insertions(+)

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 68a8a27ab3b7..d8dc58b2c55a 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1248,6 +1248,7 @@ config SENSORS_LM75
  	  temperature sensor chip, with models including:
  
  		- Analog Devices ADT75
+		- Atmel (now Microchip) AT30TS74
  		- Dallas Semiconductor DS75, DS1775 and DS7505
  		- Global Mixed-mode Technology (GMT) G751
  		- Maxim MAX6625 and MAX6626
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index afdbb63237b9..66dc826f7962 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -26,6 +26,7 @@
  
  enum lm75_type {		/* keep sorted in alphabetical order */
  	adt75,
+	at30ts74,
  	ds1775,
  	ds75,
  	ds7505,
@@ -128,6 +129,14 @@ static const struct lm75_params device_params[] = {
  		.default_resolution = 12,
  		.default_sample_time = MSEC_PER_SEC / 10,
  	},
+	[at30ts74] = {
+		.set_mask = 3 << 5,	/* 12-bit mode*/
+		.default_resolution = 12,
+		.default_sample_time = 200,
+		.num_sample_times = 4,
+		.sample_times = (unsigned int []){ 25, 50, 100, 200 },
+		.resolutions = (u8 []) {9, 10, 11, 12 },
+	},
  	[ds1775] = {
  		.clr_mask = 3 << 5,
  		.set_mask = 2 << 5,	/* 11-bit mode */
@@ -645,6 +654,7 @@ static int lm75_probe(struct i2c_client *client)
  
  static const struct i2c_device_id lm75_ids[] = {
  	{ "adt75", adt75, },
+	{ "at30ts74", at30ts74, },
  	{ "ds1775", ds1775, },
  	{ "ds75", ds75, },
  	{ "ds7505", ds7505, },
@@ -680,6 +690,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
  		.compatible = "adi,adt75",
  		.data = (void *)adt75
  	},
+	{
+		.compatible = "atmel,at30ts74",
+		.data = (void *)at30ts74
+	},
  	{
  		.compatible = "dallas,ds1775",
  		.data = (void *)ds1775
-- 
2.20.1


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

* Re: [PATCH 1/2] dt-bindings: hwmon: Add Atmel AT30TS74
  2022-04-25  5:59 ` [PATCH 1/2] dt-bindings: hwmon: Add " Peter Rosin
@ 2022-04-25 16:22   ` Rob Herring
  2022-04-25 18:49   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 8+ messages in thread
From: Rob Herring @ 2022-04-25 16:22 UTC (permalink / raw)
  To: Peter Rosin
  Cc: Jean Delvare, linux-kernel, devicetree, Guenter Roeck,
	Krzysztof Kozlowski, linux-hwmon, Rob Herring

On Mon, 25 Apr 2022 07:59:12 +0200, Peter Rosin wrote:
> Document the Atmel (now Microchip) AT30TS74 which is an LM75 based
> temperature sensor.
> 
> Signed-off-by: Peter Rosin <peda@axentia.se>
> ---
>   Documentation/devicetree/bindings/hwmon/lm75.yaml | 1 +
>   1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 2/2] hwmon: (lm75) Add Atmel AT30TS74 support
  2022-04-25  5:59 ` [PATCH 2/2] hwmon: (lm75) Add Atmel AT30TS74 support Peter Rosin
@ 2022-04-25 18:29   ` Guenter Roeck
  2022-04-25 20:33     ` Peter Rosin
  0 siblings, 1 reply; 8+ messages in thread
From: Guenter Roeck @ 2022-04-25 18:29 UTC (permalink / raw)
  To: Peter Rosin
  Cc: linux-kernel, Jean Delvare, Rob Herring, Krzysztof Kozlowski,
	linux-hwmon, devicetree

Peter,

On Mon, Apr 25, 2022 at 07:59:18AM +0200, Peter Rosin wrote:
> Atmel (now Microchip) AT30TS74 is an LM75 compatible sensor. Add it.
> 
> Signed-off-by: Peter Rosin <peda@axentia.se>

This and the previous patch of the series fail to apply with

error: patch failed: drivers/hwmon/Kconfig:1248
error: drivers/hwmon/Kconfig: patch does not apply
error: patch failed: drivers/hwmon/lm75.c:26
error: drivers/hwmon/lm75.c: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.

when I try to apply with "git am -s -3".

This is probably because MS Exchange tries to be intelligent.
In the first patch, it added a space at the beginning of each
unchanged line. It looks like it did the same or something
similar here. I tried but failed to fix it up.

Please resend as clean patch.

Thanks,
Guenter

> ---
>   drivers/hwmon/Kconfig |  1 +
>   drivers/hwmon/lm75.c  | 14 ++++++++++++++
>   2 files changed, 15 insertions(+)
> 
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 68a8a27ab3b7..d8dc58b2c55a 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1248,6 +1248,7 @@ config SENSORS_LM75
>   	  temperature sensor chip, with models including:
>   
>   		- Analog Devices ADT75
> +		- Atmel (now Microchip) AT30TS74
>   		- Dallas Semiconductor DS75, DS1775 and DS7505
>   		- Global Mixed-mode Technology (GMT) G751
>   		- Maxim MAX6625 and MAX6626
> diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
> index afdbb63237b9..66dc826f7962 100644
> --- a/drivers/hwmon/lm75.c
> +++ b/drivers/hwmon/lm75.c
> @@ -26,6 +26,7 @@
>   
>   enum lm75_type {		/* keep sorted in alphabetical order */
>   	adt75,
> +	at30ts74,
>   	ds1775,
>   	ds75,
>   	ds7505,
> @@ -128,6 +129,14 @@ static const struct lm75_params device_params[] = {
>   		.default_resolution = 12,
>   		.default_sample_time = MSEC_PER_SEC / 10,
>   	},
> +	[at30ts74] = {
> +		.set_mask = 3 << 5,	/* 12-bit mode*/
> +		.default_resolution = 12,
> +		.default_sample_time = 200,
> +		.num_sample_times = 4,
> +		.sample_times = (unsigned int []){ 25, 50, 100, 200 },
> +		.resolutions = (u8 []) {9, 10, 11, 12 },
> +	},
>   	[ds1775] = {
>   		.clr_mask = 3 << 5,
>   		.set_mask = 2 << 5,	/* 11-bit mode */
> @@ -645,6 +654,7 @@ static int lm75_probe(struct i2c_client *client)
>   
>   static const struct i2c_device_id lm75_ids[] = {
>   	{ "adt75", adt75, },
> +	{ "at30ts74", at30ts74, },
>   	{ "ds1775", ds1775, },
>   	{ "ds75", ds75, },
>   	{ "ds7505", ds7505, },
> @@ -680,6 +690,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
>   		.compatible = "adi,adt75",
>   		.data = (void *)adt75
>   	},
> +	{
> +		.compatible = "atmel,at30ts74",
> +		.data = (void *)at30ts74
> +	},
>   	{
>   		.compatible = "dallas,ds1775",
>   		.data = (void *)ds1775

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

* Re: [PATCH 1/2] dt-bindings: hwmon: Add Atmel AT30TS74
  2022-04-25  5:59 ` [PATCH 1/2] dt-bindings: hwmon: Add " Peter Rosin
  2022-04-25 16:22   ` Rob Herring
@ 2022-04-25 18:49   ` Krzysztof Kozlowski
  2022-04-25 19:03     ` Guenter Roeck
  1 sibling, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-25 18:49 UTC (permalink / raw)
  To: Peter Rosin, linux-kernel
  Cc: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	linux-hwmon, devicetree

On 25/04/2022 07:59, Peter Rosin wrote:
> Document the Atmel (now Microchip) AT30TS74 which is an LM75 based
> temperature sensor.
> 
> Signed-off-by: Peter Rosin <peda@axentia.se>
> ---
>   Documentation/devicetree/bindings/hwmon/lm75.yaml | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/lm75.yaml b/Documentation/devicetree/bindings/hwmon/lm75.yaml
> index 72980d083c21..8226e3b5d028 100644
> --- a/Documentation/devicetree/bindings/hwmon/lm75.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/lm75.yaml
> @@ -14,6 +14,7 @@ properties:
>     compatible:
>       enum:
>         - adi,adt75
> +      - atmel,at30ts74

Looks like wrong indentation.

Best regards,
Krzysztof

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

* Re: [PATCH 1/2] dt-bindings: hwmon: Add Atmel AT30TS74
  2022-04-25 18:49   ` Krzysztof Kozlowski
@ 2022-04-25 19:03     ` Guenter Roeck
  0 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2022-04-25 19:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Peter Rosin, linux-kernel
  Cc: Jean Delvare, Rob Herring, Krzysztof Kozlowski, linux-hwmon, devicetree

On 4/25/22 11:49, Krzysztof Kozlowski wrote:
> On 25/04/2022 07:59, Peter Rosin wrote:
>> Document the Atmel (now Microchip) AT30TS74 which is an LM75 based
>> temperature sensor.
>>
>> Signed-off-by: Peter Rosin <peda@axentia.se>
>> ---
>>    Documentation/devicetree/bindings/hwmon/lm75.yaml | 1 +
>>    1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/hwmon/lm75.yaml b/Documentation/devicetree/bindings/hwmon/lm75.yaml
>> index 72980d083c21..8226e3b5d028 100644
>> --- a/Documentation/devicetree/bindings/hwmon/lm75.yaml
>> +++ b/Documentation/devicetree/bindings/hwmon/lm75.yaml
>> @@ -14,6 +14,7 @@ properties:
>>      compatible:
>>        enum:
>>          - adi,adt75
>> +      - atmel,at30ts74
> 
> Looks like wrong indentation.
> 

Actually, the patch is corrupted. Unchanged lines have an extra space.

Guenter

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

* Re: [PATCH 2/2] hwmon: (lm75) Add Atmel AT30TS74 support
  2022-04-25 18:29   ` Guenter Roeck
@ 2022-04-25 20:33     ` Peter Rosin
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Rosin @ 2022-04-25 20:33 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, Jean Delvare, Rob Herring, Krzysztof Kozlowski,
	linux-hwmon, devicetree

2022-04-25 at 20:29, Guenter Roeck wrote:
> Peter,
> 
> On Mon, Apr 25, 2022 at 07:59:18AM +0200, Peter Rosin wrote:
>> Atmel (now Microchip) AT30TS74 is an LM75 compatible sensor. Add it.
>>
>> Signed-off-by: Peter Rosin <peda@axentia.se>
> 
> This and the previous patch of the series fail to apply with
> 
> error: patch failed: drivers/hwmon/Kconfig:1248
> error: drivers/hwmon/Kconfig: patch does not apply
> error: patch failed: drivers/hwmon/lm75.c:26
> error: drivers/hwmon/lm75.c: patch does not apply
> error: Did you hand edit your patch?
> It does not apply to blobs recorded in its index.
> 
> when I try to apply with "git am -s -3".
> 
> This is probably because MS Exchange tries to be intelligent.
> In the first patch, it added a space at the beginning of each
> unchanged line. It looks like it did the same or something
> similar here. I tried but failed to fix it up.
> 
> Please resend as clean patch.

After some experimentation, the culprit turned out to be Thunderbird
and its "flowed" text messages. I'll disable that and resend.

Sorry for wasting time...

Cheers,
Peter

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

end of thread, other threads:[~2022-04-25 20:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25  5:58 [PATCH 0/2] Add support for Atmel AT30TS74 Peter Rosin
2022-04-25  5:59 ` [PATCH 1/2] dt-bindings: hwmon: Add " Peter Rosin
2022-04-25 16:22   ` Rob Herring
2022-04-25 18:49   ` Krzysztof Kozlowski
2022-04-25 19:03     ` Guenter Roeck
2022-04-25  5:59 ` [PATCH 2/2] hwmon: (lm75) Add Atmel AT30TS74 support Peter Rosin
2022-04-25 18:29   ` Guenter Roeck
2022-04-25 20:33     ` Peter Rosin

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.