Linux Hardware Monitor development
 help / color / mirror / Atom feed
* [PATCH v2] hwmon: (pmbus/ltc2978) add support for LTC7132
       [not found] <0221027133201.GA566451@roeck-us.net>
@ 2022-10-27 14:51 ` Felix Nieuwenhuizen
  2022-10-28 18:15   ` Guenter Roeck
  2022-12-08  2:13   ` Rob Herring
  0 siblings, 2 replies; 5+ messages in thread
From: Felix Nieuwenhuizen @ 2022-10-27 14:51 UTC (permalink / raw)
  To: linux-hwmon; +Cc: Guenter Roeck, Jean Delvare, Felix Nieuwenhuizen

Add support for LTC7132.
The relevant registers in the LTC7132 are identical to the LTC7880.
So it's just a matter of adding the chip id.

Signed-off-by: Felix Nieuwenhuizen <Felix.Nieuwenhuizen@etas.com>
---
 drivers/hwmon/pmbus/ltc2978.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
index 6d2592731ba3..79f480b4425d 100644
--- a/drivers/hwmon/pmbus/ltc2978.c
+++ b/drivers/hwmon/pmbus/ltc2978.c
@@ -23,7 +23,7 @@ enum chips {
 	/* Managers */
 	ltc2972, ltc2974, ltc2975, ltc2977, ltc2978, ltc2979, ltc2980,
 	/* Controllers */
-	ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7880,
+	ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7132, ltc7880,
 	/* Modules */
 	ltm2987, ltm4664, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680, ltm4686,
 	ltm4700,
@@ -45,15 +45,14 @@ enum chips {
 #define LTC2974_MFR_IOUT_PEAK		0xd7
 #define LTC2974_MFR_IOUT_MIN		0xd8
 
-/* LTC3880, LTC3882, LTC3883, LTC3887, LTM4675, and LTM4676 */
+/* LTC3880, LTC3882, LTC3883, LTC3887, LTM4675, LTM4676, LTC7132 */
 #define LTC3880_MFR_IOUT_PEAK		0xd7
 #define LTC3880_MFR_CLEAR_PEAKS		0xe3
 #define LTC3880_MFR_TEMPERATURE2_PEAK	0xf4
 
-/* LTC3883, LTC3884, LTC3886, LTC3889 and LTC7880 only */
+/* LTC3883, LTC3884, LTC3886, LTC3889, LTC7132, LTC7880 */
 #define LTC3883_MFR_IIN_PEAK		0xe1
 
-
 /* LTC2975 only */
 #define LTC2975_MFR_IIN_PEAK		0xc4
 #define LTC2975_MFR_IIN_MIN		0xc5
@@ -79,10 +78,11 @@ enum chips {
 #define LTC3884_ID			0x4C00
 #define LTC3886_ID			0x4600
 #define LTC3887_ID			0x4700
-#define LTM2987_ID_A			0x8010	/* A/B for two die IDs */
-#define LTM2987_ID_B			0x8020
 #define LTC3889_ID			0x4900
+#define LTC7132_ID			0x4CE0
 #define LTC7880_ID			0x49E0
+#define LTM2987_ID_A			0x8010	/* A/B for two die IDs */
+#define LTM2987_ID_B			0x8020
 #define LTM4664_ID			0x4120
 #define LTM4675_ID			0x47a0
 #define LTM4676_ID_REV1			0x4400
@@ -547,6 +547,7 @@ static const struct i2c_device_id ltc2978_id[] = {
 	{"ltc3886", ltc3886},
 	{"ltc3887", ltc3887},
 	{"ltc3889", ltc3889},
+	{"ltc7132", ltc7132},
 	{"ltc7880", ltc7880},
 	{"ltm2987", ltm2987},
 	{"ltm4664", ltm4664},
@@ -651,6 +652,8 @@ static int ltc2978_get_id(struct i2c_client *client)
 		return ltc3887;
 	else if (chip_id == LTC3889_ID)
 		return ltc3889;
+	else if (chip_id == LTC7132_ID)
+		return ltc7132;
 	else if (chip_id == LTC7880_ID)
 		return ltc7880;
 	else if (chip_id == LTM2987_ID_A || chip_id == LTM2987_ID_B)
@@ -831,6 +834,7 @@ static int ltc2978_probe(struct i2c_client *client)
 	case ltc3884:
 	case ltc3886:
 	case ltc3889:
+	case ltc7132:
 	case ltc7880:
 	case ltm4664:
 	case ltm4678:
@@ -902,6 +906,7 @@ static const struct of_device_id ltc2978_of_match[] = {
 	{ .compatible = "lltc,ltc3886" },
 	{ .compatible = "lltc,ltc3887" },
 	{ .compatible = "lltc,ltc3889" },
+	{ .compatible = "lltc,ltc7132" },
 	{ .compatible = "lltc,ltc7880" },
 	{ .compatible = "lltc,ltm2987" },
 	{ .compatible = "lltc,ltm4664" },
-- 
2.30.2


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

* Re: [PATCH v2] hwmon: (pmbus/ltc2978) add support for LTC7132
  2022-10-27 14:51 ` [PATCH v2] hwmon: (pmbus/ltc2978) add support for LTC7132 Felix Nieuwenhuizen
@ 2022-10-28 18:15   ` Guenter Roeck
  2022-12-08  2:13   ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2022-10-28 18:15 UTC (permalink / raw)
  To: Felix Nieuwenhuizen; +Cc: linux-hwmon, Jean Delvare

On Thu, Oct 27, 2022 at 04:51:35PM +0200, Felix Nieuwenhuizen wrote:
> Add support for LTC7132.
> The relevant registers in the LTC7132 are identical to the LTC7880.
> So it's just a matter of adding the chip id.
> 
> Signed-off-by: Felix Nieuwenhuizen <Felix.Nieuwenhuizen@etas.com>

Applied to hwmon-next.

Thanks,
Guenter

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

* Re: [PATCH v2] hwmon: (pmbus/ltc2978) add support for LTC7132
  2022-10-27 14:51 ` [PATCH v2] hwmon: (pmbus/ltc2978) add support for LTC7132 Felix Nieuwenhuizen
  2022-10-28 18:15   ` Guenter Roeck
@ 2022-12-08  2:13   ` Rob Herring
  2023-01-05  7:49     ` [PATCH] hwmon: (pmbus/ltc2978) add support for LTC7132 - docs Felix Nieuwenhuizen
  1 sibling, 1 reply; 5+ messages in thread
From: Rob Herring @ 2022-12-08  2:13 UTC (permalink / raw)
  To: Felix Nieuwenhuizen; +Cc: linux-hwmon, Guenter Roeck, Jean Delvare

On Thu, Oct 27, 2022 at 04:51:35PM +0200, Felix Nieuwenhuizen wrote:
> Add support for LTC7132.
> The relevant registers in the LTC7132 are identical to the LTC7880.
> So it's just a matter of adding the chip id.
> 
> Signed-off-by: Felix Nieuwenhuizen <Felix.Nieuwenhuizen@etas.com>
> ---
>  drivers/hwmon/pmbus/ltc2978.c | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
> index 6d2592731ba3..79f480b4425d 100644
> --- a/drivers/hwmon/pmbus/ltc2978.c
> +++ b/drivers/hwmon/pmbus/ltc2978.c
> @@ -23,7 +23,7 @@ enum chips {
>  	/* Managers */
>  	ltc2972, ltc2974, ltc2975, ltc2977, ltc2978, ltc2979, ltc2980,
>  	/* Controllers */
> -	ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7880,
> +	ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7132, ltc7880,
>  	/* Modules */
>  	ltm2987, ltm4664, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680, ltm4686,
>  	ltm4700,
> @@ -45,15 +45,14 @@ enum chips {
>  #define LTC2974_MFR_IOUT_PEAK		0xd7
>  #define LTC2974_MFR_IOUT_MIN		0xd8
>  
> -/* LTC3880, LTC3882, LTC3883, LTC3887, LTM4675, and LTM4676 */
> +/* LTC3880, LTC3882, LTC3883, LTC3887, LTM4675, LTM4676, LTC7132 */
>  #define LTC3880_MFR_IOUT_PEAK		0xd7
>  #define LTC3880_MFR_CLEAR_PEAKS		0xe3
>  #define LTC3880_MFR_TEMPERATURE2_PEAK	0xf4
>  
> -/* LTC3883, LTC3884, LTC3886, LTC3889 and LTC7880 only */
> +/* LTC3883, LTC3884, LTC3886, LTC3889, LTC7132, LTC7880 */
>  #define LTC3883_MFR_IIN_PEAK		0xe1
>  
> -
>  /* LTC2975 only */
>  #define LTC2975_MFR_IIN_PEAK		0xc4
>  #define LTC2975_MFR_IIN_MIN		0xc5
> @@ -79,10 +78,11 @@ enum chips {
>  #define LTC3884_ID			0x4C00
>  #define LTC3886_ID			0x4600
>  #define LTC3887_ID			0x4700
> -#define LTM2987_ID_A			0x8010	/* A/B for two die IDs */
> -#define LTM2987_ID_B			0x8020
>  #define LTC3889_ID			0x4900
> +#define LTC7132_ID			0x4CE0
>  #define LTC7880_ID			0x49E0
> +#define LTM2987_ID_A			0x8010	/* A/B for two die IDs */
> +#define LTM2987_ID_B			0x8020
>  #define LTM4664_ID			0x4120
>  #define LTM4675_ID			0x47a0
>  #define LTM4676_ID_REV1			0x4400
> @@ -547,6 +547,7 @@ static const struct i2c_device_id ltc2978_id[] = {
>  	{"ltc3886", ltc3886},
>  	{"ltc3887", ltc3887},
>  	{"ltc3889", ltc3889},
> +	{"ltc7132", ltc7132},
>  	{"ltc7880", ltc7880},
>  	{"ltm2987", ltm2987},
>  	{"ltm4664", ltm4664},
> @@ -651,6 +652,8 @@ static int ltc2978_get_id(struct i2c_client *client)
>  		return ltc3887;
>  	else if (chip_id == LTC3889_ID)
>  		return ltc3889;
> +	else if (chip_id == LTC7132_ID)
> +		return ltc7132;
>  	else if (chip_id == LTC7880_ID)
>  		return ltc7880;
>  	else if (chip_id == LTM2987_ID_A || chip_id == LTM2987_ID_B)
> @@ -831,6 +834,7 @@ static int ltc2978_probe(struct i2c_client *client)
>  	case ltc3884:
>  	case ltc3886:
>  	case ltc3889:
> +	case ltc7132:
>  	case ltc7880:
>  	case ltm4664:
>  	case ltm4678:
> @@ -902,6 +906,7 @@ static const struct of_device_id ltc2978_of_match[] = {
>  	{ .compatible = "lltc,ltc3886" },
>  	{ .compatible = "lltc,ltc3887" },
>  	{ .compatible = "lltc,ltc3889" },
> +	{ .compatible = "lltc,ltc7132" },

This compatible string is not documented. Please add it to the bindings.

Rob

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

* [PATCH] hwmon: (pmbus/ltc2978) add support for LTC7132 - docs
  2022-12-08  2:13   ` Rob Herring
@ 2023-01-05  7:49     ` Felix Nieuwenhuizen
  2023-01-15 16:15       ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Felix Nieuwenhuizen @ 2023-01-05  7:49 UTC (permalink / raw)
  To: linux-hwmon; +Cc: Guenter Roeck, Jean Delvare, Rob Herring, Felix Nieuwenhuizen

Add missing compatible string "lltc,ltc7132" to the bindings documentation.

Signed-off-by: Felix Nieuwenhuizen <Felix.Nieuwenhuizen@etas.com>
---
 Documentation/devicetree/bindings/hwmon/ltc2978.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/hwmon/ltc2978.txt b/Documentation/devicetree/bindings/hwmon/ltc2978.txt
index 4e7f6215a453..61783b3819bf 100644
--- a/Documentation/devicetree/bindings/hwmon/ltc2978.txt
+++ b/Documentation/devicetree/bindings/hwmon/ltc2978.txt
@@ -16,6 +16,7 @@ Required properties:
   * "lltc,ltc3886"
   * "lltc,ltc3887"
   * "lltc,ltc3889"
+  * "lltc,ltc7132"
   * "lltc,ltc7880"
   * "lltc,ltm2987"
   * "lltc,ltm4664"
-- 
2.30.2


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

* Re: [PATCH] hwmon: (pmbus/ltc2978) add support for LTC7132 - docs
  2023-01-05  7:49     ` [PATCH] hwmon: (pmbus/ltc2978) add support for LTC7132 - docs Felix Nieuwenhuizen
@ 2023-01-15 16:15       ` Guenter Roeck
  0 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2023-01-15 16:15 UTC (permalink / raw)
  To: Felix Nieuwenhuizen; +Cc: linux-hwmon, Jean Delvare, Rob Herring

On Thu, Jan 05, 2023 at 08:49:00AM +0100, Felix Nieuwenhuizen wrote:
> Add missing compatible string "lltc,ltc7132" to the bindings documentation.
> 
> Signed-off-by: Felix Nieuwenhuizen <Felix.Nieuwenhuizen@etas.com>

This needs to be reviewed by a DT maintainer. Please refer to
scripts/get_maintainer.pl to determine who needs to be copied.

Guenter

> ---
>  Documentation/devicetree/bindings/hwmon/ltc2978.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/ltc2978.txt b/Documentation/devicetree/bindings/hwmon/ltc2978.txt
> index 4e7f6215a453..61783b3819bf 100644
> --- a/Documentation/devicetree/bindings/hwmon/ltc2978.txt
> +++ b/Documentation/devicetree/bindings/hwmon/ltc2978.txt
> @@ -16,6 +16,7 @@ Required properties:
>    * "lltc,ltc3886"
>    * "lltc,ltc3887"
>    * "lltc,ltc3889"
> +  * "lltc,ltc7132"
>    * "lltc,ltc7880"
>    * "lltc,ltm2987"
>    * "lltc,ltm4664"

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

end of thread, other threads:[~2023-01-15 16:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <0221027133201.GA566451@roeck-us.net>
2022-10-27 14:51 ` [PATCH v2] hwmon: (pmbus/ltc2978) add support for LTC7132 Felix Nieuwenhuizen
2022-10-28 18:15   ` Guenter Roeck
2022-12-08  2:13   ` Rob Herring
2023-01-05  7:49     ` [PATCH] hwmon: (pmbus/ltc2978) add support for LTC7132 - docs Felix Nieuwenhuizen
2023-01-15 16:15       ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox