Add Altera A10SR Status & Control Monitor
PATCH v2 1/4 dt-bindings: mfd: Add Altera Arria10 SR Monitor
In reply to [email protected]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/
---
v2 Change compatible string -mon to -monitor for clarity
--- Documentation/devicetree/bindings/mfd/altera-a10sr.txt | 9 +++++++++ 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +9 -0
@@ -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-monitor" + Example: resource-manager@0 {
@@ -43,4 +48,8 @@ Example: gpio-controller; #gpio-cells = <2>; }; + + a10sr_monitor { + compatible = "altr,a10sr-monitor"; + }; };
Signature · 1 line
1.9.1
PATCH v2 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.
---
v2 Change from -mon to -monitor for clarity
--- drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mfd/altera-a10sr.c +4 -0
@@ -33,6 +33,10 @@ .name = "altr_a10sr_gpio", .of_compatible = "altr,a10sr-gpio", }, + { + .name = "altr_a10sr_monitor", + .of_compatible = "altr,a10sr-monitor", + }, };static bool altr_a10sr_reg_readable (struct device *dev,unsigned int reg)
Signature · 1 line
1.9.1
PATCH v2 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.
---
v2 Change from -mon to -monitor for clarity.
--- arch/arm/boot/dts/socfpga_arria10_socdk.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/socfpga_arria10_socdk.dtsi +4 -0
@@ -121,6 +121,10 @@ gpio-controller; #gpio-cells = <2>; }; + + a10sr_monitor { + compatible = "altr,a10sr-monitor"; + }; }; };
Signature · 1 line
1.9.1
PATCH v2 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.
---
v2 Change compatible string and filename from -mon to -monitor
Change CONFIG from module to builtin.
Make wm_rst register writeable.
--- MAINTAINERS | 1 + drivers/misc/Kconfig | 7 ++ drivers/misc/Makefile | 1 + drivers/misc/altera-a10sr-monitor.c | 176 ++++++++++++++++++++++++++++++++++++ 4 files changed, 185 insertions(+) create mode 100644 drivers/misc/altera-a10sr-monitor.c
MAINTAINERS +1 -0
@@ -631,6 +631,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-monitor.c F: include/linux/mfd/altera-a10sr.h ALTERA TRIPLE SPEED ETHERNET DRIVER
drivers/misc/Kconfig +7 -0
@@ -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_MONITOR + bool "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
@@ -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_MONITOR) += altera-a10sr-monitor.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-monitor.c new file +176 -0
176 lines not on this page · raw message
Signature · 1 line
1.9.1
v2 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.
Version 2 changes the DT names from -mon to -monitor for better readability and clarity and changed the previous version from modular to built-in.
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-monitor.c | 176 +++++++++++++++++++++ 7 files changed, 202 insertions(+) create mode 100644 drivers/misc/altera-a10sr-monitor.c
Signature · 1 line
1.9.1
Rob Herring
maintainerRe: [PATCHv2 1/4] dt-bindings: mfd: Add Altera Arria10 SR Monitor
In reply to [email protected]Quoted 21 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.
Signed-off-by Thor Thayer <[email protected]>---
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/
---
v2 Change compatible string -mon to -monitor for clarity--- Documentation/devicetree/bindings/mfd/altera-a10sr.txt | 9 +++++++++ 1 file changed, 9 insertions(+)Documentation/devicetree/bindings/mfd/altera-a10sr.txt +0
-0
Documentation/devicetree/bindings/mfd/altera-a10sr.txt The A10SR consists of these sub-devices: · line 20
Quoted 3 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +0
-0@@ -18,6 +18,7 @@ The A10SR consists of these sub-devices: Device Description ------ ---------- a10sr_gpio GPIO Controller
This should be just "gpio" BTW.
Documentation/devicetree/bindings/mfd/altera-a10sr.txt The A10SR consists of these sub-devices: · line 21
Quoted 1 line
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +1
-0+a10sr_monitor Register and State Monitoring
s/_/-/ or maybe just "monitor". Not really a generic node name to use for this.
Rob
Re: [PATCHv2 3/4] mfd: altr-a10sr: Add Arria10 SR Monitor
In reply to [email protected]Quoted 17 lines · On Thu, 27 Oct 2016, [email protected] wrote:
From: Thor Thayer <[email protected]>
Add the Altera Arria10 DevKit System Resource Monitor functionality to the MFD device.
Signed-off-by Thor Thayer <[email protected]>---
v2 Change from -mon to -monitor for clarity--- drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mfd/altera-a10sr.c +0
-0
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_monitor", + .of_compatible = "altr,a10sr-monitor",
So long as you use whichever compatible you agree on with Rob:
For my own reference:
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
Re: [PATCHv2 1/4] dt-bindings: mfd: Add Altera Arria10 SR Monitor
In reply to Rob HerringHi Rob,
Quoted 17 lines · Rob Herring
Quoted 16 lines · On Thu, Oct 27, 2016 at 03:00:23PM -0500, [email protected] wrote:
From: Thor Thayer <[email protected]>
Add the Arria10 DevKit System Resource Chip register and state monitoring module to the MFD.
Signed-off-by Thor Thayer <[email protected]>---
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/
---
v2 Change compatible string -mon to -monitor for clarity--- Documentation/devicetree/bindings/mfd/altera-a10sr.txt | 9 +++++++++ 1 file changed, 9 insertions(+)
Quoted 10 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt The A10SR consists of these sub-devices: · line 20
Quoted 8 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +0
-0@@ -18,6 +18,7 @@ The A10SR consists of these sub-devices: Device Description ------ ---------- a10sr_gpio GPIO ControllerThis should be just "gpio" BTW.
I reason I preprend a10sr_ is to distinguish this GPIO from the other GPIOs when binding to our LEDs (see below). I think the LEDs need a unique node name (unless I'm not understanding something).
A less important reason I use a10sr_gpio on the node name is that I can cat the /sys/class/gpio/gpioxxx/label and see that it is associated with the a10sr instead of one of our other general GPIOs. Is there a better way to distinguish these?
Quoted 6 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt The A10SR consists of these sub-devices: · line 21
Quoted 2 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +1
-0+a10sr_monitor Register and State Monitorings/_/-/ or maybe just "monitor". Not really a generic node name to use for this.
The reason I use _ for the node name is that the DTC fails if I reference a node name with "-" but works OK for "_". For instance, I get an error if the LEDs reference "a10sr-gpio" but "a10sr_gpio" compiles ok.
Thanks for reviewing!
Thor
Quoted 2 lines
Rob
Rob Herring
maintainerRe: [PATCHv2 1/4] dt-bindings: mfd: Add Altera Arria10 SR Monitor
Quoted 37 lines · Thor Thayer
Hi Rob,
Quoted 20 lines · Rob Herring
Quoted 17 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.
Signed-off-by Thor Thayer <[email protected]>---
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/
---
v2 Change compatible string -mon to -monitor for clarity--- Documentation/devicetree/bindings/mfd/altera-a10sr.txt | 9 +++++++++ 1 file changed, 9 insertions(+)Quoted 12 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt The A10SR consists of these sub-devices: · line 20
Quoted 9 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +0
-0@@ -18,6 +18,7 @@ The A10SR consists of these sub-devices: Device Description ------ ---------- a10sr_gpio GPIO ControllerThis should be just "gpio" BTW.
Quoted 3 lines
I reason I preprend
a10sr_is to distinguish this GPIO from the other GPIOs when binding to our LEDs (see below). I think the LEDs need a unique node name (unless I'm not understanding something).
You are confusing DTS labels and node names. Labels are global and just convenience for the DTS source only instead of using full paths (and can be anything you want). The node name is local to the level it is at.
Quoted 4 lines
A less important reason I use
a10sr_gpioon the node name is that I can cat the/sys/class/gpio/gpioxxx/labeland see that it is associated with the a10sr instead of one of our other general GPIOs. Is there a better way to distinguish these?
label should come from the label property I think. This is one of the problems with the GPIO sysfs interface and why it is being replaced with the char dev interface.
Rob
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +1
-0+a10sr_monitor Register and State Monitoring
Quoted 7 lines
Quoted 3 lines
s/_/-/ or maybe just "monitor". Not really a generic node name to use for this.
The reason I use _ for the node name is that the DTC fails if I reference a node name with "-" but works OK for "_". For instance, I get an error if the LEDs reference "a10sr-gpio" but "
a10sr_gpio" compiles ok.
Again, I'm talking node names. You are talking labels. And yes, DTS labels can't use '-'.
Rob
Re: [PATCHv2 3/4] mfd: altr-a10sr: Add Arria10 SR Monitor
In reply to Lee JonesHi Lee,
Quoted 28 lines · Lee Jones
Quoted 17 lines · On Thu, 27 Oct 2016, [email protected] wrote:
From: Thor Thayer <[email protected]>
Add the Altera Arria10 DevKit System Resource Monitor functionality to the MFD device.
Signed-off-by Thor Thayer <[email protected]>---
v2 Change from -mon to -monitor for clarity--- drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mfd/altera-a10sr.c +0
-0drivers/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_monitor", + .of_compatible = "altr,a10sr-monitor",So long as you use whichever compatible you agree on with Rob:
Quoted 3 lines
For my own reference:
Acked-for-MFD-by Lee Jones <[email protected]>
I'm getting a "Non-standard signature" warning for this (even if I make everything lower-case).
Would you prefer I submit it with the warning or should I change it to "Acked-by"?
Thanks for reviewing!
Thor
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)
Re: [PATCHv2 3/4] mfd: altr-a10sr: Add Arria10 SR Monitor
Quoted 29 lines · Thor Thayer
Quoted 28 lines · Lee Jones
Quoted 17 lines · On Thu, 27 Oct 2016, [email protected] wrote:
From: Thor Thayer <[email protected]>
Add the Altera Arria10 DevKit System Resource Monitor functionality to the MFD device.
Signed-off-by Thor Thayer <[email protected]>---
v2 Change from -mon to -monitor for clarity--- drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mfd/altera-a10sr.c +0
-0drivers/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_monitor", + .of_compatible = "altr,a10sr-monitor",So long as you use whichever compatible you agree on with Rob:
Quoted 8 lines
Quoted 3 lines
For my own reference:
Acked-for-MFD-by Lee Jones <[email protected]>I'm getting a "Non-standard signature" warning for this (even if I make everything lower-case).
Would you prefer I submit it with the warning or should I change it to "Acked-by"?
Please submit it as you see it. I will amend when applying.
Quoted 9 lines
Thanks for reviewing!
Thor
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)
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog