Resolve the booting to Chromium issue
Subsystems (7)
RFC 1/36 Resolve the booting to Chromium issue
From: wayne <[email protected]>
--- drivers/video/msm/lcdc_st15.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/msm/lcdc_st15.c +1 -1
@@ -506,7 +506,7 @@ static int __init lcdc_st15_init(void) pinfo->type =LCDC_PANEL ; pinfo->pdest =DISPLAY_1 ; pinfo->wait_cycle =0 ; - pinfo->bpp =24 ; + pinfo->bpp =18 ; pinfo->fb_num =2 ; pinfo->clk_rate =74250000 ;
Signature · 1 line
1.7.0.4
RFC 2/36 Register GPIO#109 for USB analog switch configuration
From: wayne <[email protected]>
--- arch/arm/mach-msm/board-qsd8x50.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-msm/board-qsd8x50.c +3 -3
@@ -416,7 +416,7 @@ static struct msm_gpio hsusb_gpio_config_data[] = { { GPIO_CFG(98, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA), "fs_power" }, { GPIO_CFG(HUB_RESET_GPIO, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA), "swch_ctrl" }, - { GPIO_CFG(108, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA), "hub_reset" }, + { GPIO_CFG(109, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA), "hub_reset" }, };static int msm_otg_gpio_init (void )
@@ -441,12 +441,12 @@ static void msm_otg_setup_gpio(unsigned int enable)/* Config analog switch as USB host. */ gpio_set_value (98 ,0 );/* USB_FS_POWER_EN */ gpio_set_value (HUB_RESET_GPIO ,0 );/* SWITCH_CONTROL */ -gpio_set_value (108 ,1 );/* USB_HUB_RESET */ +gpio_set_value (109 ,1 );/* USB_HUB_RESET */ }else {/* Config analog switch as USB peripheral. */ gpio_set_value (98 ,0 );/* USB_FS_POWER_EN */ gpio_set_value (HUB_RESET_GPIO ,1 );/* SWITCH_CONTROL */ -gpio_set_value (108 ,0 );/* USB_HUB_RESET */ +gpio_set_value (109 ,0 );/* USB_HUB_RESET */ } } }
Signature · 1 line
1.7.0.4
RFC 4/36 Adding new qci keyboard driver
In reply to Wayne LinFrom: wayne <[email protected]>
--- drivers/input/keyboard/qci_kbd.c | 1101 +++++++++++++++++++------------------- 1 files changed, 551 insertions(+), 550 deletions(-)
drivers/input/keyboard/qci_kbd.c +551 -550
@@ -1,550 +1,551 @@ -/* Quanta I2C Keyboard Driver -* -* Copyright (C) 2009 Quanta Computer Inc. -* Author: Hsin Wu <[email protected]> -* Author: Austin Lai <[email protected]> -* -* 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. -* -*/ - -/* -* -* The Driver with I/O communications via the I2C Interface for ON2 of AP BU. -* And it is only working on the nuvoTon WPCE775x Embedded Controller. -* -*/ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/slab.h> -#include <linux/jiffies.h> -#include <linux/i2c.h> -#include <linux/mutex.h> -#include <linux/interrupt.h> -#include <linux/input.h> -#include <linux/keyboard.h> -#include <linux/gpio.h> -#include <linux/delay.h> - -/* Keyboard special scancode */ -#define RC_KEY_FN 0x70 -#define RC_KEY_BREAK 0x80 -#define KEY_ACK_FA 0xFA - -/* Keyboard keycodes */ -#define NOKEY KEY_RESERVED -#define KEY_LEFTWIN KEY_LEFTMETA -#define KEY_RIGHTWIN KEY_RIGHTMETA -#define KEY_APPS KEY_COMPOSE -#define KEY_PRINTSCR KEY_SYSRQ - -#define KEYBOARD_ID_NAME "qci-i2ckbd" -#define KEYBOARD_NAME "Quanta Keyboard" -#define KEYBOARD_DEVICE "/i2c/input0" -#define KEYBOARD_CMD_ENABLE 0xF4 - -/*----------------------------------------------------------------------------- -* Keyboard scancode to linux keycode translation table -*---------------------------------------------------------------------------*/ - -static const unsigned char on2_keycode[256 ] = { - [0 ] =NOKEY , - [1 ] =NOKEY , - [2 ] =NOKEY , - [3 ] =KEY_5 , - [4 ] =KEY_7 , - [5 ] =KEY_9 , - [6 ] =KEY_MINUS , - [7 ] =NOKEY , - [8 ] =NOKEY , - [9 ] =NOKEY , - [10 ] =NOKEY , - [11 ] =KEY_LEFTBRACE , - [12 ] =KEY_F10 , - [13 ] =KEY_INSERT , - [14 ] =KEY_F11 , - [15 ] =KEY_ESC , - [16 ] =NOKEY , - [17 ] =NOKEY , - [18 ] =NOKEY , - [19 ] =KEY_4 , - [20 ] =KEY_6 , - [21 ] =KEY_8 , - [22 ] =KEY_0 , - [23 ] =KEY_EQUAL , - [24 ] =NOKEY , - [25 ] =NOKEY , - [26 ] =NOKEY , - [27 ] =KEY_P , - [28 ] =KEY_F9 , - [29 ] =KEY_DELETE , - [30 ] =KEY_F12 , - [31 ] =KEY_GRAVE , - [32 ] =KEY_W , - [33 ] =NOKEY , - [34 ] =NOKEY , - [35 ] =KEY_R , - [36 ] =KEY_T , - [37 ] =KEY_U , - [38 ] =KEY_O , - [39 ] =KEY_RIGHTBRACE , - [40 ] =NOKEY , - [41 ] =NOKEY , - [42 ] =NOKEY , - [43 ] =KEY_APOSTROPHE , - [44 ] =KEY_BACKSPACE , - [45 ] =NOKEY , - [46 ] =KEY_F8 , - [47 ] =KEY_F5 , - [48 ] =KEY_S , - [49 ] =NOKEY , - [50 ] =NOKEY , - [51 ] =KEY_E , - [52 ] =KEY_H , - [53 ] =KEY_Y , - [54 ] =KEY_I , - [55 ] =KEY_ENTER , - [56 ] =NOKEY , - [57 ] =NOKEY , - [58 ] =NOKEY , - [59 ] =KEY_SEMICOLON , - [60 ] =KEY_3 , - [61 ] =KEY_PAGEUP , - [62 ] =KEY_Q , - [63 ] =KEY_TAB , - [64 ] =KEY_A , - [65 ] =NOKEY , - [66 ] =NOKEY , - [67 ] =KEY_F , - [68 ] =KEY_G , - [69 ] =KEY_J , - [70 ] =KEY_L , - [71 ] =NOKEY , - [72 ] =KEY_RIGHTSHIFT , - [73 ] =NOKEY , - [74 ] =NOKEY , - [75 ] =KEY_SLASH , - [76 ] =KEY_2 , - [77 ] =KEY_PAGEDOWN , - [78 ] =KEY_F4 , - [79 ] =KEY_F1 , - [80 ] =KEY_Z , - [81 ] =NOKEY , - [82 ] =NOKEY , - [83 ] =KEY_D , - [84 ] =KEY_V , - [85 ] =KEY_N , - [86 ] =KEY_K , - [87 ] =NOKEY , - [88 ] =KEY_LEFTSHIFT , - [89 ] =KEY_RIGHTCTRL , - [90 ] =NOKEY , - [91 ] =KEY_DOT , - [92 ] =KEY_UP , - [93 ] =KEY_RIGHT , - [94 ] =KEY_F3 , - [95 ] =KEY_F2 , - [96 ] =NOKEY , - [97 ] =NOKEY , - [98 ] =KEY_RIGHTALT , - [99 ] =KEY_X , - [100 ] =KEY_C , - [101 ] =KEY_B , - [102 ] =KEY_COMMA , - [103 ] =NOKEY , - [104 ] =NOKEY , - [105 ] =NOKEY , - [106 ] =NOKEY , - [107 ] =NOKEY , - [108 ] =KEY_PRINTSCR , - [109 ] =KEY_DOWN , - [110 ] =KEY_1 , - [111 ] =KEY_CAPSLOCK , - [112 ] =KEY_F24 , - [113 ] =KEY_HOME , - [114 ] =KEY_LEFTALT , - [115 ] =NOKEY , - [116 ] =KEY_SPACE , - [117 ] =KEY_BACKSLASH , - [118 ] =KEY_M , - [119 ] =KEY_COMPOSE , - [120 ] =NOKEY , - [121 ] =KEY_LEFTCTRL , - [122 ] =NOKEY , - [123 ] =NOKEY , - [124 ] =KEY_PAUSE , - [125 ] =KEY_LEFT , - [126 ] =KEY_F7 , - [127 ] =KEY_F6 , - [128 ] =NOKEY , - [129 ] =NOKEY , - [130 ] =NOKEY , - [131 ] =NOKEY , - [132 ] =NOKEY , - [133 ] =NOKEY , - [134 ] =NOKEY , - [135 ] =NOKEY , - [136 ] =NOKEY , - [137 ] =NOKEY , - [138 ] =NOKEY , - [139 ] =NOKEY , - [140 ] =NOKEY , - [141 ] =NOKEY , - [142 ] =NOKEY , - [143 ] =NOKEY , - [144 ] =NOKEY , - [145 ] =NOKEY , - [146 ] =NOKEY , - [147 ] =NOKEY , - [148 ] =NOKEY , - [149 ] =NOKEY , - [150 ] =NOKEY , - [151 ] =NOKEY , - [152 ] =NOKEY , - [153 ] =NOKEY , - [154 ] =NOKEY , - [155 ] =NOKEY , - [156 ] =NOKEY , - [157 ] =NOKEY , - [158 ] =NOKEY , - [159 ] =NOKEY , - [160 ] =NOKEY , - [161 ] =NOKEY , - [162 ] =NOKEY , - [163 ] =NOKEY , - [164 ] =NOKEY , - [165 ] =NOKEY , - [166 ] =NOKEY , - [167 ] =NOKEY , - [168 ] =NOKEY , - [169 ] =NOKEY , - [170 ] =NOKEY , - [171 ] =NOKEY , - [172 ] =NOKEY , - [173 ] =NOKEY , - [174 ] =NOKEY , - [175 ] =NOKEY , - [176 ] =NOKEY , - [177 ] =NOKEY , - [178 ] =NOKEY , - [179 ] =NOKEY , - [180 ] =NOKEY , - [181 ] =NOKEY , - [182 ] =NOKEY , - [183 ] =NOKEY , - [184 ] =NOKEY , - [185 ] =NOKEY , - [186 ] =NOKEY , - [187 ] =NOKEY , - [188 ] =NOKEY , - [189 ] =KEY_HOME , - [190 ] =NOKEY , - [191 ] =NOKEY , - [192 ] =NOKEY , - [193 ] =NOKEY , - [194 ] =NOKEY , - [195 ] =NOKEY , - [196 ] =NOKEY , - [197 ] =NOKEY , - [198 ] =NOKEY , - [199 ] =NOKEY , - [200 ] =NOKEY , - [201 ] =NOKEY , - [202 ] =NOKEY , - [203 ] =NOKEY , - [204 ] =NOKEY , - [205 ] =KEY_END , - [206 ] =NOKEY , - [207 ] =NOKEY , - [208 ] =NOKEY , - [209 ] =NOKEY , - [210 ] =NOKEY , - [211 ] =NOKEY , - [212 ] =NOKEY , - [213 ] =NOKEY , - [214 ] =NOKEY , - [215 ] =NOKEY , - [216 ] =NOKEY , - [217 ] =NOKEY , - [218 ] =NOKEY , - [219 ] =NOKEY , - [220 ] =KEY_VOLUMEUP , - [221 ] =KEY_BRIGHTNESSUP , - [222 ] =NOKEY , - [223 ] =NOKEY , - [224 ] =NOKEY , - [225 ] =NOKEY , - [226 ] =NOKEY , - [227 ] =NOKEY , - [228 ] =NOKEY , - [229 ] =NOKEY , - [230 ] =NOKEY , - [231 ] =NOKEY , - [232 ] =NOKEY , - [233 ] =NOKEY , - [234 ] =NOKEY , - [235 ] =NOKEY , - [236 ] =NOKEY , - [237 ] =KEY_VOLUMEDOWN , - [238 ] =NOKEY , - [239 ] =NOKEY , - [240 ] =NOKEY , - [241 ] =NOKEY , - [242 ] =NOKEY , - [243 ] =NOKEY , - [244 ] =NOKEY , - [245 ] =NOKEY , - [246 ] =NOKEY , - [247 ] =NOKEY , - [248 ] =NOKEY , - [249 ] =NOKEY , - [250 ] =NOKEY , - [251 ] =NOKEY , - [252 ] =NOKEY , - [253 ] =KEY_BRIGHTNESSDOWN , - [254 ] =NOKEY , - [255 ] =NOKEY , -}; -/*----------------------------------------------------------------------------- -* Global variables -*---------------------------------------------------------------------------*/ - -struct input_dev *g_qci_keyboard_dev; - -/* General structure to hold the driver data */ -struct i2ckbd_drv_data { -struct i2c_client *ki2c_client; -struct work_struct work; -struct input_dev *qcikbd_dev; -unsigned int qcikbd_gpio;/* GPIO used for interrupt */ -unsigned int qcikbd_irq; -unsigned int key_down; -unsigned int escape; -unsigned int pause_seq; -unsigned int fn; -}; -#ifdef CONFIG_PM -static int qcikbd_suspend (struct device *dev) -{ -return 0 ; -} - -static int qcikbd_resume (struct device *dev) -{ -return 0 ; -} -#endif -static int __devinit qcikbd_probe (struct i2c_client *client, -const struct i2c_device_id *id); -static int __devexit qcikbd_remove(struct i2c_client *kbd); - -static const struct i2c_device_id qcikbd_idtable[] = { - {KEYBOARD_ID_NAME ,0 }, - { } -}; - -MODULE_DEVICE_TABLE (i2c, qcikbd_idtable); - -#ifdef CONFIG_PM -static struct dev_pm_ops qcikbd_pm_ops = { - .suspend = qcikbd_suspend, - .resume = qcikbd_resume, -}; -#endif -static struct i2c_driver i2ckbd_driver = { - .driver = { - .owner =THIS_MODULE , - .name =KEYBOARD_ID_NAME , -#ifdef CONFIG_PM - .pm = &qcikbd_pm_ops, -#endif - }, - .probe = qcikbd_probe, - .remove =__devexit_p (qcikbd_remove), - .id_table = qcikbd_idtable, -}; - -/*----------------------------------------------------------------------------- -* Driver functions -*---------------------------------------------------------------------------*/ - -static irqreturn_t qcikbd_interrupt (int irq,void *dev_id) -{ -struct i2ckbd_drv_data *ikbd_drv_data = dev_id; -schedule_work (&ikbd_drv_data->work); -return IRQ_HANDLED ; -} - -static void qcikbd_work_handler (struct work_struct *_work) -{ -unsigned char scancode; -unsigned int keycode; - -struct i2ckbd_drv_data *ikbd_drv_data = - container_of(_work, struct i2ckbd_drv_data, work); - -struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; -struct input_dev *ikbdev = ikbd_drv_data->qcikbd_dev; - - scancode =i2c_smbus_read_byte (ikbdclient); - -if (scancode ==KEY_ACK_FA ) { -return ; - }else if (scancode ==RC_KEY_FN ) { - ikbd_drv_data->fn =0x80 ;/* select keycode table > 0x7F */ - }else { - ikbd_drv_data->key_down =1 ; -if (scancode &RC_KEY_BREAK ) { - ikbd_drv_data->key_down =0 ; -if ((scancode &0x7F ) ==RC_KEY_FN ) - ikbd_drv_data->fn =0 ; - } - keycode = on2_keycode[(scancode &0x7F ) | ikbd_drv_data->fn]; -if (keycode !=NOKEY ) { -input_report_key (ikbdev, - keycode, - ikbd_drv_data->key_down); -input_sync (ikbdev); - } - } -} - - -static int qcikbd_open (struct input_dev *dev) -{ -struct i2ckbd_drv_data *ikbd_drv_data =input_get_drvdata (dev); -struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; - -/* Send F4h - enable keyboard */ -i2c_smbus_write_byte (ikbdclient,KEYBOARD_CMD_ENABLE ); -return 0 ; -} - -static int __devinit qcikbd_probe (struct i2c_client *client, -const struct i2c_device_id *id) -{ -int err; -int i; -struct i2ckbd_drv_data *context; - context =kzalloc (sizeof (struct i2ckbd_drv_data ),GFP_KERNEL ); -if (!context) -return -ENOMEM ; -i2c_set_clientdata (client, context); - context->ki2c_client = client; - context->qcikbd_gpio = client->irq; - client->driver = &i2ckbd_driver; - -INIT_WORK (&context->work, qcikbd_work_handler); - - err =gpio_request (context->qcikbd_gpio,"qci-kbd" ); -if (err) { -pr_err ("[KBD] err gpio request\n" ); - goto gpio_request_fail; - } - - context->qcikbd_irq =gpio_to_irq (context->qcikbd_gpio); - err =request_irq (context->qcikbd_irq, - qcikbd_interrupt, -IRQF_TRIGGER_FALLING , -KEYBOARD_ID_NAME , - context); -if (err) { -pr_err ("[KBD] err unable to get IRQ\n" ); - goto request_irq_fail; - } - - context->qcikbd_dev =input_allocate_device (); -if (!context->qcikbd_dev) { -pr_err ("[KBD]allocting memory err\n" ); - err = -ENOMEM ; - goto allocate_fail; - } - - context->qcikbd_dev->name =KEYBOARD_NAME ; - context->qcikbd_dev->phys =KEYBOARD_DEVICE ; - context->qcikbd_dev->id.bustype =BUS_I2C ; - context->qcikbd_dev->id.vendor =0x1050 ; - context->qcikbd_dev->id.product =0x0006 ; - context->qcikbd_dev->id.version =0x0004 ; - context->qcikbd_dev->open = qcikbd_open; -set_bit (EV_KEY , context->qcikbd_dev->evbit); -set_bit (EV_REP , context->qcikbd_dev->evbit); - -/* Enable all supported keys */ -for (i =1 ; i <ARRAY_SIZE (on2_keycode) ; i++) -set_bit (on2_keycode[i], context->qcikbd_dev->keybit); - -set_bit (KEY_POWER , context->qcikbd_dev->keybit); -set_bit (KEY_END , context->qcikbd_dev->keybit); -set_bit (KEY_VOLUMEUP , context->qcikbd_dev->keybit); -set_bit (KEY_VOLUMEDOWN , context->qcikbd_dev->keybit); -set_bit (KEY_ZOOMIN , context->qcikbd_dev->keybit); -set_bit (KEY_ZOOMOUT , context->qcikbd_dev->keybit); - -input_set_drvdata (context->qcikbd_dev, context); - err =input_register_device (context->qcikbd_dev); -if (err) { -pr_err ("[KBD] err input register device\n" ); - goto register_fail; - } - g_qci_keyboard_dev = context->qcikbd_dev; -return 0 ; -register_fail: -input_free_device (context->qcikbd_dev); - -allocate_fail: -free_irq (context->qcikbd_irq, context); - -request_irq_fail: -gpio_free (context->qcikbd_gpio); - -gpio_request_fail: -i2c_set_clientdata (client,NULL ); -kfree (context); -return err; -} - -static int __devexit qcikbd_remove(struct i2c_client *dev) -{ -struct i2ckbd_drv_data *context =i2c_get_clientdata (dev); - -free_irq (context->qcikbd_irq, context); -gpio_free (context->qcikbd_gpio); -input_free_device (context->qcikbd_dev); -input_unregister_device (context->qcikbd_dev); -kfree (context); - -return 0 ; -} - -static int __init qcikbd_init (void ) -{ -return i2c_add_driver (&i2ckbd_driver); -} - -static void __exit qcikbd_exit(void) -{ -i2c_del_driver (&i2ckbd_driver); -} - -struct input_dev *nkbc_keypad_get_input_dev (void ) -{ -return g_qci_keyboard_dev; -} -EXPORT_SYMBOL (nkbc_keypad_get_input_dev); -module_init (qcikbd_init); -module_exit (qcikbd_exit); - -MODULE_AUTHOR ("Quanta Computer Inc." ); -MODULE_DESCRIPTION ("Quanta Embedded Controller I2C Keyboard Driver" ); -MODULE_LICENSE ("GPL v2" ); - +/* Quanta I2C Keyboard Driver +* +* Copyright (C) 2009 Quanta Computer Inc. +* Author: Hsin Wu <[email protected]> +* Author: Austin Lai <[email protected]> +* +* 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. +* +*/ + +/* +* +* The Driver with I/O communications via the I2C Interface for ON2 of AP BU. +* And it is only working on the nuvoTon WPCE775x Embedded Controller. +* +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/jiffies.h> +#include <linux/i2c.h> +#include <linux/mutex.h> +#include <linux/interrupt.h> +#include <linux/input.h> +#include <linux/keyboard.h> +#include <linux/gpio.h> +#include <linux/delay.h> + +/* Keyboard special scancode */ +#define RC_KEY_FN 0x70 +#define RC_KEY_BREAK 0x80 +#define KEY_ACK_FA 0xFA + +/* Keyboard keycodes */ +#define NOKEY KEY_RESERVED +#define KEY_LEFTWIN KEY_LEFTMETA +#define KEY_RIGHTWIN KEY_RIGHTMETA +#define KEY_APPS KEY_COMPOSE +#define KEY_PRINTSCR KEY_SYSRQ + +#define KEYBOARD_ID_NAME "qci-i2ckbd" +#define KEYBOARD_NAME "Quanta Keyboard" +#define KEYBOARD_DEVICE "/i2c/input0" +#define KEYBOARD_CMD_ENABLE 0xF4 + +/*----------------------------------------------------------------------------- +* Keyboard scancode to linux keycode translation table +*---------------------------------------------------------------------------*/ + +static const unsigned char on2_keycode[256 ] = { + [0 ] =KEY_RESERVED , + [1 ] =KEY_ESC , + [2 ] =KEY_1 , + [3 ] =KEY_2 , + [4 ] =KEY_3 , + [5 ] =KEY_4 , + [6 ] =KEY_5 , + [7 ] =KEY_6 , + [8 ] =KEY_7 , + [9 ] =KEY_8 , + [10 ] =KEY_9 , + [11 ] =KEY_0 , + [12 ] =KEY_MINUS , + [13 ] =KEY_EQUAL , + [14 ] =KEY_BACKSPACE , + [15 ] =KEY_TAB , + [16 ] =KEY_Q , + [17 ] =KEY_W , + [18 ] =KEY_E , + [19 ] =KEY_R , + [20 ] =KEY_T , + [21 ] =KEY_Y , + [22 ] =KEY_U , + [23 ] =KEY_I , + [24 ] =KEY_O , + [25 ] =KEY_P , + [26 ] =KEY_LEFTBRACE , + [27 ] =KEY_RIGHTBRACE , + [28 ] =KEY_ENTER , + [29 ] =KEY_LEFTCTRL , + [30 ] =KEY_A , + [31 ] =KEY_S , + [32 ] =KEY_D , + [33 ] =KEY_F , + [34 ] =KEY_G , + [35 ] =KEY_H , + [36 ] =KEY_J , + [37 ] =KEY_K , + [38 ] =KEY_L , + [39 ] =KEY_SEMICOLON , + [40 ] =KEY_APOSTROPHE , + [41 ] =KEY_GRAVE , + [42 ] =KEY_LEFTSHIFT , + [43 ] =KEY_BACKSLASH , + [44 ] =KEY_Z , + [45 ] =KEY_X , + [46 ] =KEY_C , + [47 ] =KEY_V , + [48 ] =KEY_B , + [49 ] =KEY_N , + [50 ] =KEY_M , + [51 ] =KEY_COMMA , + [52 ] =KEY_DOT , + [53 ] =KEY_SLASH , + [54 ] =KEY_RIGHTSHIFT , + [55 ] =KEY_KPASTERISK , + [56 ] =KEY_LEFTALT , + [57 ] =KEY_SPACE , + [58 ] =KEY_CAPSLOCK , + [59 ] =KEY_F1 , + [60 ] =KEY_F2 , + [61 ] =KEY_F3 , + [62 ] =KEY_F4 , + [63 ] =KEY_F5 , + [64 ] =KEY_F6 , + [65 ] =KEY_F7 , + [66 ] =KEY_F8 , + [67 ] =KEY_F9 , + [68 ] =KEY_F10 , + [69 ] =KEY_NUMLOCK , + [70 ] =KEY_SCROLLLOCK , + [71 ] =KEY_KP7 , + [72 ] =KEY_KP8 , + [73 ] =KEY_KP9 , + [74 ] =KEY_KPMINUS , + [75 ] =KEY_KP4 , + [76 ] =KEY_KP5 , + [77 ] =KEY_KP6 , + [78 ] =KEY_KPPLUS , + [79 ] =KEY_KP1 , + [80 ] =KEY_KP2 , + [81 ] =KEY_KP3 , + [82 ] =KEY_KP0 , + [83 ] =KEY_KPDOT , + [84 ] =KEY_RESERVED , + [85 ] =KEY_ZENKAKUHANKAKU , + [86 ] =KEY_102ND , + [87 ] =KEY_F11 , + [88 ] =KEY_F12 , + [89 ] =KEY_RO , + [90 ] =KEY_KATAKANA , + [91 ] =KEY_HIRAGANA , + [92 ] =KEY_HENKAN , + [93 ] =KEY_KATAKANAHIRAGANA , + [94 ] =KEY_MUHENKAN , + [95 ] =KEY_KPJPCOMMA , + [96 ] =KEY_KPENTER , + [97 ] =KEY_RIGHTCTRL , + [98 ] =KEY_KPSLASH , + [99 ] =KEY_SYSRQ , + [100 ] =KEY_RIGHTALT , + [101 ] =KEY_LINEFEED , + [102 ] =KEY_HOME , + [103 ] =KEY_UP , + [104 ] =KEY_PAGEUP , + [105 ] =KEY_LEFT , + [106 ] =KEY_RIGHT , + [107 ] =KEY_END , + [108 ] =KEY_DOWN , + [109 ] =KEY_PAGEDOWN , + [110 ] =KEY_INSERT , + [111 ] =KEY_DELETE , + [112 ] =KEY_MACRO , + [113 ] =KEY_MUTE , + [114 ] =KEY_VOLUMEDOWN , + [115 ] =KEY_VOLUMEUP , + [116 ] =KEY_POWER , + [117 ] =KEY_KPEQUAL , + [118 ] =KEY_KPPLUSMINUS , + [119 ] =KEY_PAUSE , + [120 ] =KEY_SCALE , + [121 ] =KEY_KPCOMMA , + [122 ] =KEY_HANGEUL , + [123 ] =KEY_HANGUEL , + [124 ] =KEY_HANJA , + [125 ] =KEY_YEN , + [126 ] =KEY_LEFTMETA , + [127 ] =KEY_RIGHTMETA , + [128 ] =KEY_COMPOSE , + [129 ] =NOKEY , + [130 ] =NOKEY , + [131 ] =NOKEY , + [132 ] =NOKEY , + [133 ] =NOKEY , + [134 ] =NOKEY , + [135 ] =NOKEY , + [136 ] =NOKEY , + [137 ] =NOKEY , + [138 ] =NOKEY , + [139 ] =NOKEY , + [140 ] =NOKEY , + [141 ] =NOKEY , + [142 ] =NOKEY , + [143 ] =NOKEY , + [144 ] =NOKEY , + [145 ] =NOKEY , + [146 ] =NOKEY , + [147 ] =NOKEY , + [148 ] =NOKEY , + [149 ] =NOKEY , + [150 ] =NOKEY , + [151 ] =NOKEY , + [152 ] =NOKEY , + [153 ] =NOKEY , + [154 ] =NOKEY , + [155 ] =NOKEY , + [156 ] =NOKEY , + [157 ] =NOKEY , + [158 ] =NOKEY , + [159 ] =NOKEY , + [160 ] =NOKEY , + [161 ] =NOKEY , + [162 ] =NOKEY , + [163 ] =NOKEY , + [164 ] =NOKEY , + [165 ] =NOKEY , + [166 ] =NOKEY , + [167 ] =NOKEY , + [168 ] =NOKEY , + [169 ] =NOKEY , + [170 ] =NOKEY , + [171 ] =NOKEY , + [172 ] =NOKEY , + [173 ] =NOKEY , + [174 ] =NOKEY , + [175 ] =NOKEY , + [176 ] =NOKEY , + [177 ] =NOKEY , + [178 ] =NOKEY , + [179 ] =NOKEY , + [180 ] =NOKEY , + [181 ] =NOKEY , + [182 ] =NOKEY , + [183 ] =NOKEY , + [184 ] =NOKEY , + [185 ] =NOKEY , + [186 ] =NOKEY , + [187 ] =NOKEY , + [188 ] =NOKEY , + [189 ] =KEY_HOME , + [190 ] =NOKEY , + [191 ] =NOKEY , + [192 ] =NOKEY , + [193 ] =NOKEY , + [194 ] =NOKEY , + [195 ] =NOKEY , + [196 ] =NOKEY , + [197 ] =NOKEY , + [198 ] =NOKEY , + [199 ] =NOKEY , + [200 ] =NOKEY , + [201 ] =NOKEY , + [202 ] =NOKEY , + [203 ] =NOKEY , + [204 ] =NOKEY , + [205 ] =KEY_END , + [206 ] =NOKEY , + [207 ] =NOKEY , + [208 ] =NOKEY , + [209 ] =NOKEY , + [210 ] =NOKEY , + [211 ] =NOKEY , + [212 ] =NOKEY , + [213 ] =NOKEY , + [214 ] =NOKEY , + [215 ] =NOKEY , + [216 ] =NOKEY , + [217 ] =NOKEY , + [218 ] =NOKEY , + [219 ] =NOKEY , + [220 ] =KEY_VOLUMEUP , + [221 ] =KEY_BRIGHTNESSUP , + [222 ] =NOKEY , + [223 ] =NOKEY , + [224 ] =NOKEY , + [225 ] =NOKEY , + [226 ] =NOKEY , + [227 ] =NOKEY , + [228 ] =NOKEY , + [229 ] =NOKEY , + [230 ] =NOKEY , + [231 ] =NOKEY , + [232 ] =NOKEY , + [233 ] =NOKEY , + [234 ] =NOKEY , + [235 ] =NOKEY , + [236 ] =NOKEY , + [237 ] =KEY_VOLUMEDOWN , + [238 ] =NOKEY , + [239 ] =NOKEY , + [240 ] =NOKEY , + [241 ] =NOKEY , + [242 ] =NOKEY , + [243 ] =NOKEY , + [244 ] =NOKEY , + [245 ] =NOKEY , + [246 ] =NOKEY , + [247 ] =NOKEY , + [248 ] =NOKEY , + [249 ] =NOKEY , + [250 ] =NOKEY , + [251 ] =NOKEY , + [252 ] =NOKEY , + [253 ] =KEY_BRIGHTNESSDOWN , + [254 ] =NOKEY , + [255 ] =NOKEY , +}; +/*----------------------------------------------------------------------------- +* Global variables +*---------------------------------------------------------------------------*/ + +struct input_dev *g_qci_keyboard_dev; + +/* General structure to hold the driver data */ +struct i2ckbd_drv_data { +struct i2c_client *ki2c_client; +struct work_struct work; +struct input_dev *qcikbd_dev; +unsigned int qcikbd_gpio;/* GPIO used for interrupt */ +unsigned int qcikbd_irq; +unsigned int key_down; +unsigned int escape; +unsigned int pause_seq; +unsigned int fn; +}; +#ifdef CONFIG_PM +static int qcikbd_suspend (struct device *dev) +{ +return 0 ; +} + +static int qcikbd_resume (struct device *dev) +{ +return 0 ; +} +#endif +static int __devinit qcikbd_probe (struct i2c_client *client, +const struct i2c_device_id *id); +static int __devexit qcikbd_remove(struct i2c_client *kbd); + +static const struct i2c_device_id qcikbd_idtable[] = { + {KEYBOARD_ID_NAME ,0 }, + { } +}; + +MODULE_DEVICE_TABLE (i2c, qcikbd_idtable); + +#ifdef CONFIG_PM +static struct dev_pm_ops qcikbd_pm_ops = { + .suspend = qcikbd_suspend, + .resume = qcikbd_resume, +}; +#endif +static struct i2c_driver i2ckbd_driver = { + .driver = { + .owner =THIS_MODULE , + .name =KEYBOARD_ID_NAME , +#ifdef CONFIG_PM + .pm = &qcikbd_pm_ops, +#endif + }, + .probe = qcikbd_probe, + .remove =__devexit_p (qcikbd_remove), + .id_table = qcikbd_idtable, +}; + +/*----------------------------------------------------------------------------- +* Driver functions +*---------------------------------------------------------------------------*/ + +static irqreturn_t qcikbd_interrupt (int irq,void *dev_id) +{ +struct i2ckbd_drv_data *ikbd_drv_data = dev_id; +schedule_work (&ikbd_drv_data->work); +return IRQ_HANDLED ; +} + +static void qcikbd_work_handler (struct work_struct *_work) +{ +unsigned char scancode; +unsigned int keycode; + +struct i2ckbd_drv_data *ikbd_drv_data = + container_of(_work, struct i2ckbd_drv_data, work); + +struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; +struct input_dev *ikbdev = ikbd_drv_data->qcikbd_dev; + + scancode =i2c_smbus_read_byte (ikbdclient); +printk (" scancode = %x\n" , scancode); + +if (scancode ==0xFA ) + { +return ; + }else { + ikbd_drv_data->key_down =1 ; +if (scancode &0x80 ) { + ikbd_drv_data->key_down =0 ; + } + keycode = on2_keycode[(scancode &0x7F )]; +if (keycode !=NOKEY ) { + +input_event (ikbdev,EV_MSC ,MSC_SCAN , scancode); + +input_report_key (ikbdev, + keycode, + ikbd_drv_data->key_down); +input_sync (ikbdev); + } + } +} + + +static int qcikbd_open (struct input_dev *dev) +{ +struct i2ckbd_drv_data *ikbd_drv_data =input_get_drvdata (dev); +struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; + +/* Send F4h - enable keyboard */ +i2c_smbus_write_byte (ikbdclient,KEYBOARD_CMD_ENABLE ); +return 0 ; +} + +static int __devinit qcikbd_probe (struct i2c_client *client, +const struct i2c_device_id *id) +{ +int err; +int i; +struct i2ckbd_drv_data *context; + context =kzalloc (sizeof (struct i2ckbd_drv_data ),GFP_KERNEL ); +if (!context) +return -ENOMEM ; +i2c_set_clientdata (client, context); + context->ki2c_client = client; + context->qcikbd_gpio = client->irq; + client->driver = &i2ckbd_driver; + +INIT_WORK (&context->work, qcikbd_work_handler); + + err =gpio_request (context->qcikbd_gpio,"qci-kbd" ); +if (err) { +pr_err ("[KBD] err gpio request\n" ); + goto gpio_request_fail; + } + + context->qcikbd_irq =gpio_to_irq (context->qcikbd_gpio); + err =request_irq (context->qcikbd_irq, + qcikbd_interrupt, +IRQF_TRIGGER_FALLING , +KEYBOARD_ID_NAME , + context); +if (err) { +pr_err ("[KBD] err unable to get IRQ\n" ); + goto request_irq_fail; + } + + context->qcikbd_dev =input_allocate_device (); +if (!context->qcikbd_dev) { +pr_err ("[KBD]allocting memory err\n" ); + err = -ENOMEM ; + goto allocate_fail; + } + + context->qcikbd_dev->name =KEYBOARD_NAME ; + context->qcikbd_dev->phys =KEYBOARD_DEVICE ; + context->qcikbd_dev->id.bustype =BUS_I2C ; + context->qcikbd_dev->id.vendor =0x1050 ; + context->qcikbd_dev->id.product =0x0006 ; + context->qcikbd_dev->id.version =0x0004 ; + context->qcikbd_dev->open = qcikbd_open; + context->qcikbd_dev->evbit[0 ] =BIT_MASK (EV_KEY ); + +/* Enable all supported keys */ +for (i =1 ; i <ARRAY_SIZE (on2_keycode) ; i++) +set_bit (on2_keycode[i], context->qcikbd_dev->keybit); + +set_bit (KEY_POWER , context->qcikbd_dev->keybit); +set_bit (KEY_END , context->qcikbd_dev->keybit); +set_bit (KEY_VOLUMEUP , context->qcikbd_dev->keybit); +set_bit (KEY_VOLUMEDOWN , context->qcikbd_dev->keybit); +set_bit (KEY_ZOOMIN , context->qcikbd_dev->keybit); +set_bit (KEY_ZOOMOUT , context->qcikbd_dev->keybit); + +input_set_drvdata (context->qcikbd_dev, context); + err =input_register_device (context->qcikbd_dev); +if (err) { +pr_err ("[KBD] err input register device\n" ); + goto register_fail; + } + g_qci_keyboard_dev = context->qcikbd_dev; +printk ("QCI_KBD PROBE\n" ); +return 0 ; +register_fail: +input_free_device (context->qcikbd_dev); + +allocate_fail: +free_irq (context->qcikbd_irq, context); + +request_irq_fail: +gpio_free (context->qcikbd_gpio); + +gpio_request_fail: +i2c_set_clientdata (client,NULL ); +kfree (context); +return err; +} + +static int __devexit qcikbd_remove(struct i2c_client *dev) +{ +struct i2ckbd_drv_data *context =i2c_get_clientdata (dev); + +free_irq (context->qcikbd_irq, context); +gpio_free (context->qcikbd_gpio); +input_free_device (context->qcikbd_dev); +input_unregister_device (context->qcikbd_dev); +kfree (context); + +return 0 ; +} + +static int __init qcikbd_init (void ) +{ +return i2c_add_driver (&i2ckbd_driver); +} + +static void __exit qcikbd_exit(void) +{ +i2c_del_driver (&i2ckbd_driver); +} + +struct input_dev *nkbc_keypad_get_input_dev (void ) +{ +return g_qci_keyboard_dev; +} +EXPORT_SYMBOL (nkbc_keypad_get_input_dev); +module_init (qcikbd_init); +module_exit (qcikbd_exit); + +MODULE_AUTHOR ("Quanta Computer Inc." ); +MODULE_DESCRIPTION ("Quanta Embedded Controller I2C Keyboard Driver" ); +MODULE_LICENSE ("GPL v2" ); +
Signature · 1 line
1.7.0.4
Dmitry Torokhov
maintainerRe: [RFC 04/36] [Driver][Qualcomm 1070][EC_KB] Adding new qci keyboard driver
Quoted 2 lines · Wayne Lin
From: wayne <[email protected]>
- Change log?
- run through checkpatch.pl
- Get rid of debug printks (or convert to dev_dbg)?
- use dev_XXX instrad of pr_xxx when you have device? Get rig
- I have seen lots of time people trying to call input_free_device after calling input_unregister_device (which is forbidden, input_unregister_device is sufficient alone) but you are the first to call free _before_ unregister.
- No need to initialize keymap with zeroes (NOKEYS)
- threaded IRQ
- copy keymap into device and set keycode, keycodemax, keycodesize so that keymap can be adjusted from userspace
- why do you export input device?
I dont think you tried applying this patch... At least I do not have qci_kbd.c in my tree so it would not apply.
Quoted 1,117 lines
--- drivers/input/keyboard/qci_kbd.c | 1101 +++++++++++++++++++------------------- 1 files changed, 551 insertions(+), 550 deletions(-)drivers/input/keyboard/qci_kbd.c +551
-550@@ -1,550 +1,551 @@ -/* Quanta I2C Keyboard Driver -* -* Copyright (C) 2009 Quanta Computer Inc. -* Author: Hsin Wu <[email protected]> -* Author: Austin Lai <[email protected]> -* -* 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. -* -*/ - -/* -* -* The Driver with I/O communications via the I2C Interface for ON2 of AP BU. -* And it is only working on the nuvoTon WPCE775x Embedded Controller. -* -*/ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/slab.h> -#include <linux/jiffies.h> -#include <linux/i2c.h> -#include <linux/mutex.h> -#include <linux/interrupt.h> -#include <linux/input.h> -#include <linux/keyboard.h> -#include <linux/gpio.h> -#include <linux/delay.h> - -/* Keyboard special scancode */ -#define RC_KEY_FN 0x70 -#define RC_KEY_BREAK 0x80 -#define KEY_ACK_FA 0xFA - -/* Keyboard keycodes */ -#define NOKEY KEY_RESERVED -#define KEY_LEFTWIN KEY_LEFTMETA -#define KEY_RIGHTWIN KEY_RIGHTMETA -#define KEY_APPS KEY_COMPOSE -#define KEY_PRINTSCR KEY_SYSRQ - -#define KEYBOARD_ID_NAME "qci-i2ckbd" -#define KEYBOARD_NAME "Quanta Keyboard" -#define KEYBOARD_DEVICE "/i2c/input0" -#define KEYBOARD_CMD_ENABLE 0xF4 - -/*----------------------------------------------------------------------------- -* Keyboard scancode to linux keycode translation table -*---------------------------------------------------------------------------*/ - -static const unsigned char on2_keycode[256 ] = { - [0 ] =NOKEY , - [1 ] =NOKEY , - [2 ] =NOKEY , - [3 ] =KEY_5 , - [4 ] =KEY_7 , - [5 ] =KEY_9 , - [6 ] =KEY_MINUS , - [7 ] =NOKEY , - [8 ] =NOKEY , - [9 ] =NOKEY , - [10 ] =NOKEY , - [11 ] =KEY_LEFTBRACE , - [12 ] =KEY_F10 , - [13 ] =KEY_INSERT , - [14 ] =KEY_F11 , - [15 ] =KEY_ESC , - [16 ] =NOKEY , - [17 ] =NOKEY , - [18 ] =NOKEY , - [19 ] =KEY_4 , - [20 ] =KEY_6 , - [21 ] =KEY_8 , - [22 ] =KEY_0 , - [23 ] =KEY_EQUAL , - [24 ] =NOKEY , - [25 ] =NOKEY , - [26 ] =NOKEY , - [27 ] =KEY_P , - [28 ] =KEY_F9 , - [29 ] =KEY_DELETE , - [30 ] =KEY_F12 , - [31 ] =KEY_GRAVE , - [32 ] =KEY_W , - [33 ] =NOKEY , - [34 ] =NOKEY , - [35 ] =KEY_R , - [36 ] =KEY_T , - [37 ] =KEY_U , - [38 ] =KEY_O , - [39 ] =KEY_RIGHTBRACE , - [40 ] =NOKEY , - [41 ] =NOKEY , - [42 ] =NOKEY , - [43 ] =KEY_APOSTROPHE , - [44 ] =KEY_BACKSPACE , - [45 ] =NOKEY , - [46 ] =KEY_F8 , - [47 ] =KEY_F5 , - [48 ] =KEY_S , - [49 ] =NOKEY , - [50 ] =NOKEY , - [51 ] =KEY_E , - [52 ] =KEY_H , - [53 ] =KEY_Y , - [54 ] =KEY_I , - [55 ] =KEY_ENTER , - [56 ] =NOKEY , - [57 ] =NOKEY , - [58 ] =NOKEY , - [59 ] =KEY_SEMICOLON , - [60 ] =KEY_3 , - [61 ] =KEY_PAGEUP , - [62 ] =KEY_Q , - [63 ] =KEY_TAB , - [64 ] =KEY_A , - [65 ] =NOKEY , - [66 ] =NOKEY , - [67 ] =KEY_F , - [68 ] =KEY_G , - [69 ] =KEY_J , - [70 ] =KEY_L , - [71 ] =NOKEY , - [72 ] =KEY_RIGHTSHIFT , - [73 ] =NOKEY , - [74 ] =NOKEY , - [75 ] =KEY_SLASH , - [76 ] =KEY_2 , - [77 ] =KEY_PAGEDOWN , - [78 ] =KEY_F4 , - [79 ] =KEY_F1 , - [80 ] =KEY_Z , - [81 ] =NOKEY , - [82 ] =NOKEY , - [83 ] =KEY_D , - [84 ] =KEY_V , - [85 ] =KEY_N , - [86 ] =KEY_K , - [87 ] =NOKEY , - [88 ] =KEY_LEFTSHIFT , - [89 ] =KEY_RIGHTCTRL , - [90 ] =NOKEY , - [91 ] =KEY_DOT , - [92 ] =KEY_UP , - [93 ] =KEY_RIGHT , - [94 ] =KEY_F3 , - [95 ] =KEY_F2 , - [96 ] =NOKEY , - [97 ] =NOKEY , - [98 ] =KEY_RIGHTALT , - [99 ] =KEY_X , - [100 ] =KEY_C , - [101 ] =KEY_B , - [102 ] =KEY_COMMA , - [103 ] =NOKEY , - [104 ] =NOKEY , - [105 ] =NOKEY , - [106 ] =NOKEY , - [107 ] =NOKEY , - [108 ] =KEY_PRINTSCR , - [109 ] =KEY_DOWN , - [110 ] =KEY_1 , - [111 ] =KEY_CAPSLOCK , - [112 ] =KEY_F24 , - [113 ] =KEY_HOME , - [114 ] =KEY_LEFTALT , - [115 ] =NOKEY , - [116 ] =KEY_SPACE , - [117 ] =KEY_BACKSLASH , - [118 ] =KEY_M , - [119 ] =KEY_COMPOSE , - [120 ] =NOKEY , - [121 ] =KEY_LEFTCTRL , - [122 ] =NOKEY , - [123 ] =NOKEY , - [124 ] =KEY_PAUSE , - [125 ] =KEY_LEFT , - [126 ] =KEY_F7 , - [127 ] =KEY_F6 , - [128 ] =NOKEY , - [129 ] =NOKEY , - [130 ] =NOKEY , - [131 ] =NOKEY , - [132 ] =NOKEY , - [133 ] =NOKEY , - [134 ] =NOKEY , - [135 ] =NOKEY , - [136 ] =NOKEY , - [137 ] =NOKEY , - [138 ] =NOKEY , - [139 ] =NOKEY , - [140 ] =NOKEY , - [141 ] =NOKEY , - [142 ] =NOKEY , - [143 ] =NOKEY , - [144 ] =NOKEY , - [145 ] =NOKEY , - [146 ] =NOKEY , - [147 ] =NOKEY , - [148 ] =NOKEY , - [149 ] =NOKEY , - [150 ] =NOKEY , - [151 ] =NOKEY , - [152 ] =NOKEY , - [153 ] =NOKEY , - [154 ] =NOKEY , - [155 ] =NOKEY , - [156 ] =NOKEY , - [157 ] =NOKEY , - [158 ] =NOKEY , - [159 ] =NOKEY , - [160 ] =NOKEY , - [161 ] =NOKEY , - [162 ] =NOKEY , - [163 ] =NOKEY , - [164 ] =NOKEY , - [165 ] =NOKEY , - [166 ] =NOKEY , - [167 ] =NOKEY , - [168 ] =NOKEY , - [169 ] =NOKEY , - [170 ] =NOKEY , - [171 ] =NOKEY , - [172 ] =NOKEY , - [173 ] =NOKEY , - [174 ] =NOKEY , - [175 ] =NOKEY , - [176 ] =NOKEY , - [177 ] =NOKEY , - [178 ] =NOKEY , - [179 ] =NOKEY , - [180 ] =NOKEY , - [181 ] =NOKEY , - [182 ] =NOKEY , - [183 ] =NOKEY , - [184 ] =NOKEY , - [185 ] =NOKEY , - [186 ] =NOKEY , - [187 ] =NOKEY , - [188 ] =NOKEY , - [189 ] =KEY_HOME , - [190 ] =NOKEY , - [191 ] =NOKEY , - [192 ] =NOKEY , - [193 ] =NOKEY , - [194 ] =NOKEY , - [195 ] =NOKEY , - [196 ] =NOKEY , - [197 ] =NOKEY , - [198 ] =NOKEY , - [199 ] =NOKEY , - [200 ] =NOKEY , - [201 ] =NOKEY , - [202 ] =NOKEY , - [203 ] =NOKEY , - [204 ] =NOKEY , - [205 ] =KEY_END , - [206 ] =NOKEY , - [207 ] =NOKEY , - [208 ] =NOKEY , - [209 ] =NOKEY , - [210 ] =NOKEY , - [211 ] =NOKEY , - [212 ] =NOKEY , - [213 ] =NOKEY , - [214 ] =NOKEY , - [215 ] =NOKEY , - [216 ] =NOKEY , - [217 ] =NOKEY , - [218 ] =NOKEY , - [219 ] =NOKEY , - [220 ] =KEY_VOLUMEUP , - [221 ] =KEY_BRIGHTNESSUP , - [222 ] =NOKEY , - [223 ] =NOKEY , - [224 ] =NOKEY , - [225 ] =NOKEY , - [226 ] =NOKEY , - [227 ] =NOKEY , - [228 ] =NOKEY , - [229 ] =NOKEY , - [230 ] =NOKEY , - [231 ] =NOKEY , - [232 ] =NOKEY , - [233 ] =NOKEY , - [234 ] =NOKEY , - [235 ] =NOKEY , - [236 ] =NOKEY , - [237 ] =KEY_VOLUMEDOWN , - [238 ] =NOKEY , - [239 ] =NOKEY , - [240 ] =NOKEY , - [241 ] =NOKEY , - [242 ] =NOKEY , - [243 ] =NOKEY , - [244 ] =NOKEY , - [245 ] =NOKEY , - [246 ] =NOKEY , - [247 ] =NOKEY , - [248 ] =NOKEY , - [249 ] =NOKEY , - [250 ] =NOKEY , - [251 ] =NOKEY , - [252 ] =NOKEY , - [253 ] =KEY_BRIGHTNESSDOWN , - [254 ] =NOKEY , - [255 ] =NOKEY , -}; -/*----------------------------------------------------------------------------- -* Global variables -*---------------------------------------------------------------------------*/ - -struct input_dev *g_qci_keyboard_dev; - -/* General structure to hold the driver data */ -struct i2ckbd_drv_data { -struct i2c_client *ki2c_client; -struct work_struct work; -struct input_dev *qcikbd_dev; -unsigned int qcikbd_gpio;/* GPIO used for interrupt */ -unsigned int qcikbd_irq; -unsigned int key_down; -unsigned int escape; -unsigned int pause_seq; -unsigned int fn; -}; -#ifdef CONFIG_PM -static int qcikbd_suspend (struct device *dev) -{ -return 0 ; -} - -static int qcikbd_resume (struct device *dev) -{ -return 0 ; -} -#endif -static int __devinit qcikbd_probe (struct i2c_client *client, -const struct i2c_device_id *id); -static int __devexit qcikbd_remove(struct i2c_client *kbd); - -static const struct i2c_device_id qcikbd_idtable[] = { - {KEYBOARD_ID_NAME ,0 }, - { } -}; - -MODULE_DEVICE_TABLE (i2c, qcikbd_idtable); - -#ifdef CONFIG_PM -static struct dev_pm_ops qcikbd_pm_ops = { - .suspend = qcikbd_suspend, - .resume = qcikbd_resume, -}; -#endif -static struct i2c_driver i2ckbd_driver = { - .driver = { - .owner =THIS_MODULE , - .name =KEYBOARD_ID_NAME , -#ifdef CONFIG_PM - .pm = &qcikbd_pm_ops, -#endif - }, - .probe = qcikbd_probe, - .remove =__devexit_p (qcikbd_remove), - .id_table = qcikbd_idtable, -}; - -/*----------------------------------------------------------------------------- -* Driver functions -*---------------------------------------------------------------------------*/ - -static irqreturn_t qcikbd_interrupt (int irq,void *dev_id) -{ -struct i2ckbd_drv_data *ikbd_drv_data = dev_id; -schedule_work (&ikbd_drv_data->work); -return IRQ_HANDLED ; -} - -static void qcikbd_work_handler (struct work_struct *_work) -{ -unsigned char scancode; -unsigned int keycode; - -struct i2ckbd_drv_data *ikbd_drv_data = - container_of(_work, struct i2ckbd_drv_data, work); - -struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; -struct input_dev *ikbdev = ikbd_drv_data->qcikbd_dev; - - scancode =i2c_smbus_read_byte (ikbdclient); - -if (scancode ==KEY_ACK_FA ) { -return ; - }else if (scancode ==RC_KEY_FN ) { - ikbd_drv_data->fn =0x80 ;/* select keycode table > 0x7F */ - }else { - ikbd_drv_data->key_down =1 ; -if (scancode &RC_KEY_BREAK ) { - ikbd_drv_data->key_down =0 ; -if ((scancode &0x7F ) ==RC_KEY_FN ) - ikbd_drv_data->fn =0 ; - } - keycode = on2_keycode[(scancode &0x7F ) | ikbd_drv_data->fn]; -if (keycode !=NOKEY ) { -input_report_key (ikbdev, - keycode, - ikbd_drv_data->key_down); -input_sync (ikbdev); - } - } -} - - -static int qcikbd_open (struct input_dev *dev) -{ -struct i2ckbd_drv_data *ikbd_drv_data =input_get_drvdata (dev); -struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; - -/* Send F4h - enable keyboard */ -i2c_smbus_write_byte (ikbdclient,KEYBOARD_CMD_ENABLE ); -return 0 ; -} - -static int __devinit qcikbd_probe (struct i2c_client *client, -const struct i2c_device_id *id) -{ -int err; -int i; -struct i2ckbd_drv_data *context; - context =kzalloc (sizeof (struct i2ckbd_drv_data ),GFP_KERNEL ); -if (!context) -return -ENOMEM ; -i2c_set_clientdata (client, context); - context->ki2c_client = client; - context->qcikbd_gpio = client->irq; - client->driver = &i2ckbd_driver; - -INIT_WORK (&context->work, qcikbd_work_handler); - - err =gpio_request (context->qcikbd_gpio,"qci-kbd" ); -if (err) { -pr_err ("[KBD] err gpio request\n" ); - goto gpio_request_fail; - } - - context->qcikbd_irq =gpio_to_irq (context->qcikbd_gpio); - err =request_irq (context->qcikbd_irq, - qcikbd_interrupt, -IRQF_TRIGGER_FALLING , -KEYBOARD_ID_NAME , - context); -if (err) { -pr_err ("[KBD] err unable to get IRQ\n" ); - goto request_irq_fail; - } - - context->qcikbd_dev =input_allocate_device (); -if (!context->qcikbd_dev) { -pr_err ("[KBD]allocting memory err\n" ); - err = -ENOMEM ; - goto allocate_fail; - } - - context->qcikbd_dev->name =KEYBOARD_NAME ; - context->qcikbd_dev->phys =KEYBOARD_DEVICE ; - context->qcikbd_dev->id.bustype =BUS_I2C ; - context->qcikbd_dev->id.vendor =0x1050 ; - context->qcikbd_dev->id.product =0x0006 ; - context->qcikbd_dev->id.version =0x0004 ; - context->qcikbd_dev->open = qcikbd_open; -set_bit (EV_KEY , context->qcikbd_dev->evbit); -set_bit (EV_REP , context->qcikbd_dev->evbit); - -/* Enable all supported keys */ -for (i =1 ; i <ARRAY_SIZE (on2_keycode) ; i++) -set_bit (on2_keycode[i], context->qcikbd_dev->keybit); - -set_bit (KEY_POWER , context->qcikbd_dev->keybit); -set_bit (KEY_END , context->qcikbd_dev->keybit); -set_bit (KEY_VOLUMEUP , context->qcikbd_dev->keybit); -set_bit (KEY_VOLUMEDOWN , context->qcikbd_dev->keybit); -set_bit (KEY_ZOOMIN , context->qcikbd_dev->keybit); -set_bit (KEY_ZOOMOUT , context->qcikbd_dev->keybit); - -input_set_drvdata (context->qcikbd_dev, context); - err =input_register_device (context->qcikbd_dev); -if (err) { -pr_err ("[KBD] err input register device\n" ); - goto register_fail; - } - g_qci_keyboard_dev = context->qcikbd_dev; -return 0 ; -register_fail: -input_free_device (context->qcikbd_dev); - -allocate_fail: -free_irq (context->qcikbd_irq, context); - -request_irq_fail: -gpio_free (context->qcikbd_gpio); - -gpio_request_fail: -i2c_set_clientdata (client,NULL ); -kfree (context); -return err; -} - -static int __devexit qcikbd_remove(struct i2c_client *dev) -{ -struct i2ckbd_drv_data *context =i2c_get_clientdata (dev); - -free_irq (context->qcikbd_irq, context); -gpio_free (context->qcikbd_gpio); -input_free_device (context->qcikbd_dev); -input_unregister_device (context->qcikbd_dev); -kfree (context); - -return 0 ; -} - -static int __init qcikbd_init (void ) -{ -return i2c_add_driver (&i2ckbd_driver); -} - -static void __exit qcikbd_exit(void) -{ -i2c_del_driver (&i2ckbd_driver); -} - -struct input_dev *nkbc_keypad_get_input_dev (void ) -{ -return g_qci_keyboard_dev; -} -EXPORT_SYMBOL (nkbc_keypad_get_input_dev); -module_init (qcikbd_init); -module_exit (qcikbd_exit); - -MODULE_AUTHOR ("Quanta Computer Inc." ); -MODULE_DESCRIPTION ("Quanta Embedded Controller I2C Keyboard Driver" ); -MODULE_LICENSE ("GPL v2" ); - +/* Quanta I2C Keyboard Driver +* +* Copyright (C) 2009 Quanta Computer Inc. +* Author: Hsin Wu <[email protected]> +* Author: Austin Lai <[email protected]> +* +* 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. +* +*/ + +/* +* +* The Driver with I/O communications via the I2C Interface for ON2 of AP BU. +* And it is only working on the nuvoTon WPCE775x Embedded Controller. +* +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/jiffies.h> +#include <linux/i2c.h> +#include <linux/mutex.h> +#include <linux/interrupt.h> +#include <linux/input.h> +#include <linux/keyboard.h> +#include <linux/gpio.h> +#include <linux/delay.h> + +/* Keyboard special scancode */ +#define RC_KEY_FN 0x70 +#define RC_KEY_BREAK 0x80 +#define KEY_ACK_FA 0xFA + +/* Keyboard keycodes */ +#define NOKEY KEY_RESERVED +#define KEY_LEFTWIN KEY_LEFTMETA +#define KEY_RIGHTWIN KEY_RIGHTMETA +#define KEY_APPS KEY_COMPOSE +#define KEY_PRINTSCR KEY_SYSRQ + +#define KEYBOARD_ID_NAME "qci-i2ckbd" +#define KEYBOARD_NAME "Quanta Keyboard" +#define KEYBOARD_DEVICE "/i2c/input0" +#define KEYBOARD_CMD_ENABLE 0xF4 + +/*----------------------------------------------------------------------------- +* Keyboard scancode to linux keycode translation table +*---------------------------------------------------------------------------*/ + +static const unsigned char on2_keycode[256 ] = { + [0 ] =KEY_RESERVED , + [1 ] =KEY_ESC , + [2 ] =KEY_1 , + [3 ] =KEY_2 , + [4 ] =KEY_3 , + [5 ] =KEY_4 , + [6 ] =KEY_5 , + [7 ] =KEY_6 , + [8 ] =KEY_7 , + [9 ] =KEY_8 , + [10 ] =KEY_9 , + [11 ] =KEY_0 , + [12 ] =KEY_MINUS , + [13 ] =KEY_EQUAL , + [14 ] =KEY_BACKSPACE , + [15 ] =KEY_TAB , + [16 ] =KEY_Q , + [17 ] =KEY_W , + [18 ] =KEY_E , + [19 ] =KEY_R , + [20 ] =KEY_T , + [21 ] =KEY_Y , + [22 ] =KEY_U , + [23 ] =KEY_I , + [24 ] =KEY_O , + [25 ] =KEY_P , + [26 ] =KEY_LEFTBRACE , + [27 ] =KEY_RIGHTBRACE , + [28 ] =KEY_ENTER , + [29 ] =KEY_LEFTCTRL , + [30 ] =KEY_A , + [31 ] =KEY_S , + [32 ] =KEY_D , + [33 ] =KEY_F , + [34 ] =KEY_G , + [35 ] =KEY_H , + [36 ] =KEY_J , + [37 ] =KEY_K , + [38 ] =KEY_L , + [39 ] =KEY_SEMICOLON , + [40 ] =KEY_APOSTROPHE , + [41 ] =KEY_GRAVE , + [42 ] =KEY_LEFTSHIFT , + [43 ] =KEY_BACKSLASH , + [44 ] =KEY_Z , + [45 ] =KEY_X , + [46 ] =KEY_C , + [47 ] =KEY_V , + [48 ] =KEY_B , + [49 ] =KEY_N , + [50 ] =KEY_M , + [51 ] =KEY_COMMA , + [52 ] =KEY_DOT , + [53 ] =KEY_SLASH , + [54 ] =KEY_RIGHTSHIFT , + [55 ] =KEY_KPASTERISK , + [56 ] =KEY_LEFTALT , + [57 ] =KEY_SPACE , + [58 ] =KEY_CAPSLOCK , + [59 ] =KEY_F1 , + [60 ] =KEY_F2 , + [61 ] =KEY_F3 , + [62 ] =KEY_F4 , + [63 ] =KEY_F5 , + [64 ] =KEY_F6 , + [65 ] =KEY_F7 , + [66 ] =KEY_F8 , + [67 ] =KEY_F9 , + [68 ] =KEY_F10 , + [69 ] =KEY_NUMLOCK , + [70 ] =KEY_SCROLLLOCK , + [71 ] =KEY_KP7 , + [72 ] =KEY_KP8 , + [73 ] =KEY_KP9 , + [74 ] =KEY_KPMINUS , + [75 ] =KEY_KP4 , + [76 ] =KEY_KP5 , + [77 ] =KEY_KP6 , + [78 ] =KEY_KPPLUS , + [79 ] =KEY_KP1 , + [80 ] =KEY_KP2 , + [81 ] =KEY_KP3 , + [82 ] =KEY_KP0 , + [83 ] =KEY_KPDOT , + [84 ] =KEY_RESERVED , + [85 ] =KEY_ZENKAKUHANKAKU , + [86 ] =KEY_102ND , + [87 ] =KEY_F11 , + [88 ] =KEY_F12 , + [89 ] =KEY_RO , + [90 ] =KEY_KATAKANA , + [91 ] =KEY_HIRAGANA , + [92 ] =KEY_HENKAN , + [93 ] =KEY_KATAKANAHIRAGANA , + [94 ] =KEY_MUHENKAN , + [95 ] =KEY_KPJPCOMMA , + [96 ] =KEY_KPENTER , + [97 ] =KEY_RIGHTCTRL , + [98 ] =KEY_KPSLASH , + [99 ] =KEY_SYSRQ , + [100 ] =KEY_RIGHTALT , + [101 ] =KEY_LINEFEED , + [102 ] =KEY_HOME , + [103 ] =KEY_UP , + [104 ] =KEY_PAGEUP , + [105 ] =KEY_LEFT , + [106 ] =KEY_RIGHT , + [107 ] =KEY_END , + [108 ] =KEY_DOWN , + [109 ] =KEY_PAGEDOWN , + [110 ] =KEY_INSERT , + [111 ] =KEY_DELETE , + [112 ] =KEY_MACRO , + [113 ] =KEY_MUTE , + [114 ] =KEY_VOLUMEDOWN , + [115 ] =KEY_VOLUMEUP , + [116 ] =KEY_POWER , + [117 ] =KEY_KPEQUAL , + [118 ] =KEY_KPPLUSMINUS , + [119 ] =KEY_PAUSE , + [120 ] =KEY_SCALE , + [121 ] =KEY_KPCOMMA , + [122 ] =KEY_HANGEUL , + [123 ] =KEY_HANGUEL , + [124 ] =KEY_HANJA , + [125 ] =KEY_YEN , + [126 ] =KEY_LEFTMETA , + [127 ] =KEY_RIGHTMETA , + [128 ] =KEY_COMPOSE , + [129 ] =NOKEY , + [130 ] =NOKEY , + [131 ] =NOKEY , + [132 ] =NOKEY , + [133 ] =NOKEY , + [134 ] =NOKEY , + [135 ] =NOKEY , + [136 ] =NOKEY , + [137 ] =NOKEY , + [138 ] =NOKEY , + [139 ] =NOKEY , + [140 ] =NOKEY , + [141 ] =NOKEY , + [142 ] =NOKEY , + [143 ] =NOKEY , + [144 ] =NOKEY , + [145 ] =NOKEY , + [146 ] =NOKEY , + [147 ] =NOKEY , + [148 ] =NOKEY , + [149 ] =NOKEY , + [150 ] =NOKEY , + [151 ] =NOKEY , + [152 ] =NOKEY , + [153 ] =NOKEY , + [154 ] =NOKEY , + [155 ] =NOKEY , + [156 ] =NOKEY , + [157 ] =NOKEY , + [158 ] =NOKEY , + [159 ] =NOKEY , + [160 ] =NOKEY , + [161 ] =NOKEY , + [162 ] =NOKEY , + [163 ] =NOKEY , + [164 ] =NOKEY , + [165 ] =NOKEY , + [166 ] =NOKEY , + [167 ] =NOKEY , + [168 ] =NOKEY , + [169 ] =NOKEY , + [170 ] =NOKEY , + [171 ] =NOKEY , + [172 ] =NOKEY , + [173 ] =NOKEY , + [174 ] =NOKEY , + [175 ] =NOKEY , + [176 ] =NOKEY , + [177 ] =NOKEY , + [178 ] =NOKEY , + [179 ] =NOKEY , + [180 ] =NOKEY , + [181 ] =NOKEY , + [182 ] =NOKEY , + [183 ] =NOKEY , + [184 ] =NOKEY , + [185 ] =NOKEY , + [186 ] =NOKEY , + [187 ] =NOKEY , + [188 ] =NOKEY , + [189 ] =KEY_HOME , + [190 ] =NOKEY , + [191 ] =NOKEY , + [192 ] =NOKEY , + [193 ] =NOKEY , + [194 ] =NOKEY , + [195 ] =NOKEY , + [196 ] =NOKEY , + [197 ] =NOKEY , + [198 ] =NOKEY , + [199 ] =NOKEY , + [200 ] =NOKEY , + [201 ] =NOKEY , + [202 ] =NOKEY , + [203 ] =NOKEY , + [204 ] =NOKEY , + [205 ] =KEY_END , + [206 ] =NOKEY , + [207 ] =NOKEY , + [208 ] =NOKEY , + [209 ] =NOKEY , + [210 ] =NOKEY , + [211 ] =NOKEY , + [212 ] =NOKEY , + [213 ] =NOKEY , + [214 ] =NOKEY , + [215 ] =NOKEY , + [216 ] =NOKEY , + [217 ] =NOKEY , + [218 ] =NOKEY , + [219 ] =NOKEY , + [220 ] =KEY_VOLUMEUP , + [221 ] =KEY_BRIGHTNESSUP , + [222 ] =NOKEY , + [223 ] =NOKEY , + [224 ] =NOKEY , + [225 ] =NOKEY , + [226 ] =NOKEY , + [227 ] =NOKEY , + [228 ] =NOKEY , + [229 ] =NOKEY , + [230 ] =NOKEY , + [231 ] =NOKEY , + [232 ] =NOKEY , + [233 ] =NOKEY , + [234 ] =NOKEY , + [235 ] =NOKEY , + [236 ] =NOKEY , + [237 ] =KEY_VOLUMEDOWN , + [238 ] =NOKEY , + [239 ] =NOKEY , + [240 ] =NOKEY , + [241 ] =NOKEY , + [242 ] =NOKEY , + [243 ] =NOKEY , + [244 ] =NOKEY , + [245 ] =NOKEY , + [246 ] =NOKEY , + [247 ] =NOKEY , + [248 ] =NOKEY , + [249 ] =NOKEY , + [250 ] =NOKEY , + [251 ] =NOKEY , + [252 ] =NOKEY , + [253 ] =KEY_BRIGHTNESSDOWN , + [254 ] =NOKEY , + [255 ] =NOKEY , +}; +/*----------------------------------------------------------------------------- +* Global variables +*---------------------------------------------------------------------------*/ + +struct input_dev *g_qci_keyboard_dev; + +/* General structure to hold the driver data */ +struct i2ckbd_drv_data { +struct i2c_client *ki2c_client; +struct work_struct work; +struct input_dev *qcikbd_dev; +unsigned int qcikbd_gpio;/* GPIO used for interrupt */ +unsigned int qcikbd_irq; +unsigned int key_down; +unsigned int escape; +unsigned int pause_seq; +unsigned int fn; +}; +#ifdef CONFIG_PM +static int qcikbd_suspend (struct device *dev) +{ +return 0 ; +} + +static int qcikbd_resume (struct device *dev) +{ +return 0 ; +} +#endif +static int __devinit qcikbd_probe (struct i2c_client *client, +const struct i2c_device_id *id); +static int __devexit qcikbd_remove(struct i2c_client *kbd); + +static const struct i2c_device_id qcikbd_idtable[] = { + {KEYBOARD_ID_NAME ,0 }, + { } +}; + +MODULE_DEVICE_TABLE (i2c, qcikbd_idtable); + +#ifdef CONFIG_PM +static struct dev_pm_ops qcikbd_pm_ops = { + .suspend = qcikbd_suspend, + .resume = qcikbd_resume, +}; +#endif +static struct i2c_driver i2ckbd_driver = { + .driver = { + .owner =THIS_MODULE , + .name =KEYBOARD_ID_NAME , +#ifdef CONFIG_PM + .pm = &qcikbd_pm_ops, +#endif + }, + .probe = qcikbd_probe, + .remove =__devexit_p (qcikbd_remove), + .id_table = qcikbd_idtable, +}; + +/*----------------------------------------------------------------------------- +* Driver functions +*---------------------------------------------------------------------------*/ + +static irqreturn_t qcikbd_interrupt (int irq,void *dev_id) +{ +struct i2ckbd_drv_data *ikbd_drv_data = dev_id; +schedule_work (&ikbd_drv_data->work); +return IRQ_HANDLED ; +} + +static void qcikbd_work_handler (struct work_struct *_work) +{ +unsigned char scancode; +unsigned int keycode; + +struct i2ckbd_drv_data *ikbd_drv_data = + container_of(_work, struct i2ckbd_drv_data, work); + +struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; +struct input_dev *ikbdev = ikbd_drv_data->qcikbd_dev; + + scancode =i2c_smbus_read_byte (ikbdclient); +printk (" scancode = %x\n" , scancode); + +if (scancode ==0xFA ) + { +return ; + }else { + ikbd_drv_data->key_down =1 ; +if (scancode &0x80 ) { + ikbd_drv_data->key_down =0 ; + } + keycode = on2_keycode[(scancode &0x7F )]; +if (keycode !=NOKEY ) { + +input_event (ikbdev,EV_MSC ,MSC_SCAN , scancode); + +input_report_key (ikbdev, + keycode, + ikbd_drv_data->key_down); +input_sync (ikbdev); + } + } +} + + +static int qcikbd_open (struct input_dev *dev) +{ +struct i2ckbd_drv_data *ikbd_drv_data =input_get_drvdata (dev); +struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; + +/* Send F4h - enable keyboard */ +i2c_smbus_write_byte (ikbdclient,KEYBOARD_CMD_ENABLE ); +return 0 ; +} + +static int __devinit qcikbd_probe (struct i2c_client *client, +const struct i2c_device_id *id) +{ +int err; +int i; +struct i2ckbd_drv_data *context; + context =kzalloc (sizeof (struct i2ckbd_drv_data ),GFP_KERNEL ); +if (!context) +return -ENOMEM ; +i2c_set_clientdata (client, context); + context->ki2c_client = client; + context->qcikbd_gpio = client->irq; + client->driver = &i2ckbd_driver; + +INIT_WORK (&context->work, qcikbd_work_handler); + + err =gpio_request (context->qcikbd_gpio,"qci-kbd" ); +if (err) { +pr_err ("[KBD] err gpio request\n" ); + goto gpio_request_fail; + } + + context->qcikbd_irq =gpio_to_irq (context->qcikbd_gpio); + err =request_irq (context->qcikbd_irq, + qcikbd_interrupt, +IRQF_TRIGGER_FALLING , +KEYBOARD_ID_NAME , + context); +if (err) { +pr_err ("[KBD] err unable to get IRQ\n" ); + goto request_irq_fail; + } + + context->qcikbd_dev =input_allocate_device (); +if (!context->qcikbd_dev) { +pr_err ("[KBD]allocting memory err\n" ); + err = -ENOMEM ; + goto allocate_fail; + } + + context->qcikbd_dev->name =KEYBOARD_NAME ; + context->qcikbd_dev->phys =KEYBOARD_DEVICE ; + context->qcikbd_dev->id.bustype =BUS_I2C ; + context->qcikbd_dev->id.vendor =0x1050 ; + context->qcikbd_dev->id.product =0x0006 ; + context->qcikbd_dev->id.version =0x0004 ; + context->qcikbd_dev->open = qcikbd_open; + context->qcikbd_dev->evbit[0 ] =BIT_MASK (EV_KEY ); + +/* Enable all supported keys */ +for (i =1 ; i <ARRAY_SIZE (on2_keycode) ; i++) +set_bit (on2_keycode[i], context->qcikbd_dev->keybit); + +set_bit (KEY_POWER , context->qcikbd_dev->keybit); +set_bit (KEY_END , context->qcikbd_dev->keybit); +set_bit (KEY_VOLUMEUP , context->qcikbd_dev->keybit); +set_bit (KEY_VOLUMEDOWN , context->qcikbd_dev->keybit); +set_bit (KEY_ZOOMIN , context->qcikbd_dev->keybit); +set_bit (KEY_ZOOMOUT , context->qcikbd_dev->keybit); + +input_set_drvdata (context->qcikbd_dev, context); + err =input_register_device (context->qcikbd_dev); +if (err) { +pr_err ("[KBD] err input register device\n" ); + goto register_fail; + } + g_qci_keyboard_dev = context->qcikbd_dev; +printk ("QCI_KBD PROBE\n" ); +return 0 ; +register_fail: +input_free_device (context->qcikbd_dev); + +allocate_fail: +free_irq (context->qcikbd_irq, context); + +request_irq_fail: +gpio_free (context->qcikbd_gpio); + +gpio_request_fail: +i2c_set_clientdata (client,NULL ); +kfree (context); +return err; +} + +static int __devexit qcikbd_remove(struct i2c_client *dev) +{ +struct i2ckbd_drv_data *context =i2c_get_clientdata (dev); + +free_irq (context->qcikbd_irq, context); +gpio_free (context->qcikbd_gpio); +input_free_device (context->qcikbd_dev); +input_unregister_device (context->qcikbd_dev); +kfree (context); + +return 0 ; +} + +static int __init qcikbd_init (void ) +{ +return i2c_add_driver (&i2ckbd_driver); +} + +static void __exit qcikbd_exit(void) +{ +i2c_del_driver (&i2ckbd_driver); +} + +struct input_dev *nkbc_keypad_get_input_dev (void ) +{ +return g_qci_keyboard_dev; +} +EXPORT_SYMBOL (nkbc_keypad_get_input_dev); +module_init (qcikbd_init); +module_exit (qcikbd_exit); + +MODULE_AUTHOR ("Quanta Computer Inc." ); +MODULE_DESCRIPTION ("Quanta Embedded Controller I2C Keyboard Driver" ); +MODULE_LICENSE ("GPL v2" ); +Signature · 6 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Dmitry
Re: [RFC 04/36] [Driver][Qualcomm 1070][EC_KB] Adding new qci keyboard driver
Hi Dmitry,
Quoted 18 lines · Dmitry Torokhov
Quoted 2 lines · Wayne Lin
From: wayne <[email protected]>
- Change log?
- run through checkpatch.pl
- Get rid of debug printks (or convert todev_dbg)?
- usedev_XXXinstrad ofpr_xxxwhen you have device? Get rig
- I have seen lots of time people trying to callinput_free_deviceafter callinginput_unregister_device(which is forbidden,input_unregister_deviceis sufficient alone) but you are the first to call free _before_ unregister.
- No need to initialize keymap with zeroes (NOKEYS)
- threaded IRQ
- copy keymap into device and set keycode, keycodemax, keycodesize so that keymap can be adjusted from userspace
- why do you export input device?
Quoted 3 lines
I dont think you tried applying this patch... At least I do not have
qci_kbd.cin my tree so it would not apply.
I think whole series needs a refresh as you had mentioned in the another email. No point in reviewing this series, because Wayne needs to post only driver part here, if he has some mach-msm bits, then they should go through Daniel Walker.
---Trilok Soni
Signature · 2 lines
Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
RE: [RFC 04/36] [Driver][Qualcomm 1070][EC_KB] Adding new qci keyboard driver
In reply to Wayne LinQuoted 921 lines
-----Original Message-----
From: [email protected] [mailto:linux-input- [email protected]] On Behalf Of Wayne Lin
Sent: Monday, July 26, 2010 2:00 PM
To: [email protected]
Cc: wayne
Subject: [RFC 04/36] [Driver][Qualcomm 1070][EC_KB] Adding new qci keyboard driverFrom: wayne <[email protected]>
--- drivers/input/keyboard/qci_kbd.c | 1101 +++++++++++++++++++-------------- ----- 1 files changed, 551 insertions(+), 550 deletions(-)drivers/input/keyboard/qci_kbd.c +0
-20@@ -1,550 +1,551 @@ -/* Quanta I2C Keyboard Driver -* -* Copyright (C) 2009 Quanta Computer Inc. -* Author: Hsin Wu <[email protected]> -* Author: Austin Lai <[email protected]> -* -* 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. -* -*/ - -/* -* -* The Driver with I/O communications via the I2C Interface for ON2 of AP BU.
- * And it is only working on the nuvoTon WPCE775x Embedded Controller.
- *
- */drivers/input/keyboard/qci_kbd.c +0
-386- -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/slab.h> -#include <linux/jiffies.h> -#include <linux/i2c.h> -#include <linux/mutex.h> -#include <linux/interrupt.h> -#include <linux/input.h> -#include <linux/keyboard.h> -#include <linux/gpio.h> -#include <linux/delay.h> - -/* Keyboard special scancode */ -#define RC_KEY_FN 0x70 -#define RC_KEY_BREAK 0x80 -#define KEY_ACK_FA 0xFA - -/* Keyboard keycodes */ -#define NOKEY KEY_RESERVED -#define KEY_LEFTWIN KEY_LEFTMETA -#define KEY_RIGHTWIN KEY_RIGHTMETA -#define KEY_APPS KEY_COMPOSE -#define KEY_PRINTSCR KEY_SYSRQ - -#define KEYBOARD_ID_NAME "qci-i2ckbd" -#define KEYBOARD_NAME "Quanta Keyboard" -#define KEYBOARD_DEVICE "/i2c/input0" -#define KEYBOARD_CMD_ENABLE 0xF4 - -/*----------------------------------------------------------------------- ------ -* Keyboard scancode to linux keycode translation table -*----------------------------------------------------------------------- ----*/ - -static const unsigned char on2_keycode[256 ] = { - [0 ] =NOKEY , - [1 ] =NOKEY , - [2 ] =NOKEY , - [3 ] =KEY_5 , - [4 ] =KEY_7 , - [5 ] =KEY_9 , - [6 ] =KEY_MINUS , - [7 ] =NOKEY , - [8 ] =NOKEY , - [9 ] =NOKEY , - [10 ] =NOKEY , - [11 ] =KEY_LEFTBRACE , - [12 ] =KEY_F10 , - [13 ] =KEY_INSERT , - [14 ] =KEY_F11 , - [15 ] =KEY_ESC , - [16 ] =NOKEY , - [17 ] =NOKEY , - [18 ] =NOKEY , - [19 ] =KEY_4 , - [20 ] =KEY_6 , - [21 ] =KEY_8 , - [22 ] =KEY_0 , - [23 ] =KEY_EQUAL , - [24 ] =NOKEY , - [25 ] =NOKEY , - [26 ] =NOKEY , - [27 ] =KEY_P , - [28 ] =KEY_F9 , - [29 ] =KEY_DELETE , - [30 ] =KEY_F12 , - [31 ] =KEY_GRAVE , - [32 ] =KEY_W , - [33 ] =NOKEY , - [34 ] =NOKEY , - [35 ] =KEY_R , - [36 ] =KEY_T , - [37 ] =KEY_U , - [38 ] =KEY_O , - [39 ] =KEY_RIGHTBRACE , - [40 ] =NOKEY , - [41 ] =NOKEY , - [42 ] =NOKEY , - [43 ] =KEY_APOSTROPHE , - [44 ] =KEY_BACKSPACE , - [45 ] =NOKEY , - [46 ] =KEY_F8 , - [47 ] =KEY_F5 , - [48 ] =KEY_S , - [49 ] =NOKEY , - [50 ] =NOKEY , - [51 ] =KEY_E , - [52 ] =KEY_H , - [53 ] =KEY_Y , - [54 ] =KEY_I , - [55 ] =KEY_ENTER , - [56 ] =NOKEY , - [57 ] =NOKEY , - [58 ] =NOKEY , - [59 ] =KEY_SEMICOLON , - [60 ] =KEY_3 , - [61 ] =KEY_PAGEUP , - [62 ] =KEY_Q , - [63 ] =KEY_TAB , - [64 ] =KEY_A , - [65 ] =NOKEY , - [66 ] =NOKEY , - [67 ] =KEY_F , - [68 ] =KEY_G , - [69 ] =KEY_J , - [70 ] =KEY_L , - [71 ] =NOKEY , - [72 ] =KEY_RIGHTSHIFT , - [73 ] =NOKEY , - [74 ] =NOKEY , - [75 ] =KEY_SLASH , - [76 ] =KEY_2 , - [77 ] =KEY_PAGEDOWN , - [78 ] =KEY_F4 , - [79 ] =KEY_F1 , - [80 ] =KEY_Z , - [81 ] =NOKEY , - [82 ] =NOKEY , - [83 ] =KEY_D , - [84 ] =KEY_V , - [85 ] =KEY_N , - [86 ] =KEY_K , - [87 ] =NOKEY , - [88 ] =KEY_LEFTSHIFT , - [89 ] =KEY_RIGHTCTRL , - [90 ] =NOKEY , - [91 ] =KEY_DOT , - [92 ] =KEY_UP , - [93 ] =KEY_RIGHT , - [94 ] =KEY_F3 , - [95 ] =KEY_F2 , - [96 ] =NOKEY , - [97 ] =NOKEY , - [98 ] =KEY_RIGHTALT , - [99 ] =KEY_X , - [100 ] =KEY_C , - [101 ] =KEY_B , - [102 ] =KEY_COMMA , - [103 ] =NOKEY , - [104 ] =NOKEY , - [105 ] =NOKEY , - [106 ] =NOKEY , - [107 ] =NOKEY , - [108 ] =KEY_PRINTSCR , - [109 ] =KEY_DOWN , - [110 ] =KEY_1 , - [111 ] =KEY_CAPSLOCK , - [112 ] =KEY_F24 , - [113 ] =KEY_HOME , - [114 ] =KEY_LEFTALT , - [115 ] =NOKEY , - [116 ] =KEY_SPACE , - [117 ] =KEY_BACKSLASH , - [118 ] =KEY_M , - [119 ] =KEY_COMPOSE , - [120 ] =NOKEY , - [121 ] =KEY_LEFTCTRL , - [122 ] =NOKEY , - [123 ] =NOKEY , - [124 ] =KEY_PAUSE , - [125 ] =KEY_LEFT , - [126 ] =KEY_F7 , - [127 ] =KEY_F6 , - [128 ] =NOKEY , - [129 ] =NOKEY , - [130 ] =NOKEY , - [131 ] =NOKEY , - [132 ] =NOKEY , - [133 ] =NOKEY , - [134 ] =NOKEY , - [135 ] =NOKEY , - [136 ] =NOKEY , - [137 ] =NOKEY , - [138 ] =NOKEY , - [139 ] =NOKEY , - [140 ] =NOKEY , - [141 ] =NOKEY , - [142 ] =NOKEY , - [143 ] =NOKEY , - [144 ] =NOKEY , - [145 ] =NOKEY , - [146 ] =NOKEY , - [147 ] =NOKEY , - [148 ] =NOKEY , - [149 ] =NOKEY , - [150 ] =NOKEY , - [151 ] =NOKEY , - [152 ] =NOKEY , - [153 ] =NOKEY , - [154 ] =NOKEY , - [155 ] =NOKEY , - [156 ] =NOKEY , - [157 ] =NOKEY , - [158 ] =NOKEY , - [159 ] =NOKEY , - [160 ] =NOKEY , - [161 ] =NOKEY , - [162 ] =NOKEY , - [163 ] =NOKEY , - [164 ] =NOKEY , - [165 ] =NOKEY , - [166 ] =NOKEY , - [167 ] =NOKEY , - [168 ] =NOKEY , - [169 ] =NOKEY , - [170 ] =NOKEY , - [171 ] =NOKEY , - [172 ] =NOKEY , - [173 ] =NOKEY , - [174 ] =NOKEY , - [175 ] =NOKEY , - [176 ] =NOKEY , - [177 ] =NOKEY , - [178 ] =NOKEY , - [179 ] =NOKEY , - [180 ] =NOKEY , - [181 ] =NOKEY , - [182 ] =NOKEY , - [183 ] =NOKEY , - [184 ] =NOKEY , - [185 ] =NOKEY , - [186 ] =NOKEY , - [187 ] =NOKEY , - [188 ] =NOKEY , - [189 ] =KEY_HOME , - [190 ] =NOKEY , - [191 ] =NOKEY , - [192 ] =NOKEY , - [193 ] =NOKEY , - [194 ] =NOKEY , - [195 ] =NOKEY , - [196 ] =NOKEY , - [197 ] =NOKEY , - [198 ] =NOKEY , - [199 ] =NOKEY , - [200 ] =NOKEY , - [201 ] =NOKEY , - [202 ] =NOKEY , - [203 ] =NOKEY , - [204 ] =NOKEY , - [205 ] =KEY_END , - [206 ] =NOKEY , - [207 ] =NOKEY , - [208 ] =NOKEY , - [209 ] =NOKEY , - [210 ] =NOKEY , - [211 ] =NOKEY , - [212 ] =NOKEY , - [213 ] =NOKEY , - [214 ] =NOKEY , - [215 ] =NOKEY , - [216 ] =NOKEY , - [217 ] =NOKEY , - [218 ] =NOKEY , - [219 ] =NOKEY , - [220 ] =KEY_VOLUMEUP , - [221 ] =KEY_BRIGHTNESSUP , - [222 ] =NOKEY , - [223 ] =NOKEY , - [224 ] =NOKEY , - [225 ] =NOKEY , - [226 ] =NOKEY , - [227 ] =NOKEY , - [228 ] =NOKEY , - [229 ] =NOKEY , - [230 ] =NOKEY , - [231 ] =NOKEY , - [232 ] =NOKEY , - [233 ] =NOKEY , - [234 ] =NOKEY , - [235 ] =NOKEY , - [236 ] =NOKEY , - [237 ] =KEY_VOLUMEDOWN , - [238 ] =NOKEY , - [239 ] =NOKEY , - [240 ] =NOKEY , - [241 ] =NOKEY , - [242 ] =NOKEY , - [243 ] =NOKEY , - [244 ] =NOKEY , - [245 ] =NOKEY , - [246 ] =NOKEY , - [247 ] =NOKEY , - [248 ] =NOKEY , - [249 ] =NOKEY , - [250 ] =NOKEY , - [251 ] =NOKEY , - [252 ] =NOKEY , - [253 ] =KEY_BRIGHTNESSDOWN , - [254 ] =NOKEY , - [255 ] =NOKEY , -}; -/*----------------------------------------------------------------------- ------ -* Global variables -*----------------------------------------------------------------------- ----*/ - -struct input_dev *g_qci_keyboard_dev; - -/* General structure to hold the driver data */ -struct i2ckbd_drv_data { -struct i2c_client *ki2c_client; -struct work_struct work; -struct input_dev *qcikbd_dev; -unsigned int qcikbd_gpio;/* GPIO used for interrupt */ -unsigned int qcikbd_irq; -unsigned int key_down; -unsigned int escape; -unsigned int pause_seq; -unsigned int fn; -}; -#ifdef CONFIG_PM -static int qcikbd_suspend (struct device *dev) -{ -return 0 ; -} - -static int qcikbd_resume (struct device *dev) -{ -return 0 ; -} -#endif -static int __devinit qcikbd_probe (struct i2c_client *client, -const struct i2c_device_id *id); -static int __devexit qcikbd_remove(struct i2c_client *kbd); - -static const struct i2c_device_id qcikbd_idtable[] = { - {KEYBOARD_ID_NAME ,0 }, - { } -}; - -MODULE_DEVICE_TABLE (i2c, qcikbd_idtable); - -#ifdef CONFIG_PM -static struct dev_pm_ops qcikbd_pm_ops = { - .suspend = qcikbd_suspend, - .resume = qcikbd_resume, -}; -#endif -static struct i2c_driver i2ckbd_driver = { - .driver = { - .owner =THIS_MODULE , - .name =KEYBOARD_ID_NAME , -#ifdef CONFIG_PM - .pm = &qcikbd_pm_ops, -#endif - }, - .probe = qcikbd_probe, - .remove =__devexit_p (qcikbd_remove), - .id_table = qcikbd_idtable, -}; - -/*----------------------------------------------------------------------- ------ -* Driver functions -*----------------------------------------------------------------------- ----*/ - -static irqreturn_t qcikbd_interrupt (int irq,void *dev_id) -{ -struct i2ckbd_drv_data *ikbd_drv_data = dev_id; -schedule_work (&ikbd_drv_data->work); -return IRQ_HANDLED ; -} - -static void qcikbd_work_handler (struct work_struct *_work) -{ -unsigned char scancode; -unsigned int keycode; - -struct i2ckbd_drv_data *ikbd_drv_data = - container_of(_work, struct i2ckbd_drv_data, work); - -struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; -struct input_dev *ikbdev = ikbd_drv_data->qcikbd_dev; - - scancode =i2c_smbus_read_byte (ikbdclient); - -if (scancode ==KEY_ACK_FA ) { -return ; - }else if (scancode ==RC_KEY_FN ) { - ikbd_drv_data->fn =0x80 ;/* select keycode table > 0x7F */
drivers/input/keyboard/qci_kbd.c +20
-147- }else { - ikbd_drv_data->key_down =1 ; -if (scancode &RC_KEY_BREAK ) { - ikbd_drv_data->key_down =0 ; -if ((scancode &0x7F ) ==RC_KEY_FN ) - ikbd_drv_data->fn =0 ; - } - keycode = on2_keycode[(scancode &0x7F ) | ikbd_drv_data->fn]; -if (keycode !=NOKEY ) { -input_report_key (ikbdev, - keycode, - ikbd_drv_data->key_down); -input_sync (ikbdev); - } - } -} - - -static int qcikbd_open (struct input_dev *dev) -{ -struct i2ckbd_drv_data *ikbd_drv_data =input_get_drvdata (dev); -struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; - -/* Send F4h - enable keyboard */ -i2c_smbus_write_byte (ikbdclient,KEYBOARD_CMD_ENABLE ); -return 0 ; -} - -static int __devinit qcikbd_probe (struct i2c_client *client, -const struct i2c_device_id *id) -{ -int err; -int i; -struct i2ckbd_drv_data *context; - context =kzalloc (sizeof (struct i2ckbd_drv_data ),GFP_KERNEL ); -if (!context) -return -ENOMEM ; -i2c_set_clientdata (client, context); - context->ki2c_client = client; - context->qcikbd_gpio = client->irq; - client->driver = &i2ckbd_driver; - -INIT_WORK (&context->work, qcikbd_work_handler); - - err =gpio_request (context->qcikbd_gpio,"qci-kbd" ); -if (err) { -pr_err ("[KBD] err gpio request\n" ); - goto gpio_request_fail; - } - - context->qcikbd_irq =gpio_to_irq (context->qcikbd_gpio); - err =request_irq (context->qcikbd_irq, - qcikbd_interrupt, -IRQF_TRIGGER_FALLING , -KEYBOARD_ID_NAME , - context); -if (err) { -pr_err ("[KBD] err unable to get IRQ\n" ); - goto request_irq_fail; - } - - context->qcikbd_dev =input_allocate_device (); -if (!context->qcikbd_dev) { -pr_err ("[KBD]allocting memory err\n" ); - err = -ENOMEM ; - goto allocate_fail; - } - - context->qcikbd_dev->name =KEYBOARD_NAME ; - context->qcikbd_dev->phys =KEYBOARD_DEVICE ; - context->qcikbd_dev->id.bustype =BUS_I2C ; - context->qcikbd_dev->id.vendor =0x1050 ; - context->qcikbd_dev->id.product =0x0006 ; - context->qcikbd_dev->id.version =0x0004 ; - context->qcikbd_dev->open = qcikbd_open; -set_bit (EV_KEY , context->qcikbd_dev->evbit); -set_bit (EV_REP , context->qcikbd_dev->evbit); - -/* Enable all supported keys */ -for (i =1 ; i <ARRAY_SIZE (on2_keycode) ; i++) -set_bit (on2_keycode[i], context->qcikbd_dev->keybit); - -set_bit (KEY_POWER , context->qcikbd_dev->keybit); -set_bit (KEY_END , context->qcikbd_dev->keybit); -set_bit (KEY_VOLUMEUP , context->qcikbd_dev->keybit); -set_bit (KEY_VOLUMEDOWN , context->qcikbd_dev->keybit); -set_bit (KEY_ZOOMIN , context->qcikbd_dev->keybit); -set_bit (KEY_ZOOMOUT , context->qcikbd_dev->keybit); - -input_set_drvdata (context->qcikbd_dev, context); - err =input_register_device (context->qcikbd_dev); -if (err) { -pr_err ("[KBD] err input register device\n" ); - goto register_fail; - } - g_qci_keyboard_dev = context->qcikbd_dev; -return 0 ; -register_fail: -input_free_device (context->qcikbd_dev); - -allocate_fail: -free_irq (context->qcikbd_irq, context); - -request_irq_fail: -gpio_free (context->qcikbd_gpio); - -gpio_request_fail: -i2c_set_clientdata (client,NULL ); -kfree (context); -return err; -} - -static int __devexit qcikbd_remove(struct i2c_client *dev) -{ -struct i2ckbd_drv_data *context =i2c_get_clientdata (dev); - -free_irq (context->qcikbd_irq, context); -gpio_free (context->qcikbd_gpio); -input_free_device (context->qcikbd_dev); -input_unregister_device (context->qcikbd_dev); -kfree (context); - -return 0 ; -} - -static int __init qcikbd_init (void ) -{ -return i2c_add_driver (&i2ckbd_driver); -} - -static void __exit qcikbd_exit(void) -{ -i2c_del_driver (&i2ckbd_driver); -} - -struct input_dev *nkbc_keypad_get_input_dev (void ) -{ -return g_qci_keyboard_dev; -} -EXPORT_SYMBOL (nkbc_keypad_get_input_dev); -module_init (qcikbd_init); -module_exit (qcikbd_exit); - -MODULE_AUTHOR ("Quanta Computer Inc." ); -MODULE_DESCRIPTION ("Quanta Embedded Controller I2C Keyboard Driver" ); -MODULE_LICENSE ("GPL v2" ); - +/* Quanta I2C Keyboard Driver +* +* Copyright (C) 2009 Quanta Computer Inc. +* Author: Hsin Wu <[email protected]> +* Author: Austin Lai <[email protected]> +* +* 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. +* +*/ + +/* +* +* The Driver with I/O communications via the I2C Interface for ON2 of AP BU.
+ * And it is only working on the nuvoTon WPCE775x Embedded Controller.
+ *
+ */drivers/input/keyboard/qci_kbd.c +311
-4+ +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/jiffies.h> +#include <linux/i2c.h> +#include <linux/mutex.h> +#include <linux/interrupt.h> +#include <linux/input.h> +#include <linux/keyboard.h> +#include <linux/gpio.h> +#include <linux/delay.h> + +/* Keyboard special scancode */ +#define RC_KEY_FN 0x70 +#define RC_KEY_BREAK 0x80 +#define KEY_ACK_FA 0xFA + +/* Keyboard keycodes */ +#define NOKEY KEY_RESERVED +#define KEY_LEFTWIN KEY_LEFTMETA +#define KEY_RIGHTWIN KEY_RIGHTMETA +#define KEY_APPS KEY_COMPOSE +#define KEY_PRINTSCR KEY_SYSRQ + +#define KEYBOARD_ID_NAME "qci-i2ckbd" +#define KEYBOARD_NAME "Quanta Keyboard" +#define KEYBOARD_DEVICE "/i2c/input0" +#define KEYBOARD_CMD_ENABLE 0xF4 + +/*----------------------------------------------------------------------- ------ +* Keyboard scancode to linux keycode translation table +*----------------------------------------------------------------------- ----*/ + +static const unsigned char on2_keycode[256] = { +[0] = KEY_RESERVED, +[1] = KEY_ESC, +[2] = KEY_1, +[3] = KEY_2, +[4] = KEY_3, +[5] = KEY_4, +[6] = KEY_5, +[7] = KEY_6, +[8] = KEY_7, +[9] = KEY_8, +[10] = KEY_9, +[11] = KEY_0, +[12] = KEY_MINUS, +[13] = KEY_EQUAL, +[14] = KEY_BACKSPACE, +[15] = KEY_TAB, +[16] = KEY_Q, +[17] = KEY_W, +[18] = KEY_E, +[19] = KEY_R, +[20] = KEY_T, +[21] = KEY_Y, +[22] = KEY_U, +[23] = KEY_I, +[24] = KEY_O, +[25] = KEY_P, +[26] = KEY_LEFTBRACE, +[27] = KEY_RIGHTBRACE, +[28] = KEY_ENTER, +[29] = KEY_LEFTCTRL, +[30] = KEY_A, +[31] = KEY_S, +[32] = KEY_D, +[33] = KEY_F, +[34] = KEY_G, +[35] = KEY_H, +[36] = KEY_J, +[37] = KEY_K, +[38] = KEY_L, +[39] = KEY_SEMICOLON, +[40] = KEY_APOSTROPHE, +[41] = KEY_GRAVE, +[42] = KEY_LEFTSHIFT, +[43] = KEY_BACKSLASH, +[44] = KEY_Z, +[45] = KEY_X, +[46] = KEY_C, +[47] = KEY_V, +[48] = KEY_B, +[49] = KEY_N, +[50] = KEY_M, +[51] = KEY_COMMA, +[52] = KEY_DOT, +[53] = KEY_SLASH, +[54] = KEY_RIGHTSHIFT, +[55] = KEY_KPASTERISK, +[56] = KEY_LEFTALT, +[57] = KEY_SPACE, +[58] = KEY_CAPSLOCK, +[59] = KEY_F1, +[60] = KEY_F2, +[61] = KEY_F3, +[62] = KEY_F4, +[63] = KEY_F5, +[64] = KEY_F6, +[65] = KEY_F7, +[66] = KEY_F8, +[67] = KEY_F9, +[68] = KEY_F10, +[69] = KEY_NUMLOCK, +[70] = KEY_SCROLLLOCK, +[71] = KEY_KP7, +[72] = KEY_KP8, +[73] = KEY_KP9, +[74] = KEY_KPMINUS, +[75] = KEY_KP4, +[76] = KEY_KP5, +[77] = KEY_KP6, +[78] = KEY_KPPLUS, +[79] = KEY_KP1, +[80] = KEY_KP2, +[81] = KEY_KP3, +[82] = KEY_KP0, +[83] = KEY_KPDOT, +[84] = KEY_RESERVED, +[85] = KEY_ZENKAKUHANKAKU, +[86] = KEY_102ND, +[87] = KEY_F11, +[88] = KEY_F12, +[89] = KEY_RO, +[90] = KEY_KATAKANA, +[91] = KEY_HIRAGANA, +[92] = KEY_HENKAN, +[93] = KEY_KATAKANAHIRAGANA, +[94] = KEY_MUHENKAN, +[95] = KEY_KPJPCOMMA, +[96] = KEY_KPENTER, +[97] = KEY_RIGHTCTRL, +[98] = KEY_KPSLASH, +[99] = KEY_SYSRQ, +[100] = KEY_RIGHTALT, +[101] = KEY_LINEFEED, +[102] = KEY_HOME, +[103] = KEY_UP, +[104] = KEY_PAGEUP, +[105] = KEY_LEFT, +[106] = KEY_RIGHT, +[107] = KEY_END, +[108] = KEY_DOWN, +[109] = KEY_PAGEDOWN, +[110] = KEY_INSERT, +[111] = KEY_DELETE, +[112] = KEY_MACRO, +[113] = KEY_MUTE, +[114] = KEY_VOLUMEDOWN, +[115] = KEY_VOLUMEUP, +[116] = KEY_POWER, +[117] = KEY_KPEQUAL, +[118] = KEY_KPPLUSMINUS, +[119] = KEY_PAUSE, +[120] = KEY_SCALE, +[121] = KEY_KPCOMMA, +[122] = KEY_HANGEUL, +[123] = KEY_HANGUEL, +[124] = KEY_HANJA, +[125] = KEY_YEN, +[126] = KEY_LEFTMETA, +[127] = KEY_RIGHTMETA, +[128] = KEY_COMPOSE, +[129] = NOKEY, +[130] = NOKEY, +[131] = NOKEY, +[132] = NOKEY, +[133] = NOKEY, +[134] = NOKEY, +[135] = NOKEY, +[136] = NOKEY, +[137] = NOKEY, +[138] = NOKEY, +[139] = NOKEY, +[140] = NOKEY, +[141] = NOKEY, +[142] = NOKEY, +[143] = NOKEY, +[144] = NOKEY, +[145] = NOKEY, +[146] = NOKEY, +[147] = NOKEY, +[148] = NOKEY, +[149] = NOKEY, +[150] = NOKEY, +[151] = NOKEY, +[152] = NOKEY, +[153] = NOKEY, +[154] = NOKEY, +[155] = NOKEY, +[156] = NOKEY, +[157] = NOKEY, +[158] = NOKEY, +[159] = NOKEY, +[160] = NOKEY, +[161] = NOKEY, +[162] = NOKEY, +[163] = NOKEY, +[164] = NOKEY, +[165] = NOKEY, +[166] = NOKEY, +[167] = NOKEY, +[168] = NOKEY, +[169] = NOKEY, +[170] = NOKEY, +[171] = NOKEY, +[172] = NOKEY, +[173] = NOKEY, +[174] = NOKEY, +[175] = NOKEY, +[176] = NOKEY, +[177] = NOKEY, +[178] = NOKEY, +[179] = NOKEY, +[180] = NOKEY, +[181] = NOKEY, +[182] = NOKEY, +[183] = NOKEY, +[184] = NOKEY, +[185] = NOKEY, +[186] = NOKEY, +[187] = NOKEY, +[188] = NOKEY, +[189] = KEY_HOME, +[190] = NOKEY, +[191] = NOKEY, +[192] = NOKEY, +[193] = NOKEY, +[194] = NOKEY, +[195] = NOKEY, +[196] = NOKEY, +[197] = NOKEY, +[198] = NOKEY, +[199] = NOKEY, +[200] = NOKEY, +[201] = NOKEY, +[202] = NOKEY, +[203] = NOKEY, +[204] = NOKEY, +[205] = KEY_END, +[206] = NOKEY, +[207] = NOKEY, +[208] = NOKEY, +[209] = NOKEY, +[210] = NOKEY, +[211] = NOKEY, +[212] = NOKEY, +[213] = NOKEY, +[214] = NOKEY, +[215] = NOKEY, +[216] = NOKEY, +[217] = NOKEY, +[218] = NOKEY, +[219] = NOKEY, +[220] = KEY_VOLUMEUP, +[221] = KEY_BRIGHTNESSUP, +[222] = NOKEY, +[223] = NOKEY, +[224] = NOKEY, +[225] = NOKEY, +[226] = NOKEY, +[227] = NOKEY, +[228] = NOKEY, +[229] = NOKEY, +[230] = NOKEY, +[231] = NOKEY, +[232] = NOKEY, +[233] = NOKEY, +[234] = NOKEY, +[235] = NOKEY, +[236] = NOKEY, +[237] = KEY_VOLUMEDOWN, +[238] = NOKEY, +[239] = NOKEY, +[240] = NOKEY, +[241] = NOKEY, +[242] = NOKEY, +[243] = NOKEY, +[244] = NOKEY, +[245] = NOKEY, +[246] = NOKEY, +[247] = NOKEY, +[248] = NOKEY, +[249] = NOKEY, +[250] = NOKEY, +[251] = NOKEY, +[252] = NOKEY, +[253] = KEY_BRIGHTNESSDOWN, +[254] = NOKEY, +[255] = NOKEY, +}; +/*----------------------------------------------------------------------- ------ +* Global variables +*----------------------------------------------------------------------- ----*/ + +struct input_dev *g_qci_keyboard_dev; + +/* General structure to hold the driver data */ +struct i2ckbd_drv_data { +struct i2c_client *ki2c_client; +struct work_struct work; +struct input_dev *qcikbd_dev; +unsigned int qcikbd_gpio;/* GPIO used for interrupt */ +unsigned int qcikbd_irq; +unsigned int key_down; +unsigned int escape; +unsigned int pause_seq; +unsigned int fn; +};
drivers/input/keyboard/qci_kbd.c line 344
Quoted 10 lines
drivers/input/keyboard/qci_kbd.c +10
-0+#ifdef CONFIG_PM +static int qcikbd_suspend (struct device *dev) +{ +return 0 ; +} + +static int qcikbd_resume (struct device *dev) +{ +return 0 ; +}
If the functions are empty you may consider adding later
Quoted 47 lines
drivers/input/keyboard/qci_kbd.c +45
-2+#endif +static int __devinit qcikbd_probe (struct i2c_client *client, +const struct i2c_device_id *id); +static int __devexit qcikbd_remove(struct i2c_client *kbd); + +static const struct i2c_device_id qcikbd_idtable[] = { + {KEYBOARD_ID_NAME ,0 }, + { } +}; + +MODULE_DEVICE_TABLE (i2c, qcikbd_idtable); + +#ifdef CONFIG_PM +static struct dev_pm_ops qcikbd_pm_ops = { + .suspend = qcikbd_suspend, + .resume = qcikbd_resume, +}; +#endif +static struct i2c_driver i2ckbd_driver = { + .driver = { + .owner =THIS_MODULE , + .name =KEYBOARD_ID_NAME , +#ifdef CONFIG_PM + .pm = &qcikbd_pm_ops, +#endif + }, + .probe = qcikbd_probe, + .remove =__devexit_p (qcikbd_remove), + .id_table = qcikbd_idtable, +}; + +/*----------------------------------------------------------------------- ------ +* Driver functions +*----------------------------------------------------------------------- ----*/ + +static irqreturn_t qcikbd_interrupt(int irq, void *dev_id) +{ +struct i2ckbd_drv_data *ikbd_drv_data = dev_id; +schedule_work(&ikbd_drv_data->work); +return IRQ_HANDLED; +} + +static void qcikbd_work_handler(struct work_struct *_work) +{ +unsigned char scancode;
drivers/input/keyboard/qci_kbd.c line 399
Quoted 10 lines
drivers/input/keyboard/qci_kbd.c +10
-0+unsigned int keycode; + +struct i2ckbd_drv_data *ikbd_drv_data = + container_of(_work, struct i2ckbd_drv_data, work); + +struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; +struct input_dev *ikbdev = ikbd_drv_data->qcikbd_dev; + + scancode =i2c_smbus_read_byte (ikbdclient); +printk (" scancode = %x\n" , scancode);
May consider use and KERN_XXX ? or may be pr_xx func
Quoted 20 lines
drivers/input/keyboard/qci_kbd.c +20
-0+ +if (scancode ==0xFA ) + { +return ; + }else { + ikbd_drv_data->key_down =1 ; +if (scancode &0x80 ) { + ikbd_drv_data->key_down =0 ; + } + keycode = on2_keycode[(scancode &0x7F )]; +if (keycode !=NOKEY ) { + +input_event (ikbdev,EV_MSC ,MSC_SCAN , scancode); + +input_report_key (ikbdev, + keycode, + ikbd_drv_data->key_down); +input_sync (ikbdev); + } + }
drivers/input/keyboard/qci_kbd.c line 429
Quoted 10 lines
drivers/input/keyboard/qci_kbd.c +10
-0+} + + +static int qcikbd_open (struct input_dev *dev) +{ +struct i2ckbd_drv_data *ikbd_drv_data =input_get_drvdata (dev); +struct i2c_client *ikbdclient = ikbd_drv_data->ki2c_client; + +/* Send F4h - enable keyboard */ +i2c_smbus_write_byte (ikbdclient,KEYBOARD_CMD_ENABLE );
You may want to see the return val of the write? Else the return 0 may be misleading.
Quoted 85 lines
drivers/input/keyboard/qci_kbd.c +85
-0+return 0 ; +} + +static int __devinit qcikbd_probe (struct i2c_client *client, +const struct i2c_device_id *id) +{ +int err; +int i; +struct i2ckbd_drv_data *context; + context =kzalloc (sizeof (struct i2ckbd_drv_data ),GFP_KERNEL ); +if (!context) +return -ENOMEM ; +i2c_set_clientdata (client, context); + context->ki2c_client = client; + context->qcikbd_gpio = client->irq; + client->driver = &i2ckbd_driver; + +INIT_WORK (&context->work, qcikbd_work_handler); + + err =gpio_request (context->qcikbd_gpio,"qci-kbd" ); +if (err) { +pr_err ("[KBD] err gpio request\n" ); + goto gpio_request_fail; + } + + context->qcikbd_irq =gpio_to_irq (context->qcikbd_gpio); + err =request_irq (context->qcikbd_irq, + qcikbd_interrupt, +IRQF_TRIGGER_FALLING , +KEYBOARD_ID_NAME , + context); +if (err) { +pr_err ("[KBD] err unable to get IRQ\n" ); + goto request_irq_fail; + } + + context->qcikbd_dev =input_allocate_device (); +if (!context->qcikbd_dev) { +pr_err ("[KBD]allocting memory err\n" ); + err = -ENOMEM ; + goto allocate_fail; + } + + context->qcikbd_dev->name =KEYBOARD_NAME ; + context->qcikbd_dev->phys =KEYBOARD_DEVICE ; + context->qcikbd_dev->id.bustype =BUS_I2C ; + context->qcikbd_dev->id.vendor =0x1050 ; + context->qcikbd_dev->id.product =0x0006 ; + context->qcikbd_dev->id.version =0x0004 ; + context->qcikbd_dev->open = qcikbd_open; + context->qcikbd_dev->evbit[0 ] =BIT_MASK (EV_KEY ); + +/* Enable all supported keys */ +for (i =1 ; i <ARRAY_SIZE (on2_keycode) ; i++) +set_bit (on2_keycode[i], context->qcikbd_dev->keybit); + +set_bit (KEY_POWER , context->qcikbd_dev->keybit); +set_bit (KEY_END , context->qcikbd_dev->keybit); +set_bit (KEY_VOLUMEUP , context->qcikbd_dev->keybit); +set_bit (KEY_VOLUMEDOWN , context->qcikbd_dev->keybit); +set_bit (KEY_ZOOMIN , context->qcikbd_dev->keybit); +set_bit (KEY_ZOOMOUT , context->qcikbd_dev->keybit); + +input_set_drvdata (context->qcikbd_dev, context); + err =input_register_device (context->qcikbd_dev); +if (err) { +pr_err ("[KBD] err input register device\n" ); + goto register_fail; + } + g_qci_keyboard_dev = context->qcikbd_dev; +printk ("QCI_KBD PROBE\n" ); +return 0 ; +register_fail: +input_free_device (context->qcikbd_dev); + +allocate_fail: +free_irq (context->qcikbd_irq, context); + +request_irq_fail: +gpio_free (context->qcikbd_gpio); + +gpio_request_fail: +i2c_set_clientdata (client,NULL ); +kfree (context); +return err;
drivers/input/keyboard/qci_kbd.c line 524
Quoted 10 lines
drivers/input/keyboard/qci_kbd.c +10
-0+} + +static int __devexit qcikbd_remove(struct i2c_client *dev) +{ +struct i2ckbd_drv_data *context =i2c_get_clientdata (dev); + +free_irq (context->qcikbd_irq, context); +gpio_free (context->qcikbd_gpio); +input_free_device (context->qcikbd_dev); +input_unregister_device (context->qcikbd_dev);
Free and then unregister ? Is it safe?
Quoted 34 lines
drivers/input/keyboard/qci_kbd.c +27
-1+kfree (context); + +return 0 ; +} + +static int __init qcikbd_init (void ) +{ +return i2c_add_driver (&i2ckbd_driver); +} + +static void __exit qcikbd_exit(void) +{ +i2c_del_driver (&i2ckbd_driver); +} + +struct input_dev *nkbc_keypad_get_input_dev (void ) +{ +return g_qci_keyboard_dev; +} +EXPORT_SYMBOL (nkbc_keypad_get_input_dev); +module_init (qcikbd_init); +module_exit (qcikbd_exit); + +MODULE_AUTHOR ("Quanta Computer Inc." ); +MODULE_DESCRIPTION ("Quanta Embedded Controller I2C Keyboard Driver" ); +MODULE_LICENSE ("GPL v2" ); + --1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
RFC 5/36 Enable TPM module
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +6 -3
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Fri Jun 4 15:48:06 2010 +# Sat Jun 5 18:26:10 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -907,7 +907,10 @@ CONFIG_UNIX98_PTYS=y # CONFIG_HW_RANDOM is not set # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set +CONFIG_TCG_TPM=y +# CONFIG_TCG_NSC is not set +# CONFIG_TCG_ATMEL is not set +CONFIG_TCG_ST_I2C=y CONFIG_Q6_VENC=y CONFIG_MSM_KGSL=y CONFIG_MSM_KGSL_DRM=y
@@ -1973,7 +1976,7 @@ CONFIG_DEBUG_LL=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set -# CONFIG_SECURITYFS is not set +CONFIG_SECURITYFS=y CONFIG_SECURITY_FILE_CAPABILITIES=y # CONFIG_CRYPTO is not set CONFIG_BINARY_PRINTF=y
Signature · 1 line
1.7.0.4
RFC 6/36 EC Bridge driver porting
In reply to Wayne LinFrom: wayne <[email protected]>
--- drivers/hwmon/Kconfig | 8 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/wpce775x.c | 166 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/wpce775x.h | 30 ++++++++ 4 files changed, 205 insertions(+), 0 deletions(-) create mode 100755 drivers/hwmon/wpce775x.c create mode 100755 include/linux/wpce775x.h
drivers/hwmon/Kconfig +8 -0
@@ -1061,4 +1061,12 @@ config SENSORS_ISL29011 help ISL29011 Light Sensor Driver implemented by Quanta. +config SENSORS_WPCE775X + tristate "Winbond WPCE775X" + depends on I2C + default n + help + This driver provides support for the Winbond WPCE775XX Embedded + Controller, which provides lcd backlight, LEDs, and Battery control. + endif # HWMON
drivers/hwmon/Makefile +1 -0
@@ -94,6 +94,7 @@ obj-$(CONFIG_SENSORS_W83L786NG) += w83l786ng.o obj-$(CONFIG_SENSORS_WM831X) += wm831x-hwmon.o obj-$(CONFIG_SENSORS_WM8350) += wm8350-hwmon.o obj-$(CONFIG_SENSORS_ISL29011) += isl29011.o +obj-$(CONFIG_SENSORS_WPCE775X) += wpce775x.o ifeq ($(CONFIG_HWMON_DEBUG_CHIP),y) EXTRA_CFLAGS += -DDEBUG
drivers/hwmon/wpce775x.c new file +166 -0
166 lines not on this page · raw message
include/linux/wpce775x.h new file +30 -0
@@ -0,0 +1,30 @@ +/* Quanta EC driver for the Winbond Embedded Controller +* +* Copyright (C) 2009 Quanta Computer Inc. +* +* 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 WPCE775X_DRV_H +#define WPCE775X_DRV_H + +#include <linux/i2c.h> + +struct i2c_client *wpce_get_i2c_client (void ); +int wpce_smbus_write_word_data (u8 command,u16 value); +struct i2c_client *wpce_get_i2c_client (void ); +void wpce_poweroff (void ); +void wpce_restart (void ); +int wpce_i2c_transfer (struct i2c_msg *msg); +int wpce_smbus_write_word_data (u8 command,u16 value); +int wpce_smbus_write_byte_data (u8 command,u8 value); + +#endif
Signature · 1 line
1.7.0.4
RFC 7/36 Enable EC Bridge
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +2 -1
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Sat Jun 5 18:26:10 2010 +# Mon Jun 7 11:20:32 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1057,6 +1057,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_W83627EHF is not set # CONFIG_SENSORS_LIS3_SPI is not set CONFIG_SENSORS_ISL29011=y +CONFIG_SENSORS_WPCE775X=y # CONFIG_THERMAL is not set # CONFIG_WATCHDOG is not set CONFIG_SSB_POSSIBLE=y
Signature · 1 line
1.7.0.4
RFC 8/36 EC battery driver porting
In reply to Wayne LinFrom: wayne <[email protected]>
--- drivers/power/Kconfig | 8 + drivers/power/Makefile | 1 + drivers/power/qci_battery.c | 356 +++++++++++++++++++++++++++++++++++++++++++ drivers/power/qci_battery.h | 61 ++++++++ 4 files changed, 426 insertions(+), 0 deletions(-) create mode 100644 drivers/power/qci_battery.c create mode 100644 drivers/power/qci_battery.h
drivers/power/Kconfig +8 -0
@@ -110,4 +110,12 @@ config CHARGER_PCF50633 help Say Y to include support for NXP PCF50633 Main Battery Charger. +config BATTERY_QCIBAT + tristate "Quanta Computer Inc. Battery" + depends on SENSORS_WPCE775X && ARCH_MSM_SCORPION + default n + help + Say Y here if you want to use the Quanta battery driver for ST15 + platform. + endif # POWER_SUPPLY
drivers/power/Makefile +1 -0
@@ -29,3 +29,4 @@ obj-$(CONFIG_BATTERY_BQ27x00) += bq27x00_battery.o obj-$(CONFIG_BATTERY_DA9030) += da9030_battery.o obj-$(CONFIG_BATTERY_MAX17040) += max17040_battery.o obj-$(CONFIG_CHARGER_PCF50633) += pcf50633-charger.o +obj-$(CONFIG_BATTERY_QCIBAT) += qci_battery.o
drivers/power/qci_battery.c new file +356 -0
356 lines not on this page · raw message
drivers/power/qci_battery.h new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
1.7.0.4
RFC 9/36 Enable EC battery
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +2 -1
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Mon Jun 7 11:20:32 2010 +# Mon Jun 7 11:24:52 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -987,6 +987,7 @@ CONFIG_POWER_SUPPLY=y # CONFIG_BATTERY_DS2782 is not set # CONFIG_BATTERY_BQ27x00 is not set # CONFIG_BATTERY_MAX17040 is not set +CONFIG_BATTERY_QCIBAT=y CONFIG_HWMON=y # CONFIG_HWMON_VID is not set # CONFIG_HWMON_DEBUG_CHIP is not set
Signature · 1 line
1.7.0.4
RFC 11/36 Enable EC gravitation sensor
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +2 -1
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Mon Jun 7 11:24:52 2010 +# Mon Jun 7 11:33:09 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1059,6 +1059,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_LIS3_SPI is not set CONFIG_SENSORS_ISL29011=y CONFIG_SENSORS_WPCE775X=y +CONFIG_SENSORS_BOSCH_BMA150=y # CONFIG_THERMAL is not set # CONFIG_WATCHDOG is not set CONFIG_SSB_POSSIBLE=y
Signature · 1 line
1.7.0.4
RFC 12/36 EC compass sensor driver porting
In reply to Wayne LinFrom: wayne <[email protected]>
--- drivers/hwmon/Kconfig | 7 + drivers/hwmon/Makefile | 1 + drivers/hwmon/hmc5843.c | 501 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/hwmon/hmc5843.h | 37 ++++ 4 files changed, 546 insertions(+), 0 deletions(-) create mode 100755 drivers/hwmon/hmc5843.c create mode 100755 drivers/hwmon/hmc5843.h
drivers/hwmon/Kconfig +7 -0
@@ -1069,6 +1069,13 @@ config SENSORS_WPCE775X This driver provides support for the Winbond WPCE775XX Embedded Controller, which provides lcd backlight, LEDs, and Battery control. +config SENSORS_HMC5843 + tristate "HMC5843 Compass Sensor Driver" + depends on I2C && ARCH_MSM_SCORPION + default n + help + HMC5843 Compass Sensor Driver implemented by Quanta. + config SENSORS_BOSCH_BMA150 tristate "SMB380/BMA150 acceleration sensor support" depends on I2C
drivers/hwmon/Makefile +1 -0
@@ -96,6 +96,7 @@ obj-$(CONFIG_SENSORS_WM8350) += wm8350-hwmon.o obj-$(CONFIG_SENSORS_ISL29011) += isl29011.o obj-$(CONFIG_SENSORS_WPCE775X) += wpce775x.o obj-$(CONFIG_SENSORS_BOSCH_BMA150) += bma150.o +obj-$(CONFIG_SENSORS_HMC5843) += hmc5843.o ifeq ($(CONFIG_HWMON_DEBUG_CHIP),y) EXTRA_CFLAGS += -DDEBUG
drivers/hwmon/hmc5843.c new file +501 -0
501 lines not on this page · raw message
drivers/hwmon/hmc5843.h new file +37 -0
@@ -0,0 +1,37 @@ +/* Quanta I2C Compass sensor Driver Header File +* +* Copyright (C) 2009 Quanta Computer Inc. +* Author: Ivan Chang <[email protected]> +* +* 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 HMC5843_DRV_H +#define HMC5843_DRV_H + +#include <linux/ioctl.h> + +/*=========================================================================== +IOCTLS +===========================================================================*/ +#define HMC5843_IOC_MAGIC 0xe5 + +#define GET_RATE _IOWR(HMC5843_IOC_MAGIC, 0, unsigned long) +#define SET_RATE _IOWR(HMC5843_IOC_MAGIC, 1, unsigned long) +#define GET_MEASURE _IOWR(HMC5843_IOC_MAGIC, 2, unsigned long) +#define SET_MEASURE _IOWR(HMC5843_IOC_MAGIC, 3, unsigned long) +#define GET_GAIN _IOWR(HMC5843_IOC_MAGIC, 4, unsigned long) +#define SET_GAIN _IOWR(HMC5843_IOC_MAGIC, 5, unsigned long) +#define GET_MODE _IOWR(HMC5843_IOC_MAGIC, 6, unsigned long) +#define SET_MODE _IOWR(HMC5843_IOC_MAGIC, 7, unsigned long) +#define SELF_TEST _IOWR(HMC5843_IOC_MAGIC, 8, unsigned long) + +#endif +
Signature · 1 line
1.7.0.4
RFC 13/36 Enable EC compass sensor driver
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +2 -1
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Mon Jun 7 11:33:09 2010 +# Mon Jun 7 11:41:09 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1059,6 +1059,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_LIS3_SPI is not set CONFIG_SENSORS_ISL29011=y CONFIG_SENSORS_WPCE775X=y +CONFIG_SENSORS_HMC5843=y CONFIG_SENSORS_BOSCH_BMA150=y # CONFIG_THERMAL is not set # CONFIG_WATCHDOG is not set
Signature · 1 line
1.7.0.4
RFC 14/36 Modify the AXI bus speed
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/mach-msm/acpuclock-8x50a.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-msm/acpuclock-8x50a.c +1 -1
@@ -106,7 +106,7 @@ struct clkctl_acpu_speed acpu_freq_tbl[] = { { 0, 921600, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x18, 1225 }, { 0, 960000, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x19, 1225 }, { 1, 998400, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x1A, 1225 }, - { 1, 1190400, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x1F, 1225 }, + { 1, 1190400, ACPU_PLL_3, 0, 0, 0, 0, 192000, 1, 0x1F, 1225 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, };
Signature · 1 line
1.7.0.4
RFC 15/36 Adding version definition
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/include/asm/img_version.h | 14 +++++++++ arch/arm/mach-msm/Makefile | 1 + arch/arm/mach-msm/smd_private.h | 2 + arch/arm/mach-msm/version.c | 56 ++++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 0 deletions(-) create mode 100755 arch/arm/include/asm/img_version.h mode change 100644 => 100755 arch/arm/mach-msm/smd_private.h create mode 100755 arch/arm/mach-msm/version.c
arch/arm/include/asm/img_version.h new file +14 -0
@@ -0,0 +1,14 @@ +#ifndef __IMG_VERSION_H__ +#define __IMG_VERSION_H__ + +#define MAX_STRING_LEN 32 + +struct version_info { +char project_name[MAX_STRING_LEN ]; +char hw_mode[MAX_STRING_LEN ]; +char hw_revision[MAX_STRING_LEN ]; +char bsp_version[MAX_STRING_LEN ]; +char bsp_revision[MAX_STRING_LEN ]; +}; + +#endif
arch/arm/mach-msm/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-y += cpufreq.o obj-y += nohlt.o obj-y += pmic.o obj-y += internal_power_rail.o +obj-y += version.o obj-$(CONFIG_ARCH_MSM_ARM11) += acpuclock.o obj-$(CONFIG_MSM_VIC) += irq-vic.o
arch/arm/mach-msm/smd_private.h +2 -0
@@ -253,6 +253,8 @@ enum {SMEM_SMD_BRIDGE_ALLOC_TABLE ,SMEM_SMDLITE_TABLE ,SMEM_SD_IMG_UPGRADE_STATUS , +SMEM_QCI_RAMTEST_INFO , +SMEM_QCI_ST15_VERSION ,SMEM_SEFS_INFO , SMEM_NUM_ITEMS, };
arch/arm/mach-msm/version.c new file +56 -0
56 lines not on this page · raw message
Signature · 1 line
1.7.0.4
RFC 17/36 Enable Athros WIFI driver
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +27 -2
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Mon Jun 7 11:41:09 2010 +# Mon Jun 7 13:35:03 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -757,8 +757,14 @@ CONFIG_SMSC911X=y # CONFIG_NETDEV_10000 is not set CONFIG_WLAN=y # CONFIG_WLAN_PRE80211 is not set -# CONFIG_WLAN_80211 is not set +CONFIG_WLAN_80211=y +# CONFIG_LIBERTAS is not set +# CONFIG_USB_ZD1201 is not set +# CONFIG_USB_NET_RNDIS_WLAN is not set CONFIG_LIBRA_SDIOIF=y +# CONFIG_ATH_COMMON is not set +# CONFIG_HOSTAP is not set +# CONFIG_IWM is not set # # Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -1710,6 +1716,25 @@ CONFIG_STAGING=y # CONFIG_IIO is not set # +# Chromeos Supplied Third-Party Device Drivers +# +CONFIG_ATH6K_LEGACY=m +CONFIG_AR600x_SD31_XXX=y +# CONFIG_AR600x_WB31_XXX is not set +# CONFIG_AR600x_SD32_XXX is not set +# CONFIG_AR600x_CUSTOM_XXX is not set +# CONFIG_ATH6KL_ENABLE_COEXISTENCE is not set +# CONFIG_ATH6KL_HCI_BRIDGE is not set +# CONFIG_ATH6KL_CFG80211 is not set +# CONFIG_ATH6KL_HTC_RAW_INTERFACE is not set +# CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER is not set +CONFIG_ATH6KL_DEBUG=y +# CONFIG_ATH6KL_ENABLE_HOST_DEBUG is not set +CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS=y +CONFIG_AR600x_DEBUG_UART_TX_PIN=8 +# CONFIG_ATH6KL_DISABLE_TARGET_DBGLOGS is not set + +# # File systems # CONFIG_EXT2_FS=y
Signature · 1 line
1.7.0.4
RFC 18/36 Turn on the Athros WIFI power
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/mach-msm/board-qsd8x50.c | 263 +++++++++++++++++++++++++++++++++++++ 1 files changed, 263 insertions(+), 0 deletions(-)
arch/arm/mach-msm/board-qsd8x50.c +263 -0
@@ -1811,6 +1811,262 @@ exit:return ; } +static void set_st15_voltage (void ) +{ +struct vreg *vreg_pa; +struct vreg *vreg_gp1; +struct vreg *vreg_gp2; +struct vreg *vreg_ruim; +struct vreg *vreg_gp5; +struct vreg *vreg_rfrx2; +struct vreg *vreg_synth; +struct vreg *vreg_gp4; +int rc; + + vreg_pa =vreg_get (NULL ,"pa" ); +if (IS_ERR (vreg_pa)) { +printk (KERN_ERR "%s: vreg pa get failed (%ld)\n" , + __func__,PTR_ERR (vreg_pa)); +return ; + } + rc =vreg_set_level (vreg_pa,2100 ); +if (rc) { +printk (KERN_ERR "%s: vreg pa set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_pa); +if (rc) { +printk (KERN_ERR "%s: vreg pa enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); + + vreg_gp1 =vreg_get (NULL ,"gp1" ); +if (IS_ERR (vreg_gp1)) { +printk (KERN_ERR "%s: vreg gp1 get failed (%ld)\n" , + __func__,PTR_ERR (vreg_gp1)); +return ; + } + rc =vreg_set_level (vreg_gp1,1800 ); +if (rc) { +printk (KERN_ERR "%s: vreg gp1 set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_gp1); +if (rc) { +printk (KERN_ERR "%s: vreg gp1 enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); + + vreg_gp2 =vreg_get (NULL ,"gp2" ); +if (IS_ERR (vreg_gp2)) { +printk (KERN_ERR "%s: vreg gp2 get failed (%ld)\n" , + __func__,PTR_ERR (vreg_gp2)); +return ; + } + rc =vreg_set_level (vreg_gp2,2850 ); +if (rc) { +printk (KERN_ERR "%s: vreg gp2 set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_gp2); +if (rc) { +printk (KERN_ERR "%s: vreg gp2 enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); + + vreg_ruim =vreg_get (NULL ,"ruim" ); +if (IS_ERR (vreg_ruim)) { +printk (KERN_ERR "%s: vreg ruim get failed (%ld)\n" , + __func__,PTR_ERR (vreg_ruim)); +return ; + } + rc =vreg_set_level (vreg_ruim,2850 ); +if (rc) { +printk (KERN_ERR "%s: vreg ruim set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_ruim); +if (rc) { +printk (KERN_ERR "%s: vreg ruim enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); + + vreg_gp5 =vreg_get (NULL ,"gp5" ); +if (IS_ERR (vreg_gp5)) { +printk (KERN_ERR "%s: vreg gp5 get failed (%ld)\n" , + __func__,PTR_ERR (vreg_gp5)); +return ; + } + rc =vreg_set_level (vreg_gp5,1800 ); +if (rc) { +printk (KERN_ERR "%s: vreg gp5 set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_gp5); +if (rc) { +printk (KERN_ERR "%s: vreg gp5 enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); + + vreg_rfrx2 =vreg_get (NULL ,"rfrx2" ); +if (IS_ERR (vreg_rfrx2)) { +printk (KERN_ERR "%s: vreg rfrx2 get failed (%ld)\n" , + __func__,PTR_ERR (vreg_rfrx2)); +return ; + } + rc =vreg_set_level (vreg_rfrx2,2100 ); +if (rc) { +printk (KERN_ERR "%s: vreg rfrx2 set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_rfrx2); +if (rc) { +printk (KERN_ERR "%s: vreg rfrx2 enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); + + vreg_synth =vreg_get (NULL ,"synt" ); +if (IS_ERR (vreg_synth)) { +printk (KERN_ERR "%s: vreg synth get failed (%ld)\n" , + __func__,PTR_ERR (vreg_synth)); +return ; + } + rc =vreg_set_level (vreg_synth,2850 ); +if (rc) { +printk (KERN_ERR "%s: vreg synth set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_synth); +if (rc) { +printk (KERN_ERR "%s: vreg synth enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); + + vreg_gp4 =vreg_get (NULL ,"gp4" ); +if (IS_ERR (vreg_gp4)) { +printk (KERN_ERR "%s: vreg gp4 get failed (%ld)\n" , + __func__,PTR_ERR (vreg_gp4)); +return ; + } + rc =vreg_set_level (vreg_gp4,2850 ); +if (rc) { +printk (KERN_ERR "%s: vreg gp4 set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_gp4); +if (rc) { +printk (KERN_ERR "%s: vreg gp4 enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); +} + +static void enable_wlan_bt (void ) +{ +struct vreg *vreg_gp6; +struct vreg *vreg_wlan; +struct vreg *vreg_gp3; +int rc; + + vreg_gp3 =vreg_get (NULL ,"gp3" ); +if (IS_ERR (vreg_gp3)) { +printk (KERN_ERR "%s: vreg gp3 get failed (%ld)\n" , + __func__,PTR_ERR (vreg_gp3)); +return ; + } + rc =vreg_set_level (vreg_gp3,2600 ); +if (rc) { +printk (KERN_ERR "%s: vreg gp3 set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_gp3); +if (rc) { +printk (KERN_ERR "%s: vreg gp3 enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); + + vreg_wlan =vreg_get (NULL ,"wlan" ); +if (IS_ERR (vreg_wlan)) { +printk (KERN_ERR "%s: vreg wlan get failed (%ld)\n" , + __func__,PTR_ERR (vreg_wlan)); +return ; + } + rc =vreg_set_level (vreg_wlan,2850 ); +if (rc) { +printk (KERN_ERR "%s: vreg wlan set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_wlan); +if (rc) { +printk (KERN_ERR "%s: vreg wlan enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); + +gpio_tlmm_config (GPIO_CFG (26 ,0 ,GPIO_OUTPUT ,GPIO_NO_PULL ,GPIO_2MA ),GPIO_ENABLE ); +gpio_set_value (26 ,1 ); +msleep (100 ); + + vreg_gp6 =vreg_get (NULL ,"gp6" ); +if (IS_ERR (vreg_gp6)) { +printk (KERN_ERR "%s: vreg get failed (%ld)\n" , + __func__,PTR_ERR (vreg_gp6)); +return ; + } + rc =vreg_disable (vreg_gp6); +if (rc) { +printk (KERN_ERR "%s: vreg gp6 enable failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_set_level (vreg_gp6,1800 ); +if (rc) { +printk (KERN_ERR "%s: vreg gp6 set level failed (%d)\n" , + __func__, rc); +return ; + } + rc =vreg_enable (vreg_gp6); +if (rc) { +printk (KERN_ERR "%s: vreg gp6 enable failed (%d)\n" , + __func__, rc); +return ; + } +msleep (100 ); +gpio_tlmm_config (GPIO_CFG (41 ,0 ,GPIO_OUTPUT ,GPIO_NO_PULL ,GPIO_2MA ),GPIO_ENABLE ); + +gpio_set_value (41 ,0 ); +msleep (100 ); +gpio_set_value (41 ,1 ); +} +static void __attribute__((unused))__init bt_power_init_st_1_5 (void ) {int rc;
@@ -3245,7 +3501,11 @@ static void __init qsd8x50_init(void)qsd8x50_init_host ();qsd8x50_init_mmc ();if (machine_is_qsd8x50a_st1_5 ()) + {bt_power_init_st_1_5 (); +/* power on wlan_bt module(AR6000) */ +enable_wlan_bt (); + }else bt_power_init ();audio_gpio_init ();
@@ -3285,6 +3545,9 @@ static void __init qsd8x50_init(void) else platform_device_register(&keypad_device_surf);#endif +/* set regulator voltage */ +if (machine_is_qsd8x50a_st1_5 ()) +set_st15_voltage (); }static void __init qsd8x50_allocate_memory_regions (void )
Signature · 1 line
1.7.0.4
RFC 19/36 Enable Athros BT driver
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +12 -5
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Mon Jun 7 13:35:03 2010 +# Mon Jun 7 13:56:07 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1719,12 +1719,19 @@ CONFIG_STAGING=y # Chromeos Supplied Third-Party Device Drivers # CONFIG_ATH6K_LEGACY=m -CONFIG_AR600x_SD31_XXX=y -# CONFIG_AR600x_WB31_XXX is not set +# CONFIG_AR600x_SD31_XXX is not set +CONFIG_AR600x_WB31_XXX=y # CONFIG_AR600x_SD32_XXX is not set # CONFIG_AR600x_CUSTOM_XXX is not set -# CONFIG_ATH6KL_ENABLE_COEXISTENCE is not set -# CONFIG_ATH6KL_HCI_BRIDGE is not set +CONFIG_ATH6KL_ENABLE_COEXISTENCE=y +CONFIG_AR600x_DUAL_ANTENNA=y +# CONFIG_AR600x_SINGLE_ANTENNA is not set +# CONFIG_AR600x_BT_QCOM is not set +# CONFIG_AR600x_BT_CSR is not set +CONFIG_AR600x_BT_AR3001=y +CONFIG_ATH6KL_HCI_BRIDGE=y +CONFIG_ATH6KL_CONFIG_GPIO_BT_RESET=y +CONFIG_AR600x_BT_RESET_PIN=22 # CONFIG_ATH6KL_CFG80211 is not set # CONFIG_ATH6KL_HTC_RAW_INTERFACE is not set # CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER is not set
Signature · 1 line
1.7.0.4
RFC 20/36 Enable MMC1 dummy send read and configure Athros WIFI build-in driver
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +6 -3
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Mon Jun 7 13:56:07 2010 +# Mon Jun 7 14:52:04 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1582,12 +1582,15 @@ CONFIG_MMC_MSM=y # CONFIG_MMC_MSM_CARD_HW_DETECTION is not set CONFIG_MMC_MSM_SDC1_SUPPORT=y # CONFIG_MMC_MSM_SDC1_8_BIT_SUPPORT is not set +# CONFIG_MMC_MSM_SDC1_DUMMY52_REQUIRED is not set CONFIG_MMC_MSM_SDC2_SUPPORT=y # CONFIG_MMC_MSM_SDC2_8_BIT_SUPPORT is not set +CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED=y CONFIG_MMC_MSM_SDC3_SUPPORT=y CONFIG_MMC_MSM_SDC3_8_BIT_SUPPORT=y +# CONFIG_MMC_MSM_SDC3_DUMMY52_REQUIRED is not set # CONFIG_MMC_MSM_SDC4_SUPPORT is not set -CONFIG_MMC_MSM_PROG_DONE_SCAN=y +# CONFIG_MMC_MSM_PROG_DONE_SCAN is not set # CONFIG_MEMSTICK is not set CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y
@@ -1718,7 +1721,7 @@ CONFIG_STAGING=y # # Chromeos Supplied Third-Party Device Drivers # -CONFIG_ATH6K_LEGACY=m +CONFIG_ATH6K_LEGACY=y # CONFIG_AR600x_SD31_XXX is not set CONFIG_AR600x_WB31_XXX=y # CONFIG_AR600x_SD32_XXX is not set
Signature · 1 line
1.7.0.4
RFC 21/36 Revert " [Driver][Qualcomm 1070][CLOCK] Modify the AXI bus speed"
In reply to Wayne LinFrom: wayne <[email protected]>
This reverts commit 9ab35ce7ead42adf500950c6492fdd8aae173f5e.
--- arch/arm/mach-msm/acpuclock-8x50a.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-msm/acpuclock-8x50a.c +1 -1
@@ -106,7 +106,7 @@ struct clkctl_acpu_speed acpu_freq_tbl[] = { { 0, 921600, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x18, 1225 }, { 0, 960000, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x19, 1225 }, { 1, 998400, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x1A, 1225 }, - { 1, 1190400, ACPU_PLL_3, 0, 0, 0, 0, 192000, 1, 0x1F, 1225 }, + { 1, 1190400, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x1F, 1225 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, };
Signature · 1 line
1.7.0.4
Dmitry Torokhov
maintainerRe: [RFC 21/36] Revert " [Driver][Qualcomm 1070][CLOCK] Modify the AXI bus speed"
Quoted 3 lines · Wayne Lin
From: wayne <[email protected]>
This reverts commit
9ab35ce7ead42adf500950c6492fdd8aae173f5e.
You really need to sanitize your patch series before posting and not simply dump your internal tree with all its history.
Quoted 24 lines
--- arch/arm/mach-msm/acpuclock-8x50a.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-msm/acpuclock-8x50a.c +1
-1@@ -106,7 +106,7 @@ struct clkctl_acpu_speed acpu_freq_tbl[] = { { 0, 921600, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x18, 1225 }, { 0, 960000, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x19, 1225 }, { 1, 998400, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x1A, 1225 }, - { 1, 1190400, ACPU_PLL_3, 0, 0, 0, 0, 192000, 1, 0x1F, 1225 }, + { 1, 1190400, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x1F, 1225 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, };Signature · 6 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Dmitry
RFC 22/36 Modify the AXI bus maximum speed
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/mach-msm/board-qsd8x50.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-msm/board-qsd8x50.c +4 -0
@@ -2129,7 +2129,11 @@ static struct resource kgsl_resources[] = {#endif };static struct kgsl_platform_data kgsl_pdata = { +#ifdef CONFIG_MSM_SOC_REV_A + .max_axi_freq =192000 ,/*Max for 8650A*/ +#else .max_axi_freq =128000 ,/*Max for 8K*/ +#endif };static struct platform_device msm_device_kgsl = {
Signature · 1 line
1.7.0.4
RFC 23/36 retrieve message
In reply to Wayne LinFrom: morris.chen <[email protected]>
--- arch/arm/mach-msm/smd_tty.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) mode change 100644 => 100755 arch/arm/mach-msm/smd_tty.c
arch/arm/mach-msm/smd_tty.c +3 -1
@@ -80,7 +80,9 @@ static void smd_tty_work_func(struct work_struct *work)printk (KERN_ERR "OOPS - smd_tty_buffer mismatch?!" ); }mutex_unlock (&smd_tty_lock); - +//QCI, morris chen, 20100608, begin, return ATcmd's message back +printk ("%s\n" ,ptr); +//QCI, morris chen, end tty_flip_buffer_push (tty); }
Signature · 1 line
1.7.0.4
RFC 24/36 Modify the AXI clock for 1.2Ghz
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/mach-msm/acpuclock-8x50a.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-msm/acpuclock-8x50a.c +1 -1
@@ -106,7 +106,7 @@ struct clkctl_acpu_speed acpu_freq_tbl[] = { { 0, 921600, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x18, 1225 }, { 0, 960000, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x19, 1225 }, { 1, 998400, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x1A, 1225 }, - { 1, 1190400, ACPU_PLL_3, 0, 0, 0, 0, 128000, 1, 0x1F, 1225 }, + { 1, 1190400, ACPU_PLL_3, 0, 0, 0, 0, 192000, 1, 0x1F, 1225 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, };
Signature · 1 line
1.7.0.4
RFC 25/36 Adding new EC bridge driver
In reply to Wayne LinFrom: lc <[email protected]>
--- drivers/hwmon/Kconfig | 208 ++++++++++++++++++++-------------------------- drivers/hwmon/Makefile | 18 ++--- drivers/hwmon/npce781x.c | 159 +++++++++++++++++++++++++++++++++++ 3 files changed, 255 insertions(+), 130 deletions(-) create mode 100755 drivers/hwmon/npce781x.c
drivers/hwmon/Kconfig +90 -118
@@ -28,17 +28,6 @@ config HWMON_VID tristate default n -config HWMON_DEBUG_CHIP - bool "Hardware Monitoring Chip debugging messages" - default n - help - Say Y here if you want the I2C chip drivers to produce a bunch of - debug messages to the system log. Select this if you are having - a problem with I2C support and want to see more of what is going - on. - -comment "Native drivers" - config SENSORS_ABITUGURU tristate "Abit uGuru (rev 1 & 2)" depends on X86 && EXPERIMENTAL
@@ -259,6 +248,18 @@ config SENSORS_ASB100 This driver can also be built as a module. If so, the module will be called asb100. +config SENSORS_ATK0110 + tristate "ASUS ATK0110 ACPI hwmon" + depends on X86 && ACPI && EXPERIMENTAL + help + If you say yes here you get support for the ACPI hardware + monitoring interface found in many ASUS motherboards. This + driver will provide readings of fans, voltages and temperatures + through the system firmware. + + This driver can also be built as a module. If so, the module + will be called asus_atk0110. + config SENSORS_ATXP1 tristate "Attansic ATXP1 VID controller" depends on I2C && EXPERIMENTAL
@@ -325,6 +326,34 @@ config SENSORS_F75375S This driver can also be built as a module. If so, the module will be called f75375s. +config SENSORS_FSCHER + tristate "FSC Hermes (DEPRECATED)" + depends on X86 && I2C + help + This driver is DEPRECATED please use the new merged fschmd + ("FSC Poseidon, Scylla, Hermes, Heimdall and Heracles") driver + instead. + + If you say yes here you get support for Fujitsu Siemens + Computers Hermes sensor chips. + + This driver can also be built as a module. If so, the module + will be called fscher. + +config SENSORS_FSCPOS + tristate "FSC Poseidon (DEPRECATED)" + depends on X86 && I2C + help + This driver is DEPRECATED please use the new merged fschmd + ("FSC Poseidon, Scylla, Hermes, Heimdall and Heracles") driver + instead. + + If you say yes here you get support for Fujitsu Siemens + Computers Poseidon sensor chips. + + This driver can also be built as a module. If so, the module + will be called fscpos. + config SENSORS_FSCHMD tristate "Fujitsu Siemens Computers sensor chips" depends on X86 && I2C
@@ -373,12 +402,12 @@ config SENSORS_GL520SM will be called gl520sm. config SENSORS_CORETEMP - tristate "Intel Core/Core2/Atom temperature sensor" - depends on X86 && PCI && EXPERIMENTAL + tristate "Intel Core (2) Duo/Solo temperature sensor" + depends on X86 && EXPERIMENTAL help If you say yes here you get support for the temperature - sensor inside your CPU. Most of the family 6 CPUs - are supported. Check documentation/driver for details. + sensor inside your CPU. Supported all are all known variants + of Intel Core family. config SENSORS_IBMAEM tristate "IBM Active Energy Manager temperature/power sensors and control"
@@ -673,23 +702,6 @@ config SENSORS_SHT15 This driver can also be built as a module. If so, the module will be called sht15. -config SENSORS_S3C - tristate "S3C24XX/S3C64XX Inbuilt ADC" - depends on ARCH_S3C2410 - help - If you say yes here you get support for the on-board ADCs of - the Samsung S3C24XX or S3C64XX series of SoC - - This driver can also be built as a module. If so, the module - will be called s3c-hwmo. - -config SENSORS_S3C_RAW - bool "Include raw channel attributes in sysfs" - depends on SENSORS_S3C - help - Say Y here if you want to include raw copies of all the ADC - channels in sysfs. - config SENSORS_SIS5595 tristate "Silicon Integrated Systems Corp. SiS5595" depends on PCI
@@ -785,16 +797,6 @@ config SENSORS_TMP401 This driver can also be built as a module. If so, the module will be called tmp401. -config SENSORS_TMP421 - tristate "Texas Instruments TMP421 and compatible" - depends on I2C && EXPERIMENTAL - help - If you say yes here you get support for Texas Instruments TMP421, - TMP422 and TMP423 temperature sensor chips. - - This driver can also be built as a module. If so, the module - will be called tmp421. - config SENSORS_VIA686A tristate "VIA686A" depends on PCI
@@ -918,27 +920,6 @@ config SENSORS_W83627EHF This driver can also be built as a module. If so, the module will be called w83627ehf. -config SENSORS_WM831X - tristate "WM831x PMICs" - depends on MFD_WM831X - help - If you say yes here you get support for the hardware - monitoring functionality of the Wolfson Microelectronics - WM831x series of PMICs. - - This driver can also be built as a module. If so, the module - will be called wm831x-hwmon. - -config SENSORS_WM8350 - tristate "Wolfson Microelectronics WM835x" - depends on MFD_WM8350 - help - If you say yes here you get support for the hardware - monitoring features of the WM835x series of PMICs. - - This driver can also be built as a module. If so, the module - will be called wm8350-hwmon. - config SENSORS_ULTRA45 tristate "Sun Ultra45 PIC16F747" depends on SPARC64
@@ -966,6 +947,34 @@ config SENSORS_HDAPS Say Y here if you have an applicable laptop and want to experience the awesome power of hdaps. +config SENSORS_LIS3LV02D + tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer" + depends on ACPI && INPUT + select INPUT_POLLDEV + select NEW_LEDS + select LEDS_CLASS + default n + help + This driver provides support for the LIS3LV02Dx accelerometer. In + particular, it can be found in a number of HP laptops, which have the + "Mobile Data Protection System 3D" or "3D DriveGuard" feature. On such + systems the driver should load automatically (via ACPI). The + accelerometer might also be found in other systems, connected via SPI + or I2C. The accelerometer data is readable via + /sys/devices/platform/lis3lv02d. + + This driver also provides an absolute input class device, allowing + the laptop to act as a pinball machine-esque joystick. On HP laptops, + if the led infrastructure is activated, support for a led indicating + disk protection will be provided as hp:red:hddprotection. + + This driver can also be built as modules. If so, the core module + will be called lis3lv02d and a specific module for HP laptops will be + called hp_accel. + + Say Y here if you have an applicable laptop and want to experience + the awesome power of lis3lv02d. + config SENSORS_LIS3_SPI tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer (SPI)" depends on !ACPI && SPI_MASTER && INPUT
@@ -1008,51 +1017,21 @@ config SENSORS_APPLESMC Say Y here if you have an applicable laptop and want to experience the awesome power of applesmc. -if ACPI - -comment "ACPI drivers" - -config SENSORS_ATK0110 - tristate "ASUS ATK0110" - depends on X86 && EXPERIMENTAL - help - If you say yes here you get support for the ACPI hardware - monitoring interface found in many ASUS motherboards. This - driver will provide readings of fans, voltages and temperatures - through the system firmware. - - This driver can also be built as a module. If so, the module - will be called asus_atk0110. +config SENSORS_HMC5843 + tristate "HMC5843 Compass Sensor Driver" + depends on I2C && ARCH_MSM_SCORPION + default n + help + HMC5843 Compass Sensor Driver implemented by Quanta. -config SENSORS_LIS3LV02D - tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer" - depends on INPUT - select INPUT_POLLDEV - select NEW_LEDS - select LEDS_CLASS +config HWMON_DEBUG_CHIP + bool "Hardware Monitoring Chip debugging messages" default n help - This driver provides support for the LIS3LV02Dx accelerometer. In - particular, it can be found in a number of HP laptops, which have the - "Mobile Data Protection System 3D" or "3D DriveGuard" feature. On such - systems the driver should load automatically (via ACPI). The - accelerometer might also be found in other systems, connected via SPI - or I2C. The accelerometer data is readable via - /sys/devices/platform/lis3lv02d. - - This driver also provides an absolute input class device, allowing - the laptop to act as a pinball machine-esque joystick. On HP laptops, - if the led infrastructure is activated, support for a led indicating - disk protection will be provided as hp:red:hddprotection. - - This driver can also be built as modules. If so, the core module - will be called lis3lv02d and a specific module for HP laptops will be - called hp_accel. - - Say Y here if you have an applicable laptop and want to experience - the awesome power of lis3lv02d. - -endif # ACPI + Say Y here if you want the I2C chip drivers to produce a bunch of + debug messages to the system log. Select this if you are having + a problem with I2C support and want to see more of what is going + on. config SENSORS_ISL29011 tristate "ISL29011 Light Sensor Driver"
@@ -1069,19 +1048,12 @@ config SENSORS_WPCE775X This driver provides support for the Winbond WPCE775XX Embedded Controller, which provides lcd backlight, LEDs, and Battery control. -config SENSORS_HMC5843 - tristate "HMC5843 Compass Sensor Driver" - depends on I2C && ARCH_MSM_SCORPION - default n - help - HMC5843 Compass Sensor Driver implemented by Quanta. - -config SENSORS_BOSCH_BMA150 - tristate "SMB380/BMA150 acceleration sensor support" - depends on I2C - default n +config SENSORS_NPCE781X + tristate "NuvoTon WPCE775X" + depends on I2C + default n help - If you say yes here you get support for Bosch Sensortec's - acceleration sensors SMB380/BMA150. + This driver provides support for the NuvoTon NPCE781X Embedded + Controller, which provides lcd backlight, LEDs, and Battery control. endif # HWMON
drivers/hwmon/Makefile +6 -12
@@ -5,10 +5,6 @@ obj-$(CONFIG_HWMON) += hwmon.o obj-$(CONFIG_HWMON_VID) += hwmon-vid.o -# APCI drivers -obj-$(CONFIG_SENSORS_ATK0110) += asus_atk0110.o - -# Native drivers # asb100, then w83781d go first, as they can override other drivers' addresses. obj-$(CONFIG_SENSORS_ASB100) += asb100.o obj-$(CONFIG_SENSORS_W83627HF) += w83627hf.o
@@ -33,8 +29,10 @@ obj-$(CONFIG_SENSORS_ADT7462) += adt7462.o obj-$(CONFIG_SENSORS_ADT7470) += adt7470.o obj-$(CONFIG_SENSORS_ADT7473) += adt7473.o obj-$(CONFIG_SENSORS_ADT7475) += adt7475.o + obj-$(CONFIG_SENSORS_APPLESMC) += applesmc.o obj-$(CONFIG_SENSORS_AMS) += ams/ +obj-$(CONFIG_SENSORS_ATK0110) += asus_atk0110.o obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o obj-$(CONFIG_SENSORS_DME1737) += dme1737.o
@@ -42,7 +40,9 @@ obj-$(CONFIG_SENSORS_DS1621) += ds1621.o obj-$(CONFIG_SENSORS_F71805F) += f71805f.o obj-$(CONFIG_SENSORS_F71882FG) += f71882fg.o obj-$(CONFIG_SENSORS_F75375S) += f75375s.o +obj-$(CONFIG_SENSORS_FSCHER) += fscher.o obj-$(CONFIG_SENSORS_FSCHMD) += fschmd.o +obj-$(CONFIG_SENSORS_FSCPOS) += fscpos.o obj-$(CONFIG_SENSORS_G760A) += g760a.o obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o
@@ -76,7 +76,6 @@ obj-$(CONFIG_SENSORS_MAX6650) += max6650.o obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_PC87427) += pc87427.o obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o -obj-$(CONFIG_SENSORS_S3C) += s3c-hwmon.o obj-$(CONFIG_SENSORS_SHT15) += sht15.o obj-$(CONFIG_SENSORS_SIS5595) += sis5595.o obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc47b397.o
@@ -84,22 +83,17 @@ obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o obj-$(CONFIG_SENSORS_SMSC47M192)+= smsc47m192.o obj-$(CONFIG_SENSORS_THMC50) += thmc50.o obj-$(CONFIG_SENSORS_TMP401) += tmp401.o -obj-$(CONFIG_SENSORS_TMP421) += tmp421.o obj-$(CONFIG_SENSORS_VIA686A) += via686a.o obj-$(CONFIG_SENSORS_VT1211) += vt1211.o obj-$(CONFIG_SENSORS_VT8231) += vt8231.o obj-$(CONFIG_SENSORS_W83627EHF) += w83627ehf.o obj-$(CONFIG_SENSORS_W83L785TS) += w83l785ts.o obj-$(CONFIG_SENSORS_W83L786NG) += w83l786ng.o -obj-$(CONFIG_SENSORS_WM831X) += wm831x-hwmon.o -obj-$(CONFIG_SENSORS_WM8350) += wm8350-hwmon.o obj-$(CONFIG_SENSORS_ISL29011) += isl29011.o -obj-$(CONFIG_SENSORS_WPCE775X) += wpce775x.o -obj-$(CONFIG_SENSORS_BOSCH_BMA150) += bma150.o obj-$(CONFIG_SENSORS_HMC5843) += hmc5843.o +obj-$(CONFIG_SENSORS_WPCE775X) += wpce775x.o +obj-$(CONFIG_SENSORS_NPCE781X) += npce781x.o ifeq ($(CONFIG_HWMON_DEBUG_CHIP),y) EXTRA_CFLAGS += -DDEBUG endif - -bma150-objs := bma150_driver.o smb380.o smb380calib.o
drivers/hwmon/npce781x.c new file +159 -0
159 lines not on this page · raw message
Signature · 1 line
1.7.0.4
RFC 26/36 New EC backlight driver porting
In reply to Wayne LinFrom: wayne <[email protected]>
--- drivers/leds/Kconfig | 20 +++++----- drivers/leds/Makefile | 1 + drivers/leds/leds-qci-backlight.c | 77 +++++++++++++++++++++++++++++++++++++ drivers/leds/leds-qci-backlight.h | 34 ++++++++++++++++ 4 files changed, 122 insertions(+), 10 deletions(-) create mode 100755 drivers/leds/leds-qci-backlight.c create mode 100755 drivers/leds/leds-qci-backlight.h
drivers/leds/Kconfig +10 -10
@@ -150,9 +150,9 @@ config LEDS_LP3944 tristate "LED Support for N.S. LP3944 (Fun Light) I2C chip" depends on LEDS_CLASS && I2C help - This option enables support for LEDs connected to the National - Semiconductor LP3944 Lighting Management Unit (LMU) also known as - Fun Light Chip. + This option enables support for LEDs connected to the National + Semiconductor LP3944 Lighting Management Unit (LMU) also known as + Fun Light Chip. To compile this driver as a module, choose M here: the module will be called leds-lp3944.
@@ -195,13 +195,6 @@ config LEDS_PCA955X LED driver chips accessed via the I2C bus. Supported devices include PCA9550, PCA9551, PCA9552, and PCA9553. -config LEDS_WM831X_STATUS - tristate "LED support for status LEDs on WM831x PMICs" - depends on LEDS_CLASS && MFD_WM831X - help - This option enables support for the status LEDs of the WM831x - series of PMICs. - config LEDS_WM8350 tristate "LED Support for WM8350 AudioPlus PMIC" depends on LEDS_CLASS && MFD_WM8350
@@ -236,6 +229,13 @@ config LEDS_BD2802 This option enables support for BD2802GU RGB LED driver chips accessed via the I2C bus. +config LEDS_QCIBL + tristate "LED Support for Quanta LCD backlight" + depends on SENSORS_NPCE781X + default n + help + Say Y here if you want to use the Quanta backlight driver for ST 1.5 platform. + comment "LED Triggers" config LEDS_TRIGGERS
drivers/leds/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_LEDS_DA903X) += leds-da903x.o obj-$(CONFIG_LEDS_WM831X_STATUS) += leds-wm831x-status.o obj-$(CONFIG_LEDS_WM8350) += leds-wm8350.o obj-$(CONFIG_LEDS_PWM) += leds-pwm.o +obj-$(CONFIG_LEDS_QCIBL) += leds-qci-backlight.o # LED SPI Drivers obj-$(CONFIG_LEDS_DAC124S085) += leds-dac124s085.o
drivers/leds/leds-qci-backlight.c new file +77 -0
77 lines not on this page · raw message
drivers/leds/leds-qci-backlight.h new file +34 -0
@@ -0,0 +1,34 @@ +/* arm\mach-msm\include\mach\leds-qci-backlight.h +* Header file for Quanta lcd backlight Driver +* +* Copyright (C) 2009 Quanta Computer Inc. +* Author: Austin Lai <[email protected]> +* +* 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. +* +*/ + +/* +* +* The Driver with I/O communications via the I2C Interface for ON2 of AP BU. +* And it is only working on the nuvoTon WPCE775x Embedded Controller. +* +*/ + +#ifndef __LEDS_QCI_BACKLIGHT_H__ +#define __LEDS_QCI_BACKLIGHT_H__ + +//#define EC_CMD_SET_BACKLIGHT 0xB1 +#define EC_CMD_SET_BACKLIGHT 0xC4 + +extern int npce_smbus_write_word_data (u8 command,u16 value); +extern int npce_read_ecram (u8 ecram); + +#endif
Signature · 1 line
1.7.0.4
RFC 27/36 Enable NuvoTon WPCE775X driver and disable WinBond WPCE775X driver
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 17 ++++++----------- 1 files changed, 6 insertions(+), 11 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +6 -11
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Mon Jun 7 14:52:04 2010 +# Mon Jun 14 18:41:45 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -993,14 +993,8 @@ CONFIG_POWER_SUPPLY=y # CONFIG_BATTERY_DS2782 is not set # CONFIG_BATTERY_BQ27x00 is not set # CONFIG_BATTERY_MAX17040 is not set -CONFIG_BATTERY_QCIBAT=y CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Native drivers -# # CONFIG_SENSORS_AD7414 is not set # CONFIG_SENSORS_AD7418 is not set # CONFIG_SENSORS_ADCXX is not set
@@ -1052,7 +1046,6 @@ CONFIG_HWMON=y # CONFIG_SENSORS_ADS7828 is not set # CONFIG_SENSORS_THMC50 is not set # CONFIG_SENSORS_TMP401 is not set -# CONFIG_SENSORS_TMP421 is not set # CONFIG_SENSORS_VT1211 is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83791D is not set
@@ -1063,10 +1056,11 @@ CONFIG_HWMON=y # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set # CONFIG_SENSORS_LIS3_SPI is not set -CONFIG_SENSORS_ISL29011=y -CONFIG_SENSORS_WPCE775X=y CONFIG_SENSORS_HMC5843=y -CONFIG_SENSORS_BOSCH_BMA150=y +# CONFIG_HWMON_DEBUG_CHIP is not set +CONFIG_SENSORS_ISL29011=y +# CONFIG_SENSORS_WPCE775X is not set +CONFIG_SENSORS_NPCE781X=y # CONFIG_THERMAL is not set # CONFIG_WATCHDOG is not set CONFIG_SSB_POSSIBLE=y
@@ -1604,6 +1598,7 @@ CONFIG_LEDS_CLASS=y # CONFIG_LEDS_PCA955X is not set # CONFIG_LEDS_DAC124S085 is not set # CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_QCIBL is not set # # LED Triggers
Signature · 1 line
1.7.0.4
RFC 28/36 Enable QCI backlight driver
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +2 -2
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Mon Jun 14 18:41:45 2010 +# Mon Jun 14 18:42:30 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1598,7 +1598,7 @@ CONFIG_LEDS_CLASS=y # CONFIG_LEDS_PCA955X is not set # CONFIG_LEDS_DAC124S085 is not set # CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_QCIBL is not set +CONFIG_LEDS_QCIBL=y # # LED Triggers
Signature · 1 line
1.7.0.4
RFC 29/36 Correct new EC bridge driver Makefile and Kconfig
In reply to Wayne LinFrom: wayne <[email protected]>
--- drivers/hwmon/Kconfig | 214 ++++++++++++++++++++++++++++-------------------- drivers/hwmon/Makefile | 17 +++- 2 files changed, 137 insertions(+), 94 deletions(-)
drivers/hwmon/Kconfig +125 -89
@@ -28,6 +28,17 @@ config HWMON_VID tristate default n +config HWMON_DEBUG_CHIP + bool "Hardware Monitoring Chip debugging messages" + default n + help + Say Y here if you want the I2C chip drivers to produce a bunch of + debug messages to the system log. Select this if you are having + a problem with I2C support and want to see more of what is going + on. + +comment "Native drivers" + config SENSORS_ABITUGURU tristate "Abit uGuru (rev 1 & 2)" depends on X86 && EXPERIMENTAL
@@ -248,18 +259,6 @@ config SENSORS_ASB100 This driver can also be built as a module. If so, the module will be called asb100. -config SENSORS_ATK0110 - tristate "ASUS ATK0110 ACPI hwmon" - depends on X86 && ACPI && EXPERIMENTAL - help - If you say yes here you get support for the ACPI hardware - monitoring interface found in many ASUS motherboards. This - driver will provide readings of fans, voltages and temperatures - through the system firmware. - - This driver can also be built as a module. If so, the module - will be called asus_atk0110. - config SENSORS_ATXP1 tristate "Attansic ATXP1 VID controller" depends on I2C && EXPERIMENTAL
@@ -326,34 +325,6 @@ config SENSORS_F75375S This driver can also be built as a module. If so, the module will be called f75375s. -config SENSORS_FSCHER - tristate "FSC Hermes (DEPRECATED)" - depends on X86 && I2C - help - This driver is DEPRECATED please use the new merged fschmd - ("FSC Poseidon, Scylla, Hermes, Heimdall and Heracles") driver - instead. - - If you say yes here you get support for Fujitsu Siemens - Computers Hermes sensor chips. - - This driver can also be built as a module. If so, the module - will be called fscher. - -config SENSORS_FSCPOS - tristate "FSC Poseidon (DEPRECATED)" - depends on X86 && I2C - help - This driver is DEPRECATED please use the new merged fschmd - ("FSC Poseidon, Scylla, Hermes, Heimdall and Heracles") driver - instead. - - If you say yes here you get support for Fujitsu Siemens - Computers Poseidon sensor chips. - - This driver can also be built as a module. If so, the module - will be called fscpos. - config SENSORS_FSCHMD tristate "Fujitsu Siemens Computers sensor chips" depends on X86 && I2C
@@ -402,12 +373,12 @@ config SENSORS_GL520SM will be called gl520sm. config SENSORS_CORETEMP - tristate "Intel Core (2) Duo/Solo temperature sensor" - depends on X86 && EXPERIMENTAL + tristate "Intel Core/Core2/Atom temperature sensor" + depends on X86 && PCI && EXPERIMENTAL help If you say yes here you get support for the temperature - sensor inside your CPU. Supported all are all known variants - of Intel Core family. + sensor inside your CPU. Most of the family 6 CPUs + are supported. Check documentation/driver for details. config SENSORS_IBMAEM tristate "IBM Active Energy Manager temperature/power sensors and control"
@@ -702,6 +673,23 @@ config SENSORS_SHT15 This driver can also be built as a module. If so, the module will be called sht15. +config SENSORS_S3C + tristate "S3C24XX/S3C64XX Inbuilt ADC" + depends on ARCH_S3C2410 + help + If you say yes here you get support for the on-board ADCs of + the Samsung S3C24XX or S3C64XX series of SoC + + This driver can also be built as a module. If so, the module + will be called s3c-hwmo. + +config SENSORS_S3C_RAW + bool "Include raw channel attributes in sysfs" + depends on SENSORS_S3C + help + Say Y here if you want to include raw copies of all the ADC + channels in sysfs. + config SENSORS_SIS5595 tristate "Silicon Integrated Systems Corp. SiS5595" depends on PCI
@@ -797,6 +785,16 @@ config SENSORS_TMP401 This driver can also be built as a module. If so, the module will be called tmp401. +config SENSORS_TMP421 + tristate "Texas Instruments TMP421 and compatible" + depends on I2C && EXPERIMENTAL + help + If you say yes here you get support for Texas Instruments TMP421, + TMP422 and TMP423 temperature sensor chips. + + This driver can also be built as a module. If so, the module + will be called tmp421. + config SENSORS_VIA686A tristate "VIA686A" depends on PCI
@@ -920,6 +918,27 @@ config SENSORS_W83627EHF This driver can also be built as a module. If so, the module will be called w83627ehf. +config SENSORS_WM831X + tristate "WM831x PMICs" + depends on MFD_WM831X + help + If you say yes here you get support for the hardware + monitoring functionality of the Wolfson Microelectronics + WM831x series of PMICs. + + This driver can also be built as a module. If so, the module + will be called wm831x-hwmon. + +config SENSORS_WM8350 + tristate "Wolfson Microelectronics WM835x" + depends on MFD_WM8350 + help + If you say yes here you get support for the hardware + monitoring features of the WM835x series of PMICs. + + This driver can also be built as a module. If so, the module + will be called wm8350-hwmon. + config SENSORS_ULTRA45 tristate "Sun Ultra45 PIC16F747" depends on SPARC64
@@ -947,34 +966,6 @@ config SENSORS_HDAPS Say Y here if you have an applicable laptop and want to experience the awesome power of hdaps. -config SENSORS_LIS3LV02D - tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer" - depends on ACPI && INPUT - select INPUT_POLLDEV - select NEW_LEDS - select LEDS_CLASS - default n - help - This driver provides support for the LIS3LV02Dx accelerometer. In - particular, it can be found in a number of HP laptops, which have the - "Mobile Data Protection System 3D" or "3D DriveGuard" feature. On such - systems the driver should load automatically (via ACPI). The - accelerometer might also be found in other systems, connected via SPI - or I2C. The accelerometer data is readable via - /sys/devices/platform/lis3lv02d. - - This driver also provides an absolute input class device, allowing - the laptop to act as a pinball machine-esque joystick. On HP laptops, - if the led infrastructure is activated, support for a led indicating - disk protection will be provided as hp:red:hddprotection. - - This driver can also be built as modules. If so, the core module - will be called lis3lv02d and a specific module for HP laptops will be - called hp_accel. - - Say Y here if you have an applicable laptop and want to experience - the awesome power of lis3lv02d. - config SENSORS_LIS3_SPI tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer (SPI)" depends on !ACPI && SPI_MASTER && INPUT
@@ -1017,21 +1008,51 @@ config SENSORS_APPLESMC Say Y here if you have an applicable laptop and want to experience the awesome power of applesmc. -config SENSORS_HMC5843 - tristate "HMC5843 Compass Sensor Driver" - depends on I2C && ARCH_MSM_SCORPION - default n - help - HMC5843 Compass Sensor Driver implemented by Quanta. +if ACPI -config HWMON_DEBUG_CHIP - bool "Hardware Monitoring Chip debugging messages" +comment "ACPI drivers" + +config SENSORS_ATK0110 + tristate "ASUS ATK0110" + depends on X86 && EXPERIMENTAL + help + If you say yes here you get support for the ACPI hardware + monitoring interface found in many ASUS motherboards. This + driver will provide readings of fans, voltages and temperatures + through the system firmware. + + This driver can also be built as a module. If so, the module + will be called asus_atk0110. + +config SENSORS_LIS3LV02D + tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer" + depends on INPUT + select INPUT_POLLDEV + select NEW_LEDS + select LEDS_CLASS default n help - Say Y here if you want the I2C chip drivers to produce a bunch of - debug messages to the system log. Select this if you are having - a problem with I2C support and want to see more of what is going - on. + This driver provides support for the LIS3LV02Dx accelerometer. In + particular, it can be found in a number of HP laptops, which have the + "Mobile Data Protection System 3D" or "3D DriveGuard" feature. On such + systems the driver should load automatically (via ACPI). The + accelerometer might also be found in other systems, connected via SPI + or I2C. The accelerometer data is readable via + /sys/devices/platform/lis3lv02d. + + This driver also provides an absolute input class device, allowing + the laptop to act as a pinball machine-esque joystick. On HP laptops, + if the led infrastructure is activated, support for a led indicating + disk protection will be provided as hp:red:hddprotection. + + This driver can also be built as modules. If so, the core module + will be called lis3lv02d and a specific module for HP laptops will be + called hp_accel. + + Say Y here if you have an applicable laptop and want to experience + the awesome power of lis3lv02d. + +endif # ACPI config SENSORS_ISL29011 tristate "ISL29011 Light Sensor Driver"
@@ -1048,12 +1069,27 @@ config SENSORS_WPCE775X This driver provides support for the Winbond WPCE775XX Embedded Controller, which provides lcd backlight, LEDs, and Battery control. +config SENSORS_HMC5843 + tristate "HMC5843 Compass Sensor Driver" + depends on I2C && ARCH_MSM_SCORPION + default n + help + HMC5843 Compass Sensor Driver implemented by Quanta. + +config SENSORS_BOSCH_BMA150 + tristate "SMB380/BMA150 acceleration sensor support" + depends on I2C + default n + help + If you say yes here you get support for Bosch Sensortec's + acceleration sensors SMB380/BMA150. + config SENSORS_NPCE781X - tristate "NuvoTon WPCE775X" - depends on I2C - default n + tristate "NuvoTon WPCE775X" + depends on I2C + default n help - This driver provides support for the NuvoTon NPCE781X Embedded - Controller, which provides lcd backlight, LEDs, and Battery control. + This driver provides support for the NuvoTon NPCE781X Embedded + Controller, which provides lcd backlight, LEDs, and Battery control. endif # HWMON
drivers/hwmon/Makefile +12 -5
@@ -5,6 +5,10 @@ obj-$(CONFIG_HWMON) += hwmon.o obj-$(CONFIG_HWMON_VID) += hwmon-vid.o +# APCI drivers +obj-$(CONFIG_SENSORS_ATK0110) += asus_atk0110.o + +# Native drivers # asb100, then w83781d go first, as they can override other drivers' addresses. obj-$(CONFIG_SENSORS_ASB100) += asb100.o obj-$(CONFIG_SENSORS_W83627HF) += w83627hf.o
@@ -29,10 +33,8 @@ obj-$(CONFIG_SENSORS_ADT7462) += adt7462.o obj-$(CONFIG_SENSORS_ADT7470) += adt7470.o obj-$(CONFIG_SENSORS_ADT7473) += adt7473.o obj-$(CONFIG_SENSORS_ADT7475) += adt7475.o - obj-$(CONFIG_SENSORS_APPLESMC) += applesmc.o obj-$(CONFIG_SENSORS_AMS) += ams/ -obj-$(CONFIG_SENSORS_ATK0110) += asus_atk0110.o obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o obj-$(CONFIG_SENSORS_DME1737) += dme1737.o
@@ -40,9 +42,7 @@ obj-$(CONFIG_SENSORS_DS1621) += ds1621.o obj-$(CONFIG_SENSORS_F71805F) += f71805f.o obj-$(CONFIG_SENSORS_F71882FG) += f71882fg.o obj-$(CONFIG_SENSORS_F75375S) += f75375s.o -obj-$(CONFIG_SENSORS_FSCHER) += fscher.o obj-$(CONFIG_SENSORS_FSCHMD) += fschmd.o -obj-$(CONFIG_SENSORS_FSCPOS) += fscpos.o obj-$(CONFIG_SENSORS_G760A) += g760a.o obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o
@@ -76,6 +76,7 @@ obj-$(CONFIG_SENSORS_MAX6650) += max6650.o obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_PC87427) += pc87427.o obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o +obj-$(CONFIG_SENSORS_S3C) += s3c-hwmon.o obj-$(CONFIG_SENSORS_SHT15) += sht15.o obj-$(CONFIG_SENSORS_SIS5595) += sis5595.o obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc47b397.o
@@ -83,17 +84,23 @@ obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o obj-$(CONFIG_SENSORS_SMSC47M192)+= smsc47m192.o obj-$(CONFIG_SENSORS_THMC50) += thmc50.o obj-$(CONFIG_SENSORS_TMP401) += tmp401.o +obj-$(CONFIG_SENSORS_TMP421) += tmp421.o obj-$(CONFIG_SENSORS_VIA686A) += via686a.o obj-$(CONFIG_SENSORS_VT1211) += vt1211.o obj-$(CONFIG_SENSORS_VT8231) += vt8231.o obj-$(CONFIG_SENSORS_W83627EHF) += w83627ehf.o obj-$(CONFIG_SENSORS_W83L785TS) += w83l785ts.o obj-$(CONFIG_SENSORS_W83L786NG) += w83l786ng.o +obj-$(CONFIG_SENSORS_WM831X) += wm831x-hwmon.o +obj-$(CONFIG_SENSORS_WM8350) += wm8350-hwmon.o obj-$(CONFIG_SENSORS_ISL29011) += isl29011.o -obj-$(CONFIG_SENSORS_HMC5843) += hmc5843.o obj-$(CONFIG_SENSORS_WPCE775X) += wpce775x.o obj-$(CONFIG_SENSORS_NPCE781X) += npce781x.o +obj-$(CONFIG_SENSORS_BOSCH_BMA150) += bma150.o +obj-$(CONFIG_SENSORS_HMC5843) += hmc5843.o ifeq ($(CONFIG_HWMON_DEBUG_CHIP),y) EXTRA_CFLAGS += -DDEBUG endif + +bma150-objs := bma150_driver.o smb380.o smb380calib.o
Signature · 1 line
1.7.0.4
RFC 30/36 Enable EC gravitation sensor
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +9 -3
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Mon Jun 14 18:42:30 2010 +# Tue Jun 15 17:30:06 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -995,6 +995,11 @@ CONFIG_POWER_SUPPLY=y # CONFIG_BATTERY_MAX17040 is not set CONFIG_HWMON=y # CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# # CONFIG_SENSORS_AD7414 is not set # CONFIG_SENSORS_AD7418 is not set # CONFIG_SENSORS_ADCXX is not set
@@ -1046,6 +1051,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_ADS7828 is not set # CONFIG_SENSORS_THMC50 is not set # CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set # CONFIG_SENSORS_VT1211 is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83791D is not set
@@ -1056,10 +1062,10 @@ CONFIG_HWMON=y # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set # CONFIG_SENSORS_LIS3_SPI is not set -CONFIG_SENSORS_HMC5843=y -# CONFIG_HWMON_DEBUG_CHIP is not set CONFIG_SENSORS_ISL29011=y # CONFIG_SENSORS_WPCE775X is not set +CONFIG_SENSORS_HMC5843=y +CONFIG_SENSORS_BOSCH_BMA150=y CONFIG_SENSORS_NPCE781X=y # CONFIG_THERMAL is not set # CONFIG_WATCHDOG is not set
Signature · 1 line
1.7.0.4
RFC 31/36 0.1.1
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/mach-msm/version.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-msm/version.c +1 -1
@@ -12,7 +12,7 @@#include "smd_private.h" #define KERNEL_VERSION UTS_RELEASE -#define IMAGE_VERSION "0.1.0" +#define IMAGE_VERSION "0.1.1"static int version_proc_show (struct seq_file *m,void *v) {
Signature · 1 line
1.7.0.4
RFC 32/36 Enable MMC1 HW detection
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +2 -2
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Tue Jun 15 17:30:06 2010 +# Mon Jun 28 14:46:18 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1579,7 +1579,7 @@ CONFIG_MMC_BLOCK_PARANOID_RESUME=y CONFIG_MMC_MSM=y # CONFIG_MMC_MSM7X00A_RESUME_IN_WQ is not set # CONFIG_MMC_MSM_SDIO_SUPPORT is not set -# CONFIG_MMC_MSM_CARD_HW_DETECTION is not set +CONFIG_MMC_MSM_CARD_HW_DETECTION=y CONFIG_MMC_MSM_SDC1_SUPPORT=y # CONFIG_MMC_MSM_SDC1_8_BIT_SUPPORT is not set # CONFIG_MMC_MSM_SDC1_DUMMY52_REQUIRED is not set
Signature · 1 line
1.7.0.4
RFC 33/36 0.1.2
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/mach-msm/version.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-msm/version.c +1 -1
@@ -12,7 +12,7 @@#include "smd_private.h" #define KERNEL_VERSION UTS_RELEASE -#define IMAGE_VERSION "0.1.1" +#define IMAGE_VERSION "0.1.2"static int version_proc_show (struct seq_file *m,void *v) {
Signature · 1 line
1.7.0.4
RFC 34/36 Adding newer version battery driver
In reply to Wayne LinFrom: wayne <[email protected]>
--- drivers/power/Kconfig | 2 +- drivers/power/qci_battery.c | 681 +++++++++++++++++++++---------------------- drivers/power/qci_battery.h | 128 +++++---- 3 files changed, 393 insertions(+), 418 deletions(-)
drivers/power/Kconfig +1 -1
@@ -112,7 +112,7 @@ config CHARGER_PCF50633 config BATTERY_QCIBAT tristate "Quanta Computer Inc. Battery" - depends on SENSORS_WPCE775X && ARCH_MSM_SCORPION + depends on SENSORS_NPCE781X && ARCH_MSM_SCORPION default n help Say Y here if you want to use the Quanta battery driver for ST15
drivers/power/qci_battery.c +325 -356
681 lines not on this page · raw message
drivers/power/qci_battery.h +67 -61
128 lines not on this page · raw message
Signature · 1 line
1.7.0.4
RFC 35/36 Enable EC battery
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/configs/qsd8650a-st1_5_defconfig | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/configs/qsd8650a-st1_5_defconfig +6 -4
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Mon Jun 28 14:46:18 2010 +# Wed Jul 21 15:20:49 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -993,6 +993,7 @@ CONFIG_POWER_SUPPLY=y # CONFIG_BATTERY_DS2782 is not set # CONFIG_BATTERY_BQ27x00 is not set # CONFIG_BATTERY_MAX17040 is not set +CONFIG_BATTERY_QCIBAT=y CONFIG_HWMON=y # CONFIG_HWMON_VID is not set # CONFIG_HWMON_DEBUG_CHIP is not set
@@ -1572,13 +1573,14 @@ CONFIG_MMC_BLOCK_PARANOID_RESUME=y # # MMC/SD/SDIO Host Controller Drivers # -# CONFIG_MMC_SDHCI is not set +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y # CONFIG_MMC_AT91 is not set # CONFIG_MMC_ATMELMCI is not set # CONFIG_MMC_SPI is not set CONFIG_MMC_MSM=y -# CONFIG_MMC_MSM7X00A_RESUME_IN_WQ is not set -# CONFIG_MMC_MSM_SDIO_SUPPORT is not set +CONFIG_MMC_MSM7X00A_RESUME_IN_WQ=y +CONFIG_MMC_MSM_SDIO_SUPPORT=y CONFIG_MMC_MSM_CARD_HW_DETECTION=y CONFIG_MMC_MSM_SDC1_SUPPORT=y # CONFIG_MMC_MSM_SDC1_8_BIT_SUPPORT is not set
Signature · 1 line
1.7.0.4
RFC 36/36 0.2.0
In reply to Wayne LinFrom: wayne <[email protected]>
--- arch/arm/mach-msm/version.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-msm/version.c +1 -1
@@ -12,7 +12,7 @@#include "smd_private.h" #define KERNEL_VERSION UTS_RELEASE -#define IMAGE_VERSION "0.1.2" +#define IMAGE_VERSION "0.2.0"static int version_proc_show (struct seq_file *m,void *v) {
Signature · 1 line
1.7.0.4
RE: [RFC 36/36] [Driver][Qualcomm 1070][VERSION] 0.2.0
Quoted 10 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Wayne Lin
Sent: Monday, July 26, 2010 2:01 PM
To: [email protected]
Cc: wayne
Subject: [RFC 36/36] [Driver][Qualcomm 1070][VERSION] 0.2.0From: wayne <[email protected]>
I haven't looked at all the patches, but I see may patches that are changing only 1 or 2 lines. Do these really need to separated as such?
If you collate patches functionally, having description would also help.
Also, I noticed many changes to the defconfigs. You may want to take a look at this discussion:
http://amailbox.org/mailarchive/linux-kernel/2010/6/6/4579948
~sanjeev
Quoted 26 lines
--- arch/arm/mach-msm/version.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-msm/version.c +1
-1@@ -12,7 +12,7 @@#include "smd_private.h" #define KERNEL_VERSION UTS_RELEASE -#define IMAGE_VERSION "0.1.2" +#define IMAGE_VERSION "0.2.0"static int version_proc_show (struct seq_file *m,void *v) {Signature · 7 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [RFC 36/36] [Driver][Qualcomm 1070][VERSION] 0.2.0
In reply to Wayne LinQuoted 21 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Wayne Lin
Sent: Monday, July 26, 2010 2:01 PM
To: [email protected]
Cc: wayne
Subject: [RFC 36/36] [Driver][Qualcomm 1070][VERSION] 0.2.0From: wayne <[email protected]>
--- arch/arm/mach-msm/version.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-msm/version.c +0
-0
arch/arm/mach-msm/version.c line 16
Quoted 6 lines
arch/arm/mach-msm/version.c +1
-1@@ -12,7 +12,7 @@#include "smd_private.h" #define KERNEL_VERSION UTS_RELEASE -#define IMAGE_VERSION "0.1.2" +#define IMAGE_VERSION "0.2.0"
[sp] I see 3 patches that are successively changing the same version number.
Quoted 11 lines
arch/arm/mach-msm/version.c +0
-0static int version_proc_show (struct seq_file *m,void *v) {Signature · 7 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html