Re: [PATCH 3/4 v5] video, sm501: add OF binding to support SM501

2011-03-22 Thread Paul Mundt
On Thu, Mar 17, 2011 at 07:12:56AM +0100, Heiko Schocher wrote:
 Paul Mundt schrieb:
  On Tue, Mar 15, 2011 at 08:26:40AM +0100, Heiko Schocher wrote:
  0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious 
  style problems and is ready for submission.
 
   Documentation/powerpc/dts-bindings/sm501.txt |   34 +
   drivers/mfd/sm501.c  |9 +-
   drivers/video/sm501fb.c  |   42 
  --
   3 files changed, 81 insertions(+), 4 deletions(-)
   create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt
  This patchset is pending know for a while. I got Acked by from
 
  Samuel Ortiz for the mfd part, see here:
 
  http://www.spinics.net/lists/linux-fbdev/msg02550.html
  http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html
 
  and for the DTS part from Benjamin Herrenschmidt:
 
  http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html
 
  Are there some more issues?
 
  Not that I remember off the top of my head, but I think they've been lost
  in my backlog. Could you re-send the current series with the appropriate
  acked-bys? If there's nothing else obvious outstanding I'll roll them in.
 
 Ok, I resend them (I also rebase them to current tree, ok?)
 
Ok, I've dug them up on l-k in the meantime and applied 1-3. 4/4 doesn't
apply due to a missing dts file, but I assume you're aware of that and
will take care of it separately. Let me know if I've overlooked anything,
and sorry for the delay!
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 3/4 v5] video, sm501: add OF binding to support SM501

2011-03-22 Thread Heiko Schocher
Hello Paul,

Paul Mundt wrote:
 On Thu, Mar 17, 2011 at 07:12:56AM +0100, Heiko Schocher wrote:
 Paul Mundt schrieb:
 On Tue, Mar 15, 2011 at 08:26:40AM +0100, Heiko Schocher wrote:
 0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious 
 style problems and is ready for submission.

  Documentation/powerpc/dts-bindings/sm501.txt |   34 +
  drivers/mfd/sm501.c  |9 +-
  drivers/video/sm501fb.c  |   42 
 --
  3 files changed, 81 insertions(+), 4 deletions(-)
  create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt
 This patchset is pending know for a while. I got Acked by from

 Samuel Ortiz for the mfd part, see here:

 http://www.spinics.net/lists/linux-fbdev/msg02550.html
 http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html

 and for the DTS part from Benjamin Herrenschmidt:

 http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html

 Are there some more issues?

 Not that I remember off the top of my head, but I think they've been lost
 in my backlog. Could you re-send the current series with the appropriate
 acked-bys? If there's nothing else obvious outstanding I'll roll them in.
 Ok, I resend them (I also rebase them to current tree, ok?)

 Ok, I've dug them up on l-k in the meantime and applied 1-3. 4/4 doesn't
 apply due to a missing dts file, but I assume you're aware of that and
 will take care of it separately. Let me know if I've overlooked anything,
 and sorry for the delay!

No problem!

Just working on this patchset (rebase and check if it boots/works) ... will
post the update (with all patches again) in some minutes, so please wait
for it.

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 3/4 v5] video, sm501: add OF binding to support SM501

2011-03-17 Thread Heiko Schocher
Hello Paul,

Paul Mundt schrieb:
 On Tue, Mar 15, 2011 at 08:26:40AM +0100, Heiko Schocher wrote:
 0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
 problems and is ready for submission.

  Documentation/powerpc/dts-bindings/sm501.txt |   34 +
  drivers/mfd/sm501.c  |9 +-
  drivers/video/sm501fb.c  |   42 
 --
  3 files changed, 81 insertions(+), 4 deletions(-)
  create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt
 This patchset is pending know for a while. I got Acked by from

 Samuel Ortiz for the mfd part, see here:

 http://www.spinics.net/lists/linux-fbdev/msg02550.html
 http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html

 and for the DTS part from Benjamin Herrenschmidt:

 http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html

 Are there some more issues?

 Not that I remember off the top of my head, but I think they've been lost
 in my backlog. Could you re-send the current series with the appropriate
 acked-bys? If there's nothing else obvious outstanding I'll roll them in.

Ok, I resend them (I also rebase them to current tree, ok?)

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 3/4 v5] video, sm501: add OF binding to support SM501

2011-03-16 Thread Paul Mundt
On Tue, Mar 15, 2011 at 08:26:40AM +0100, Heiko Schocher wrote:
  0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
  problems and is ready for submission.
  
   Documentation/powerpc/dts-bindings/sm501.txt |   34 +
   drivers/mfd/sm501.c  |9 +-
   drivers/video/sm501fb.c  |   42 
  --
   3 files changed, 81 insertions(+), 4 deletions(-)
   create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt
 
 This patchset is pending know for a while. I got Acked by from
 
 Samuel Ortiz for the mfd part, see here:
 
 http://www.spinics.net/lists/linux-fbdev/msg02550.html
 http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html
 
 and for the DTS part from Benjamin Herrenschmidt:
 
 http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html
 
 Are there some more issues?
 
Not that I remember off the top of my head, but I think they've been lost
in my backlog. Could you re-send the current series with the appropriate
acked-bys? If there's nothing else obvious outstanding I'll roll them in.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 3/4 v5] video, sm501: add OF binding to support SM501

2011-03-15 Thread Heiko Schocher
Hello

Heiko Schocher wrote:
 - add binding to OF, compatible name smi,sm501
 
 Signed-off-by: Heiko Schocher h...@denx.de
 cc: linux-fb...@vger.kernel.org
 cc: devicetree-disc...@ozlabs.org
 cc: Ben Dooks b...@simtec.co.uk
 cc: Vincent Sanders vi...@simtec.co.uk
 cc: Samuel Ortiz sa...@linux.intel.com
 cc: linux-ker...@vger.kernel.org
 cc: Randy Dunlap rdun...@xenotime.net
 cc: Paul Mundt let...@linux-sh.org
 
 ---
 - changes since v1:
   add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
   Paul Mundt.
 - changes since v2:
   add comments from Randy Dunlap:
   - move parameter documentation to Documentation/fb/sm501.txt
 - changes since v3:
   - rebased against v2.6.38-rc2
   - split in 3 patches
 - of support patch
   - get rid of #if defined(CONFIG_PPC_MPC52xx) usage
 hide this in DTS, as Paul suggested.
 - i/o routine patch
 - edid support patch
 - changes since v4
   replace remaining CONFIG_PPC_MPC52xx with CONFIG_OF, as
   it is no longer MPC52xx only.
 - changes since v5
   free edid_data after its usage, as it is no longer needed,
   suggested from Paul Mundt. Also fall back to default if
   kmemdup(edid_data) fails.
 
 ./scripts/checkpatch.pl 0003-video-sm501-add-OF-binding-to-support-SM501.patch
 total: 0 errors, 0 warnings, 132 lines checked
 
 0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
 problems and is ready for submission.
 
  Documentation/powerpc/dts-bindings/sm501.txt |   34 +
  drivers/mfd/sm501.c  |9 +-
  drivers/video/sm501fb.c  |   42 
 --
  3 files changed, 81 insertions(+), 4 deletions(-)
  create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

This patchset is pending know for a while. I got Acked by from

Samuel Ortiz for the mfd part, see here:

http://www.spinics.net/lists/linux-fbdev/msg02550.html
http://linux.derkeiler.com/Mailing-Lists/Kernel/2011-01/msg11798.html

and for the DTS part from Benjamin Herrenschmidt:

http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-February/088279.html

Are there some more issues?

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 3/4 v5] video, sm501: add OF binding to support SM501

2011-01-25 Thread Heiko Schocher
- add binding to OF, compatible name smi,sm501

Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
cc: Ben Dooks b...@simtec.co.uk
cc: Vincent Sanders vi...@simtec.co.uk
cc: Samuel Ortiz sa...@linux.intel.com
cc: linux-ker...@vger.kernel.org
cc: Randy Dunlap rdun...@xenotime.net
cc: Paul Mundt let...@linux-sh.org

---
- changes since v1:
  add Ben Dooks, Vincent Sanders and Samuel Ortiz to cc, as suggested from
  Paul Mundt.
- changes since v2:
  add comments from Randy Dunlap:
  - move parameter documentation to Documentation/fb/sm501.txt
- changes since v3:
  - rebased against v2.6.38-rc2
  - split in 3 patches
- of support patch
  - get rid of #if defined(CONFIG_PPC_MPC52xx) usage
hide this in DTS, as Paul suggested.
- i/o routine patch
- edid support patch
- changes since v4
  replace remaining CONFIG_PPC_MPC52xx with CONFIG_OF, as
  it is no longer MPC52xx only.
- changes since v5
  free edid_data after its usage, as it is no longer needed,
  suggested from Paul Mundt. Also fall back to default if
  kmemdup(edid_data) fails.

./scripts/checkpatch.pl 0003-video-sm501-add-OF-binding-to-support-SM501.patch
total: 0 errors, 0 warnings, 132 lines checked

0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
problems and is ready for submission.

 Documentation/powerpc/dts-bindings/sm501.txt |   34 +
 drivers/mfd/sm501.c  |9 +-
 drivers/video/sm501fb.c  |   42 --
 3 files changed, 81 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

diff --git a/Documentation/powerpc/dts-bindings/sm501.txt 
b/Documentation/powerpc/dts-bindings/sm501.txt
new file mode 100644
index 000..7d319fb
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/sm501.txt
@@ -0,0 +1,34 @@
+* SM SM501
+
+The SM SM501 is a LCD controller, with proper hardware, it can also
+drive DVI monitors.
+
+Required properties:
+- compatible : should be smi,sm501.
+- reg : contain two entries:
+- First entry: System Configuration register
+- Second entry: IO space (Display Controller register)
+- interrupts : SMI interrupt to the cpu should be described here.
+- interrupt-parent : the phandle for the interrupt controller that
+  services interrupts for this device.
+
+Optional properties:
+- mode : select a video mode:
+xresxyres[-bpp][@refresh]
+- edid : verbatim EDID data block describing attached display.
+  Data from the detailed timing descriptor will be used to
+  program the display controller.
+- little-endian: availiable on big endian systems, to
+  set different foreign endian.
+- big-endian: availiable on little endian systems, to
+  set different foreign endian.
+
+Example for MPC5200:
+   display@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   interrupts = 1 1 3;
+   mode = 640x480-32@60;
+   edid = [edid-data];
+   };
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 558d5f3..df3702c 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -1377,7 +1377,7 @@ static int __devinit sm501_init_dev(struct sm501_devdata 
*sm)
sm501_register_gpio(sm);
}
 
-   if (pdata-gpio_i2c != NULL  pdata-gpio_i2c_nr  0) {
+   if (pdata  pdata-gpio_i2c != NULL  pdata-gpio_i2c_nr  0) {
if (!sm501_gpio_isregistered(sm))
dev_err(sm-dev, no gpio available for i2c gpio.\n);
else
@@ -1422,6 +1422,7 @@ static int __devinit sm501_plat_probe(struct 
platform_device *dev)
 
sm-io_res = platform_get_resource(dev, IORESOURCE_MEM, 1);
sm-mem_res = platform_get_resource(dev, IORESOURCE_MEM, 0);
+
if (sm-io_res == NULL || sm-mem_res == NULL) {
dev_err(dev-dev, failed to get IO resource\n);
ret = -ENOENT;
@@ -1735,10 +1736,16 @@ static struct pci_driver sm501_pci_driver = {
 
 MODULE_ALIAS(platform:sm501);
 
+static struct of_device_id __devinitdata of_sm501_match_tbl[] = {
+   { .compatible = smi,sm501, },
+   { /* end */ }
+};
+
 static struct platform_driver sm501_plat_driver = {
.driver = {
.name   = sm501,
.owner  = THIS_MODULE,
+   .of_match_table = of_sm501_match_tbl,
},
.probe  = sm501_plat_probe,
.remove = sm501_plat_remove,
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index d60b2a2..92b001d 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -1729,6 +1729,15 @@ static int sm501fb_init_fb(struct fb_info *fb,
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN;
 
+#if defined(CONFIG_OF)