From: 张昊 Date: Fri, 18 Nov 2011 03:35:57 +0000 (+0800) Subject: rk29phone:fix building errors without wm8994 X-Git-Tag: firefly_0821_release~9737 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f3b54da7a3932b12d1206a48957e2aa4c0b9052c;p=firefly-linux-kernel-4.4.55.git rk29phone:fix building errors without wm8994 --- diff --git a/arch/arm/mach-rk29/board-rk29-phonesdk.c b/arch/arm/mach-rk29/board-rk29-phonesdk.c index ac57fc82ef18..509fae12868e 100755 --- a/arch/arm/mach-rk29/board-rk29-phonesdk.c +++ b/arch/arm/mach-rk29/board-rk29-phonesdk.c @@ -79,7 +79,7 @@ #include "../../../drivers/input/touchscreen/xpt2046_cbn_ts.h" #endif #include "../../../drivers/misc/gps/rk29_gps.h" -#include "../../../drivers/serial/sc8800.h" +#include "../../../drivers/tty/serial/sc8800.h" #ifdef CONFIG_VIDEO_RK29 /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ @@ -3199,8 +3199,12 @@ static int rk29xx_virtual_keys_init(void) static void __init rk29_gic_init_irq(void) { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) + gic_init(0, 32, (void __iomem *)RK29_GICPERI_BASE, (void __iomem *)RK29_GICCPU_BASE); +#else gic_dist_init(0, (void __iomem *)RK29_GICPERI_BASE, 32); gic_cpu_init(0, (void __iomem *)RK29_GICCPU_BASE); +#endif } static void __init machine_rk29_init_irq(void) @@ -3312,8 +3316,11 @@ static void __init machine_rk29_mapio(void) MACHINE_START(RK29, "RK29board") /* UART for LL DEBUG */ +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)) + /* UART for LL DEBUG */ .phys_io = RK29_UART1_PHYS & 0xfff00000, .io_pg_offst = ((RK29_UART1_BASE) >> 18) & 0xfffc, +#endif .boot_params = RK29_SDRAM_PHYS + 0x88000, .fixup = machine_rk29_fixup, .map_io = machine_rk29_mapio, diff --git a/drivers/headset_observe/rk_headset.c b/drivers/headset_observe/rk_headset.c index ad99920e5e90..9ea5f095fc56 100755 --- a/drivers/headset_observe/rk_headset.c +++ b/drivers/headset_observe/rk_headset.c @@ -39,6 +39,7 @@ #include #include #include +#include /* Debug */ #if 1 diff --git a/drivers/input/misc/isl29028.c b/drivers/input/misc/isl29028.c index 18fa05d3dfc9..055f53c5a4b1 100755 --- a/drivers/input/misc/isl29028.c +++ b/drivers/input/misc/isl29028.c @@ -27,6 +27,7 @@ #include #include #include "isl29028.h" +#include #ifdef CONFIG_HAS_EARLYSUSPEND #include diff --git a/drivers/input/touchscreen/gt818_ts.c b/drivers/input/touchscreen/gt818_ts.c index 6e55be7fba17..5fc376435d68 100644 --- a/drivers/input/touchscreen/gt818_ts.c +++ b/drivers/input/touchscreen/gt818_ts.c @@ -834,6 +834,6 @@ late_initcall(goodix_ts_init); module_exit(goodix_ts_exit); MODULE_DESCRIPTION("Goodix Touchscreen Driver"); -MODULE_AUTHOR("hhb@rock-chips.com") +MODULE_AUTHOR("hhb@rock-chips.com"); MODULE_LICENSE("GPL"); diff --git a/drivers/misc/gps/rk29_gps.c b/drivers/misc/gps/rk29_gps.c index 0e4aa47e22ec..a9414f3fdd54 100755 --- a/drivers/misc/gps/rk29_gps.c +++ b/drivers/misc/gps/rk29_gps.c @@ -248,7 +248,7 @@ static struct file_operations rk29_gps_fops = { .owner = THIS_MODULE, .open = rk29_gps_open, .read = rk29_gps_read, - .ioctl = rk29_gps_ioctl, + .unlocked_ioctl = rk29_gps_ioctl, .release = rk29_gps_release, }; @@ -272,8 +272,8 @@ static int rk29_gps_probe(struct platform_device *pdev) return ret; } - init_MUTEX(&pdata->power_sem); - pdata->wq = create_freezeable_workqueue("rk29_gps"); + sema_init(&pdata->power_sem,1); + pdata->wq = create_freezable_workqueue("rk29_gps"); INIT_WORK(&pdata->work, rk29_gps_delay_power_downup); pdata->power_flag = 0; diff --git a/drivers/misc/mtk23d.c b/drivers/misc/mtk23d.c index 14fdcdbe50d2..a0fe107d3e46 100755 --- a/drivers/misc/mtk23d.c +++ b/drivers/misc/mtk23d.c @@ -23,6 +23,7 @@ #include #include #include "../mtd/rknand/api_flash.h" +#include MODULE_LICENSE("GPL"); @@ -405,7 +406,7 @@ static struct file_operations mtk23d_fops = { .owner = THIS_MODULE, .open = mtk23d_open, .release = mtk23d_release, - .ioctl = mtk23d_ioctl + .unlocked_ioctl = mtk23d_ioctl }; static struct miscdevice mtk23d_misc = { @@ -492,7 +493,7 @@ static int mtk23d_probe(struct platform_device *pdev) #endif INIT_WORK(&mt6223d_data->work, bpwakeup_work_func_work); - init_MUTEX(&pdata->power_sem); + sema_init(&pdata->power_sem,1); power_on = 1; result = misc_register(&mtk23d_misc); if(result) diff --git a/drivers/video/backlight/wm831x_bl.c b/drivers/video/backlight/wm831x_bl.c index bb8ac47c51f2..d94845185fee 100755 --- a/drivers/video/backlight/wm831x_bl.c +++ b/drivers/video/backlight/wm831x_bl.c @@ -270,7 +270,7 @@ static int wm831x_backlight_probe(struct platform_device *pdev) props.max_brightness = max_isel; bl = backlight_device_register("wm831x", &pdev->dev, data, - &wm831x_backlight_ops); + &wm831x_backlight_ops,&props); if (IS_ERR(bl)) { dev_err(&pdev->dev, "failed to register backlight\n"); kfree(data); diff --git a/include/linux/usb/android_composite.h b/include/linux/usb/android_composite.h new file mode 100644 index 000000000000..50889ba138b9 --- /dev/null +++ b/include/linux/usb/android_composite.h @@ -0,0 +1,98 @@ +/* + * Platform data for Android USB + * + * Copyright (C) 2008 Google, Inc. + * Author: Mike Lockwood + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ +#ifndef __LINUX_USB_ANDROID_H +#define __LINUX_USB_ANDROID_H + +#include +#include + +struct android_usb_function { + struct list_head list; + char *name; + int (*bind_config)(struct usb_configuration *c); +}; + +struct android_usb_product { + /* Default product ID. */ + __u16 product_id; + + /* List of function names associated with this product. + * This is used to compute the USB product ID dynamically + * based on which functions are enabled. + */ + int num_functions; + char **functions; +}; + +struct android_usb_platform_data { + /* USB device descriptor fields */ + __u16 vendor_id; + + /* Default product ID. */ + __u16 product_id; + + __u16 version; + + char *product_name; + char *manufacturer_name; + char *serial_number; + + /* List of available USB products. + * This is used to compute the USB product ID dynamically + * based on which functions are enabled. + * if num_products is zero or no match can be found, + * we use the default product ID + */ + int num_products; + struct android_usb_product *products; + + /* List of all supported USB functions. + * This list is used to define the order in which + * the functions appear in the configuration's list of USB interfaces. + * This is necessary to avoid depending upon the order in which + * the individual function drivers are initialized. + */ + int num_functions; + char **functions; +}; + +/* Platform data for "usb_mass_storage" driver. */ +struct usb_mass_storage_platform_data { + /* Contains values for the SC_INQUIRY SCSI command. */ + char *vendor; + char *product; + int release; + + /* number of LUNS */ + int nluns; +}; + +/* Platform data for USB ethernet driver. */ +struct usb_ether_platform_data { + u8 ethaddr[ETH_ALEN]; + u32 vendorID; + const char *vendorDescr; +}; + +extern void android_usb_set_connected(int on); + +extern void android_register_function(struct android_usb_function *f); + +extern void android_enable_function(struct usb_function *f, int enable); + + +#endif /* __LINUX_USB_ANDROID_H */