diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/i2c/adp8870.h | 153 | ||||
| -rw-r--r-- | include/linux/kernel.h | 4 | ||||
| -rw-r--r-- | include/linux/kmsg_dump.h | 1 | ||||
| -rw-r--r-- | include/linux/memcontrol.h | 6 | ||||
| -rw-r--r-- | include/linux/swap.h | 8 | ||||
| -rw-r--r-- | include/linux/topology.h | 2 | ||||
| -rw-r--r-- | include/linux/uts.h | 2 |
7 files changed, 166 insertions, 10 deletions
diff --git a/include/linux/i2c/adp8870.h b/include/linux/i2c/adp8870.h new file mode 100644 index 000000000000..624dceccbd5b --- /dev/null +++ b/include/linux/i2c/adp8870.h | |||
| @@ -0,0 +1,153 @@ | |||
| 1 | /* | ||
| 2 | * Definitions and platform data for Analog Devices | ||
| 3 | * Backlight drivers ADP8870 | ||
| 4 | * | ||
| 5 | * Copyright 2009-2010 Analog Devices Inc. | ||
| 6 | * | ||
| 7 | * Licensed under the GPL-2 or later. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __LINUX_I2C_ADP8870_H | ||
| 11 | #define __LINUX_I2C_ADP8870_H | ||
| 12 | |||
| 13 | #define ID_ADP8870 8870 | ||
| 14 | |||
| 15 | #define ADP8870_MAX_BRIGHTNESS 0x7F | ||
| 16 | #define FLAG_OFFT_SHIFT 8 | ||
| 17 | |||
| 18 | /* | ||
| 19 | * LEDs subdevice platform data | ||
| 20 | */ | ||
| 21 | |||
| 22 | #define ADP8870_LED_DIS_BLINK (0 << FLAG_OFFT_SHIFT) | ||
| 23 | #define ADP8870_LED_OFFT_600ms (1 << FLAG_OFFT_SHIFT) | ||
| 24 | #define ADP8870_LED_OFFT_1200ms (2 << FLAG_OFFT_SHIFT) | ||
| 25 | #define ADP8870_LED_OFFT_1800ms (3 << FLAG_OFFT_SHIFT) | ||
| 26 | |||
| 27 | #define ADP8870_LED_ONT_200ms 0 | ||
| 28 | #define ADP8870_LED_ONT_600ms 1 | ||
| 29 | #define ADP8870_LED_ONT_800ms 2 | ||
| 30 | #define ADP8870_LED_ONT_1200ms 3 | ||
| 31 | |||
| 32 | #define ADP8870_LED_D7 (7) | ||
| 33 | #define ADP8870_LED_D6 (6) | ||
| 34 | #define ADP8870_LED_D5 (5) | ||
| 35 | #define ADP8870_LED_D4 (4) | ||
| 36 | #define ADP8870_LED_D3 (3) | ||
| 37 | #define ADP8870_LED_D2 (2) | ||
| 38 | #define ADP8870_LED_D1 (1) | ||
| 39 | |||
| 40 | /* | ||
| 41 | * Backlight subdevice platform data | ||
| 42 | */ | ||
| 43 | |||
| 44 | #define ADP8870_BL_D7 (1 << 6) | ||
| 45 | #define ADP8870_BL_D6 (1 << 5) | ||
| 46 | #define ADP8870_BL_D5 (1 << 4) | ||
| 47 | #define ADP8870_BL_D4 (1 << 3) | ||
| 48 | #define ADP8870_BL_D3 (1 << 2) | ||
| 49 | #define ADP8870_BL_D2 (1 << 1) | ||
| 50 | #define ADP8870_BL_D1 (1 << 0) | ||
| 51 | |||
| 52 | #define ADP8870_FADE_T_DIS 0 /* Fade Timer Disabled */ | ||
| 53 | #define ADP8870_FADE_T_300ms 1 /* 0.3 Sec */ | ||
| 54 | #define ADP8870_FADE_T_600ms 2 | ||
| 55 | #define ADP8870_FADE_T_900ms 3 | ||
| 56 | #define ADP8870_FADE_T_1200ms 4 | ||
| 57 | #define ADP8870_FADE_T_1500ms 5 | ||
| 58 | #define ADP8870_FADE_T_1800ms 6 | ||
| 59 | #define ADP8870_FADE_T_2100ms 7 | ||
| 60 | #define ADP8870_FADE_T_2400ms 8 | ||
| 61 | #define ADP8870_FADE_T_2700ms 9 | ||
| 62 | #define ADP8870_FADE_T_3000ms 10 | ||
| 63 | #define ADP8870_FADE_T_3500ms 11 | ||
| 64 | #define ADP8870_FADE_T_4000ms 12 | ||
| 65 | #define ADP8870_FADE_T_4500ms 13 | ||
| 66 | #define ADP8870_FADE_T_5000ms 14 | ||
| 67 | #define ADP8870_FADE_T_5500ms 15 /* 5.5 Sec */ | ||
| 68 | |||
| 69 | #define ADP8870_FADE_LAW_LINEAR 0 | ||
| 70 | #define ADP8870_FADE_LAW_SQUARE 1 | ||
| 71 | #define ADP8870_FADE_LAW_CUBIC1 2 | ||
| 72 | #define ADP8870_FADE_LAW_CUBIC2 3 | ||
| 73 | |||
| 74 | #define ADP8870_BL_AMBL_FILT_80ms 0 /* Light sensor filter time */ | ||
| 75 | #define ADP8870_BL_AMBL_FILT_160ms 1 | ||
| 76 | #define ADP8870_BL_AMBL_FILT_320ms 2 | ||
| 77 | #define ADP8870_BL_AMBL_FILT_640ms 3 | ||
| 78 | #define ADP8870_BL_AMBL_FILT_1280ms 4 | ||
| 79 | #define ADP8870_BL_AMBL_FILT_2560ms 5 | ||
| 80 | #define ADP8870_BL_AMBL_FILT_5120ms 6 | ||
| 81 | #define ADP8870_BL_AMBL_FILT_10240ms 7 /* 10.24 sec */ | ||
| 82 | |||
| 83 | /* | ||
| 84 | * Blacklight current 0..30mA | ||
| 85 | */ | ||
| 86 | #define ADP8870_BL_CUR_mA(I) ((I * 127) / 30) | ||
| 87 | |||
| 88 | /* | ||
| 89 | * L2 comparator current 0..1106uA | ||
| 90 | */ | ||
| 91 | #define ADP8870_L2_COMP_CURR_uA(I) ((I * 255) / 1106) | ||
| 92 | |||
| 93 | /* | ||
| 94 | * L3 comparator current 0..551uA | ||
| 95 | */ | ||
| 96 | #define ADP8870_L3_COMP_CURR_uA(I) ((I * 255) / 551) | ||
| 97 | |||
| 98 | /* | ||
| 99 | * L4 comparator current 0..275uA | ||
| 100 | */ | ||
| 101 | #define ADP8870_L4_COMP_CURR_uA(I) ((I * 255) / 275) | ||
| 102 | |||
| 103 | /* | ||
| 104 | * L5 comparator current 0..138uA | ||
| 105 | */ | ||
| 106 | #define ADP8870_L5_COMP_CURR_uA(I) ((I * 255) / 138) | ||
| 107 | |||
| 108 | struct adp8870_backlight_platform_data { | ||
| 109 | u8 bl_led_assign; /* 1 = Backlight 0 = Individual LED */ | ||
| 110 | u8 pwm_assign; /* 1 = Enables PWM mode */ | ||
| 111 | |||
| 112 | u8 bl_fade_in; /* Backlight Fade-In Timer */ | ||
| 113 | u8 bl_fade_out; /* Backlight Fade-Out Timer */ | ||
| 114 | u8 bl_fade_law; /* fade-on/fade-off transfer characteristic */ | ||
| 115 | |||
| 116 | u8 en_ambl_sens; /* 1 = enable ambient light sensor */ | ||
| 117 | u8 abml_filt; /* Light sensor filter time */ | ||
| 118 | |||
| 119 | u8 l1_daylight_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 120 | u8 l1_daylight_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 121 | u8 l2_bright_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 122 | u8 l2_bright_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 123 | u8 l3_office_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 124 | u8 l3_office_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 125 | u8 l4_indoor_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 126 | u8 l4_indor_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 127 | u8 l5_dark_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 128 | u8 l5_dark_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
| 129 | |||
| 130 | u8 l2_trip; /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ | ||
| 131 | u8 l2_hyst; /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ | ||
| 132 | u8 l3_trip; /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */ | ||
| 133 | u8 l3_hyst; /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */ | ||
| 134 | u8 l4_trip; /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */ | ||
| 135 | u8 l4_hyst; /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */ | ||
| 136 | u8 l5_trip; /* use L5_COMP_CURR_uA(I) 0 <= I <= 138 uA */ | ||
| 137 | u8 l5_hyst; /* use L6_COMP_CURR_uA(I) 0 <= I <= 138 uA */ | ||
| 138 | |||
| 139 | /** | ||
| 140 | * Independent Current Sinks / LEDS | ||
| 141 | * Sinks not assigned to the Backlight can be exposed to | ||
| 142 | * user space using the LEDS CLASS interface | ||
| 143 | */ | ||
| 144 | |||
| 145 | int num_leds; | ||
| 146 | struct led_info *leds; | ||
| 147 | u8 led_fade_in; /* LED Fade-In Timer */ | ||
| 148 | u8 led_fade_out; /* LED Fade-Out Timer */ | ||
| 149 | u8 led_fade_law; /* fade-on/fade-off transfer characteristic */ | ||
| 150 | u8 led_on_time; | ||
| 151 | }; | ||
| 152 | |||
| 153 | #endif /* __LINUX_I2C_ADP8870_H */ | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fb0e7329fee1..953352a88336 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -671,8 +671,8 @@ struct sysinfo { | |||
| 671 | 671 | ||
| 672 | #ifdef __CHECKER__ | 672 | #ifdef __CHECKER__ |
| 673 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) | 673 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) |
| 674 | #define BUILD_BUG_ON_ZERO(e) | 674 | #define BUILD_BUG_ON_ZERO(e) (0) |
| 675 | #define BUILD_BUG_ON_NULL(e) | 675 | #define BUILD_BUG_ON_NULL(e) ((void*)0) |
| 676 | #define BUILD_BUG_ON(condition) | 676 | #define BUILD_BUG_ON(condition) |
| 677 | #else /* __CHECKER__ */ | 677 | #else /* __CHECKER__ */ |
| 678 | 678 | ||
diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h index 2a0d7d651dc3..ee0c952188de 100644 --- a/include/linux/kmsg_dump.h +++ b/include/linux/kmsg_dump.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #ifndef _LINUX_KMSG_DUMP_H | 12 | #ifndef _LINUX_KMSG_DUMP_H |
| 13 | #define _LINUX_KMSG_DUMP_H | 13 | #define _LINUX_KMSG_DUMP_H |
| 14 | 14 | ||
| 15 | #include <linux/errno.h> | ||
| 15 | #include <linux/list.h> | 16 | #include <linux/list.h> |
| 16 | 17 | ||
| 17 | enum kmsg_dump_reason { | 18 | enum kmsg_dump_reason { |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 9724a38ee69d..50940da6adf3 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -84,6 +84,7 @@ int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); | |||
| 84 | 84 | ||
| 85 | extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); | 85 | extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); |
| 86 | extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); | 86 | extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); |
| 87 | extern struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm); | ||
| 87 | 88 | ||
| 88 | static inline | 89 | static inline |
| 89 | int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) | 90 | int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) |
| @@ -246,6 +247,11 @@ static inline struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page) | |||
| 246 | return NULL; | 247 | return NULL; |
| 247 | } | 248 | } |
| 248 | 249 | ||
| 250 | static inline struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm) | ||
| 251 | { | ||
| 252 | return NULL; | ||
| 253 | } | ||
| 254 | |||
| 249 | static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) | 255 | static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) |
| 250 | { | 256 | { |
| 251 | return 1; | 257 | return 1; |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 384eb5fe530b..e70564647039 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -358,6 +358,7 @@ struct backing_dev_info; | |||
| 358 | extern struct mm_struct *swap_token_mm; | 358 | extern struct mm_struct *swap_token_mm; |
| 359 | extern void grab_swap_token(struct mm_struct *); | 359 | extern void grab_swap_token(struct mm_struct *); |
| 360 | extern void __put_swap_token(struct mm_struct *); | 360 | extern void __put_swap_token(struct mm_struct *); |
| 361 | extern void disable_swap_token(struct mem_cgroup *memcg); | ||
| 361 | 362 | ||
| 362 | static inline int has_swap_token(struct mm_struct *mm) | 363 | static inline int has_swap_token(struct mm_struct *mm) |
| 363 | { | 364 | { |
| @@ -370,11 +371,6 @@ static inline void put_swap_token(struct mm_struct *mm) | |||
| 370 | __put_swap_token(mm); | 371 | __put_swap_token(mm); |
| 371 | } | 372 | } |
| 372 | 373 | ||
| 373 | static inline void disable_swap_token(void) | ||
| 374 | { | ||
| 375 | put_swap_token(swap_token_mm); | ||
| 376 | } | ||
| 377 | |||
| 378 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 374 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
| 379 | extern void | 375 | extern void |
| 380 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); | 376 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); |
| @@ -500,7 +496,7 @@ static inline int has_swap_token(struct mm_struct *mm) | |||
| 500 | return 0; | 496 | return 0; |
| 501 | } | 497 | } |
| 502 | 498 | ||
| 503 | static inline void disable_swap_token(void) | 499 | static inline void disable_swap_token(struct mem_cgroup *memcg) |
| 504 | { | 500 | { |
| 505 | } | 501 | } |
| 506 | 502 | ||
diff --git a/include/linux/topology.h b/include/linux/topology.h index b91a40e847d2..fc839bfa7935 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
| @@ -60,7 +60,7 @@ int arch_update_cpu_topology(void); | |||
| 60 | * (in whatever arch specific measurement units returned by node_distance()) | 60 | * (in whatever arch specific measurement units returned by node_distance()) |
| 61 | * then switch on zone reclaim on boot. | 61 | * then switch on zone reclaim on boot. |
| 62 | */ | 62 | */ |
| 63 | #define RECLAIM_DISTANCE 20 | 63 | #define RECLAIM_DISTANCE 30 |
| 64 | #endif | 64 | #endif |
| 65 | #ifndef PENALTY_FOR_NODE_WITH_CPUS | 65 | #ifndef PENALTY_FOR_NODE_WITH_CPUS |
| 66 | #define PENALTY_FOR_NODE_WITH_CPUS (1) | 66 | #define PENALTY_FOR_NODE_WITH_CPUS (1) |
diff --git a/include/linux/uts.h b/include/linux/uts.h index 73eb1ed36ec4..6ddbd86377de 100644 --- a/include/linux/uts.h +++ b/include/linux/uts.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #endif | 9 | #endif |
| 10 | 10 | ||
| 11 | #ifndef UTS_NODENAME | 11 | #ifndef UTS_NODENAME |
| 12 | #define UTS_NODENAME "(none)" /* set by sethostname() */ | 12 | #define UTS_NODENAME CONFIG_DEFAULT_HOSTNAME /* set by sethostname() */ |
| 13 | #endif | 13 | #endif |
| 14 | 14 | ||
| 15 | #ifndef UTS_DOMAINNAME | 15 | #ifndef UTS_DOMAINNAME |
