diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/nvc_torch.h | 43 | ||||
-rw-r--r-- | include/media/ssl3250a.h | 70 |
2 files changed, 67 insertions, 46 deletions
diff --git a/include/media/nvc_torch.h b/include/media/nvc_torch.h new file mode 100644 index 000000000000..7c88bc75af05 --- /dev/null +++ b/include/media/nvc_torch.h @@ -0,0 +1,43 @@ +/* Copyright (C) 2011 NVIDIA Corporation. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307, USA + */ + +#ifndef __NVC_TORCH_H__ +#define __NVC_TORCH_H__ + +struct nvc_torch_level_info { + __s32 guidenum; + __u32 sustaintime; + __s32 rechargefactor; +} __packed; + +struct nvc_torch_pin_state { + __u16 mask; + __u16 values; +} __packed; + +struct nvc_torch_flash_capabilities { + __u32 numberoflevels; + struct nvc_torch_level_info levels[]; +} __packed; + +struct nvc_torch_torch_capabilities { + __u32 numberoflevels; + __s32 guidenum[]; +} __packed; + +#endif /* __NVC_TORCH_H__ */ + diff --git a/include/media/ssl3250a.h b/include/media/ssl3250a.h index ebe2804b348a..c4e802fa2efc 100644 --- a/include/media/ssl3250a.h +++ b/include/media/ssl3250a.h @@ -1,60 +1,38 @@ -/* - * Copyright (c) 2011, NVIDIA CORPORATION, All rights reserved. +/* Copyright (C) 2011 NVIDIA Corporation. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of NVIDIA CORPORATION nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307, USA */ + #ifndef __SSL3250A_H__ #define __SSL3250A_H__ -#include <linux/ioctl.h> /* For IOCTL macros */ +#include <media/nvc_torch.h> -#define SSL3250A_IOCTL_MODE_SHUTDOWN _IOW('o', 1, __u8) -#define SSL3250A_IOCTL_MODE_STANDBY _IOW('o', 2, __u8) -#define SSL3250A_IOTCL_MODE_TORCH _IOW('o', 3, __u8) -#define SSL3250A_IOCTL_MODE_FLASH _IOW('o', 4, __u8) -#define SSL3250A_IOCTL_MODE_LED _IOW('o', 5, __u8) -#define SSL3250A_IOCTL_STRB _IOW('o', 6, __u8) -#define SSL3250A_IOCTL_TIMER _IOW('o', 7, __u8) +#define SSL3250A_MAX_TORCH_LEVEL 11 +#define SSL3250A_MAX_FLASH_LEVEL 20 -#ifdef __KERNEL__ struct ssl3250a_platform_data { - int config; - int max_amp_indic; - int max_amp_torch; - int max_amp_flash; - int (*init)(void); - void (*exit)(void); - int (*gpio_act)(int); - int (*gpio_en1)(int); - int (*gpio_en2)(int); - int (*gpio_strb)(int); + unsigned cfg; /* use the NVC_CFG_ defines */ + unsigned num; /* see implementation notes in driver */ + unsigned sync; /* see implementation notes in driver */ + const char *dev_name; /* see implementation notes in driver */ + struct nvc_torch_pin_state (*pinstate); /* see notes in driver */ + unsigned max_amp_torch; /* maximum torch value allowed */ + unsigned max_amp_flash; /* maximum flash value allowed */ + unsigned gpio_act; /* GPIO connected to the ACT signal */ }; -#endif /* __KERNEL__ */ #endif /* __SSL3250A_H__ */ |