All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] staging: mt7621-gpio: use mediatek as binding instead of custom mtk
@ 2018-05-15  8:37 Sergio Paracuellos
  2018-05-15  8:37 ` [PATCH 1/4] staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio Sergio Paracuellos
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2018-05-15  8:37 UTC (permalink / raw)
  To: gregkh; +Cc: neil, driverdev-devel

The following series updated mt7621-gpio driver to use 'mediatek'
which is already defined in kernel bindings documentation instead
of add a new custom one 'mtk' for this company. mt7621-gpio device-tree 
documentation has been added also but there some missing stuff 
about gpio  interrupts which is not included in dtsi yet. So add 
temporal documentation to the staging driver directory and update 
TODO file accordly with missing things to get this driver out of 
staging.

Sergio Paracuellos (4):
  staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio
  staging: mt7621-gpio: update TODO file
  staging: mt7621-dts: update gpios related entries to use 'mediatek'
  staging: mt7621-gpio: replace 'mtk' to use correct one 'mediatek'

 drivers/staging/mt7621-dts/mt7621.dtsi             |  8 ++--
 drivers/staging/mt7621-gpio/TODO                   |  4 +-
 drivers/staging/mt7621-gpio/gpio-mt7621.c          |  4 +-
 .../staging/mt7621-gpio/mediatek,mt7621-gpio.txt   | 51 ++++++++++++++++++++++
 4 files changed, 60 insertions(+), 7 deletions(-)
 create mode 100644 drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt

-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 1/4] staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio
  2018-05-15  8:37 [PATCH 0/4] staging: mt7621-gpio: use mediatek as binding instead of custom mtk Sergio Paracuellos
@ 2018-05-15  8:37 ` Sergio Paracuellos
  2018-05-15  8:37 ` [PATCH 2/4] staging: mt7621-gpio: update TODO file Sergio Paracuellos
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2018-05-15  8:37 UTC (permalink / raw)
  To: gregkh; +Cc: neil, driverdev-devel

This commit add missing dt bindings documentation for mt7621-gpio
driver. There is some missing stuff here about interrupts with is
not also being used in the mt7621.dtsi file. So just include in
staging a incomplete version before moving this to kernel's dt-bindings
place.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 .../staging/mt7621-gpio/mediatek,mt7621-gpio.txt   | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt

diff --git a/drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt b/drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt
new file mode 100644
index 0000000..54de9f7
--- /dev/null
+++ b/drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt
@@ -0,0 +1,51 @@
+Mediatek SoC GPIO controller bindings
+
+The IP core used inside these SoCs has 3 banks of 32 GPIOs each.
+The registers of all the banks are interwoven inside one single IO range.
+We load one GPIO controller instance per bank. To make this possible
+we support 2 types of nodes. The parent node defines the memory I/O range and
+has 3 children each describing a single bank.
+
+Required properties for the top level node:
+- compatible:
+  - "mediatek,mt7621-gpio" for Mediatek controllers
+- reg : Physical base address and length of the controller's registers
+
+Required properties for the GPIO bank node:
+- compatible:
+  - "mediatek,mt7621-gpio-bank" for Mediatek banks
+- #gpio-cells : Should be two.
+  - first cell is the pin number
+  - second cell is used to specify optional parameters (unused)
+- gpio-controller : Marks the device node as a GPIO controller
+- reg : The id of the bank that the node describes.
+
+Example:
+	gpio@600 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		compatible = "mediatek,mt7621-gpio";
+		reg = <0x600 0x100>;
+
+		gpio0: bank@0 {
+			reg = <0>;
+			compatible = "mediatek,mt7621-gpio-bank";
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		gpio1: bank@1 {
+			reg = <1>;
+			compatible = "mediatek,mt7621-gpio-bank";
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		gpio2: bank@2 {
+			reg = <2>;
+			compatible = "mediatek,mt7621-gpio-bank";
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+	};
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 2/4] staging: mt7621-gpio: update TODO file
  2018-05-15  8:37 [PATCH 0/4] staging: mt7621-gpio: use mediatek as binding instead of custom mtk Sergio Paracuellos
  2018-05-15  8:37 ` [PATCH 1/4] staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio Sergio Paracuellos
@ 2018-05-15  8:37 ` Sergio Paracuellos
  2018-05-15  8:37 ` [PATCH 3/4] staging: mt7621-dts: update gpios related entries to use 'mediatek' Sergio Paracuellos
  2018-05-15  8:37 ` [PATCH 4/4] staging: mt7621-gpio: replace 'mtk' to use correct one 'mediatek' Sergio Paracuellos
  3 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2018-05-15  8:37 UTC (permalink / raw)
  To: gregkh; +Cc: neil, driverdev-devel

This commit updates TODO file with missing things to
get this driver ready to be mainlined.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/mt7621-gpio/TODO | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/mt7621-gpio/TODO b/drivers/staging/mt7621-gpio/TODO
index 7143905..9077b16 100644
--- a/drivers/staging/mt7621-gpio/TODO
+++ b/drivers/staging/mt7621-gpio/TODO
@@ -1,5 +1,7 @@
 
-- general code review and clean up
+- general code review and clean up 
+- avoid global variables and use drvdata allocated instead
 - ensure device-tree requirements are documented
+- make sure interrupts work
 
 Cc:  NeilBrown <neil@brown.name>
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 3/4] staging: mt7621-dts: update gpios related entries to use 'mediatek'
  2018-05-15  8:37 [PATCH 0/4] staging: mt7621-gpio: use mediatek as binding instead of custom mtk Sergio Paracuellos
  2018-05-15  8:37 ` [PATCH 1/4] staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio Sergio Paracuellos
  2018-05-15  8:37 ` [PATCH 2/4] staging: mt7621-gpio: update TODO file Sergio Paracuellos
@ 2018-05-15  8:37 ` Sergio Paracuellos
  2018-05-15  8:37 ` [PATCH 4/4] staging: mt7621-gpio: replace 'mtk' to use correct one 'mediatek' Sergio Paracuellos
  3 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2018-05-15  8:37 UTC (permalink / raw)
  To: gregkh; +Cc: neil, driverdev-devel

Gpio driver for mt7621 is using 'mtk' as binding but in the kernel
is already defined one for this maker which is 'mediatek'. Update
device tree to use the correct one.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/mt7621-dts/mt7621.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi b/drivers/staging/mt7621-dts/mt7621.dtsi
index 9d941b5..115eb04 100644
--- a/drivers/staging/mt7621-dts/mt7621.dtsi
+++ b/drivers/staging/mt7621-dts/mt7621.dtsi
@@ -64,26 +64,26 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			compatible = "mtk,mt7621-gpio";
+			compatible = "mediatek,mt7621-gpio";
 			reg = <0x600 0x100>;
 
 			gpio0: bank@0 {
 				reg = <0>;
-				compatible = "mtk,mt7621-gpio-bank";
+				compatible = "mediatek,mt7621-gpio-bank";
 				gpio-controller;
 				#gpio-cells = <2>;
 			};
 
 			gpio1: bank@1 {
 				reg = <1>;
-				compatible = "mtk,mt7621-gpio-bank";
+				compatible = "mediatek,mt7621-gpio-bank";
 				gpio-controller;
 				#gpio-cells = <2>;
 			};
 
 			gpio2: bank@2 {
 				reg = <2>;
-				compatible = "mtk,mt7621-gpio-bank";
+				compatible = "mediatek,mt7621-gpio-bank";
 				gpio-controller;
 				#gpio-cells = <2>;
 			};
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 4/4] staging: mt7621-gpio: replace 'mtk' to use correct one 'mediatek'
  2018-05-15  8:37 [PATCH 0/4] staging: mt7621-gpio: use mediatek as binding instead of custom mtk Sergio Paracuellos
                   ` (2 preceding siblings ...)
  2018-05-15  8:37 ` [PATCH 3/4] staging: mt7621-dts: update gpios related entries to use 'mediatek' Sergio Paracuellos
@ 2018-05-15  8:37 ` Sergio Paracuellos
  3 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2018-05-15  8:37 UTC (permalink / raw)
  To: gregkh; +Cc: neil, driverdev-devel

Gpio driver is using mtk and there is already 'mediatek' binding
defined for this maker. Update driver to use it instead the custom
one 'mtk'.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/mt7621-gpio/gpio-mt7621.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c b/drivers/staging/mt7621-gpio/gpio-mt7621.c
index a577381..7d17949 100644
--- a/drivers/staging/mt7621-gpio/gpio-mt7621.c
+++ b/drivers/staging/mt7621-gpio/gpio-mt7621.c
@@ -323,7 +323,7 @@ mediatek_gpio_probe(struct platform_device *pdev)
 	}
 
 	for_each_child_of_node(np, bank)
-		if (of_device_is_compatible(bank, "mtk,mt7621-gpio-bank"))
+		if (of_device_is_compatible(bank, "mediatek,mt7621-gpio-bank"))
 			mediatek_gpio_bank_probe(pdev, bank);
 
 	if (mediatek_gpio_irq_domain)
@@ -334,7 +334,7 @@ mediatek_gpio_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id mediatek_gpio_match[] = {
-	{ .compatible = "mtk,mt7621-gpio" },
+	{ .compatible = "mediatek,mt7621-gpio" },
 	{},
 };
 MODULE_DEVICE_TABLE(of, mediatek_gpio_match);
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2018-05-15  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15  8:37 [PATCH 0/4] staging: mt7621-gpio: use mediatek as binding instead of custom mtk Sergio Paracuellos
2018-05-15  8:37 ` [PATCH 1/4] staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio Sergio Paracuellos
2018-05-15  8:37 ` [PATCH 2/4] staging: mt7621-gpio: update TODO file Sergio Paracuellos
2018-05-15  8:37 ` [PATCH 3/4] staging: mt7621-dts: update gpios related entries to use 'mediatek' Sergio Paracuellos
2018-05-15  8:37 ` [PATCH 4/4] staging: mt7621-gpio: replace 'mtk' to use correct one 'mediatek' Sergio Paracuellos

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.