Taniya Das | 6f0884b | 2011-09-06 16:24:21 +0530 | [diff] [blame^] | 1 | /** |
| 2 | * |
| 3 | * Synaptics RMI over I2C Physical Layer Driver Header File. |
| 4 | * Copyright (c) 2007 - 2011, Synaptics Incorporated |
| 5 | * |
| 6 | */ |
| 7 | /* |
| 8 | * This file is licensed under the GPL2 license. |
| 9 | * |
| 10 | *############################################################################# |
| 11 | * GPL |
| 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify it |
| 14 | * under the terms of the GNU General Public License version 2 as published |
| 15 | * by the Free Software Foundation. |
| 16 | * |
| 17 | * This program is distributed in the hope that it will be useful, but |
| 18 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 19 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 20 | * for more details. |
| 21 | * |
| 22 | *############################################################################# |
| 23 | */ |
| 24 | |
| 25 | #ifndef _RMI_I2C_H |
| 26 | #define _RMI_I2C_H |
| 27 | |
| 28 | #include <linux/input/rmi_platformdata.h> |
| 29 | |
| 30 | /* Sensor-specific configuration data, to be included as the platform data |
| 31 | * for the relevant i2c_board_info entry. |
| 32 | * |
| 33 | * This describes a single RMI4 sensor on an I2C bus, including: |
| 34 | * its I2C address, IRQ (if any), the type of IRQ (if applicable), and an |
| 35 | * optional list of any non-default settings (on a per function basis) |
| 36 | * to be applied at start up. |
| 37 | */ |
| 38 | struct rmi_i2c_platformdata { |
| 39 | /* The seven-bit i2c address of the sensor. */ |
| 40 | int i2c_address; |
| 41 | /* The number of the irq. Set to zero if polling is required. */ |
| 42 | int irq; |
| 43 | /* The type of the irq (e.g., IRQF_TRIGGER_FALLING). |
| 44 | * Only valid if irq != 0 */ |
| 45 | int irq_type; |
| 46 | |
| 47 | /* If >0, the driver will delay this many milliseconds before attempting |
| 48 | * I2C communications. This is necessary because some horribly broken |
| 49 | * development systems don't bring their I2C up very fast after system |
| 50 | * power on or reboot. In most cases, you can safely ignore this. |
| 51 | */ |
| 52 | int delay_ms; |
| 53 | |
| 54 | /* Use this to specify platformdata that is not I2C specific. */ |
| 55 | struct rmi_sensordata *sensordata; |
| 56 | }; |
| 57 | |
| 58 | #endif |