Revert "Set up OWNERS" am: c1171c3553

Original change: https://partner-android-review.googlesource.com/c/kernel/private/google-modules/nfc/+/2687654

Change-Id: Iada3c90b6d2a247c71d1e6349e47f359c6fdfabb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/BUILD.bazel b/BUILD.bazel
index 0160167..856cacd 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -7,9 +7,9 @@
     srcs = glob([
         "**/*.c",
         "**/*.h",
+    ]) + [
         "Kbuild",
         "ese/Kbuild",
-    ]) + [
         "//private/google-modules/soc/gs:gs_soc_headers",
     ],
     outs = [
diff --git a/ese/st33spi.c b/ese/st33spi.c
index d4fe427..64c6215 100644
--- a/ese/st33spi.c
+++ b/ese/st33spi.c
@@ -28,6 +28,8 @@
 #include <linux/of_device.h>
 #include <linux/acpi.h>
 
+#include <linux/pinctrl/consumer.h>
+
 #include <linux/spi/spi.h>
 #include <linux/spi/spidev.h>
 
@@ -1171,7 +1173,7 @@
 	return status;
 }
 
-static int st33spi_remove(struct spi_device *spi)
+static void st33spi_remove(struct spi_device *spi)
 {
 	struct st33spi_data *st33spi = spi_get_drvdata(spi);
 
@@ -1194,8 +1196,6 @@
 #endif
 	}
 	mutex_unlock(&device_list_lock);
-
-	return 0;
 }
 
 static struct spi_driver st33spi_spi_driver = {
diff --git a/ese/st54spi.c b/ese/st54spi.c
index 932486d..d6500f3 100644
--- a/ese/st54spi.c
+++ b/ese/st54spi.c
@@ -69,6 +69,9 @@
 
 #define ST54SPI_IOC_RD_POWER _IOR(SPI_IOC_MAGIC, 99, __u32)
 #define ST54SPI_IOC_WR_POWER _IOW(SPI_IOC_MAGIC, 99, __u32)
+#define ST54SPI_GET_CHIP_EN_VALUE _IOR(SPI_IOC_MAGIC, 98, __u32)
+#define ST54SPI_SET_CHIP_EN_VALUE _IOW(SPI_IOC_MAGIC, 98, __u32)
+#define ST54SPI_CHIP_EN_PULSE_RESET _IO(SPI_IOC_MAGIC, 97)
 
 /* Bit masks for spi_device.mode management.  Note that incorrect
  * settings for some settings can cause *lots* of trouble for other
@@ -104,6 +107,9 @@
 	/* GPIO for SE_POWER_REQ / SE_nRESET */
 	struct gpio_desc *gpiod_se_reset;
 
+	/* GPIO for SE_CHIP_EN */
+	struct gpio_desc *gpiod_se_chip_en;
+
 	int power_gpio_mode;
 	int power_gpio;
 	int nfcc_needs_poweron;
@@ -127,7 +133,7 @@
 
 #define VERBOSE 0
 
-#define DRIVER_VERSION "2.2.1"
+#define DRIVER_VERSION "2.3.0"
 
 /*-------------------------------------------------------------------------*/
 
@@ -643,6 +649,36 @@
 				 tmp);
 		}
 		break;
+	case ST54SPI_GET_CHIP_EN_VALUE:
+		if (!IS_ERR(st54spi->gpiod_se_chip_en)) {
+			retval = gpiod_get_value(st54spi->gpiod_se_chip_en);
+			dev_dbg(&st54spi->spi->dev, "SE_CHIP_ENABLE get: %d\n", retval);
+		} else {
+			retval = -ENODEV;
+		}
+		break;
+	case ST54SPI_SET_CHIP_EN_VALUE:
+		if (!IS_ERR(st54spi->gpiod_se_chip_en)) {
+			dev_dbg(&st54spi->spi->dev, "SE_CHIP_ENABLE set: %lu\n", arg);
+			if ((arg == 0) || (arg == 1)) {
+				gpiod_set_value(st54spi->gpiod_se_chip_en, arg);
+			} else {
+				retval = -ENOIOCTLCMD;
+			}
+		} else {
+			retval = -ENODEV;
+		}
+		break;
+	case ST54SPI_CHIP_EN_PULSE_RESET:
+		if (!IS_ERR(st54spi->gpiod_se_chip_en)) {
+			dev_dbg(&st54spi->spi->dev, "ST54SPI_CHIP_EN_PULSE_RESET\n");
+			gpiod_set_value(st54spi->gpiod_se_chip_en, 0);
+			usleep_range(2000, 3000);
+			gpiod_set_value(st54spi->gpiod_se_chip_en, 1);
+		} else {
+			retval = -ENODEV;
+		}
+		break;
 	default:
 		/* segmented and/or full-duplex I/O request */
 		/* Check message and copy into scratch area */
@@ -981,6 +1017,9 @@
 		dev_err(dev, "%s: ST54H mode not supported", __FILE__);
 	}
 	if (pdata->power_gpio_mode == POWER_MODE_ST54L) {
+		/* Optional se_chip_en Gpio */
+		pdata->gpiod_se_chip_en =
+			devm_gpiod_get(dev, "ese_chip_enable", GPIOD_OUT_HIGH);
 		pdata->pinctrl = devm_pinctrl_get(dev);
 		if (IS_ERR(pdata->pinctrl)) {
 			dev_err(dev, "could not get pinctrl\n");
@@ -1098,7 +1137,7 @@
 	return status;
 }
 
-static int st54spi_remove(struct spi_device *spi)
+static void st54spi_remove(struct spi_device *spi)
 {
 	struct st54spi_data *st54spi = spi_get_drvdata(spi);
 
@@ -1121,8 +1160,6 @@
 #endif
 	}
 	mutex_unlock(&device_list_lock);
-
-	return 0;
 }
 
 static struct spi_driver st54spi_spi_driver = {
diff --git a/st21nfc.c b/st21nfc.c
index db669bd..efd5fff 100644
--- a/st21nfc.c
+++ b/st21nfc.c
@@ -899,6 +899,8 @@
 	if (st21nfc_dev == NULL)
 		return -ENOMEM;
 
+	dev->init_name = "i2c-st21nfc";
+
 	/* store for later use */
 	st21nfc_dev->client = client;
 	st21nfc_dev->r_state_current = ST21NFC_HEADER;
@@ -1081,7 +1083,7 @@
 	return ret;
 }
 
-static int st21nfc_remove(struct i2c_client *client)
+static void st21nfc_remove(struct i2c_client *client)
 {
 	struct st21nfc_device *st21nfc_dev = i2c_get_clientdata(client);
 
@@ -1095,8 +1097,6 @@
 	sysfs_remove_group(&client->dev.kobj, &st21nfc_attr_grp);
 	mutex_destroy(&st21nfc_dev->read_mutex);
 	acpi_dev_remove_driver_gpios(ACPI_COMPANION(&client->dev));
-
-	return 0;
 }
 
 static int st21nfc_suspend(struct device *device)