Thread (2 messages) 2 messages, 2 authors, 2016-02-23

Re: [V4] Input: Add MELFAS MIP4 Touchscreen driver

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2016-02-23 23:18:22

Hi,

On Mon, Feb 15, 2016 at 10:40:45PM +0900, Sangwon Jee wrote:
This is an input driver for MELFAS MIP4 Touchscreen devices,
made by the original vendor, MELFAS.

MIP4 means MELFAS Interface Protocol Version 4.
MELFAS MMS400, MMS500, MCS8000, MIT200, MIT300, MIT400, MFS10 and other
recent touchscreen devices are using MIP4 and supported by this driver.

There are two MELFAS touchscreen drivers(mcs5000_ts, mms114) in the kernel.
But those drivers are for discontinued models and not supported by MELFAS.

Signed-off-by: Sangwon Jee <redacted>
As you may have noticed I ended up applying the previous version of the
driver. Any additional changes should be made against the version in my
'next' branch or linux-next.
+static ssize_t mip4_sysfs_read_hw_version(struct device *dev,
+					  struct device_attribute *attr,
+					  char *buf)
+{
+	struct i2c_client *client = to_i2c_client(dev);
+	struct mip4_ts *ts = i2c_get_clientdata(client);
+	size_t count;
+
+	/* Take lock to prevent racing with firmware update */
+	mutex_lock(&ts->input->mutex);
+
+	count = snprintf(buf, PAGE_SIZE, "%s\n", "MIT400");
+
+	mutex_unlock(&ts->input->mutex);
+
+	return count;
+}
It is unclear why we need basically a constant attribute.

Thanks.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help