From dc3778cb19cfc765c68686713123e6ca631ca6a2 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 14 Jul 2014 15:06:44 -0700 Subject: [PATCH] CHROMIUM: chromeos-laptop: Remove pn544 code This is left over from proto boards and should be removed. Also the trailing entry in the DMI table was removed in the previous commit so it is added back. BUG=chrome-os-partner:30586 TEST=build for samus, verify that there are no warnings about unused variables. Change-Id: I723eec1db00cce7ddd12554b28763fe146ab05ec Signed-off-by: Duncan Laurie Reviewed-on: https://chromium-review.googlesource.com/207906 Reviewed-by: Sameer Nanda --- drivers/platform/chrome/chromeos_laptop.c | 86 +---------------------- 1 file changed, 2 insertions(+), 84 deletions(-) diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c index f2193d3492f0..009b084a42a9 100644 --- a/drivers/platform/chrome/chromeos_laptop.c +++ b/drivers/platform/chrome/chromeos_laptop.c @@ -29,7 +29,6 @@ #include #include #include -#include #define ATMEL_TP_I2C_ADDR 0x4b #define ATMEL_TP_I2C_BL_ADDR 0x25 @@ -38,7 +37,6 @@ #define CYAPA_TP_I2C_ADDR 0x67 #define ISL_ALS_I2C_ADDR 0x44 #define TAOS_ALS_I2C_ADDR 0x29 -#define PN544_HCI_I2C_ADDR 0x28 #define MAX_I2C_DEVICE_DEFERRALS 5 @@ -114,87 +112,6 @@ static struct i2c_board_info atmel_1664s_device = { .flags = I2C_CLIENT_WAKE, }; -static int nfc_gpio_enable = -1; -static int nfc_gpio_fw_reset = -1; -static int nfc_gpio_irq = -1; - -static int pn544_get_gpio(int type) -{ - switch (type) { - case NFC_GPIO_ENABLE: - return nfc_gpio_enable; - case NFC_GPIO_FW_RESET: - return nfc_gpio_fw_reset; - case NFC_GPIO_IRQ: - return nfc_gpio_irq; - } - return -1; -} - -static int pn544_request_resources(struct i2c_client *client) -{ - int ret; - - ret = gpio_request_one(pn544_get_gpio(NFC_GPIO_ENABLE), - GPIOF_OUT_INIT_LOW, - "NFC enable"); - if (ret < 0) - return ret; - - ret = gpio_request_one(pn544_get_gpio(NFC_GPIO_FW_RESET), - GPIOF_OUT_INIT_LOW, - "NFC FW reset"); - if (ret < 0) - goto fail_free_enable; - - ret = gpio_request_one(pn544_get_gpio(NFC_GPIO_IRQ), - GPIOF_IN, - "NFC interrupt"); - if (ret < 0) - goto fail_free_reset; - - client->irq = gpio_to_irq(pn544_get_gpio(NFC_GPIO_IRQ)); - return 0; - -fail_free_reset: - gpio_free(pn544_get_gpio(NFC_GPIO_FW_RESET)); -fail_free_enable: - gpio_free(pn544_get_gpio(NFC_GPIO_ENABLE)); - return ret; -} - -static void pn544_free_resources(void) -{ - gpio_free(pn544_get_gpio(NFC_GPIO_IRQ)); - gpio_free(pn544_get_gpio(NFC_GPIO_FW_RESET)); - gpio_free(pn544_get_gpio(NFC_GPIO_ENABLE)); -} - -static void pn544_enable(int fw) -{ - gpio_set_value(pn544_get_gpio(NFC_GPIO_ENABLE), 1); - gpio_set_value(pn544_get_gpio(NFC_GPIO_FW_RESET), !!fw); -} - -static void pn544_disable(void) -{ - gpio_set_value(pn544_get_gpio(NFC_GPIO_ENABLE), 0); -} - -static struct pn544_nfc_platform_data pn544_platform_data = { - .request_resources = pn544_request_resources, - .free_resources = pn544_free_resources, - .enable = pn544_enable, - .disable = pn544_disable, - .get_gpio = pn544_get_gpio, -}; - -static struct i2c_board_info pn544_hci_device = { - I2C_BOARD_INFO("pn544", PN544_HCI_I2C_ADDR), - .platform_data = &pn544_platform_data, - .flags = I2C_CLIENT_WAKE, -}; - static struct i2c_client *__add_probed_i2c_device( const char *name, int bus, @@ -677,7 +594,8 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_NAME, "Bolt"), }, _CBDD(bolt), - } + }, + { } }; MODULE_DEVICE_TABLE(dmi, chromeos_laptop_dmi_table);