diff --git a/drivers/input/fingerprint/gx556/Makefile b/drivers/input/fingerprint/gx556/Makefile index 52eaaea1e..b600fb88e 100755 --- a/drivers/input/fingerprint/gx556/Makefile +++ b/drivers/input/fingerprint/gx556/Makefile @@ -9,6 +9,6 @@ subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/include subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat subdir-ccflags-y += -I$(srctree)/drivers/spi/mediatek/$(MTK_PLATFORM) -subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/mt6735/ +subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/mt6757/ obj-y += gf_spi.o platform.o diff --git a/drivers/input/fingerprint/gx556/gf_spi.c b/drivers/input/fingerprint/gx556/gf_spi.c index 48a30f0cd..add59606f 100755 --- a/drivers/input/fingerprint/gx556/gf_spi.c +++ b/drivers/input/fingerprint/gx556/gf_spi.c @@ -55,7 +55,7 @@ #define GF_SPIDEV_NAME "goodix,fingerprint" /*device name after register in charater*/ #define GF_DEV_NAME "goodix_fp" -#define GF_INPUT_NAME "qwerty" /*"goodix_fp" */ +#define GF_INPUT_NAME "gf-input" /*"goodix_fp" */ #define SPI_DEV_NAME "spidev" #define CHRD_DRIVER_NAME "goodix_fp_spi" @@ -362,7 +362,7 @@ static SPI_SPEED trans_spi_speed(unsigned int speed) spi_speed = SPEED_4MHZ; } - //printk("%s , speed_in=%l, speed_out=%l\n", __func__, speed, spi_speed); + printk("%s , speed_in=%d, speed_out=%d\n",__func__, speed, spi_speed); return spi_speed; } @@ -842,7 +842,7 @@ static int gf_open(struct inode *inode, struct file *filp) gf_print("Succeed to open device. irq = %d, users:%d\n", gf_dev->spi->irq, gf_dev->users); if (gf_dev->users == 1){ - //gf_enable_irq(gf_dev); + gf_enable_irq(gf_dev); } } } else { @@ -1086,7 +1086,7 @@ int gf_read_chip_id(struct gf_dev *pdev) gf_spi_read_word(pdev, 0x0142, &val); gf_print("goodix-chip id: 0x%x \n", val); - if((val >> 4) == (0x12a1 >> 4)) { + if(val == 0x0) { return 0; } printk(KERN_ERR"3goodix-chip id: 0x%x \n", val); diff --git a/drivers/input/fingerprint/gx556/gf_spi.h b/drivers/input/fingerprint/gx556/gf_spi.h index f174a4633..c0e62308a 100755 --- a/drivers/input/fingerprint/gx556/gf_spi.h +++ b/drivers/input/fingerprint/gx556/gf_spi.h @@ -56,12 +56,12 @@ #ifdef GF_DEBUG #define gf_print(fmt, args...) do { \ - printk(KERN_ERR"gf5216_spi:" fmt, ##args);\ + printk(KERN_ERR"gx556:" fmt, ##args);\ } while (0) //#define gf_print(args...) printk(KERN_ERR "gf_spi:" ##args) -#define FUNC_ENTRY() printk(KERN_ERR "gf5216_spi:%s, entry\n", __func__) -#define FUNC_EXIT() printk(KERN_ERR "gf5216_spi:%s, exit\n", __func__) +#define FUNC_ENTRY() printk(KERN_ERR "gx556:%s, entry\n", __func__) +#define FUNC_EXIT() printk(KERN_ERR "gx556:%s, exit\n", __func__) #else #define gf_print(fmt, args...) #define FUNC_ENTRY() @@ -148,10 +148,10 @@ struct gf_dev { unsigned int isPowerOn; struct regulator *avdd; struct pinctrl *pinctrl1; - struct pinctrl_state *pins_default; + struct pinctrl_state *fp_default; struct pinctrl_state *eint_as_int, *eint_in_low, *eint_in_high, *eint_in_float, *fp_rst_low, *fp_rst_high, - *miso_pull_up,*miso_pull_disable,*fp_enable_high,*fp_enable_low,*fp_enable1v8_high,*fp_enable1v8_low; + *miso_pull_up,*miso_pull_disable,*fp_enable_high,*fp_enable_low; }; diff --git a/drivers/input/fingerprint/gx556/platform.c b/drivers/input/fingerprint/gx556/platform.c index 34734ed86..ee5d03bad 100755 --- a/drivers/input/fingerprint/gx556/platform.c +++ b/drivers/input/fingerprint/gx556/platform.c @@ -24,7 +24,7 @@ int gf_parse_dts(struct gf_dev* pdev) FUNC_ENTRY(); if(pdev->spi->dev.of_node == NULL) { - pdev->spi->dev.of_node = of_find_compatible_node(NULL, NULL, "mediatek,goodix"); + pdev->spi->dev.of_node = of_find_compatible_node(NULL, NULL, "mediatek,fingerprint"); } if(pdev->spi->dev.of_node) { @@ -96,19 +96,6 @@ int gf_parse_dts(struct gf_dev* pdev) dev_err(&pdev->spi->dev, " Cannot find fp pinctrl fp_enable_low!\n"); return ret; } - pdev->fp_enable1v8_high = pinctrl_lookup_state(pdev->pinctrl1, "fp_enable1v8_high"); - if (IS_ERR(pdev->fp_enable1v8_high)) { - ret = PTR_ERR(pdev->fp_enable1v8_high); - dev_err(&pdev->spi->dev, " Cannot find fp pinctrl fp_enable1v8_high!\n"); - return ret; - } - pdev->fp_enable1v8_low = pinctrl_lookup_state(pdev->pinctrl1, "fp_enable1v8_low"); - if (IS_ERR(pdev->fp_enable1v8_low)) { - ret = PTR_ERR(pdev->fp_enable1v8_low); - dev_err(&pdev->spi->dev, " Cannot find fp pinctrl fp_enable1v8_low!\n"); - return ret; - } - } else { @@ -285,12 +272,10 @@ void gf_power_output(struct gf_dev *pdev, int level) if (level) { pinctrl_select_state(pdev->pinctrl1, pdev->fp_enable_high); - pinctrl_select_state(pdev->pinctrl1, pdev->fp_enable1v8_high); } else { pinctrl_select_state(pdev->pinctrl1, pdev->fp_enable_low); - pinctrl_select_state(pdev->pinctrl1, pdev->fp_enable1v8_low); } mutex_unlock(&gf_set_gpio_mutex); }