| Flemmard | 939472a | 2014-02-21 20:23:00 +0100 | [diff] [blame] | 1 | /* | 
|  | 2 | * linux/include/linux/a6.h | 
|  | 3 | * | 
|  | 4 | * Driver for the A6 TP. | 
|  | 5 | * | 
|  | 6 | * Copyright (C) 2008 Palm, Inc. | 
|  | 7 | * Author: Raj Mojumder <raj.mojumder@palm.com> | 
|  | 8 | * | 
|  | 9 | * This program is free software; you can redistribute it and/or | 
|  | 10 | * modify it under the terms of the GNU General Public License. | 
|  | 11 | */ | 
|  | 12 |  | 
|  | 13 | #ifndef _A6_H | 
|  | 14 | #define _A6_H | 
|  | 15 |  | 
|  | 16 | #include <linux/ioctl.h> | 
|  | 17 | #include <linux/types.h> | 
|  | 18 | #include <mach/msm_hsusb.h> | 
|  | 19 |  | 
|  | 20 | #define  A6_DEVICE_0   "a6_0" | 
|  | 21 | #define  A6_DEVICE_1   "a6_1" | 
|  | 22 | #define  A6_DRIVER     "a6" | 
|  | 23 |  | 
|  | 24 | #define  A6_DEVICE     A6_DEVICE_0 | 
|  | 25 |  | 
|  | 26 | #define MAX8903B_CONNECTED_PS_AC	(1U << 1) | 
|  | 27 | #define MAX8903B_CONNECTED_PS_USB	(1U << 2) | 
|  | 28 | #define MAX8903B_CONNECTED_PS_DOCK	(1U << 3) | 
|  | 29 | #define MAX8903B_DOCK_DRAW_MA		1400 | 
|  | 30 |  | 
|  | 31 | /* IOCTLs */ | 
|  | 32 | #define A6_IOCTL_SET_FW_DATA		_IOW('c', 0x01, int) | 
|  | 33 | #define A6_IOCTL_VERIFY_FW_DATA		_IOW('c', 0x02, int) | 
|  | 34 |  | 
|  | 35 | /* Touch panel platform data structure */ | 
|  | 36 | struct a6_platform_data { | 
|  | 37 | char*	dev_name;   // device name | 
|  | 38 | int	pwr_gpio; | 
|  | 39 | int	sbw_tck_gpio; | 
|  | 40 | int 	sbw_tdio_gpio; | 
|  | 41 | int	sbw_wkup_gpio; | 
|  | 42 | void*	sbw_ops; | 
|  | 43 | void*	wake_ops; | 
|  | 44 |  | 
|  | 45 | void*	sbw_init_gpio_config; | 
|  | 46 | int	sbw_init_gpio_config_size; | 
|  | 47 | void*	sbw_deinit_gpio_config; | 
|  | 48 | int	sbw_deinit_gpio_config_size; | 
|  | 49 |  | 
|  | 50 | int	(*sbw_init)(struct a6_platform_data*); | 
|  | 51 | int	(*sbw_deinit)(struct a6_platform_data*); | 
|  | 52 |  | 
|  | 53 | int	pwr_gpio_wakeup_cap;  /* set if pwr_gpio is wakeup capable */ | 
|  | 54 | int	power_supply_connected;	/* Set to 1 if this is the a6 connected to battery, etc */ | 
|  | 55 | }; | 
|  | 56 |  | 
|  | 57 | struct a6_wake_ops { | 
|  | 58 | void*	data; | 
|  | 59 |  | 
|  | 60 | // external periodic sleep/wake interface | 
|  | 61 | int	(*enable_periodic_wake)(void *); | 
|  | 62 | int	(*disable_periodic_wake)(void *); | 
|  | 63 |  | 
|  | 64 | // internal sleep/wake interface | 
|  | 65 | int	(*internal_wake_enable_state)(void*); | 
|  | 66 | int	(*internal_wake_period)(void*); | 
|  | 67 |  | 
|  | 68 | // force sleep/wake interface (needed to force-wake A6 when | 
|  | 69 | // internal/external periodic sleep/wake in effect... | 
|  | 70 | int	(*force_wake)(void *); | 
|  | 71 | int	(*force_sleep)(void *); | 
|  | 72 | }; | 
|  | 73 |  | 
|  | 74 | void a6_charger_event (enum chg_type otg_chg_type); | 
|  | 75 |  | 
|  | 76 | #endif // _A6_H |