View | Details | Raw Unified | Return to bug 204771 | Differences between
and this patch

Collapse All | Expand All

(-)a/Documentation/devicetree/bindings/input/elan_i2c.txt (+1 lines)
Lines 17-22 Optional properties: Link Here
17
- elan,middle-button: touchpad has a physical middle button
17
- elan,middle-button: touchpad has a physical middle button
18
- elan,x_traces: number of antennas on the x axis
18
- elan,x_traces: number of antennas on the x axis
19
- elan,y_traces: number of antennas on the y axis
19
- elan,y_traces: number of antennas on the y axis
20
- elan,product_id: the product ID of the touchpad
20
- some generic touchscreen properties [2]:
21
- some generic touchscreen properties [2]:
21
  * touchscreen-size-x
22
  * touchscreen-size-x
22
  * touchscreen-size-y
23
  * touchscreen-size-y
(-)a/drivers/input/mouse/elan_i2c_core.c (-3 / +8 lines)
Lines 209-219 static int elan_sleep(struct elan_tp_data *data) Link Here
209
209
210
static int elan_query_product(struct elan_tp_data *data)
210
static int elan_query_product(struct elan_tp_data *data)
211
{
211
{
212
	struct i2c_client *client = data->client;
212
	int error;
213
	int error;
213
214
214
	error = data->ops->get_product_id(data->client, &data->product_id);
215
	if (device_property_read_u16(&client->dev, "elan,product_id",
215
	if (error)
216
				     &data->product_id)) {
216
		return error;
217
		error = data->ops->get_product_id(data->client,
218
						  &data->product_id);
219
		if (error)
220
			return error;
221
	}
217
222
218
	error = data->ops->get_sm_version(data->client, &data->ic_type,
223
	error = data->ops->get_sm_version(data->client, &data->ic_type,
219
					  &data->sm_version, &data->clickpad);
224
					  &data->sm_version, &data->clickpad);
(-)a/drivers/input/mouse/elantech.c (-2 / +4 lines)
Lines 1783-1794 static int elantech_create_smbus(struct psmouse *psmouse, Link Here
1783
				 struct elantech_device_info *info,
1783
				 struct elantech_device_info *info,
1784
				 bool leave_breadcrumbs)
1784
				 bool leave_breadcrumbs)
1785
{
1785
{
1786
	struct property_entry i2c_props[11] = {};
1786
	struct property_entry i2c_props[12] = {};
1787
	struct i2c_board_info smbus_board = {
1787
	struct i2c_board_info smbus_board = {
1788
		I2C_BOARD_INFO("elan_i2c", 0x15),
1788
		I2C_BOARD_INFO("elan_i2c", 0x15),
1789
		.flags = I2C_CLIENT_HOST_NOTIFY,
1789
		.flags = I2C_CLIENT_HOST_NOTIFY,
1790
	};
1790
	};
1791
	unsigned int idx = 0;
1791
	unsigned int idx = 0;
1792
	u16 product_id = get_unaligned_be16(info->samples);
1792
1793
1793
	smbus_board.properties = i2c_props;
1794
	smbus_board.properties = i2c_props;
1794
1795
Lines 1807-1812 static int elantech_create_smbus(struct psmouse *psmouse, Link Here
1807
		i2c_props[idx++] = PROPERTY_ENTRY_U32("touchscreen-y-mm",
1808
		i2c_props[idx++] = PROPERTY_ENTRY_U32("touchscreen-y-mm",
1808
						      (info->y_max + 1) / info->y_res);
1809
						      (info->y_max + 1) / info->y_res);
1809
1810
1811
	i2c_props[idx++] = PROPERTY_ENTRY_U16("elan,product_id", product_id);
1812
1810
	if (info->has_trackpoint)
1813
	if (info->has_trackpoint)
1811
		i2c_props[idx++] = PROPERTY_ENTRY_BOOL("elan,trackpoint");
1814
		i2c_props[idx++] = PROPERTY_ENTRY_BOOL("elan,trackpoint");
1812
1815
1813
- 

Return to bug 204771