linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jun Nie <niej0001@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/8] pxa: support PXA168 LCD platform dependent power on
Date: Mon, 16 Nov 2009 09:34:27 +0000	[thread overview]
Message-ID: <7c34ac520911160134w531a2c0aq3f1ee81b93049dd3@mail.gmail.com> (raw)
In-Reply-To: <7c34ac520911100012y4b52659eid46c241111c34032@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

From: Jun Nie <njun@marvell.com>
Date: Mon, 16 Nov 2009 17:16:35 +0800
Subject: [PATCH] pxa: support PXA168 LCD platform dependent power on

Signed-off-by: Jun Nie <njun@marvell.com>
---
 drivers/video/pxa168fb.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c
index aec95c4..e728be3 100644
--- a/drivers/video/pxa168fb.c
+++ b/drivers/video/pxa168fb.c
@@ -845,6 +845,23 @@ static int __init pxa168fb_probe(struct
platform_device *pdev)
 	}

 	platform_set_drvdata(pdev, fbi);
+	if (mi->pxa168fb_lcd_power) {
+		if (gpio_is_valid(mi->spi_gpio_cs)) {
+			ret = gpio_request(mi->spi_gpio_cs, "LCD_SPI_CS");
+			if (ret) {
+				dev_err(&pdev->dev,
+					"failed to request GPIO for LCD CS\n");
+				return -EIO;
+			}
+		}
+		ret = mi->pxa168fb_lcd_power(fbi, mi->spi_gpio_cs,
+				mi->spi_gpio_reset, 1);
+		if (ret) {
+			dev_err(&pdev->dev, "Failed to power up pxa168-fb\n");
+			goto failed_free_irq;
+		}
+	}
+	dev_info(fbi->dev, "frame buffer detected\n");
 	return 0;

 failed_free_irq:
-- 
1.5.4.3

[-- Attachment #2: 0002-pxa-support-PXA168-LCD-platform-dependent-power-on.patch --]
[-- Type: text/x-diff, Size: 1171 bytes --]

From 0fe41d67a29d6bac116d5d59430ffd681196e1f8 Mon Sep 17 00:00:00 2001
From: Jun Nie <njun@marvell.com>
Date: Mon, 16 Nov 2009 17:16:35 +0800
Subject: [PATCH] pxa: support PXA168 LCD platform dependent power on

Signed-off-by: Jun Nie <njun@marvell.com>
---
 drivers/video/pxa168fb.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c
index aec95c4..e728be3 100644
--- a/drivers/video/pxa168fb.c
+++ b/drivers/video/pxa168fb.c
@@ -845,6 +845,23 @@ static int __init pxa168fb_probe(struct platform_device *pdev)
 	}
 
 	platform_set_drvdata(pdev, fbi);
+	if (mi->pxa168fb_lcd_power) {
+		if (gpio_is_valid(mi->spi_gpio_cs)) {
+			ret = gpio_request(mi->spi_gpio_cs, "LCD_SPI_CS");
+			if (ret) {
+				dev_err(&pdev->dev,
+					"failed to request GPIO for LCD CS\n");
+				return -EIO;
+			}
+		}
+		ret = mi->pxa168fb_lcd_power(fbi, mi->spi_gpio_cs,
+				mi->spi_gpio_reset, 1);
+		if (ret) {
+			dev_err(&pdev->dev, "Failed to power up pxa168-fb\n");
+			goto failed_free_irq;
+		}
+	}
+	dev_info(fbi->dev, "frame buffer detected\n");
 	return 0;
 
 failed_free_irq:
-- 
1.5.4.3


      parent reply	other threads:[~2009-11-16  9:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10  8:12 [PATCH 2/8] pxa: support PXA168 LCD platform dependent power on Jun Nie
2009-11-12  2:16 ` Jun Nie
2009-11-16  9:34 ` Jun Nie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c34ac520911160134w531a2c0aq3f1ee81b93049dd3@mail.gmail.com \
    --to=niej0001@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).