Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91d36830 authored by Amy Maloche's avatar Amy Maloche Committed by Gerrit - the friendly Code Review server
Browse files

input: atmel_maxtouch_ts: add device tree support



Enable device tree support along with necessary
platform data entries.

Change-Id: If50b937d67f38b76e2224f161c7b9b0a2392572b
Signed-off-by: default avatarAmy Maloche <amaloche@codeaurora.org>
parent 0ff80c12
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
Atmel touch controller

Required properties:

 - compatible	: should be "atmel,maxtouch-ts"
 - reg			: i2c slave address of the device
 - interrupt-parent	: parent of interrupt
 - interrupts		: touch sample interrupt to indicate presense or release
				of fingers on the panel.
 - atmel,panel-coords	: touch panel minimum x, minimum y, maximum x and
				maximum y resolution
 - atmel,display-coords : LCD display minimum x, minimum y, maximum x and
				maximum y resolution
 - vdd-supply	: Analog power supply needed to power device
 - avcc-supply		: Power source required to pull up i2c bus
 - atmel,irq-gpio	: irq gpio
 - atmel,reset-gpio	: reset gpio

Optional property:
 - atmel,bl-addr		: bootloader address, by default is looked up
					in mxt_slave_addresses structure
 - atmel,key-codes		: key codes corresponding to keyarray object

Example:
	i2c@f9966000 {
		atmel_maxtouch_ts@4a {
			compatible = "atmel,maxtouch-ts";
			reg = <0x4a>
			interrupt-parent = <&msmgpio>
			interrupts = <48 0x0>;
			vdd-supply = <&pm8941_l18>;
			avdd-supply = <&pm8941_lvs1>;
			atmel,panel-coords = <0 0 479 799>;
			atmel,display-coords = <0 0 479 799>;
			atmel,irq-gpio = <&msmgpio 48 0>;
			atmel,reset-gpio = <&msmgpio 26 0>;
		};
	};
+400 −271

File changed.

Preview size limit exceeded, changes collapsed.

+33 −3
Original line number Diff line number Diff line
/*
 * Atmel maXTouch Touchscreen driver
 *
 * Copyright (c) 2014, The Linux Foundation.  All rights reserved.
 *
 * Linux foundation chooses to take subject only to the GPLv2 license terms,
 * and distributes only under these terms.
 *
 * Copyright (C) 2010 Samsung Electronics Co.Ltd
 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
 *
@@ -10,20 +15,45 @@
 * option) any later version.
 */

#ifndef __LINUX_ATMEL_MXT_TS_H
#define __LINUX_ATMEL_MXT_TS_H
#ifndef __LINUX_ATMEL_MAXTOUCH_TS_H
#define __LINUX_ATMEL_MAXTOUCH_TS_H

#include <linux/types.h>

/* The platform data for the Atmel maXTouch touchscreen driver */
struct mxt_platform_data {
	unsigned long irqflags;
	unsigned long resetflags;
	int reset_gpio;
	int irq_gpio;
	u8 t19_num_keys;
	const unsigned int *t19_keymap;
	int t15_num_keys;
	const unsigned int *t15_keymap;
	unsigned long gpio_reset;
	const char *cfg_name;

	const struct mxt_config_info *config_array;
	size_t config_array_size;

	/* touch panel's minimum and maximum coordinates */
	u32 panel_minx;
	u32 panel_maxx;
	u32 panel_miny;
	u32 panel_maxy;

	/* display's minimum and maximum coordinates */
	u32 disp_minx;
	u32 disp_maxx;
	u32 disp_miny;
	u32 disp_maxy;

	int *key_codes;
	u8 bl_addr;

	u8(*read_chg) (void);
	int (*init_hw) (bool);
	int (*power_on) (bool);
};

#endif /* __LINUX_ATMEL_MXT_TS_H */
#endif /* __LINUX_ATMEL_MAXTOUCH_TS_H */