mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-01-12 01:20:20 +00:00
linux 3.0: add support for loopthrough expansion boards like the uLCD-lite
also add led driver for the beacon board Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux/arm 3.0.1 Kernel Configuration
|
||||
# Linux/arm 3.0.6 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_HAVE_PWM=y
|
||||
@@ -297,6 +297,7 @@ CONFIG_OMAP_SMARTREFLEX_CLASS3=y
|
||||
CONFIG_OMAP_RESET_CLOCKS=y
|
||||
CONFIG_OMAP_MUX=y
|
||||
CONFIG_OMAP_MUX_DEBUG=y
|
||||
CONFIG_OMAP_MUX_WARNINGS=y
|
||||
CONFIG_OMAP_MCBSP=y
|
||||
CONFIG_OMAP_MBOX_FWK=m
|
||||
CONFIG_OMAP_MBOX_KFIFO_SIZE=256
|
||||
@@ -403,7 +404,7 @@ CONFIG_VMSPLIT_3G=y
|
||||
# CONFIG_VMSPLIT_2G is not set
|
||||
# CONFIG_VMSPLIT_1G is not set
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
# CONFIG_PREEMPT_NONE is not set
|
||||
CONFIG_PREEMPT_NONE=y
|
||||
# CONFIG_PREEMPT_VOLUNTARY is not set
|
||||
# CONFIG_PREEMPT is not set
|
||||
CONFIG_HZ=128
|
||||
@@ -1551,7 +1552,34 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y
|
||||
# CONFIG_INPUT_JOYSTICK is not set
|
||||
# CONFIG_INPUT_TABLET is not set
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
# CONFIG_TOUCHSCREEN_ADS7846 is not set
|
||||
# CONFIG_TOUCHSCREEN_AD7877 is not set
|
||||
# CONFIG_TOUCHSCREEN_AD7879 is not set
|
||||
# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set
|
||||
# CONFIG_TOUCHSCREEN_BU21013 is not set
|
||||
# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
|
||||
# CONFIG_TOUCHSCREEN_DYNAPRO is not set
|
||||
# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
|
||||
# CONFIG_TOUCHSCREEN_EETI is not set
|
||||
# CONFIG_TOUCHSCREEN_FUJITSU is not set
|
||||
# CONFIG_TOUCHSCREEN_GUNZE is not set
|
||||
# CONFIG_TOUCHSCREEN_ELO is not set
|
||||
# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
|
||||
# CONFIG_TOUCHSCREEN_MAX11801 is not set
|
||||
# CONFIG_TOUCHSCREEN_MCS5000 is not set
|
||||
# CONFIG_TOUCHSCREEN_MTOUCH is not set
|
||||
# CONFIG_TOUCHSCREEN_INEXIO is not set
|
||||
# CONFIG_TOUCHSCREEN_MK712 is not set
|
||||
# CONFIG_TOUCHSCREEN_PENMOUNT is not set
|
||||
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
|
||||
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
|
||||
# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
|
||||
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
|
||||
# CONFIG_TOUCHSCREEN_TSC2005 is not set
|
||||
CONFIG_TOUCHSCREEN_TSC2007=y
|
||||
# CONFIG_TOUCHSCREEN_W90X900 is not set
|
||||
# CONFIG_TOUCHSCREEN_ST1232 is not set
|
||||
# CONFIG_TOUCHSCREEN_TPS6507X is not set
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_AD714X=m
|
||||
CONFIG_INPUT_AD714X_I2C=m
|
||||
@@ -2430,7 +2458,19 @@ CONFIG_PANEL_NEC_NL8048HL11_01B=y
|
||||
CONFIG_PANEL_TPO_TD043MTEA1=m
|
||||
CONFIG_BACKLIGHT_LCD_SUPPORT=y
|
||||
CONFIG_LCD_CLASS_DEVICE=y
|
||||
# CONFIG_LCD_L4F00242T03 is not set
|
||||
# CONFIG_LCD_LMS283GF05 is not set
|
||||
# CONFIG_LCD_LTV350QV is not set
|
||||
# CONFIG_LCD_TDO24M is not set
|
||||
# CONFIG_LCD_VGG2432A4 is not set
|
||||
# CONFIG_LCD_PLATFORM is not set
|
||||
# CONFIG_LCD_S6E63M0 is not set
|
||||
# CONFIG_LCD_LD9040 is not set
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_GENERIC=y
|
||||
# CONFIG_BACKLIGHT_PWM is not set
|
||||
# CONFIG_BACKLIGHT_ADP8860 is not set
|
||||
# CONFIG_BACKLIGHT_ADP8870 is not set
|
||||
|
||||
#
|
||||
# Display device support
|
||||
@@ -2562,6 +2602,7 @@ CONFIG_HID_PETALYNX=y
|
||||
CONFIG_HID_PICOLCD=m
|
||||
CONFIG_HID_PICOLCD_FB=y
|
||||
CONFIG_HID_PICOLCD_BACKLIGHT=y
|
||||
# CONFIG_HID_PICOLCD_LCD is not set
|
||||
CONFIG_HID_PICOLCD_LEDS=y
|
||||
CONFIG_HID_QUANTA=m
|
||||
CONFIG_HID_ROCCAT=m
|
||||
@@ -2795,6 +2836,7 @@ CONFIG_USB_FUNCTIONFS=m
|
||||
CONFIG_USB_FUNCTIONFS_RNDIS=y
|
||||
# CONFIG_USB_FUNCTIONFS_GENERIC is not set
|
||||
CONFIG_USB_FILE_STORAGE=m
|
||||
# CONFIG_USB_FILE_STORAGE_TEST is not set
|
||||
CONFIG_USB_MASS_STORAGE=m
|
||||
# CONFIG_USB_G_SERIAL is not set
|
||||
# CONFIG_USB_MIDI_GADGET is not set
|
||||
@@ -2860,6 +2902,7 @@ CONFIG_LEDS_LP5523=m
|
||||
CONFIG_LEDS_PWM=m
|
||||
CONFIG_LEDS_REGULATOR=m
|
||||
# CONFIG_LEDS_BD2802 is not set
|
||||
CONFIG_LEDS_WS2801=y
|
||||
# CONFIG_LEDS_LT3593 is not set
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From bbe3f55963a08d3b4a8324abee8e05f25f2d9200 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Tue, 11 Oct 2011 13:13:35 +0200
|
||||
Subject: [PATCH] ARM: OMAP2: beagleboard: add support for loopthrough expansionboard, make uLCD use it
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 15 +++++++++++++--
|
||||
1 files changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 8c0d1a3..7e5558d 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -253,6 +253,7 @@ static void __init omap3_beagle_init_rev(void)
|
||||
}
|
||||
|
||||
char expansionboard_name[16];
|
||||
+char expansionboard2_name[16];
|
||||
|
||||
#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
|
||||
#include <linux/regulator/fixed.h>
|
||||
@@ -868,6 +869,15 @@ static int __init expansionboard_setup(char *str)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int __init expansionboard2_setup(char *str)
|
||||
+{
|
||||
+ if (!str)
|
||||
+ return -EINVAL;
|
||||
+ strncpy(expansionboard2_name, str, 16);
|
||||
+ printk(KERN_INFO "Beagle second expansionboard: %s\n", expansionboard2_name);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void __init beagle_opp_init(void)
|
||||
{
|
||||
int r = 0;
|
||||
@@ -1003,9 +1013,9 @@ static void __init omap3_beagle_init(void)
|
||||
platform_device_register(&omap_vwlan_device);
|
||||
}
|
||||
|
||||
- if(!strcmp(expansionboard_name, "bbtoys-ulcd"))
|
||||
+ if(!strcmp(expansionboard2_name, "bbtoys-ulcd"))
|
||||
{
|
||||
- printk(KERN_INFO "Beagle expansionboard: registering bbtoys-ulcd\n");
|
||||
+ printk(KERN_INFO "Beagle second expansionboard: registering bbtoys-ulcd\n");
|
||||
omap_register_i2c_bus(2, 400, beagle_i2c2_bbtoys_ulcd,
|
||||
ARRAY_SIZE(beagle_i2c2_bbtoys_ulcd));
|
||||
}
|
||||
@@ -1027,6 +1037,7 @@ static void __init omap3_beagle_init(void)
|
||||
}
|
||||
|
||||
early_param("buddy", expansionboard_setup);
|
||||
+early_param("buddy2", expansionboard2_setup);
|
||||
|
||||
MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
|
||||
/* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
From 846578cb98e201d771098968c7022a125cb6bb07 Mon Sep 17 00:00:00 2001
|
||||
From: David Anders <x0132446@ti.com>
|
||||
Date: Mon, 22 Aug 2011 11:00:38 -0500
|
||||
Subject: [PATCH 2/2] LEDS: add initial support for WS2801 controller
|
||||
|
||||
This adds initial support for the WS2801 RGB LED controller.
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 11 ++
|
||||
drivers/leds/Kconfig | 6 +
|
||||
drivers/leds/Makefile | 1 +
|
||||
drivers/leds/leds-ws2801.c | 159 +++++++++++++++++++++++++++++++
|
||||
4 files changed, 177 insertions(+), 0 deletions(-)
|
||||
create mode 100644 drivers/leds/leds-ws2801.c
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 787891d..0e73089 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -802,6 +802,11 @@ static struct platform_device leds_gpio = {
|
||||
},
|
||||
};
|
||||
|
||||
+static struct platform_device ws2801_leds = {
|
||||
+ .name = "ws2801-leds",
|
||||
+ .id = -1,
|
||||
+};
|
||||
+
|
||||
static struct gpio_keys_button gpio_buttons[] = {
|
||||
{
|
||||
.code = BTN_EXTRA,
|
||||
@@ -1018,6 +1023,12 @@ static void __init omap3_beagle_init(void)
|
||||
lcd_panel.name = beagle_config.lcd_driver_name;
|
||||
}
|
||||
|
||||
+ if(!strcmp(expansionboard_name, "beacon"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering TinCanTools Beacon LED driver\n");
|
||||
+ platform_device_register(&ws2801_leds);
|
||||
+ }
|
||||
+
|
||||
usb_musb_init(NULL);
|
||||
usbhs_init(&usbhs_bdata);
|
||||
omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions,
|
||||
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
|
||||
index 713d43b..fd2c4b3 100644
|
||||
--- a/drivers/leds/Kconfig
|
||||
+++ b/drivers/leds/Kconfig
|
||||
@@ -323,6 +323,12 @@ config LEDS_BD2802
|
||||
This option enables support for BD2802GU RGB LED driver chips
|
||||
accessed via the I2C bus.
|
||||
|
||||
+config LEDS_WS2801
|
||||
+ tristate "LED driver for WS2801 RGB LED"
|
||||
+ depends on LEDS_CLASS
|
||||
+ help
|
||||
+ This option enables support for WS2801 RGB LED driver chips.
|
||||
+
|
||||
config LEDS_INTEL_SS4200
|
||||
tristate "LED driver for Intel NAS SS4200 series"
|
||||
depends on LEDS_CLASS
|
||||
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
|
||||
index bbfd2e3..14f849e 100644
|
||||
--- a/drivers/leds/Makefile
|
||||
+++ b/drivers/leds/Makefile
|
||||
@@ -43,6 +43,7 @@ obj-$(CONFIG_LEDS_MC13783) += leds-mc13783.o
|
||||
obj-$(CONFIG_LEDS_NS2) += leds-ns2.o
|
||||
obj-$(CONFIG_LEDS_NETXBIG) += leds-netxbig.o
|
||||
obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o
|
||||
+obj-$(CONFIG_LEDS_WS2801) += leds-ws2801.o
|
||||
|
||||
# LED SPI Drivers
|
||||
obj-$(CONFIG_LEDS_DAC124S085) += leds-dac124s085.o
|
||||
diff --git a/drivers/leds/leds-ws2801.c b/drivers/leds/leds-ws2801.c
|
||||
new file mode 100644
|
||||
index 0000000..17d0666
|
||||
--- /dev/null
|
||||
+++ b/drivers/leds/leds-ws2801.c
|
||||
@@ -0,0 +1,159 @@
|
||||
+/*
|
||||
+ * LEDs driver for WS2801 RGB Controller
|
||||
+ *
|
||||
+ * Copyright (C) 2006 Kristian Kielhofner <kris@krisk.org>
|
||||
+ *
|
||||
+ * Based on leds-net48xx.c
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/leds.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/io.h>
|
||||
+
|
||||
+#define DRVNAME "ws2801-leds"
|
||||
+#define WS2801_LED_CLOCK_GPIO 159
|
||||
+#define WS2801_LED_DATA_GPIO 158
|
||||
+
|
||||
+static unsigned long rgb_color;
|
||||
+
|
||||
+static struct platform_device *pdev;
|
||||
+
|
||||
+static void ws2801_set_rgb(void)
|
||||
+{
|
||||
+ int count;
|
||||
+ int color_bit;
|
||||
+
|
||||
+ for (count = 23; count >= 0 ; count--) {
|
||||
+ color_bit = (rgb_color>>count) & (1<<0);
|
||||
+ gpio_set_value(WS2801_LED_DATA_GPIO, color_bit);
|
||||
+ gpio_set_value(WS2801_LED_CLOCK_GPIO, 1);
|
||||
+ gpio_set_value(WS2801_LED_CLOCK_GPIO, 0);
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+static void ws2801_red_led_set(struct led_classdev *led_cdev,
|
||||
+ enum led_brightness value)
|
||||
+{
|
||||
+ rgb_color &= ((0x00<<16)|(0xff<<8)|(0xff<<0));
|
||||
+ rgb_color |= (value<<16);
|
||||
+ ws2801_set_rgb();
|
||||
+}
|
||||
+
|
||||
+static void ws2801_green_led_set(struct led_classdev *led_cdev,
|
||||
+ enum led_brightness value)
|
||||
+{
|
||||
+ rgb_color &= ((0xff<<16)|(0x00<<8)|(0xff<<0));
|
||||
+ rgb_color |= (value<<8);
|
||||
+ ws2801_set_rgb();
|
||||
+}
|
||||
+
|
||||
+static void ws2801_blue_led_set(struct led_classdev *led_cdev,
|
||||
+ enum led_brightness value)
|
||||
+{
|
||||
+ rgb_color &= ((0xff<<16)|(0xff<<8)|(0x00<<0));
|
||||
+ rgb_color |= (value<<0);
|
||||
+ ws2801_set_rgb();
|
||||
+}
|
||||
+
|
||||
+static struct led_classdev ws2801_red_led = {
|
||||
+ .name = "ws2801-red",
|
||||
+ .brightness_set = ws2801_red_led_set,
|
||||
+ .flags = LED_CORE_SUSPENDRESUME,
|
||||
+};
|
||||
+
|
||||
+static struct led_classdev ws2801_green_led = {
|
||||
+ .name = "ws2801-green",
|
||||
+ .brightness_set = ws2801_green_led_set,
|
||||
+ .flags = LED_CORE_SUSPENDRESUME,
|
||||
+};
|
||||
+
|
||||
+static struct led_classdev ws2801_blue_led = {
|
||||
+ .name = "ws2801-blue",
|
||||
+ .brightness_set = ws2801_blue_led_set,
|
||||
+ .flags = LED_CORE_SUSPENDRESUME,
|
||||
+};
|
||||
+
|
||||
+static int ws2801_led_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = led_classdev_register(&pdev->dev, &ws2801_red_led);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = led_classdev_register(&pdev->dev, &ws2801_green_led);
|
||||
+ if (ret < 0)
|
||||
+ goto err1;
|
||||
+
|
||||
+ ret = led_classdev_register(&pdev->dev, &ws2801_blue_led);
|
||||
+ if (ret < 0)
|
||||
+ goto err2;
|
||||
+
|
||||
+ gpio_request_one(WS2801_LED_DATA_GPIO,
|
||||
+ GPIOF_OUT_INIT_LOW, "ws2801_data");
|
||||
+
|
||||
+ gpio_request_one(WS2801_LED_CLOCK_GPIO,
|
||||
+ GPIOF_OUT_INIT_LOW, "ws2801_clock");
|
||||
+
|
||||
+ ws2801_set_rgb();
|
||||
+ return ret;
|
||||
+
|
||||
+err2:
|
||||
+ led_classdev_unregister(&ws2801_green_led);
|
||||
+err1:
|
||||
+ led_classdev_unregister(&ws2801_red_led);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int ws2801_led_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ led_classdev_unregister(&ws2801_red_led);
|
||||
+ led_classdev_unregister(&ws2801_green_led);
|
||||
+ led_classdev_unregister(&ws2801_blue_led);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver ws2801_led_driver = {
|
||||
+ .probe = ws2801_led_probe,
|
||||
+ .remove = ws2801_led_remove,
|
||||
+ .driver = {
|
||||
+ .name = DRVNAME,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static int __init ws2801_led_init(void)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = platform_driver_register(&ws2801_led_driver);
|
||||
+ if (ret < 0)
|
||||
+ goto out;
|
||||
+
|
||||
+out:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void __exit ws2801_led_exit(void)
|
||||
+{
|
||||
+ platform_device_unregister(pdev);
|
||||
+ platform_driver_unregister(&ws2801_led_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(ws2801_led_init);
|
||||
+module_exit(ws2801_led_exit);
|
||||
+
|
||||
+MODULE_AUTHOR("David Anders <danders@tincantools.com>");
|
||||
+MODULE_DESCRIPTION("WS2801 RGB LED driver");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -10,7 +10,7 @@ PV = "3.0.6"
|
||||
SRCREV_pn-${PN} = "a004e0962a10dfa7fc83dfa4ed4109d1cf84124b"
|
||||
|
||||
# The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc
|
||||
MACHINE_KERNEL_PR_append = "a"
|
||||
MACHINE_KERNEL_PR_append = "b"
|
||||
|
||||
FILESPATH =. "${FILE_DIRNAME}/linux-3.0:${FILE_DIRNAME}/linux-3.0/${MACHINE}:"
|
||||
|
||||
@@ -214,6 +214,8 @@ SRC_URI += "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gi
|
||||
\
|
||||
file://ulcd/0001-OMAP_VOUT-Fix-build-break-caused-by-update_mode-remo.patch \
|
||||
file://ulcd/0002-WIP-omap-beagleboard-add-bbtoys-ulcd-lite-support.patch \
|
||||
file://ulcd/0001-ARM-OMAP2-beagleboard-add-support-for-loopthrough-ex.patch \
|
||||
file://ulcd/0002-LEDS-add-initial-support-for-WS2801-controller.patch \
|
||||
\
|
||||
file://omap4/0001-OMAP-Fix-linking-error-in-twl-common.c-for-OMAP2-3-4.patch \
|
||||
\
|
||||
|
||||
Reference in New Issue
Block a user