Flemmard | e2ce3b7 | 2013-04-25 21:59:45 -0700 | [diff] [blame] | 1 | /* include/linux/capella_cm3602.h |
| 2 | * |
| 3 | * Copyright (C) 2009 Google, Inc. |
| 4 | * Author: Iliyan Malchev <malchev@google.com> |
| 5 | * |
| 6 | * This software is licensed under the terms of the GNU General Public |
| 7 | * License version 2, as published by the Free Software Foundation, and |
| 8 | * may be copied, distributed, and modified under those terms. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | */ |
| 16 | |
| 17 | #ifndef __LINUX_CAPELLA_CM3602_H |
| 18 | #define __LINUX_CAPELLA_CM3602_H |
| 19 | |
| 20 | #include <linux/types.h> |
| 21 | #include <linux/ioctl.h> |
| 22 | |
| 23 | #define CAPELLA_CM3602_IOCTL_MAGIC 'c' |
| 24 | #define CAPELLA_CM3602_IOCTL_GET_ENABLED \ |
| 25 | _IOR(CAPELLA_CM3602_IOCTL_MAGIC, 1, int *) |
| 26 | #define CAPELLA_CM3602_IOCTL_ENABLE \ |
| 27 | _IOW(CAPELLA_CM3602_IOCTL_MAGIC, 2, int *) |
| 28 | |
| 29 | #ifdef __KERNEL__ |
| 30 | #define CAPELLA_CM3602 "capella_cm3602" |
| 31 | #define LS_PWR_ON (1 << 0) |
| 32 | #define PS_PWR_ON (1 << 1) |
| 33 | struct capella_cm3602_platform_data { |
| 34 | int (*power)(int, uint8_t); |
| 35 | int (*enable)(uint8_t); |
| 36 | int p_en; |
| 37 | int p_out; |
| 38 | int irq; |
| 39 | }; |
| 40 | #endif |
| 41 | |
| 42 | #endif |