aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChirayu Desai <cdesai@cyanogenmod.org>2012-03-09 16:37:06 +0530
committerChirayu Desai <chirayudesai1@gmail.com>2013-05-05 10:47:19 +0530
commit939facfc7191b58c3d0fec275f93ed7d66a6c032 (patch)
tree29a52eb6fa4cfe32b4471076cb1ed7d0643dbdd5 /include
parentf661100a75d28ad9ec0f3e9015794ffd69846f35 (diff)
downloadkernel_samsung_aries-939facfc7191b58c3d0fec275f93ed7d66a6c032.zip
kernel_samsung_aries-939facfc7191b58c3d0fec275f93ed7d66a6c032.tar.gz
kernel_samsung_aries-939facfc7191b58c3d0fec275f93ed7d66a6c032.tar.bz2
add support for p1
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org> Signed-off-by: Humberto Borba <humberos@gmail.com> Signed-off-by: Koudai Aono <koxudaxi@gmail.com> Change-Id: I2dcbaee7f17852ed3ea4a5db2d103704027fe259
Diffstat (limited to 'include')
-rw-r--r--include/linux/bh1721.h28
-rw-r--r--include/linux/fs.h18
-rw-r--r--include/linux/fsa9480.h15
-rw-r--r--include/linux/i2c/l3g4200d.h69
-rw-r--r--include/linux/max17042_battery.h58
-rw-r--r--[-rwxr-xr-x]include/linux/mfd/max8998-private.h41
-rw-r--r--[-rwxr-xr-x]include/linux/mfd/max8998.h12
-rw-r--r--include/linux/regulator/consumer.h4
-rw-r--r--include/linux/sec_battery.h148
-rw-r--r--include/linux/smb136_charger.h19
-rw-r--r--include/linux/timed_output.h37
-rw-r--r--[-rwxr-xr-x]include/linux/videodev2_samsung.h28
-rw-r--r--include/media/isx005_platform.h18
-rw-r--r--include/media/nm6xx_platform.h18
-rw-r--r--include/media/s5k5ccgx_platform.h18
-rw-r--r--include/media/s5k6aafx_platform.h22
-rw-r--r--include/media/v4l2-i2c-drv.h80
-rw-r--r--include/media/v4l2-subdev.h10
18 files changed, 628 insertions, 15 deletions
diff --git a/include/linux/bh1721.h b/include/linux/bh1721.h
new file mode 100644
index 0000000..e752fef
--- /dev/null
+++ b/include/linux/bh1721.h
@@ -0,0 +1,28 @@
+/*
+ * bh1721.h - BH1721 Ambient Light Sensors driver
+ *
+ * Copyright (c) 2009 Samsung Eletronics
+ * Authors:
+ * Donggeun Kim <dg77.kim@samsung.com>
+ *
+ * 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.
+ *
+ */
+
+#ifndef _BH1721_H_
+#define _BH1721_H_
+
+
+#include <linux/types.h>
+
+#ifdef __KERNEL__
+#define BH1721_OPT "bh1721-opt"
+struct bh1721_platform_data
+{
+ void (*reset)(void);
+};
+#endif /* __KERNEL__ */
+
+#endif
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 212ea7b..7f11764 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -17,8 +17,8 @@
* nr_file rlimit, so it's safe to set up a ridiculously high absolute
* upper limit on files-per-process.
*
- * Some programs (notably those using select()) may have to be
- * recompiled to take full advantage of the new limits..
+ * Some programs (notably those using select()) may have to be
+ * recompiled to take full advantage of the new limits..
*/
/* Fixed constants first: */
@@ -172,7 +172,7 @@ struct inodes_stat_t {
#define SEL_EX 4
/* public flags for file_system_type */
-#define FS_REQUIRES_DEV 1
+#define FS_REQUIRES_DEV 1
#define FS_BINARY_MOUNTDATA 2
#define FS_HAS_SUBTYPE 4
#define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */
@@ -480,7 +480,7 @@ struct iattr {
*/
#include <linux/quota.h>
-/**
+/**
* enum positive_aop_returns - aop return codes with specific semantics
*
* @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has
@@ -490,7 +490,7 @@ struct iattr {
* be a candidate for writeback again in the near
* future. Other callers must be careful to unlock
* the page if they get this return. Returned by
- * writepage();
+ * writepage();
*
* @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has
* unlocked it and the page might have been truncated.
@@ -1037,10 +1037,10 @@ static inline int file_check_writeable(struct file *filp)
#define MAX_NON_LFS ((1UL<<31) - 1)
-/* Page cache limit. The filesystems should put that into their s_maxbytes
- limits, otherwise bad things can happen in VM. */
+/* Page cache limit. The filesystems should put that into their s_maxbytes
+ limits, otherwise bad things can happen in VM. */
#if BITS_PER_LONG==32
-#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
+#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
#elif BITS_PER_LONG==64
#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL
#endif
@@ -2241,7 +2241,7 @@ extern void free_write_pipe(struct file *);
extern int kernel_read(struct file *, loff_t, char *, unsigned long);
extern struct file * open_exec(const char *);
-
+
/* fs/dcache.c -- generic fs support functions */
extern int is_subdir(struct dentry *, struct dentry *);
extern int path_is_under(struct path *, struct path *);
diff --git a/include/linux/fsa9480.h b/include/linux/fsa9480.h
index 674f18e..6bbb91b 100644
--- a/include/linux/fsa9480.h
+++ b/include/linux/fsa9480.h
@@ -36,8 +36,23 @@ struct fsa9480_platform_data {
void (*deskdock_cb) (bool attached);
void (*cardock_cb) (bool attached);
void (*reset_cb) (void);
+#ifdef CONFIG_MACH_P1
+ void (*set_init_flag) (void);
+ void (*set_usb_switch) (void);
+#endif
};
extern int fsa9480_get_dock_status(void);
+#ifdef CONFIG_MACH_P1
+enum {
+ AUTO_SWITCH = 0,
+ SWITCH_USB_Port,
+ SWITCH_Audio_Port,
+ SWITCH_UART_Port,
+ SWITCH_V_Audio_Port
+};
+
+void fsa9480_manual_switching(int path);
+#endif
#endif /* _FSA9480_H_ */
diff --git a/include/linux/i2c/l3g4200d.h b/include/linux/i2c/l3g4200d.h
new file mode 100644
index 0000000..1e01219
--- /dev/null
+++ b/include/linux/i2c/l3g4200d.h
@@ -0,0 +1,69 @@
+/******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
+*
+* File Name : l3g4200d.c
+* Authors : MH - C&I BU - Application Team
+* : Carmine Iascone (carmine.iascone@st.com)
+* : Matteo Dameno (matteo.dameno@st.com)
+* Version : V 0.1
+* Date : 29/01/2010
+* Description : L3G4200D digital output gyroscope sensor API
+*
+********************************************************************************
+*
+* 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.
+*
+* THE PRESENT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES
+* OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, FOR THE SOLE
+* PURPOSE TO SUPPORT YOUR APPLICATION DEVELOPMENT.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*
+* THIS SOFTWARE IS SPECIFICALLY DESIGNED FOR EXCLUSIVE USE WITH ST PARTS.
+*
+*******************************************************************************/
+
+#ifndef __L3G4200D_H__
+#define __L3G4200D_H__
+
+#include <linux/ioctl.h> /* For IOCTL macros */
+
+/** This define controls compilation of the master device interface */
+/*#define L3G4200D_MASTER_DEVICE*/
+
+#define L3G4200D_IOCTL_BASE 'g'
+/* The following define the IOCTL command values via the ioctl macros */
+#define L3G4200D_SET_RANGE _IOW(L3G4200D_IOCTL_BASE, 1, int)
+#define L3G4200D_SET_MODE _IOW(L3G4200D_IOCTL_BASE, 2, int)
+#define L3G4200D_SET_BANDWIDTH _IOW(L3G4200D_IOCTL_BASE, 3, int)
+#define L3G4200D_READ_GYRO_VALUES _IOW(L3G4200D_IOCTL_BASE, 4, int)
+
+#define L3G4200D_FS_250DPS 0x00
+#define L3G4200D_FS_500DPS 0x10
+#define L3G4200D_FS_2000DPS 0x30
+
+#ifdef __KERNEL__
+struct l3g4200d_platform_data {
+ u8 fs_range;
+
+ u8 axis_map_x;
+ u8 axis_map_y;
+ u8 axis_map_z;
+
+ u8 negate_x;
+ u8 negate_y;
+ u8 negate_z;
+
+ int (*init)(void);
+ void (*exit)(void);
+ int (*power_on)(void);
+ int (*power_off)(void);
+
+};
+
+#endif /* __KERNEL__ */
+
+#endif /* __L3G4200D_H__ */
diff --git a/include/linux/max17042_battery.h b/include/linux/max17042_battery.h
new file mode 100644
index 0000000..7ad1503
--- /dev/null
+++ b/include/linux/max17042_battery.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ * Ikkeun Kim <iks.kim@samsung.com>
+ *
+ * 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.
+ */
+
+#ifndef __MAX17042_BATTERY_H_
+#define __MAX17042_BATTERY_H_
+
+enum {
+ REQ_FULL_CHARGE_COMPENSATION = 0,
+ REQ_VF_FULLCAP_RANGE_CHECK,
+ REQ_CAP_CORRUPTION_CHECK,
+ REQ_LOW_BATTERY_COMPENSATION,
+ REQ_ADJUST_CAPACITY_RESTART,
+ REQ_TEST_MODE_INTERFACE,
+};
+
+typedef enum {
+ TEST_MODE_FUEL_GAUGE_CHECK = 0,
+ TEST_MODE_RESET_CAPACITY,
+ TEST_MODE_QUICK_START_CMD,
+ TEST_MODE_DUMP_FG_REGISTER,
+ TEST_MODE_BATTERY_TYPE_CHECK,
+} max17042_test_mode_type_t ;
+
+typedef enum {
+ UNKNOWN_TYPE = 0,
+ SDI_BATTERY_TYPE,
+ ATL_BATTERY_TYPE
+} battery_type_t;
+
+struct max17042_callbacks {
+ void (*full_charge_comp)(struct max17042_callbacks *ptr,
+ u32 is_recharging, u32 pre_update);
+ void (*vf_fullcap_check)(struct max17042_callbacks *ptr);
+ int (*corruption_check)(struct max17042_callbacks *ptr);
+ void (*low_batt_comp)(struct max17042_callbacks *ptr, int enable);
+ int (*adjust_capacity)(struct max17042_callbacks *ptr);
+ int (*test_mode_request)(struct max17042_callbacks *ptr,
+ max17042_test_mode_type_t mode, int arg);
+};
+
+struct max17042_platform_data {
+ int (*battery_online)(void);
+ int (*charger_online)(void);
+ int (*charger_enable)(void);
+ int (*power_supply_register)(struct device *parent,
+ struct power_supply *psy);
+ void (*power_supply_unregister)(struct power_supply *psy);
+ void (*force_update_status)(void);
+ void (*register_callbacks)(struct max17042_callbacks *ptr);
+};
+
+#endif
diff --git a/include/linux/mfd/max8998-private.h b/include/linux/mfd/max8998-private.h
index 1877d15..724b432 100755..100644
--- a/include/linux/mfd/max8998-private.h
+++ b/include/linux/mfd/max8998-private.h
@@ -48,12 +48,21 @@ enum {
MAX8998_REG_ONOFF2,
MAX8998_REG_ONOFF3,
MAX8998_REG_ONOFF4,
+#ifdef CONFIG_MACH_ARIES
MAX8998_REG_BUCK1_VOLTAGE1,
MAX8998_REG_BUCK1_VOLTAGE2,
MAX8998_REG_BUCK1_VOLTAGE3,
MAX8998_REG_BUCK1_VOLTAGE4,
MAX8998_REG_BUCK2_VOLTAGE1,
MAX8998_REG_BUCK2_VOLTAGE2,
+#else // CONFIG_MACH_P1
+ MAX8998_REG_BUCK1_DVSARM1,
+ MAX8998_REG_BUCK1_DVSARM2,
+ MAX8998_REG_BUCK1_DVSARM3,
+ MAX8998_REG_BUCK1_DVSARM4,
+ MAX8998_REG_BUCK2_DVSINT1,
+ MAX8998_REG_BUCK2_DVSINT2,
+#endif
MAX8998_REG_BUCK3,
MAX8998_REG_BUCK4,
MAX8998_REG_LDO2_LDO3,
@@ -278,6 +287,9 @@ enum {
* @dev: master device of the chip (can be used to access platform data)
* @i2c: i2c client private data for regulator
* @rtc: i2c client private data for rtc
+ * @dev_read(): chip register read function
+ * @dev_write(): chip register write function
+ * @dev_update(): chip register update function
* @iolock: mutex for serializing io access
* @irqlock: mutex for buslock
* @irq_base: base IRQ number for max8998, required for IRQs
@@ -291,6 +303,11 @@ struct max8998_dev {
struct device *dev;
struct i2c_client *i2c;
struct i2c_client *rtc;
+#ifdef CONFIG_MACH_P1
+ int (*dev_read)(struct max8998_dev *max8998, u8 reg, u8 *dest);
+ int (*dev_write)(struct max8998_dev *max8998, u8 reg, u8 val);
+ int (*dev_update)(struct max8998_dev *max8998, u8 reg, u8 val, u8 mask);
+#endif
struct mutex iolock;
struct mutex irqlock;
@@ -299,20 +316,36 @@ struct max8998_dev {
int ono;
u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS];
u8 irq_masks_cache[MAX8998_NUM_IRQ_REGS];
+#ifdef CONFIG_MACH_ARIES
int type;
bool wakeup;
+#endif
};
int max8998_irq_init(struct max8998_dev *max8998);
void max8998_irq_exit(struct max8998_dev *max8998);
int max8998_irq_resume(struct max8998_dev *max8998);
+extern int max8998_bulk_read(struct i2c_client *i2c, u8 reg, int count, u8 *buf);
+
+#ifdef CONFIG_MACH_ARIES
extern int max8998_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest);
-extern int max8998_bulk_read(struct i2c_client *i2c, u8 reg, int count,
- u8 *buf);
extern int max8998_write_reg(struct i2c_client *i2c, u8 reg, u8 value);
-extern int max8998_bulk_write(struct i2c_client *i2c, u8 reg, int count,
- u8 *buf);
+extern int max8998_bulk_write(struct i2c_client *i2c, u8 reg, int count, u8 *buf);
extern int max8998_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask);
+#else // CONFIG_MACH_P1
+static inline int max8998_read_reg(struct max8998_dev *max8998, u8 reg, u8 *value)
+{
+ return max8998->dev_read(max8998, reg, value);
+}
+static inline int max8998_write_reg(struct max8998_dev *max8998, u8 reg, u8 value)
+{
+ return max8998->dev_write(max8998, reg, value);
+}
+static inline int max8998_update_reg(struct max8998_dev *max8998, u8 reg, u8 value, u8 mask)
+{
+ return max8998->dev_update(max8998, reg, value, mask);
+}
+#endif
#endif /* __LINUX_MFD_MAX8998_PRIV_H */
diff --git a/include/linux/mfd/max8998.h b/include/linux/mfd/max8998.h
index 67db8b6..948abfd 100755..100644
--- a/include/linux/mfd/max8998.h
+++ b/include/linux/mfd/max8998.h
@@ -63,11 +63,12 @@ struct max8998_regulator_data {
int id;
struct regulator_init_data *initdata;
};
-
+#ifdef CONFIG_MACH_ARIES
enum cable_type_t {
CABLE_TYPE_NONE = 0,
CABLE_TYPE_USB,
CABLE_TYPE_AC,
+ CABLE_TYPE_IMPROPER_AC,
};
/**
@@ -83,6 +84,7 @@ struct max8998_charger_callbacks {
void (*set_cable)(struct max8998_charger_callbacks *ptr,
enum cable_type_t status);
};
+#endif
/**
* max8998_charger_data - charger data
@@ -91,10 +93,16 @@ struct max8998_charger_callbacks {
* @adc_table: adc_table must be ascending adc value order
*/
struct max8998_charger_data {
+#ifdef CONFIG_MACH_ARIES
struct power_supply *psy_fuelgauge;
void (*register_callbacks)(struct max8998_charger_callbacks *ptr);
struct max8998_adc_table_data *adc_table;
int adc_array_size;
+#else // CONFIG_MACH_P1
+ int (*charger_dev_register)(struct charger_device *chgdev);
+ void (*charger_dev_unregister)(struct charger_device *chgdev);
+ struct charger_device *chgdev;
+#endif
};
/**
@@ -126,6 +134,7 @@ struct max8998_platform_data {
int num_regulators;
int irq_base;
int ono;
+#ifdef CONFIG_MACH_ARIES
bool buck_voltage_lock;
int buck1_voltage1;
int buck1_voltage2;
@@ -140,6 +149,7 @@ struct max8998_platform_data {
int buck2_default_idx;
bool wakeup;
bool rtc_delay;
+#endif
struct max8998_charger_data *charger;
};
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 9e87c1c..9a35906 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -138,7 +138,9 @@ int regulator_enable(struct regulator *regulator);
int regulator_disable(struct regulator *regulator);
int regulator_force_disable(struct regulator *regulator);
int regulator_is_enabled(struct regulator *regulator);
-
+#ifdef CONFIG_MACH_P1
+void regulator_set_use_count(struct regulator *regulator, int cnt);
+#endif
int regulator_bulk_get(struct device *dev, int num_consumers,
struct regulator_bulk_data *consumers);
int regulator_bulk_enable(int num_consumers,
diff --git a/include/linux/sec_battery.h b/include/linux/sec_battery.h
new file mode 100644
index 0000000..7b7da32
--- /dev/null
+++ b/include/linux/sec_battery.h
@@ -0,0 +1,148 @@
+/*
+ * sec_battery.h
+ *
+ * Battery measurement code for samsung platform.
+ *
+ * Copyright (C) 2010 Samsung Electronics.
+ *
+ * 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.
+ *
+ */
+
+#ifndef __SEC_BATTERY_H
+#define __SEC_BATTERY_H
+
+/*
+ * Battery Table
+ */
+#define BATT_CAL 2447 /* 3.60V */
+
+#define BATT_MAXIMUM 406 /* 4.176V */
+#define BATT_FULL 353 /* 4.10V */
+#define BATT_SAFE_RECHARGE 353 /* 4.10V */
+#define BATT_ALMOST_FULL 188 /* 3.8641V */
+#define BATT_HIGH 112 /* 3.7554V */
+#define BATT_MED 66 /* 3.6907V */
+#define BATT_LOW 43 /* 3.6566V */
+#define BATT_CRITICAL 8 /* 3.6037V */
+#define BATT_MINIMUM (-28) /* 3.554V */
+#define BATT_OFF (-128) /* 3.4029V */
+
+
+#define SAMSUNG_LPM_MODE
+//#define __FUEL_GAUGES_IC__
+
+enum cable_type_t {
+ CABLE_TYPE_NONE = 0,
+ CABLE_TYPE_USB,
+ CABLE_TYPE_AC,
+ CABLE_TYPE_IMPROPER_AC,
+};
+
+enum charging_status_type_t {
+ CHARGING_STATUS_ERROR = -1,
+ CHARGING_STATUS_NONE = 0,
+ CHARGING_STATUS_ACTIVE,
+ CHARGING_STATUS_FULL,
+};
+
+/**
+ * sec_battery_adc_table_data
+ * @adc_value : temperture adc value
+ * @temperature : temperature(C) * 10
+ */
+struct sec_battery_adc_table_data {
+ int adc_value;
+ int temperature;
+};
+
+struct sec_battery_callbacks {
+ void (*set_cable)(struct sec_battery_callbacks *ptr,
+ enum cable_type_t status);
+ void (*set_status)(struct sec_battery_callbacks *ptr,
+ enum charging_status_type_t status);
+ void (*force_update)(struct sec_battery_callbacks *ptr);
+};
+
+struct charger_device {
+ int (*charging_control) (int en, int cable_status);
+ int (*get_charging_status) (void);
+ void (*set_charging_status) (int status);
+ int (*get_connection_status) (void);
+};
+
+struct sec_battery_platform_data {
+ struct power_supply *psy_fuelgauge;
+ struct charger_device *pmic_charger;
+ struct charger_device *external_charger;
+ void (*register_callbacks)(struct sec_battery_callbacks *ptr);
+ int (*fuelgauge_cb)(int request_mode, int arg1, int arg2);
+ bool (*get_jig_status)(void);
+ struct sec_battery_adc_table_data *adc_table;
+ int adc_array_size;
+};
+
+
+/*
+ * ADC channel
+ */
+enum adc_channel_type {
+ ADC_TEMPERATURE = 0,
+ ADC_CH1,
+ ADC_LCD_ID,
+ ADC_EAR_ADC_35,
+ ADC_ACCESSORY_ID,
+ ADC_REMOTE_SENSE,
+ ADC_AP_CHECK_2,
+ ADC_AP_CHECK_1,
+ ADC_CH8,
+ ADC_CH9,
+ ENDOFADC
+};
+
+
+enum {
+ BATT_VOL = 0,
+ BATT_TEMP,
+ BATT_CHARGING_SOURCE,
+ BATT_FG_SOC,
+#ifdef CONFIG_BATTERY_MAX17042
+ BATT_FG_CHECK,
+ BATT_RESET_SOC,
+ BATT_RESET_CAP,
+ BATT_FG_REG,
+ BATT_BATT_TYPE,
+#endif
+#ifdef SAMSUNG_LPM_MODE
+ CHARGING_MODE_BOOTING,
+ BATT_TEMP_CHECK,
+ BATT_FULL_CHECK,
+#endif
+};
+
+
+#define TOTAL_CHARGING_TIME (6*60*60) /* 6 hours */
+#define TOTAL_RECHARGING_TIME (90*60) /* 1.5 hours */
+
+#define COMPENSATE_VIBRATOR 19
+#define COMPENSATE_CAMERA 25
+#define COMPENSATE_MP3 17
+#define COMPENSATE_VIDEO 28
+#define COMPENSATE_VOICE_CALL_2G 13
+#define COMPENSATE_VOICE_CALL_3G 14
+#define COMPENSATE_DATA_CALL 25
+#define COMPENSATE_LCD 0
+#define COMPENSATE_TA 0
+#define COMPENSATE_CAM_FALSH 0
+#define COMPENSATE_BOOTING 52
+
+#define SOC_LB_FOR_POWER_OFF 27
+
+#define RECHARGE_COND_VOLTAGE 4135000
+#define RECHARGE_COND_TIME (30*1000) /* 30 seconds */
+
+#endif
+
+int get_boot_charger_info(void);
diff --git a/include/linux/smb136_charger.h b/include/linux/smb136_charger.h
new file mode 100644
index 0000000..40399c3
--- /dev/null
+++ b/include/linux/smb136_charger.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ * Ikkeun Kim <iks.kim@samsung.com>
+ *
+ * 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.
+ */
+
+#ifndef __SMB136_CHARGER_H_
+#define __SMB136_CHARGER_H_
+
+struct smb136_charger_data {
+ int (*charger_dev_register)(struct charger_device *chgdev);
+ void (*charger_dev_unregister)(struct charger_device *chgdev);
+ struct charger_device *chgdev;
+};
+
+#endif
diff --git a/include/linux/timed_output.h b/include/linux/timed_output.h
new file mode 100644
index 0000000..ec907ab
--- /dev/null
+++ b/include/linux/timed_output.h
@@ -0,0 +1,37 @@
+/* include/linux/timed_output.h
+ *
+ * Copyright (C) 2008 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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.
+ *
+*/
+
+#ifndef _LINUX_TIMED_OUTPUT_H
+#define _LINUX_TIMED_OUTPUT_H
+
+struct timed_output_dev {
+ const char *name;
+
+ /* enable the output and set the timer */
+ void (*enable)(struct timed_output_dev *sdev, int timeout);
+
+ /* returns the current number of milliseconds remaining on the timer */
+ int (*get_time)(struct timed_output_dev *sdev);
+
+ /* private data */
+ struct device *dev;
+ int index;
+ int state;
+};
+
+extern int timed_output_dev_register(struct timed_output_dev *dev);
+extern void timed_output_dev_unregister(struct timed_output_dev *dev);
+
+#endif
diff --git a/include/linux/videodev2_samsung.h b/include/linux/videodev2_samsung.h
index 13ec5d6..e66e84e 100755..100644
--- a/include/linux/videodev2_samsung.h
+++ b/include/linux/videodev2_samsung.h
@@ -193,6 +193,11 @@ enum v4l2_wb_mode {
WHITE_BALANCE_AUTO,
WHITE_BALANCE_SUNNY,
WHITE_BALANCE_CLOUDY,
+#ifdef CONFIG_MACH_P1
+ WHITE_BALANCE_DAYLIGHT,
+ WHITE_BALANCE_CLOUDY_DAYLIGHT,
+ WHITE_BALANCE_INCANDESCENT,
+#endif
WHITE_BALANCE_TUNGSTEN,
WHITE_BALANCE_FLUORESCENT,
WHITE_BALANCE_MAX,
@@ -306,6 +311,13 @@ enum v4l2_vintage_mode {
};
#define V4L2_CID_CAMERA_JPEG_QUALITY (V4L2_CID_PRIVATE_BASE + 85)
+enum JPEG_QUALITY{
+ JPEG_QUALITY_ECONOMY = 0,
+ JPEG_QUALITY_NORMAL = 50,
+ JPEG_QUALITY_SUPERFINE = 100,
+ JPEG_QUALITY_MAX,
+};
+
#define V4L2_CID_CAMERA_GPS_LATITUDE (V4L2_CID_CAMERA_CLASS_BASE + 30)
#define V4L2_CID_CAMERA_GPS_LONGITUDE (V4L2_CID_CAMERA_CLASS_BASE + 31)
#define V4L2_CID_CAMERA_GPS_TIMESTAMP (V4L2_CID_CAMERA_CLASS_BASE + 32)
@@ -425,6 +437,7 @@ enum v4l2_caf_start_stop {
};
#define V4L2_CID_CAMERA_AUTO_FOCUS_RESULT_FIRST (V4L2_CID_PRIVATE_BASE + 103)
+#define V4L2_CID_CAMERA_AUTO_FOCUS_RESULT (V4L2_CID_PRIVATE_BASE + 103)
#define V4L2_CID_CAMERA_AUTO_FOCUS_RESULT_SECOND (V4L2_CID_PRIVATE_BASE + 120)
#define V4L2_CID_CAMERA_FINISH_AUTO_FOCUS (V4L2_CID_PRIVATE_BASE + 121)
#define V4L2_CID_CAMERA_FRAME_RATE (V4L2_CID_PRIVATE_BASE + 104)
@@ -479,6 +492,21 @@ enum v4l2_slow_ae_mode {
#define V4L2_CID_CAMERA_LENS_SOFTLANDING (V4L2_CID_PRIVATE_BASE + 120)
#endif
+#define V4L2_CID_CAMERA_APP_CHECK (V4L2_CID_PRIVATE_BASE + 119)
+#define V4L2_CID_CAMERA_CHECK_FLIP (V4L2_CID_PRIVATE_BASE + 120)
+
+#define V4L2_CID_CAM_SENSOR_TYPE (V4L2_CID_PRIVATE_BASE + 121)
+enum v4l2_camera_id {
+ CAMERA_ID_BACK = 0,
+ CAMERA_ID_FRONT = 1,
+#ifdef CONFIG_VIDEO_NM6XX
+ CAMERA_ID_MOBILETV = 3,
+ CAMERA_ID_MAX = 4,
+#else
+ CAMERA_ID_MAX = 2,
+#endif
+};
+
/* Pixel format FOURCC depth Description */
/* 12 Y/CbCr 4:2:0 64x32 macroblocks */
#define V4L2_PIX_FMT_NV12T v4l2_fourcc('T', 'V', '1', '2')
diff --git a/include/media/isx005_platform.h b/include/media/isx005_platform.h
new file mode 100644
index 0000000..3269fa3
--- /dev/null
+++ b/include/media/isx005_platform.h
@@ -0,0 +1,18 @@
+/*
+ * Driver for isx005 (3MP Camera) from SONY
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+struct isx005_platform_data {
+ unsigned int default_width;
+ unsigned int default_height;
+ unsigned int pixelformat;
+ int freq; /* MCLK in Hz */
+
+ /* This SoC supports Parallel & CSI-2 */
+ int is_mipi;
+};
diff --git a/include/media/nm6xx_platform.h b/include/media/nm6xx_platform.h
new file mode 100644
index 0000000..8d1190a
--- /dev/null
+++ b/include/media/nm6xx_platform.h
@@ -0,0 +1,18 @@
+/*
+ * Driver for NM6XX ( Analog TV Tunner ) from Newport Media
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+struct nm6xx_platform_data {
+ unsigned int default_width;
+ unsigned int default_height;
+ unsigned int pixelformat;
+ int freq; /* MCLK in Hz */
+
+ /* This SoC supports Parallel & CSI-2 */
+ int is_mipi;
+};
diff --git a/include/media/s5k5ccgx_platform.h b/include/media/s5k5ccgx_platform.h
new file mode 100644
index 0000000..e86400a
--- /dev/null
+++ b/include/media/s5k5ccgx_platform.h
@@ -0,0 +1,18 @@
+/*
+ * Driver for S5K5CCGX (3MP camera) from LSI
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+struct s5k5ccgx_platform_data {
+ unsigned int default_width;
+ unsigned int default_height;
+ unsigned int pixelformat;
+ int freq; /* MCLK in Hz */
+
+ /* This SoC supports Parallel & CSI-2 */
+ int is_mipi;
+};
diff --git a/include/media/s5k6aafx_platform.h b/include/media/s5k6aafx_platform.h
new file mode 100644
index 0000000..688e09e
--- /dev/null
+++ b/include/media/s5k6aafx_platform.h
@@ -0,0 +1,22 @@
+/*
+ * Driver for S5K6AAFX (VGA camera) from SAMSUNG ELECTRONICS
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#define DEFAULT_FMT V4L2_PIX_FMT_UYVY /* YUV422 */
+#define DEFAULT_WIDTH 640
+#define DEFAULT_HEIGHT 480
+
+struct s5k6aafx_platform_data {
+ unsigned int default_width;
+ unsigned int default_height;
+ unsigned int pixelformat;
+ int freq; /* MCLK in Hz */
+
+ /* This SoC supports Parallel & CSI-2 */
+ int is_mipi;
+};
diff --git a/include/media/v4l2-i2c-drv.h b/include/media/v4l2-i2c-drv.h
new file mode 100644
index 0000000..74bf741
--- /dev/null
+++ b/include/media/v4l2-i2c-drv.h
@@ -0,0 +1,80 @@
+/*
+ * v4l2-i2c-drv.h - contains I2C handling code that's identical for
+ * all V4L2 I2C drivers. Use this header if the
+ * I2C driver is only used by drivers converted
+ * to the bus-based I2C API.
+ *
+ * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/* NOTE: the full version of this header is in the v4l-dvb repository
+ * and allows v4l i2c drivers to be compiled on pre-2.6.26 kernels.
+ * The version of this header as it appears in the kernel is a stripped
+ * version (without all the backwards compatibility stuff) and so it
+ * looks a bit odd.
+ *
+ * If you look at the full version then you will understand the reason
+ * for introducing this header since you really don't want to have all
+ * the tricky backwards compatibility code in each and every i2c driver.
+ *
+ * If the i2c driver will never be compiled for pre-2.6.26 kernels, then
+ * DO NOT USE this header! Just write it as a regular i2c driver.
+ */
+
+#ifndef __V4L2_I2C_DRV_H__
+#define __V4L2_I2C_DRV_H__
+
+#include <media/v4l2-common.h>
+
+struct v4l2_i2c_driver_data {
+ const char * const name;
+ int (*command)(struct i2c_client *client, unsigned int cmd, void *arg);
+ int (*probe)(struct i2c_client *client, const struct i2c_device_id *id);
+ int (*remove)(struct i2c_client *client);
+ int (*suspend)(struct i2c_client *client, pm_message_t state);
+ int (*resume)(struct i2c_client *client);
+ const struct i2c_device_id *id_table;
+};
+
+static struct v4l2_i2c_driver_data v4l2_i2c_data;
+static struct i2c_driver v4l2_i2c_driver;
+
+
+/* Bus-based I2C implementation for kernels >= 2.6.26 */
+
+static int __init v4l2_i2c_drv_init(void)
+{
+ v4l2_i2c_driver.driver.name = v4l2_i2c_data.name;
+ v4l2_i2c_driver.command = v4l2_i2c_data.command;
+ v4l2_i2c_driver.probe = v4l2_i2c_data.probe;
+ v4l2_i2c_driver.remove = v4l2_i2c_data.remove;
+ v4l2_i2c_driver.suspend = v4l2_i2c_data.suspend;
+ v4l2_i2c_driver.resume = v4l2_i2c_data.resume;
+ v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table;
+ return i2c_add_driver(&v4l2_i2c_driver);
+}
+
+
+static void __exit v4l2_i2c_drv_cleanup(void)
+{
+ i2c_del_driver(&v4l2_i2c_driver);
+}
+
+module_init(v4l2_i2c_drv_init);
+module_exit(v4l2_i2c_drv_cleanup);
+
+#endif /* __V4L2_I2C_DRV_H__ */
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 2884e3e..bb6bc05 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -141,12 +141,17 @@ struct v4l2_subdev_io_pin_config {
handler, when an interrupt status has be raised due to this subdev,
so that this subdev can handle the details. It may schedule work to be
performed later. It must not sleep. *Called from an IRQ context*.
+
+s_config: if set, then it is always called by the v4l2_i2c_new_subdev*
+ functions after the v4l2_subdev was registered. It is used to pass
+ platform data to the subdev which can be used during initialization.
*/
struct v4l2_subdev_core_ops {
int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip);
int (*log_status)(struct v4l2_subdev *sd);
int (*s_io_pin_config)(struct v4l2_subdev *sd, size_t n,
struct v4l2_subdev_io_pin_config *pincfg);
+ int (*s_config)(struct v4l2_subdev *sd, int irq, void *platform_data);
int (*init)(struct v4l2_subdev *sd, u32 val);
int (*load_fw)(struct v4l2_subdev *sd);
int (*reset)(struct v4l2_subdev *sd, u32 val);
@@ -187,6 +192,7 @@ struct v4l2_subdev_core_ops {
s_config: sets tda9887 specific stuff, like port1, port2 and qss
*/
struct v4l2_subdev_tuner_ops {
+ int (*s_mode)(struct v4l2_subdev *sd, enum v4l2_tuner_type);
int (*s_radio)(struct v4l2_subdev *sd);
int (*s_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
@@ -267,6 +273,10 @@ struct v4l2_subdev_video_ops {
int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std);
int (*g_input_status)(struct v4l2_subdev *sd, u32 *status);
int (*s_stream)(struct v4l2_subdev *sd, int enable);
+ int (*enum_fmt)(struct v4l2_subdev *sd, struct v4l2_fmtdesc *fmtdesc);
+ int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
+ int (*try_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
+ int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
int (*cropcap)(struct v4l2_subdev *sd, struct v4l2_cropcap *cc);
int (*g_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop);
int (*s_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop);