#define LEVEL_TRIGGER_LOW 0x2\r
#define LEVEL_TRIGGER_HIGH 0x3\r
\r
+#define GPIO_LDO1P8_EN (1)
+#define GPIO_LDO3P3_EN (1)\r
\r
struct ioctl_cmd {\r
int int_mode;\r
\r
if (etspi != NULL) {\r
/* initial 18V power pin */\r
-#if 0 \r
- status = gpio_request(etspi->vdd_18v_Pin, "18v-gpio");\r
+#if GPIO_LDO1P8_EN
+ status = gpio_request(etspi->vdd_18v_Pin, "fp_18v-gpio");\r
if (status < 0) {\r
pr_err("%s gpio_requset vdd_18v_Pin failed\n",\r
__func__);\r
gpio_set_value(etspi->vdd_18v_Pin, 1);\r
pr_err("etspi: vdd_18v_Pin set to high\n");\r
mdelay(1);\r
+#endif\r
+#if GPIO_LDO3P3_EN\r
/* initial 33V power pin */\r
- status = gpio_request(etspi->vcc_33v_Pin, "33v-gpio");\r
+ status = gpio_request(etspi->vcc_33v_Pin, "fp_33v-gpio");\r
if (status < 0) {\r
pr_err("%s gpio_requset vcc_33v_Pin failed\n",\r
__func__);\r
#endif\r
\r
/* Initial Reset Pin*/\r
- status = gpio_request(etspi->rstPin, "ets_reset-gpio");\r
+ status = gpio_request(etspi->rstPin, "fp_reset-gpio");\r
if (status < 0) {\r
pr_err("%s gpio_requset etspi_Reset failed\n",\r
__func__);\r
pr_err("etspi: reset to high\n");\r
\r
/* Initial IRQ Pin*/\r
- status = gpio_request(etspi->irqPin, "ets_irq-gpio");\r
+ status = gpio_request(etspi->irqPin, "fp_irq-gpio");\r
if (status < 0) {\r
pr_err("%s gpio_request etspi_irq failed\n",\r
__func__);\r
\r
etspi_platformInit_gpio_init_failed:\r
gpio_free(etspi->irqPin);\r
-// gpio_free(etspi->vcc_33v_Pin);\r
-// gpio_free(etspi->vdd_18v_Pin);\r
+#if GPIO_LDO3P3_EN\r
+ gpio_free(etspi->vcc_33v_Pin);\r
+#endif\r
+#if GPIO_LDO1P8_EN
+ gpio_free(etspi->vdd_18v_Pin);\r
+#endif\r
etspi_platformInit_irq_failed:\r
gpio_free(etspi->rstPin);\r
etspi_platformInit_rst_failed:\r
data->irqPin = gpio;\r
DEBUG_PRINT("%s: drdyPin=%d\n", __func__, data->irqPin);\r
}\r
-/*\r
+#if GPIO_LDO3P3_EN\r
gpio = of_get_named_gpio(np, "egistec,gpio_ldo3p3_en", 0);\r
if (gpio < 0) {\r
errorno = gpio;\r
data->vcc_33v_Pin = gpio;\r
pr_info("%s: 3.3v power pin=%d\n", __func__, data->vcc_33v_Pin);\r
}\r
+#endif\r
+#if GPIO_LDO1P8_EN
gpio = of_get_named_gpio(np, "egistec,gpio_ldo1p8_en", 0);\r
if (gpio < 0) {\r
errorno = gpio;\r
data->vdd_18v_Pin = gpio;\r
pr_info("%s: 18v power pin=%d\n", __func__, data->vdd_18v_Pin);\r
}\r
-*/ \r
+#endif
DEBUG_PRINT("%s is successful\n", __func__);\r
return errorno;\r
dt_exit:\r