diff options
author | Ke Qinghua <qinghua.ke@freescale.com> | 2013-12-19 10:29:12 +0800 |
---|---|---|
committer | Ke Qinghua <qinghua.ke@freescale.com> | 2013-12-19 12:17:06 +0800 |
commit | 6702ef28b741ab2895f4220ac70f7949a55bb8ee (patch) | |
tree | ad771be3c7581889bbda0ea48c68d83472cb5225 /include | |
parent | 6aa195c6f430c25f671c00b88601cc7550f5a72c (diff) |
ENGR00292372 Add consumer IR support in android 4.4
Add IR char driver,mx6_ir driver,epit driver and update configuration
for support IR.
Signed-off-by: Ke Qinghua <qinghua.ke@freescale.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ir.h | 48 | ||||
-rw-r--r-- | include/linux/pwm.h | 6 |
2 files changed, 54 insertions, 0 deletions
diff --git a/include/linux/ir.h b/include/linux/ir.h new file mode 100644 index 000000000000..fe10985a9ecd --- /dev/null +++ b/include/linux/ir.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved. + */ +/* + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ +#ifndef _LINUX_IR_H +#define _LINUX_IR_H + +#include <linux/types.h> +#ifdef __KERNEL__ +#include <linux/kgdb.h> +#endif /* __KERNEL__ */ + +#define IR_MAGIC 'I' + +#define IR_GET_CARRIER_FREQS _IO(IR_MAGIC, 0x01) +#define IR_GET_CARRIER_FREQS_NUM _IO(IR_MAGIC, 0x02) +#define IR_DATA_TRANSMIT _IO(IR_MAGIC, 0x03) +#define IR_CFG_CARRIER _IO(IR_MAGIC, 0x04) + +struct ir_data_pattern { + int len; + int *pattern; +}; + +struct ir_carrier_freq { + /* carrier frequence id */ + int id; + /* ir support min carrier freq */ + int min; + /* ir support max carrier freq */ + int max; +}; +#ifdef __KERNEL__ +extern void ir_device_register(const char *name, struct device *parent, void *devdata); +extern void ir_device_unregister(void); +extern int ir_config(void *dev, int carry_freq); +extern int ir_get_num_carrier_freqs(void); +extern int ir_get_carrier_range(int id, int *min, int *max); +extern int ir_transmit(void *dev, int len, int *pattern, unsigned char start_level); +#endif +#endif /* _LINUX_IR_H */ diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 7c775751392c..de0c93e47b0e 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -28,4 +28,10 @@ int pwm_enable(struct pwm_device *pwm); */ void pwm_disable(struct pwm_device *pwm); +/* + * pwm_out_enable - enable/disable PWM output + */ +void pwm_out_enable(struct pwm_device *pwm, int enable); + + #endif /* __LINUX_PWM_H */ |