Skip to contentSkip to conversation

Add Altera A10SR Status & Control Monitor

PATCH Superseded [email protected] 3 participants 9 messages Oct 13, 2016 – Oct 26, 2016

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Add Altera A10SR Status & Control Monitor

From: Thor Thayer <[email protected]>

This patch series adds the Altera Arria10 DevKit System Resource chip's Status and Control Monitor to the A10SR Multi-Function Device. An earlier patch added this to the hwmon class which wasn't the proper place so this functionality is added to the misc directory.

Thor Thayer (4):
dt-bindings: mfd: Add Altera Arria10 SR Monitor
misc: Add Altera Arria10 System Resource Control
mfd: altr-a10sr: Add Arria10 SR Monitor
ARM: socfpga: dts: Add Monitor to A10-SR MFD

 .../devicetree/bindings/mfd/altera-a10sr.txt       |    9 +
 MAINTAINERS                                        |    1 +
 arch/arm/boot/dts/socfpga_arria10_socdk.dtsi       |    4 +
 drivers/mfd/altera-a10sr.c                         |    4 +
 drivers/misc/Kconfig                               |    7 +
 drivers/misc/Makefile                              |    1 +
 drivers/misc/altera-a10sr-mon.c                    |  184 ++++++++++++++++++++
 7 files changed, 210 insertions(+)
 create mode 100644 drivers/misc/altera-a10sr-mon.c
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/4 dt-bindings: mfd: Add Altera Arria10 SR Monitor

From: Thor Thayer <[email protected]>

Add the Arria10 DevKit System Resource Chip register and state monitoring module to the MFD.

---
Note: This needs to be applied to the bindings document that was Acked & Applied but didn't reach the for-next branch. See https://patchwork.ozlabs.org/patch/629397/
---

---
 .../devicetree/bindings/mfd/altera-a10sr.txt       |    9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +9 -0
index ea151f2..0787ec6 100644
@@ -18,6 +18,7 @@ The A10SR consists of these sub-devices:
 Device                   Description
 ------                   ----------
 a10sr_gpio               GPIO Controller
+a10sr_monitor            Register and State Monitoring
 
 Arria10 GPIO
 Required Properties:
@@ -27,6 +28,10 @@ Required Properties:
                       the second cell is used to specify flags.
                       See ../gpio/gpio.txt for more information.
 
+Arria10 Register and State Monitor
+Required Properties:
+- compatible        : Should be "altr,a10sr-mon"
+
 Example:
 
         resource-manager@0 {
@@ -43,4 +48,8 @@ Example:
 			gpio-controller;
 			#gpio-cells = <2>;
 		};
+
+		a10sr_monitor {
+			compatible = "altr,a10sr-mon";
+		};
 	};
Signature · 1 line
1.7.9.5
maintainer Acked-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] dt-bindings: mfd: Add Altera Arria10 SR Monitor

Quoted 6 lines · tthayer at opensource.altera.com

From: Thor Thayer <[email protected]>

Add the Arria10 DevKit System Resource Chip register and state monitoring module to the MFD.

Quoted 8 lines

---
Note: This needs to be applied to the bindings document that was Acked & Applied but didn't reach the for-next branch. See https://patchwork.ozlabs.org/patch/629397/
---

---
 .../devicetree/bindings/mfd/altera-a10sr.txt       |    9 +++++++++
 1 file changed, 9 insertions(+)
#3 lore raw

Re: [PATCH 1/4] dt-bindings: mfd: Add Altera Arria10 SR Monitor

In reply to [email protected]
Quoted 28 lines · On Thu, 13 Oct 2016, [email protected] wrote:

From: Thor Thayer <[email protected]>

Add the Arria10 DevKit System Resource Chip register and state monitoring module to the MFD.

---
Note: This needs to be applied to the bindings document that was Acked & Applied but didn't reach the for-next branch. See https://patchwork.ozlabs.org/patch/629397/
---

---
 .../devicetree/bindings/mfd/altera-a10sr.txt       |    9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +1 -0
index ea151f2..0787ec6 100644
@@ -18,6 +18,7 @@ The A10SR consists of these sub-devices:
 Device                   Description
 ------                   ----------
 a10sr_gpio               GPIO Controller
+a10sr_monitor            Register and State Monitoring
 
 Arria10 GPIO
 Required Properties:

Documentation/devicetree/bindings/mfd/altera-a10sr.txt Required Properties: · line 33

Quoted 6 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +3 -0
@@ -27,6 +28,10 @@ Required Properties:
                       the second cell is used to specify flags.
                       See ../gpio/gpio.txt for more information.
 
+Arria10 Register and State Monitor
+Required Properties:
+- compatible        : Should be "altr,a10sr-mon"

Why not "-monitor"?

Quoted 12 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +4 -0
 Example:
 
         resource-manager@0 {
@@ -43,4 +48,8 @@ Example:
 			gpio-controller;
 			#gpio-cells = <2>;
 		};
+
+		a10sr_monitor {
+			compatible = "altr,a10sr-mon";
+		};
 	};
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#4 lore raw

PATCH 2/4 misc: Add Altera Arria10 System Resource Control

In reply to [email protected]

From: Thor Thayer <[email protected]>

This patch adds the Altera Arria10 control & monitoring functions to the Arria10 System Resource chip.

---
 MAINTAINERS                     |    1 +
 drivers/misc/Kconfig            |    7 ++
 drivers/misc/Makefile           |    1 +
 drivers/misc/altera-a10sr-mon.c |  184 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 193 insertions(+)
 create mode 100644 drivers/misc/altera-a10sr-mon.c
MAINTAINERS +1 -0
index 1cd38a7..a0919ec 100644
@@ -625,6 +625,7 @@ M:	Thor Thayer <[email protected]>
 S:	Maintained
 F:	drivers/gpio/gpio-altera-a10sr.c
 F:	drivers/mfd/altera-a10sr.c
+F: 	drivers/misc/altera-a10sr-mon.c
 F:	include/linux/mfd/altera-a10sr.h
 
 ALTERA TRIPLE SPEED ETHERNET DRIVER
drivers/misc/Kconfig +7 -0
index 64971ba..9dd33c4 100644
@@ -766,6 +766,13 @@ config PANEL_BOOT_MESSAGE
 	  An empty message will only clear the display at driver init time. Any other
 	  printf()-formatted message is valid with newline and escape codes.
 
+config ALTERA_A10SR_MON
+	tristate "Altera Arria10 System Resource Monitor"
+	depends on MFD_ALTERA_A10SR
+	help
+	  This enables the System Resource monitor driver for the Altera
+	  Arria10 DevKit.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
index 3198336..fd69f0c 100644
@@ -43,6 +43,7 @@ obj-y				+= ti-st/
 obj-y				+= lis3lv02d/
 obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o
 obj-$(CONFIG_ALTERA_STAPL)	+=altera-stapl/
+obj-$(CONFIG_ALTERA_A10SR_MON)  += altera-a10sr-mon.o
 obj-$(CONFIG_INTEL_MEI)		+= mei/
 obj-$(CONFIG_VMWARE_VMCI)	+= vmw_vmci/
 obj-$(CONFIG_LATTICE_ECP3_CONFIG)	+= lattice-ecp3-config.o
drivers/misc/altera-a10sr-mon.c new file +184 -0

184 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#5 lore raw

PATCH 3/4 mfd: altr-a10sr: Add Arria10 SR Monitor

In reply to [email protected]

From: Thor Thayer <[email protected]>

Add the Altera Arria10 DevKit System Resource Monitor functionality to the MFD device.

---
 drivers/mfd/altera-a10sr.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/mfd/altera-a10sr.c +4 -0
index 06e1f7f..0942d7d 100644
@@ -33,6 +33,10 @@
 		.name = "altr_a10sr_gpio",
 		.of_compatible = "altr,a10sr-gpio",
 	},
+	{
+		.name = "altr_a10sr_mon",
+		.of_compatible = "altr,a10sr-mon",
+	},
 };
 
 static bool altr_a10sr_reg_readable(struct device *dev, unsigned int reg)
Signature · 1 line
1.7.9.5
#6 lore raw

Re: [PATCH 3/4] mfd: altr-a10sr: Add Arria10 SR Monitor

Quoted 15 lines · On Thu, 13 Oct 2016, [email protected] wrote:

From: Thor Thayer <[email protected]>

Add the Altera Arria10 DevKit System Resource Monitor functionality to the MFD device.

---
 drivers/mfd/altera-a10sr.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/mfd/altera-a10sr.c +0 -0
index 06e1f7f..0942d7d 100644

drivers/mfd/altera-a10sr.c line 38

Quoted 6 lines
drivers/mfd/altera-a10sr.c +3 -0
@@ -33,6 +33,10 @@
 		.name = "altr_a10sr_gpio",
 		.of_compatible = "altr,a10sr-gpio",
 	},
+	{
+		.name = "altr_a10sr_mon",
+		.of_compatible = "altr,a10sr-mon",

"-monitor" would be better in my opinion.

Quoted 4 lines
drivers/mfd/altera-a10sr.c +1 -0
+	},
 };
 
 static bool altr_a10sr_reg_readable(struct device *dev, unsigned int reg)
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#7 lore raw

Re: [PATCH 3/4] mfd: altr-a10sr: Add Arria10 SR Monitor

Quoted 12 lines · Lee Jones
Quoted 10 lines · tthayer at opensource.altera.com

From: Thor Thayer <[email protected]>

Add the Altera Arria10 DevKit System Resource Monitor functionality to the MFD device.

---
 drivers/mfd/altera-a10sr.c |    4 ++++
 1 file changed, 4 insertions(+)
Quoted 14 lines

drivers/mfd/altera-a10sr.c line 38

Quoted 11 lines
drivers/mfd/altera-a10sr.c +3 -0
index 06e1f7f..0942d7d 100644
@@ -33,6 +33,10 @@
 		.name = "altr_a10sr_gpio",
 		.of_compatible = "altr,a10sr-gpio",
 	},
+	{
+		.name = "altr_a10sr_mon",
+		.of_compatible = "altr,a10sr-mon",

"-monitor" would be better in my opinion.

OK. I'm flexible and it is clearer. I'll make the changes and resubmit. Thanks for reviewing!

Quoted 5 lines
Quoted 4 lines
drivers/mfd/altera-a10sr.c +1 -0
+	},
 };
 
 static bool altr_a10sr_reg_readable(struct device *dev, unsigned int reg)
#8 lore raw

PATCH 4/4 ARM: socfpga: dts: Add Monitor to A10-SR MFD

In reply to [email protected]

From: Thor Thayer <[email protected]>

Add the Monitor functionality to the Arria10 DevKit System Resource chip.

---
 arch/arm/boot/dts/socfpga_arria10_socdk.dtsi |    4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/socfpga_arria10_socdk.dtsi +4 -0
index eb00ae3..183d88b 100644
@@ -121,6 +121,10 @@
 			gpio-controller;
 			#gpio-cells = <2>;
 		};
+
+		a10sr_monitor {
+			compatible = "altr,a10sr-mon";
+		};
 	};
 };
 
Signature · 1 line
1.7.9.5