From: phc Date: Tue, 3 May 2011 09:39:00 +0000 (+0800) Subject: RK29MobileSDK:update mtk23d_ioctl of mtk23d.c X-Git-Tag: firefly_0821_release~10374 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=64c815a1e0f900380d08ce28fc89b7da3ffe8cfd;p=firefly-linux-kernel-4.4.55.git RK29MobileSDK:update mtk23d_ioctl of mtk23d.c --- diff --git a/drivers/misc/mtk23d.c b/drivers/misc/mtk23d.c index 8f92768267b8..0367884e40c9 100755 --- a/drivers/misc/mtk23d.c +++ b/drivers/misc/mtk23d.c @@ -166,24 +166,24 @@ static int mtk23d_ioctl(struct inode *inode,struct file *file, unsigned int cmd, printk("mtk23d_ioctl\n"); switch(cmd) { - case MTK23D_RESET: - gpio_direction_output(pdata->bp_power, GPIO_HIGH); - mdelay(100); - gpio_direction_output(pdata->bp_reset, GPIO_LOW); - mdelay(100); - gpio_set_value(pdata->bp_reset, GPIO_HIGH); - msleep(4000); - gpio_set_value(pdata->bp_power, GPIO_LOW); - break; - case MTK23D_IMEI_READ: - if(copy_to_user(argp, &(imei_value[0]), 16)) - { - printk("ERROR: copy_to_user---%s\n", __FUNCTION__); - return -EFAULT; - } - break; - default: - break; + case MTK23D_RESET: + gpio_set_value(gpdata->bp_power, pdata->bp_power_active_low? GPIO_LOW:GPIO_HIGH); + mdelay(100); + gpio_direction_output(pdata->bp_reset, pdata->bp_reset_active_low? GPIO_LOW:GPIO_HIGH); + mdelay(100); + gpio_set_value(pdata->bp_reset, pdata->bp_reset_active_low? GPIO_HIGH:GPIO_LOW); + msleep(4000); + gpio_set_value(gpdata->bp_power, pdata->bp_power_active_low? GPIO_HIGH:GPIO_LOW); + break; + case MTK23D_IMEI_READ: + if(copy_to_user(argp, &(imei_value[0]), 16)) + { + printk("ERROR: copy_to_user---%s\n", __FUNCTION__); + return -EFAULT; + } + break; + default: + break; } return 0; }