[oe-commits] org.oe.dev linux: added 2.6.21 for Simpad (progear need refresh of config) - close #2247

Bernhard commit openembedded-commits at lists.openembedded.org
Mon May 7 18:07:32 UTC 2007


linux: added 2.6.21 for Simpad (progear need refresh of config) - close #2247

Author: Bernhard
Branch: org.openembedded.dev
Revision: 80f7f84f9356a16a8a92b8c33d7297b74324541a
ViewMTN: http://monotone.openembedded.org/revision.psp?id=80f7f84f9356a16a8a92b8c33d7297b74324541a
Files:
1
packages/linux/linux/simpad/linux-2.6.21-SIMpad-cs3-simpad.patch
packages/linux/linux/simpad/linux-2.6.21-SIMpad-mq200.patch
packages/linux/linux/simpad/linux-2.6.21-SIMpad-serial-and-gpio_keys.patch
packages/linux/linux/simpad/linux-2.6.21-SIMpad-ucb1x00-switches.patch
packages/linux/linux/simpad/linux-2.6.21-pcmcia-device-to-platform-driver.patch
packages/linux/linux_2.6.21.bb
packages/linux/linux/simpad/defconfig
Diffs:

#
# mt diff -rdddf8b4270847ac7e1bbb99974f009e371505148 -r80f7f84f9356a16a8a92b8c33d7297b74324541a
#
# 
# 
# add_file "packages/linux/linux/simpad/linux-2.6.21-SIMpad-cs3-simpad.patch"
#  content [4b58fb12608fa60445bee6da494d33330aa5fd90]
# 
# add_file "packages/linux/linux/simpad/linux-2.6.21-SIMpad-mq200.patch"
#  content [58ee469c10637abf4381071d339d748a9447f58b]
# 
# add_file "packages/linux/linux/simpad/linux-2.6.21-SIMpad-serial-and-gpio_keys.patch"
#  content [7e4ce852b19b50c4da00d638fdef12857e7df853]
# 
# add_file "packages/linux/linux/simpad/linux-2.6.21-SIMpad-ucb1x00-switches.patch"
#  content [380567e4ad356d3df12b22af4f4cc6b3454cdc90]
# 
# add_file "packages/linux/linux/simpad/linux-2.6.21-pcmcia-device-to-platform-driver.patch"
#  content [77eb8a3cd53e4a43e6264ba60927295276428c23]
# 
# add_file "packages/linux/linux_2.6.21.bb"
#  content [6c28f02eada919c6256cd0f85bf833e8d7eafd76]
# 
# patch "packages/linux/linux/simpad/defconfig"
#  from [72ec0d5b176ec0eb7eac88999945af1b93505154]
#    to [db78ce10226f67738cc6a072a5190e9edf027ce3]
# 
============================================================
--- packages/linux/linux/simpad/linux-2.6.21-SIMpad-cs3-simpad.patch	4b58fb12608fa60445bee6da494d33330aa5fd90
+++ packages/linux/linux/simpad/linux-2.6.21-SIMpad-cs3-simpad.patch	4b58fb12608fa60445bee6da494d33330aa5fd90
@@ -0,0 +1,315 @@
+diff -uNr linux-2.6.21.vanilla/arch/arm/mach-sa1100/Makefile linux-2.6.21/arch/arm/mach-sa1100/Makefile
+--- linux-2.6.21.vanilla/arch/arm/mach-sa1100/Makefile	2007-05-01 16:40:44.000000000 +0200
++++ linux-2.6.21/arch/arm/mach-sa1100/Makefile	2007-05-01 16:52:10.000000000 +0200
+@@ -40,6 +40,7 @@
+ obj-$(CONFIG_SA1100_SHANNON)		+= shannon.o
+ 
+ obj-$(CONFIG_SA1100_SIMPAD)		+= simpad.o
++obj-$(CONFIG_SA1100_SIMPAD)             += cs3-simpad.o
+ led-$(CONFIG_SA1100_SIMPAD)		+= leds-simpad.o
+ 
+ # LEDs support
+diff -uNr linux-2.6.21.vanilla/arch/arm/mach-sa1100/cs3-simpad.c linux-2.6.21/arch/arm/mach-sa1100/cs3-simpad.c
+--- linux-2.6.21.vanilla/arch/arm/mach-sa1100/cs3-simpad.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.21/arch/arm/mach-sa1100/cs3-simpad.c	2007-05-01 16:52:10.000000000 +0200
+@@ -0,0 +1,300 @@
++/*
++ *  cs3-simpad.c
++ *
++ *  This driver shows the GPIO states of the cs3 latch. You can also
++ *  switch some GPIOS.
++ *
++ *  (c) 2007 Bernhard Guillon <Bernhard.Guillon at OpenSIMpad.org>
++ *
++ *  You may use this code as per GPL version 2
++ *
++ *  Some parts are based on battery.c
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/types.h>
++#include <linux/init.h>
++#include <linux/device.h>
++
++#include <asm/arch/simpad.h>
++
++extern long get_cs3_shadow(void);
++extern void set_cs3_bit(int value);
++extern void clear_cs3_bit(int value);
++
++struct cs3 {
++	struct class_device class_dev;
++	const char *name;
++	char *id;
++	int type;
++};
++
++struct cs3 cs3 ={
++        .name = "latch_cs3",
++};
++
++static ssize_t get_VCC_5V_EN (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & VCC_5V_EN ) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_VCC_3V_EN (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & VCC_3V_EN) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_EN1 (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & EN1) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_EN0 (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & EN0) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_DISPLAY_ON (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & DISPLAY_ON) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_PCMCIA_BUFF_DIS (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & PCMCIA_BUFF_DIS) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_MQ_RESET (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & MQ_RESET) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_PCMCIA_RESET (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & PCMCIA_RESET) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++}
++
++static ssize_t get_DECT_POWER_ON (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & DECT_POWER_ON) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_IRDA_SD (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & IRDA_SD) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_RS232_ON (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & RS232_ON) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_SD_MEDIAQ (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & SD_MEDIAQ) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++}
++
++static ssize_t get_LED2_ON (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & LED2_ON) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_IRDA_MODE (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & IRDA_MODE) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++}
++
++static ssize_t get_ENABLE_5V (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & ENABLE_5V) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++} 
++
++static ssize_t get_RESET_SIMCARD (struct class_device *class_dev, char *buf) {
++    if (get_cs3_shadow() & RESET_SIMCARD) 
++        return sprintf(buf, "1\n");
++    else 
++        return sprintf(buf, "0\n");
++}
++
++
++static ssize_t write_DISPLAY_ON (struct class_device *cdev, const char * buf, size_t count){
++    char val;
++        if (sscanf(buf, "%c",&val) !=1)
++            return -EINVAL;
++        if (val=='1')
++            set_cs3_bit(DISPLAY_ON);
++        else if (val=='0')
++            clear_cs3_bit(DISPLAY_ON);
++        return strlen(buf);
++}
++
++static ssize_t write_DECT_POWER_ON (struct class_device *cdev, const char * buf, size_t count){
++    char val;
++        if (sscanf(buf, "%c",&val) !=1)
++            return -EINVAL;
++        if (val=='1')
++            set_cs3_bit(DECT_POWER_ON);
++        else if (val=='0')
++            clear_cs3_bit(DECT_POWER_ON);
++        return strlen(buf);
++}
++
++static ssize_t write_IRDA_SD (struct class_device *cdev, const char * buf, size_t count){
++    char val;
++        if (sscanf(buf, "%c",&val) !=1)
++            return -EINVAL;
++        if (val=='1')
++            set_cs3_bit(IRDA_SD);
++        else if (val=='0')
++            clear_cs3_bit(IRDA_SD);
++        return strlen(buf);
++}
++
++static ssize_t write_SD_MEDIAQ (struct class_device *cdev, const char * buf, size_t count){
++    char val;
++        if (sscanf(buf, "%c",&val) !=1)
++            return -EINVAL;
++        if (val=='1')
++            set_cs3_bit(SD_MEDIAQ);
++        else if (val=='0')
++            clear_cs3_bit(SD_MEDIAQ);
++        return strlen(buf);
++}
++
++static ssize_t write_LED2_ON (struct class_device *cdev, const char * buf, size_t count){
++    char val;
++        if (sscanf(buf, "%c",&val) !=1)
++            return -EINVAL;
++        if (val=='1')
++            set_cs3_bit(LED2_ON);
++        else if (val=='0')
++            clear_cs3_bit(LED2_ON);
++        return strlen(buf);
++}
++
++static ssize_t write_IRDA_MODE (struct class_device *cdev, const char * buf, size_t count){
++    char val;
++        if (sscanf(buf, "%c",&val) !=1)
++            return -EINVAL;
++        if (val=='1')
++            set_cs3_bit(IRDA_MODE);
++        else if (val=='0')
++            clear_cs3_bit(IRDA_MODE);
++        return strlen(buf);
++}
++
++static ssize_t write_RESET_SIMCARD (struct class_device *cdev, const char * buf, size_t count){
++    char val;
++        if (sscanf(buf, "%c",&val) !=1)
++            return -EINVAL;
++        if (val=='1')
++            set_cs3_bit(RESET_SIMCARD);
++        else if (val=='0')
++            clear_cs3_bit(RESET_SIMCARD);
++        return strlen(buf);
++}
++
++static CLASS_DEVICE_ATTR(vcc_5v_en, 0444, get_VCC_5V_EN, NULL);
++static CLASS_DEVICE_ATTR(vcc_3v_en, 0444, get_VCC_3V_EN, NULL);
++static CLASS_DEVICE_ATTR(en1, 0444, get_EN1, NULL);
++static CLASS_DEVICE_ATTR(en0, 0444, get_EN0, NULL);
++static CLASS_DEVICE_ATTR(display_on, 0664, get_DISPLAY_ON, write_DISPLAY_ON);
++static CLASS_DEVICE_ATTR(pcmcia_buff_dis, 0444, get_PCMCIA_BUFF_DIS, NULL);
++static CLASS_DEVICE_ATTR(mq_reset, 0444, get_MQ_RESET, NULL);
++static CLASS_DEVICE_ATTR(pcmcia_reset, 0444, get_PCMCIA_RESET, NULL);
++static CLASS_DEVICE_ATTR(dect_power_on, 0664, get_DECT_POWER_ON, write_DECT_POWER_ON);
++static CLASS_DEVICE_ATTR(irda_sd, 0664, get_IRDA_SD, write_IRDA_SD);
++static CLASS_DEVICE_ATTR(rs232_on, 0444, get_RS232_ON, NULL);
++static CLASS_DEVICE_ATTR(sd_mediaq, 0664, get_SD_MEDIAQ, write_SD_MEDIAQ);
++static CLASS_DEVICE_ATTR(led2_on, 0664, get_LED2_ON, write_LED2_ON);
++static CLASS_DEVICE_ATTR(irda_mode, 0664, get_IRDA_MODE, write_IRDA_MODE);
++static CLASS_DEVICE_ATTR(enable_5v, 0444, get_ENABLE_5V, NULL);
++static CLASS_DEVICE_ATTR(reset_simcard, 0664, get_RESET_SIMCARD, write_RESET_SIMCARD);
++
++static struct class simpad_gpios_class = {
++        .name = "simpad"
++};
++
++#define create_entry_conditional(name) \
++	rc = class_device_create_file(&cs3->class_dev, &class_device_attr_##name); \
++	if (rc) goto out; \
++
++static int register_cs3_latch(struct cs3 *cs3){
++    int rc = 0;
++	cs3->class_dev.class = &simpad_gpios_class;
++	strcpy(cs3->class_dev.class_id, cs3->name);
++	rc = class_device_register(&cs3->class_dev);
++	if(rc)
++		goto out;
++
++	create_entry_conditional(vcc_5v_en);
++    create_entry_conditional(vcc_3v_en);
++    create_entry_conditional(en1);
++    create_entry_conditional(en0);
++    create_entry_conditional(display_on);
++    create_entry_conditional(pcmcia_buff_dis);
++    create_entry_conditional(mq_reset);
++    create_entry_conditional(pcmcia_reset);
++    create_entry_conditional(dect_power_on);
++    create_entry_conditional(irda_sd);
++    create_entry_conditional(rs232_on);
++    create_entry_conditional(sd_mediaq);
++    create_entry_conditional(led2_on);
++    create_entry_conditional(irda_mode);
++    create_entry_conditional(enable_5v);
++    create_entry_conditional(reset_simcard);
++    
++out:
++    return rc;
++}
++
++static int __init simpad_gpios_class_init(void)
++{
++    if (class_register(&simpad_gpios_class) != 0)
++    printk(KERN_ERR "cs3 latch class failed "
++                    "to register properly\n");
++    register_cs3_latch(&cs3);
++	return 0;
++}
++
++static void __exit simpad_gpios_class_exit(void)
++{
++	class_unregister(&simpad_gpios_class);
++}
++
++module_init(simpad_gpios_class_init);
++module_exit(simpad_gpios_class_exit);
++                                                                                
++MODULE_DESCRIPTION("CS3_latch driver");
++MODULE_AUTHOR("Bernhard Guillon");
++MODULE_LICENSE("GPL");
============================================================
--- packages/linux/linux/simpad/linux-2.6.21-SIMpad-mq200.patch	58ee469c10637abf4381071d339d748a9447f58b
+++ packages/linux/linux/simpad/linux-2.6.21-SIMpad-mq200.patch	58ee469c10637abf4381071d339d748a9447f58b
@@ -0,0 +1,2511 @@
+diff -uNr linux-2.6.21.vanilla/drivers/video/Kconfig linux-2.6.21/drivers/video/Kconfig
+--- linux-2.6.21.vanilla/drivers/video/Kconfig	2007-05-01 16:40:48.000000000 +0200
++++ linux-2.6.21/drivers/video/Kconfig	2007-05-01 17:02:17.000000000 +0200
+@@ -139,7 +139,7 @@
+ 	 This is particularly important to one driver, matroxfb.  If
+ 	 unsure, say N.
+ 
+-comment "Frame buffer hardware drivers"
++comment "Frambuffer hardware drivers"
+ 	depends on FB
+ 
+ config FB_CIRRUS
+@@ -1120,6 +1120,15 @@
+ 	---help---
+ 	  Driver for graphics boards with S3 Trio / S3 Virge chip.
+ 
++config FB_MQ200
++        bool "MQ200 Driver"
++        depends on (FB = y) && ARM && ARCH_SA1100
++        select FB_CFB_FILLRECT
++        select FB_CFB_COPYAREA
++        select FB_CFB_IMAGEBLIT
++        help
++         This is a MQ200 driver tested only on Siemens SIMpads. 
++
+ config FB_SAVAGE
+ 	tristate "S3 Savage support"
+ 	depends on FB && PCI && EXPERIMENTAL
+diff -uNr linux-2.6.21.vanilla/drivers/video/Makefile linux-2.6.21/drivers/video/Makefile
+--- linux-2.6.21.vanilla/drivers/video/Makefile	2007-05-01 16:40:48.000000000 +0200
++++ linux-2.6.21/drivers/video/Makefile	2007-05-01 17:02:17.000000000 +0200
+@@ -29,6 +29,7 @@
+ obj-$(CONFIG_FB_PM2)              += pm2fb.o
+ obj-$(CONFIG_FB_PM3)		  += pm3fb.o
+ 
++obj-$(CONFIG_FB_MQ200)            += mq200/
+ obj-$(CONFIG_FB_MATROX)		  += matrox/
+ obj-$(CONFIG_FB_RIVA)		  += riva/ vgastate.o
+ obj-$(CONFIG_FB_NVIDIA)		  += nvidia/
+diff -uNr linux-2.6.21.vanilla/drivers/video/backlight/Kconfig linux-2.6.21/drivers/video/backlight/Kconfig
+--- linux-2.6.21.vanilla/drivers/video/backlight/Kconfig	2007-05-01 16:40:48.000000000 +0200
++++ linux-2.6.21/drivers/video/backlight/Kconfig	2007-05-01 17:02:17.000000000 +0200
+@@ -63,3 +63,20 @@
+ 	help
+ 	  If you have a Frontpath ProGear say Y to enable the
+ 	  backlight driver.
++
++config BACKLIGHT_SIMPAD
++        tristate "SIMpad MQ200 Backlight driver"
++        depends on SA1100_SIMPAD && BACKLIGHT_CLASS_DEVICE
++	default y
++        help
++          If you have a Siemens SIMpad say Y to enable the
++          backlight driver.
++
++config LCD_SIMPAD
++        tristate "SIMpad MQ200 LCD driver"
++        depends on SA1100_SIMPAD && LCD_CLASS_DEVICE
++	default y
++        help
++          If you have a Siemens SIMpad say Y to enable the
++          LCD driver.
++
+diff -uNr linux-2.6.21.vanilla/drivers/video/backlight/Makefile linux-2.6.21/drivers/video/backlight/Makefile
+--- linux-2.6.21.vanilla/drivers/video/backlight/Makefile	2007-05-01 16:40:48.000000000 +0200
++++ linux-2.6.21/drivers/video/backlight/Makefile	2007-05-01 17:02:17.000000000 +0200
+@@ -6,3 +6,5 @@
+ obj-$(CONFIG_BACKLIGHT_HP680)	+= hp680_bl.o
+ obj-$(CONFIG_BACKLIGHT_LOCOMO)	+= locomolcd.o
+ obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o
++obj-$(CONFIG_BACKLIGHT_SIMPAD)	+= simpad_bl.o
++obj-$(CONFIG_LCD_SIMPAD)	+= simpad_lcd.o
+diff -uNr linux-2.6.21.vanilla/drivers/video/backlight/simpad_bl.c linux-2.6.21/drivers/video/backlight/simpad_bl.c
+--- linux-2.6.21.vanilla/drivers/video/backlight/simpad_bl.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.21/drivers/video/backlight/simpad_bl.c	2007-05-01 17:02:17.000000000 +0200
+@@ -0,0 +1,208 @@
++/*
++ * GPLv2 <zecke at handhelds.org
++ *
++ * Implementation of the backlight_driver for
++ * the mq200 framebuffer
++ *
++ * 2007/03/17 mrdata:
++ *            - small changes simpad_bl_get_brightness()
++ *                            simpad_bl_set_brightness()
++ *            - new function simpad_bl_update_status()
++ *            - changed struct backlight_properties simpad_bl_props()
++ *              to new one
++ *            - changed __init simpad_bl_init() -> backlight_device_register
++ *
++ * 2007/03/24 mrdata
++ *            - added .brightness=127 in
++ *              struct backlight_properties simpad_bl_props() 
++ */ 
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/spinlock.h>
++#include <linux/fb.h>
++#include <linux/backlight.h>
++
++#include <asm/types.h>
++#include <asm/hardware.h>
++#include <asm/io.h>
++
++#include "../mq200/mq200_data.h"
++
++#define SIMPAD_BACKLIGHT_MASK 0x00a10044
++#define SIMPAD_DEFAULT_INTENSITY 127
++#define SIMPAD_MAX_INTENSITY 254
++#define REGISTER_BASE 0xf2e00000
++
++static int simpad_bl_suspended;
++static int%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list