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 <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207906
Reviewed-by: Sameer Nanda <snanda@chromium.org>
This commit is contained in:
Duncan Laurie
2014-07-14 15:06:44 -07:00
committed by chrome-internal-fetch
parent 7301d2bd37
commit dc3778cb19

View File

@@ -29,7 +29,6 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/platform_data/pn544.h>
#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);