Hello.

Mark A. Greer wrote:

From: Steve Chen <[email protected]>

   Hm, is it Steve's patch? I'm seeing my stuff here.

Add graphics support for the Sharp LCD035Q3DG01 graphical
LCD that's on the User Interface (UI) daughter card of the
DA830/OMAP-L137 EVM.

The LCD shares EMIFA lines with the NAND and NOR devices that
are also on the UI card so those lines are shared via a couple
of muxes.  The muxes are controlled by the 'MUX_MODE' line on
the UI card.  The 'MUX_MODE' line is controlled by pin P6 of
a pcf8574 i2c expander that's at i2c address 0x3f on UI card.
The i2c expander is controlled using the gpio infrastructure
from the board code using the 'setup()' and 'teardown()'
routines.

Signed-off-by: Steve Chen <[email protected]>
Signed-off-by: Mark A. Greer <[email protected]>

   This patch really misses my signoff...

---
 arch/arm/mach-davinci/Kconfig           |   21 ++++++++++++++
 arch/arm/mach-davinci/board-da830-evm.c |   44 ++++++++++++++++++++++++++++++-
 arch/arm/mach-davinci/da830.c           |    2 +-
 3 files changed, 65 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 40866c6..7b6dddf 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -101,6 +101,27 @@ config MACH_DAVINCI_DA830_EVM
        help
          Say Y here to select the TI DA830/OMAP-L137 Evaluation Module.
+config DA830_UI
+       bool "DA830/OMAP-L137 UI (User Interface) board support"
+       depends on MACH_DAVINCI_DA830_EVM
+       help
+         Say Y here if you have the DA830/OMAP-L137 UI
+         (User Interface) board installed and you want to
+         enable the peripherals located on User Interface
+         board.
+
+choice
+       prompt "Select DA830/OMAP-L137 UI board peripheral"
+       depends on DA830_UI
+
+config DA830_UI_LCD
+       bool "LCD"
+       help
+         Say Y here to use the LCD as a framebuffer or simple character
+         display.
+
+endchoice

   Certainly my addition thu the help text was somewhat reworded...

+
 config MACH_DAVINCI_DA850_EVM
        bool "TI DA850/OMAP-L138 Reference Platform"
        default ARCH_DAVINCI_DA850
diff --git a/arch/arm/mach-davinci/board-da830-evm.c 
b/arch/arm/mach-davinci/board-da830-evm.c
index 69a791a..dfc4897 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -13,7 +13,9 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/console.h>
+#include <linux/gpio.h>
 #include <linux/i2c.h>
+#include <linux/i2c/pcf857x.h>
 #include <linux/i2c/at24.h>
#include <asm/mach-types.h>
@@ -38,6 +40,31 @@ static struct at24_platform_data da830_evm_i2c_eeprom_info = 
{
        .context        = (void *)0x7f00,
 };
+static int da830_evm_ui_expander_setup(struct i2c_client *client, int gpio,
+               unsigned ngpio, void *context)
+{
+       gpio_request(gpio + 6, "MUX_MODE");
+#ifdef CONFIG_DA830_UI_LCD
+       gpio_direction_output(gpio + 6, 0);
+#else /* Must be NAND or NOR */
+       gpio_direction_output(gpio + 6, 1);

   One is the default value after reset, no need to reprogram it.

+#endif
+       return 0;
+}
+

[...]

@@ -175,6 +206,17 @@ static __init void da830_evm_init(void)
        if (ret)
                pr_warning("da830_evm_init: mmc/sd registration failed: %d\n",
                                ret);
+
+#ifdef CONFIG_DA830_UI_LCD
+       ret = da8xx_pinmux_setup(da830_lcdcntl_pins);
+       if (ret)
+               pr_warning("da830_evm_init: lcdcntl mux setup failed: %d\n",
+                               ret);
+
+       ret = da8xx_register_lcdc(&sharp_lcd035q3dg01_pdata);

It's again not clear why board specific LCD platfrom data ended up in devices-da8xx.c

+       if (ret)
+               pr_warning("da830_evm_init: lcd setup failed: %d\n", ret);
+#endif
 }
#ifdef CONFIG_SERIAL_8250_CONSOLE

I see this has been committed too -- Kevin, really, could you allow more time on patch comments?

WBR, Sergei

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to