From: Tony Lindgren Date: Mon, 5 May 2008 20:21:13 +0000 (-0700) Subject: Merge current mainline tree into linux-omap tree X-Git-Tag: v2.6.26-omap1~123^2~144 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3f35ebfdc4b987abe923eee79d25a04e336dee56;p=linux-2.6-omap-h63xx.git Merge current mainline tree into linux-omap tree Merge branches 'master' and 'linus' Conflicts: arch/arm/mach-omap1/board-h3.c drivers/input/touchscreen/Kconfig drivers/input/touchscreen/Makefile drivers/media/video/Kconfig drivers/misc/Kconfig include/linux/kfifo.h security/Makefile --- 3f35ebfdc4b987abe923eee79d25a04e336dee56 diff --cc arch/arm/mach-omap1/board-h3.c index e49e070f1ed,7fbaa8d648c..733a7eea033 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@@ -505,114 -497,6 +505,118 @@@ static int nand_dev_ready(struct omap_n return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN); } +#if defined(CONFIG_VIDEO_OV9640) || defined(CONFIG_VIDEO_OV9640_MODULE) +/* + * Common OV9640 register initialization for all image sizes, pixel formats, + * and frame rates + */ +const static struct ov9640_reg ov9640_common[] = { + + { 0x12, 0x80 }, { 0x11, 0x80 }, { 0x13, 0x88 }, /* COM7, CLKRC, COM8 */ + { 0x01, 0x58 }, { 0x02, 0x24 }, { 0x04, 0x00 }, /* BLUE, RED, COM1 */ + { 0x0E, 0x81 }, { 0x0F, 0x4F }, { 0x14, 0xcA }, /* COM5, COM6, COM9 */ + { 0x16, 0x02 }, { 0x1B, 0x01 }, { 0x24, 0x70 }, /* ?, PSHFT, AEW */ + { 0x25, 0x68 }, { 0x26, 0xD3 }, { 0x27, 0x90 }, /* AEB, VPT, BBIAS */ + { 0x2A, 0x00 }, { 0x2B, 0x00 }, { 0x32, 0x24 }, /* EXHCH, EXHCL, HREF */ + { 0x33, 0x02 }, { 0x37, 0x02 }, { 0x38, 0x13 }, /* CHLF, ADC, ACOM */ + { 0x39, 0xF0 }, { 0x3A, 0x00 }, { 0x3B, 0x01 }, /* OFON, TSLB, COM11 */ + { 0x3D, 0x90 }, { 0x3E, 0x02 }, { 0x3F, 0xF2 }, /* COM13, COM14, EDGE */ + { 0x41, 0x02 }, { 0x42, 0xC8 }, /* COM16, COM17 */ + { 0x43, 0xF0 }, { 0x44, 0x10 }, { 0x45, 0x6C }, /* ?, ?, ? */ + { 0x46, 0x6C }, { 0x47, 0x44 }, { 0x48, 0x44 }, /* ?, ?, ? */ + { 0x49, 0x03 }, { 0x59, 0x49 }, { 0x5A, 0x94 }, /* ?, ?, ? */ + { 0x5B, 0x46 }, { 0x5C, 0x84 }, { 0x5D, 0x5C }, /* ?, ?, ? */ + { 0x5E, 0x08 }, { 0x5F, 0x00 }, { 0x60, 0x14 }, /* ?, ?, ? */ + { 0x61, 0xCE }, /* ? */ + { 0x62, 0x70 }, { 0x63, 0x00 }, { 0x64, 0x04 }, /* LCC1, LCC2, LCC3 */ + { 0x65, 0x00 }, { 0x66, 0x00 }, /* LCC4, LCC5 */ + { 0x69, 0x00 }, { 0x6A, 0x3E }, { 0x6B, 0x3F }, /* HV, MBD, DBLV */ + { 0x6C, 0x40 }, { 0x6D, 0x30 }, { 0x6E, 0x4B }, /* GSP1, GSP2, GSP3 */ + { 0x6F, 0x60 }, { 0x70, 0x70 }, { 0x71, 0x70 }, /* GSP4, GSP5, GSP6 */ + { 0x72, 0x70 }, { 0x73, 0x70 }, { 0x74, 0x60 }, /* GSP7, GSP8, GSP9 */ + { 0x75, 0x60 }, { 0x76, 0x50 }, { 0x77, 0x48 }, /* GSP10,GSP11,GSP12 */ + { 0x78, 0x3A }, { 0x79, 0x2E }, { 0x7A, 0x28 }, /* GSP13,GSP14,GSP15 */ + { 0x7B, 0x22 }, { 0x7C, 0x04 }, { 0x7D, 0x07 }, /* GSP16,GST1, GST2 */ + { 0x7E, 0x10 }, { 0x7F, 0x28 }, { 0x80, 0x36 }, /* GST3, GST4, GST5 */ + { 0x81, 0x44 }, { 0x82, 0x52 }, { 0x83, 0x60 }, /* GST6, GST7, GST8 */ + { 0x84, 0x6C }, { 0x85, 0x78 }, { 0x86, 0x8C }, /* GST9, GST10,GST11 */ + { 0x87, 0x9E }, { 0x88, 0xBB }, { 0x89, 0xD2 }, /* GST12,GST13,GST14 */ + { 0x8A, 0xE6 }, { 0x13, 0xaF }, { 0x15, 0x02 }, /* GST15, COM8 */ + { 0x22, 0x8a }, /* GROS */ + { OV9640_REG_TERM, OV9640_VAL_TERM } +}; + +static int ov9640_sensor_power_set(int power) +{ + unsigned char expa; + int err; + + /* read current state of GPIO EXPA outputs */ + err = read_gpio_expa(&expa, 0x27); + if (err) { + printk(KERN_ERR "Error reading GPIO EXPA\n"); + return err; + } + /* Clear GPIO EXPA P3 (CAMERA_MODULE_EN) to power-up/down sensor */ + if (power) + expa |= 0x08; + else + expa &= ~0x08; + + err = write_gpio_expa(expa, 0x27); + if (err) { + printk(KERN_ERR "Error writing to GPIO EXPA\n"); + return err; + } + + return err; +} + +static struct v4l2_ifparm ifparm = { + .if_type = V4L2_IF_TYPE_BT656, + .u = { + .bt656 = { + .frame_start_on_rising_vs = 1, + .nobt_vs_inv = 1, + .mode = V4L2_IF_TYPE_BT656_MODE_NOBT_8BIT, + .clock_min = OV9640_XCLK_MIN, + .clock_max = OV9640_XCLK_MAX, + }, + }, +}; + +static int ov9640_ifparm(struct v4l2_ifparm *p) +{ + *p = ifparm; + + return 0; +} + +static struct ov9640_platform_data h3_ov9640_platform_data = { + .power_set = ov9640_sensor_power_set, + .default_regs = ov9640_common, + .ifparm = ov9640_ifparm, +}; +#endif + +static struct i2c_board_info __initdata h3_i2c_board_info[] = { ++ { ++ I2C_BOARD_INFO("tps65013", 0x48), ++ /* .irq = OMAP_GPIO_IRQ(??), */ ++ }, +#if defined(CONFIG_VIDEO_OV9640) || defined(CONFIG_VIDEO_OV9640_MODULE) + { + I2C_BOARD_INFO("ov9640", 0x30), + .platform_data = &h3_ov9640_platform_data, + }, +#endif + { + I2C_BOARD_INFO("isp1301_omap", 0x2d), + .type = "isp1301_omap", + .irq = OMAP_GPIO_IRQ(14), + }, +}; + static void __init h3_init(void) { /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped diff --cc drivers/input/touchscreen/Kconfig index 1542e160ad4,565ec711c2e..8b5fd642389 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@@ -170,61 -170,74 +170,114 @@@ config TOUCHSCREEN_TOUCHWI To compile this driver as a module, choose M here: the module will be called touchwin. - config TOUCHSCREEN_UCB1400 - tristate "Philips UCB1400 touchscreen" - select AC97_BUS - help - This enables support for the Philips UCB1400 touchscreen interface. - The UCB1400 is an AC97 audio codec. The touchscreen interface - will be initialized only after the ALSA subsystem has been - brought up and the UCB1400 detected. You therefore have to - configure ALSA support as well (either built-in or modular, - independently of whether this driver is itself built-in or - modular) for this driver to work. - - To compile this driver as a module, choose M here: the - module will be called ucb1400_ts. - +config TOUCHSCREEN_TSC2005 + tristate "TSC2005 touchscreen support" + help + Say Y here for if you are using the touchscreen features of TSC2301. + +config TOUCHSCREEN_TSC2102 + tristate "TSC 2102 based touchscreens" + depends on SPI_MASTER + select SPI_TSC2102 + help + Say Y here if you have a touchscreen interface using the + TI TSC 2102 controller, and your board-specific initialization + code includes that in its table of SPI devices. Also make + sure the proper SPI controller is selected. + + If unsure, say N (but it's safe to say "Y"). + + To compile this driver as a module, choose M here: the + module will be called tsc2102_ts. + +config TOUCHSCREEN_TSC210X + tristate "TI TSC210x based touchscreens" + depends on SPI_MASTER + select SPI_TSC210X + help + Say Y here if you have a touchscreen interface using a + TI TSC210x controller, and your board-specific initialisation + code includes that in its table of SPI devices. + + If unsure, say N (but it's safe to say "Y"). + + To compile this driver as a module, choose M here: the + module will be called tsc210x_ts. + +config TOUCHSCREEN_TSC2301 + tristate "TSC2301 touchscreen support" + depends on SPI_TSC2301 + help + Say Y here for if you are using the touchscreen features of TSC2301. + + config TOUCHSCREEN_UCB1400 + tristate "Philips UCB1400 touchscreen" + select AC97_BUS + help + This enables support for the Philips UCB1400 touchscreen interface. + The UCB1400 is an AC97 audio codec. The touchscreen interface + will be initialized only after the ALSA subsystem has been + brought up and the UCB1400 detected. You therefore have to + configure ALSA support as well (either built-in or modular, + independently of whether this driver is itself built-in or + modular) for this driver to work. + + To compile this driver as a module, choose M here: the + module will be called ucb1400_ts. + + config TOUCHSCREEN_WM97XX + tristate "Support for WM97xx AC97 touchscreen controllers" + depends on AC97_BUS + help + Say Y here if you have a Wolfson Microelectronics WM97xx + touchscreen connected to your system. Note that this option + only enables core driver, you will also need to select + support for appropriate chip below. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called wm97xx-ts. + + config TOUCHSCREEN_WM9705 + bool "WM9705 Touchscreen interface support" + depends on TOUCHSCREEN_WM97XX + help + Say Y here if you have a Wolfson Microelectronics WM9705 + touchscreen controller connected to your system. + + If unsure, say N. + + config TOUCHSCREEN_WM9712 + bool "WM9712 Touchscreen interface support" + depends on TOUCHSCREEN_WM97XX + help + Say Y here if you have a Wolfson Microelectronics WM9712 + touchscreen controller connected to your system. + + If unsure, say N. + + config TOUCHSCREEN_WM9713 + bool "WM9713 Touchscreen interface support" + depends on TOUCHSCREEN_WM97XX + help + Say Y here if you have a Wolfson Microelectronics WM9713 touchscreen + controller connected to your system. + + If unsure, say N. + + config TOUCHSCREEN_WM97XX_MAINSTONE + tristate "WM97xx Mainstone accelerated touch" + depends on TOUCHSCREEN_WM97XX && ARCH_PXA + help + Say Y here for support for streaming mode with WM97xx touchscreens + on Mainstone systems. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called mainstone-wm97xx. + config TOUCHSCREEN_USB_COMPOSITE tristate "USB Touchscreen Driver" depends on USB_ARCH_HAS_HCD diff --cc drivers/input/touchscreen/Makefile index 51d3a23038a,3c096d75651..f8f08a735c5 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@@ -19,8 -21,8 +21,13 @@@ obj-$(CONFIG_TOUCHSCREEN_PENMOUNT) += p obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o +obj-$(CONFIG_TOUCHSCREEN_TSC2005) += tsc2005.o +obj-$(CONFIG_TOUCHSCREEN_TSC2102) += tsc2102_ts.o +obj-$(CONFIG_TOUCHSCREEN_OMAP) += omap/ +obj-$(CONFIG_TOUCHSCREEN_TSC210X) += tsc210x_ts.o +obj-$(CONFIG_TOUCHSCREEN_TSC2301) += tsc2301_ts.o + obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o + wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o + wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9712) += wm9712.o + wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9713) += wm9713.o + obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE) += mainstone-wm97xx.o diff --cc drivers/media/video/Kconfig index 2b81bb54d81,fe743aa7f64..39894a10af9 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@@ -710,8 -748,8 +756,10 @@@ source "drivers/media/video/au0828/Kcon source "drivers/media/video/ivtv/Kconfig" +source drivers/media/video/omap/Kconfig + + source "drivers/media/video/cx18/Kconfig" + config VIDEO_M32R_AR tristate "AR devices" depends on M32R && VIDEO_V4L1 diff --cc drivers/misc/Kconfig index f46d4578808,636af286230..4885d2dc6f5 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@@ -351,19 -357,18 +357,31 @@@ config INTEL_MENLO If unsure, say N. + config EEEPC_LAPTOP + tristate "Eee PC Hotkey Driver (EXPERIMENTAL)" + depends on X86 + depends on ACPI + depends on BACKLIGHT_CLASS_DEVICE + depends on HWMON + depends on EXPERIMENTAL ++ + ---help--- + This driver supports the Fn-Fx keys on Eee PC laptops. + It also adds the ability to switch camera/wlan on/off. + - If you have an Eee PC laptop, say Y or M here. +config OMAP_STI - bool "Serial Trace Interface support" - depends on ARCH_OMAP16XX || ARCH_OMAP24XX || ARCH_OMAP34XX - default n - help - Serial Trace Interface. The protocols suported for OMAP1/2/3 are - STI/CSTI/XTIv2 correspondingly. ++ bool "Serial Trace Interface support" ++ depends on ARCH_OMAP16XX || ARCH_OMAP24XX || ARCH_OMAP34XX ++ default n ++ help ++ Serial Trace Interface. The protocols suported for OMAP1/2/3 are ++ STI/CSTI/XTIv2 correspondingly. + +config OMAP_STI_CONSOLE + bool "STI console support" + depends on OMAP_STI + help + This enables a console driver by way of STI/XTI. config ENCLOSURE_SERVICES tristate "Enclosure Services" diff --cc drivers/misc/Makefile index 77ec228e55f,1952875a272..2649528f06d --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@@ -5,10 -5,10 +5,11 @@@ obj- := misc.o # Dummy rule to force bu obj-$(CONFIG_IBM_ASM) += ibmasm/ obj-$(CONFIG_HDPU_FEATURES) += hdpuftrs/ +obj-$(CONFIG_OMAP_STI) += sti/ obj-$(CONFIG_MSI_LAPTOP) += msi-laptop.o obj-$(CONFIG_ACER_WMI) += acer-wmi.o - obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o + obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o + obj-$(CONFIG_EEEPC_LAPTOP) += eeepc-laptop.o obj-$(CONFIG_ATMEL_PWM) += atmel_pwm.o obj-$(CONFIG_ATMEL_SSC) += atmel-ssc.o obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib.o diff --cc drivers/mtd/maps/omap_nor.c index a1342a2a1cb,240b0e2d095..dca13a77f24 --- a/drivers/mtd/maps/omap_nor.c +++ b/drivers/mtd/maps/omap_nor.c @@@ -132,10 -130,9 +132,10 @@@ out_free_info return err; } - static int __devexit omapflash_remove(struct platform_device *pdev) + static int __exit omapflash_remove(struct platform_device *pdev) { struct omapflash_info *info = platform_get_drvdata(pdev); + struct flash_platform_data *pdata = pdev->dev.platform_data; platform_set_drvdata(pdev, NULL); diff --cc drivers/usb/host/Kconfig index c7d83751793,33b467a8352..1655a40ddb5 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@@ -28,29 -41,10 +41,29 @@@ config USB_EHCI_HC To compile this driver as a module, choose M here: the module will be called ehci-hcd. +choice + prompt "PHY/TLL mode" + depends on USB_EHCI_HCD && EXPERIMENTAL && ARCH_OMAP34XX + ---help--- + Choose PHY or TLL mode of operation + +config OMAP_EHCI_PHY_MODE + bool "PHY mode: ISP1504 on Port1/2 (NEW 3430ES2.0)" + depends on USB_EHCI_HCD && EXPERIMENTAL && ARCH_OMAP34XX + ---help--- + EHCI PHY mode. Port1 and Port2 are connected to ISP1504 transcievers + +config OMAP_EHCI_TLL_MODE + bool "TLL mode: (EXPERIMENTAL)" + depends on USB_EHCI_HCD && EXPERIMENTAL && ARCH_OMAP34XX + ---help--- + OMAP EHCI controller has TLL mode of operation for all 3 ports. + Use this mode when no transciever is present +endchoice config USB_EHCI_ROOT_HUB_TT - bool "Root Hub Transaction Translators (EXPERIMENTAL)" - depends on USB_EHCI_HCD && EXPERIMENTAL + bool "Root Hub Transaction Translators" + depends on USB_EHCI_HCD ---help--- Some EHCI chips have vendor-specific extensions to integrate transaction translators, so that no OHCI or UHCI companion diff --cc include/linux/kfifo.h index 2dd610d6fdd,29f62e1733f..17065f7681a --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h @@@ -154,39 -149,4 +152,36 @@@ static inline unsigned int kfifo_len(st return ret; } +/** + * kfifo_get_to_user - gets some data from the FIFO + * @fifo: the fifo to be used. + * @buffer: where the data must be copied. user buffer + * @len: the size of the destination buffer. + * + * This function copies at most @len bytes from the FIFO into the + * user @buffer and returns the number of copied bytes. + */ +static inline unsigned int kfifo_get_to_user(struct kfifo *fifo, + unsigned char __user *buffer, + unsigned int len) +{ + unsigned long flags; + unsigned int ret; + + spin_lock_irqsave(fifo->lock, flags); + + ret = __kfifo_get_to_user(fifo, buffer, len); + + /* + * optimization: if the FIFO is empty, set the indices to 0 + * so we don't wrap the next time + */ + if (fifo->in == fifo->out) + fifo->in = fifo->out = 0; + + spin_unlock_irqrestore(fifo->lock, flags); + + return ret; +} + - #else - #warning "don't include kernel headers in userspace" - #endif /* __KERNEL__ */ #endif diff --cc security/Makefile index 2feea8d97c0,7ef1107a728..7111cf1e0d6 --- a/security/Makefile +++ b/security/Makefile @@@ -18,4 -18,4 +18,5 @@@ obj-$(CONFIG_SECURITY_SELINUX) += seli obj-$(CONFIG_SECURITY_SMACK) += commoncap.o smack/built-in.o obj-$(CONFIG_SECURITY_CAPABILITIES) += commoncap.o capability.o obj-$(CONFIG_SECURITY_ROOTPLUG) += commoncap.o root_plug.o +obj-$(CONFIG_SECURITY_LOWMEM) += commoncap.o lowmem.o + obj-$(CONFIG_CGROUP_DEVICE) += device_cgroup.o