All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shobhit Kumar <shobhit.kumar@intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>
Cc: gnurou@gmail.com, Jani Nikula <jani.nikula@intel.com>,
	Shobhit Kumar <shobhit.kumar@intel.com>,
	linus.walleij@linaro.org, thierry.reding@gmail.com,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH 1/2] gpio/crystalcove: Export Panel and backlight en/disable signals as GPIO
Date: Wed, 18 Feb 2015 17:48:13 +0530	[thread overview]
Message-ID: <1424261894-24983-2-git-send-email-shobhit.kumar@intel.com> (raw)
In-Reply-To: <1424261894-24983-1-git-send-email-shobhit.kumar@intel.com>

Export Panel BACKLIGHT_EN(offset 0x51) and PANEL_EN(offset 0x52) as two
additional GPIOs. Needed by display driver to enable the DSI panel on
BYT platform where the Panel EN/Disable and Backlight control are
routed thorugh CRC PMIC

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
---
 drivers/gpio/gpio-crystalcove.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c
index 3d9e08f..9e94dc64 100644
--- a/drivers/gpio/gpio-crystalcove.c
+++ b/drivers/gpio/gpio-crystalcove.c
@@ -24,7 +24,7 @@
 #include <linux/mfd/intel_soc_pmic.h>
 
 #define CRYSTALCOVE_GPIO_NUM	16
-#define CRYSTALCOVE_VGPIO_NUM	94
+#define CRYSTALCOVE_VGPIO_NUM	96
 
 #define UPDATE_IRQ_TYPE		BIT(0)
 #define UPDATE_IRQ_MASK		BIT(1)
@@ -39,6 +39,7 @@
 #define GPIO0P0CTLI		0x33
 #define GPIO1P0CTLO		0x3b
 #define GPIO1P0CTLI		0x43
+#define GPIOPANELCTL		0x51
 
 #define CTLI_INTCNT_DIS		(0)
 #define CTLI_INTCNT_NE		(1 << 1)
@@ -93,6 +94,11 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type)
 {
 	int reg;
 
+	if (gpio >= 94) {
+		reg = GPIOPANELCTL + gpio - 94;
+		return reg;
+	}
+
 	if (reg_type == CTRL_IN) {
 		if (gpio < 8)
 			reg = GPIO0P0CTLI;
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-02-18 12:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 12:18 [PATCH 0/2] Crystal Cove PMIC based Panel Control Shobhit Kumar
2015-02-18 12:18 ` Shobhit Kumar [this message]
2015-03-06 11:04   ` [PATCH 1/2] gpio/crystalcove: Export Panel and backlight en/disable signals as GPIO Linus Walleij
2015-03-06 16:23     ` Kumar, Shobhit
2015-03-09 17:15       ` Linus Walleij
2015-03-12 15:06         ` Kumar, Shobhit
2015-03-18 11:50           ` Linus Walleij
2015-03-18 13:27             ` Daniel Vetter
2015-03-24  9:50               ` Linus Walleij
2015-03-25 12:27   ` Linus Walleij
2015-03-25 14:15     ` Kumar, Shobhit
2015-03-25 14:39       ` Linus Walleij
2015-02-18 12:18 ` [PATCH 2/2] drm/i915: Use the CRC gpio_chip for panel enable/disable Shobhit Kumar
2015-02-26 10:13   ` Alexandre Courbot
2015-03-01 13:24     ` Kumar, Shobhit

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=1424261894-24983-2-git-send-email-shobhit.kumar@intel.com \
    --to=shobhit.kumar@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=gnurou@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=thierry.reding@gmail.com \
    /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 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.