Searched refs:mode (Results 1 - 200 of 9552) sorted by relevance

1234567891011>>

/linux-4.1.27/drivers/gpu/drm/gma500/
H A Dmdfld_tpo_vid.c32 struct drm_display_mode *mode; tpo_vid_get_config_mode() local
37 mode = kzalloc(sizeof(*mode), GFP_KERNEL); tpo_vid_get_config_mode()
38 if (!mode) tpo_vid_get_config_mode()
42 mode->hdisplay = (ti->hactive_hi << 8) | ti->hactive_lo; tpo_vid_get_config_mode()
43 mode->vdisplay = (ti->vactive_hi << 8) | ti->vactive_lo; tpo_vid_get_config_mode()
44 mode->hsync_start = mode->hdisplay + tpo_vid_get_config_mode()
47 mode->hsync_end = mode->hsync_start + tpo_vid_get_config_mode()
50 mode->htotal = mode->hdisplay + ((ti->hblank_hi << 8) | tpo_vid_get_config_mode()
52 mode->vsync_start = tpo_vid_get_config_mode()
53 mode->vdisplay + ((ti->vsync_offset_hi << 8) | tpo_vid_get_config_mode()
55 mode->vsync_end = tpo_vid_get_config_mode()
56 mode->vsync_start + ((ti->vsync_pulse_width_hi << 8) | tpo_vid_get_config_mode()
58 mode->vtotal = mode->vdisplay + tpo_vid_get_config_mode()
60 mode->clock = ti->pixel_clock * 10; tpo_vid_get_config_mode()
62 dev_dbg(dev->dev, "hdisplay is %d\n", mode->hdisplay); tpo_vid_get_config_mode()
63 dev_dbg(dev->dev, "vdisplay is %d\n", mode->vdisplay); tpo_vid_get_config_mode()
64 dev_dbg(dev->dev, "HSS is %d\n", mode->hsync_start); tpo_vid_get_config_mode()
65 dev_dbg(dev->dev, "HSE is %d\n", mode->hsync_end); tpo_vid_get_config_mode()
66 dev_dbg(dev->dev, "htotal is %d\n", mode->htotal); tpo_vid_get_config_mode()
67 dev_dbg(dev->dev, "VSS is %d\n", mode->vsync_start); tpo_vid_get_config_mode()
68 dev_dbg(dev->dev, "VSE is %d\n", mode->vsync_end); tpo_vid_get_config_mode()
69 dev_dbg(dev->dev, "vtotal is %d\n", mode->vtotal); tpo_vid_get_config_mode()
70 dev_dbg(dev->dev, "clock is %d\n", mode->clock); tpo_vid_get_config_mode()
72 mode->hdisplay = 864; tpo_vid_get_config_mode()
73 mode->vdisplay = 480; tpo_vid_get_config_mode()
74 mode->hsync_start = 873; tpo_vid_get_config_mode()
75 mode->hsync_end = 876; tpo_vid_get_config_mode()
76 mode->htotal = 887; tpo_vid_get_config_mode()
77 mode->vsync_start = 487; tpo_vid_get_config_mode()
78 mode->vsync_end = 490; tpo_vid_get_config_mode()
79 mode->vtotal = 499; tpo_vid_get_config_mode()
80 mode->clock = 33264; tpo_vid_get_config_mode()
83 drm_mode_set_name(mode); tpo_vid_get_config_mode()
84 drm_mode_set_crtcinfo(mode, 0); tpo_vid_get_config_mode()
86 mode->type |= DRM_MODE_TYPE_PREFERRED; tpo_vid_get_config_mode()
88 return mode; tpo_vid_get_config_mode()
H A Dmdfld_tmd_vid.c35 struct drm_display_mode *mode; tmd_vid_get_config_mode() local
40 mode = kzalloc(sizeof(*mode), GFP_KERNEL); tmd_vid_get_config_mode()
41 if (!mode) tmd_vid_get_config_mode()
45 mode->hdisplay = (ti->hactive_hi << 8) | ti->hactive_lo; tmd_vid_get_config_mode()
46 mode->vdisplay = (ti->vactive_hi << 8) | ti->vactive_lo; tmd_vid_get_config_mode()
47 mode->hsync_start = mode->hdisplay + \ tmd_vid_get_config_mode()
50 mode->hsync_end = mode->hsync_start + \ tmd_vid_get_config_mode()
53 mode->htotal = mode->hdisplay + ((ti->hblank_hi << 8) | \ tmd_vid_get_config_mode()
55 mode->vsync_start = \ tmd_vid_get_config_mode()
56 mode->vdisplay + ((ti->vsync_offset_hi << 8) | \ tmd_vid_get_config_mode()
58 mode->vsync_end = \ tmd_vid_get_config_mode()
59 mode->vsync_start + ((ti->vsync_pulse_width_hi << 8) | \ tmd_vid_get_config_mode()
61 mode->vtotal = mode->vdisplay + \ tmd_vid_get_config_mode()
63 mode->clock = ti->pixel_clock * 10; tmd_vid_get_config_mode()
65 dev_dbg(dev->dev, "hdisplay is %d\n", mode->hdisplay); tmd_vid_get_config_mode()
66 dev_dbg(dev->dev, "vdisplay is %d\n", mode->vdisplay); tmd_vid_get_config_mode()
67 dev_dbg(dev->dev, "HSS is %d\n", mode->hsync_start); tmd_vid_get_config_mode()
68 dev_dbg(dev->dev, "HSE is %d\n", mode->hsync_end); tmd_vid_get_config_mode()
69 dev_dbg(dev->dev, "htotal is %d\n", mode->htotal); tmd_vid_get_config_mode()
70 dev_dbg(dev->dev, "VSS is %d\n", mode->vsync_start); tmd_vid_get_config_mode()
71 dev_dbg(dev->dev, "VSE is %d\n", mode->vsync_end); tmd_vid_get_config_mode()
72 dev_dbg(dev->dev, "vtotal is %d\n", mode->vtotal); tmd_vid_get_config_mode()
73 dev_dbg(dev->dev, "clock is %d\n", mode->clock); tmd_vid_get_config_mode()
75 mode->hdisplay = 480; tmd_vid_get_config_mode()
76 mode->vdisplay = 854; tmd_vid_get_config_mode()
77 mode->hsync_start = 487; tmd_vid_get_config_mode()
78 mode->hsync_end = 490; tmd_vid_get_config_mode()
79 mode->htotal = 499; tmd_vid_get_config_mode()
80 mode->vsync_start = 861; tmd_vid_get_config_mode()
81 mode->vsync_end = 865; tmd_vid_get_config_mode()
82 mode->vtotal = 873; tmd_vid_get_config_mode()
83 mode->clock = 33264; tmd_vid_get_config_mode()
86 drm_mode_set_name(mode); tmd_vid_get_config_mode()
87 drm_mode_set_crtcinfo(mode, 0); tmd_vid_get_config_mode()
89 mode->type |= DRM_MODE_TYPE_PREFERRED; tmd_vid_get_config_mode()
91 return mode; tmd_vid_get_config_mode()
H A Doaktrail_lvds.c78 static void oaktrail_lvds_dpms(struct drm_encoder *encoder, int mode) oaktrail_lvds_dpms() argument
83 if (mode == DRM_MODE_DPMS_ON) oaktrail_lvds_dpms()
92 struct drm_display_mode *mode, oaktrail_lvds_mode_set()
131 DRM_ERROR("Couldn't find connector when setting mode"); oaktrail_lvds_mode_set()
143 if ((mode->vdisplay != adjusted_mode->crtc_vdisplay) || oaktrail_lvds_mode_set()
144 (mode->hdisplay != adjusted_mode->crtc_hdisplay)) { oaktrail_lvds_mode_set()
145 if ((adjusted_mode->crtc_hdisplay * mode->vdisplay) == oaktrail_lvds_mode_set()
146 (mode->hdisplay * adjusted_mode->crtc_vdisplay)) oaktrail_lvds_mode_set()
149 mode->vdisplay) > (mode->hdisplay * oaktrail_lvds_mode_set()
221 /* Returns the panel fixed mode from configuration. */
226 struct drm_display_mode *mode = NULL; oaktrail_lvds_get_configuration_mode() local
234 mode = kzalloc(sizeof(*mode), GFP_KERNEL); oaktrail_lvds_get_configuration_mode()
235 if (!mode) oaktrail_lvds_get_configuration_mode()
238 mode->hdisplay = (ti->hactive_hi << 8) | ti->hactive_lo; oaktrail_lvds_get_configuration_mode()
239 mode->vdisplay = (ti->vactive_hi << 8) | ti->vactive_lo; oaktrail_lvds_get_configuration_mode()
240 mode->hsync_start = mode->hdisplay + \ oaktrail_lvds_get_configuration_mode()
243 mode->hsync_end = mode->hsync_start + \ oaktrail_lvds_get_configuration_mode()
246 mode->htotal = mode->hdisplay + ((ti->hblank_hi << 8) | \ oaktrail_lvds_get_configuration_mode()
248 mode->vsync_start = \ oaktrail_lvds_get_configuration_mode()
249 mode->vdisplay + ((ti->vsync_offset_hi << 4) | \ oaktrail_lvds_get_configuration_mode()
251 mode->vsync_end = \ oaktrail_lvds_get_configuration_mode()
252 mode->vsync_start + ((ti->vsync_pulse_width_hi << 4) | \ oaktrail_lvds_get_configuration_mode()
254 mode->vtotal = mode->vdisplay + \ oaktrail_lvds_get_configuration_mode()
256 mode->clock = ti->pixel_clock * 10; oaktrail_lvds_get_configuration_mode()
258 printk(KERN_INFO "hdisplay is %d\n", mode->hdisplay); oaktrail_lvds_get_configuration_mode()
259 printk(KERN_INFO "vdisplay is %d\n", mode->vdisplay); oaktrail_lvds_get_configuration_mode()
260 printk(KERN_INFO "HSS is %d\n", mode->hsync_start); oaktrail_lvds_get_configuration_mode()
261 printk(KERN_INFO "HSE is %d\n", mode->hsync_end); oaktrail_lvds_get_configuration_mode()
262 printk(KERN_INFO "htotal is %d\n", mode->htotal); oaktrail_lvds_get_configuration_mode()
263 printk(KERN_INFO "VSS is %d\n", mode->vsync_start); oaktrail_lvds_get_configuration_mode()
264 printk(KERN_INFO "VSE is %d\n", mode->vsync_end); oaktrail_lvds_get_configuration_mode()
265 printk(KERN_INFO "vtotal is %d\n", mode->vtotal); oaktrail_lvds_get_configuration_mode()
266 printk(KERN_INFO "clock is %d\n", mode->clock); oaktrail_lvds_get_configuration_mode()
268 mode_dev->panel_fixed_mode = mode; oaktrail_lvds_get_configuration_mode()
271 /* Use the BIOS VBT mode if available */ oaktrail_lvds_get_configuration_mode()
276 /* Then try the LVDS VBT mode */ oaktrail_lvds_get_configuration_mode()
283 /* If we still got no mode then bail */ oaktrail_lvds_get_configuration_mode()
375 * Attempt to get the fixed panel mode from DDC. Assume that the oaktrail_lvds_init()
376 * preferred mode is the right one. oaktrail_lvds_init()
403 /* If we still don't have a mode after all that, give up. */ oaktrail_lvds_init()
91 oaktrail_lvds_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) oaktrail_lvds_mode_set() argument
/linux-4.1.27/arch/x86/boot/
H A Dvideo-mode.c12 * arch/i386/boot/video-mode.c
14 * Set the video mode. This is separated out into a different
27 int do_restore; /* Screen contents changed during mode flip */
28 int graphic_mode; /* Graphic mode with linear frame buffer */
30 /* Probe the video drivers and have them generate their mode lists. */ probe_cards()
51 /* Test if a mode is defined */ mode_defined()
52 int mode_defined(u16 mode) mode_defined() argument
61 if (mi->mode == mode) mode_defined()
69 /* Set mode (without recalc) */ raw_set_mode()
70 static int raw_set_mode(u16 mode, u16 *real_mode) raw_set_mode() argument
77 mode &= ~VIDEO_RECALC; raw_set_mode()
79 /* Scan for mode based on fixed ID, position, or resolution */ raw_set_mode()
86 if ((mode == nmode && visible) || raw_set_mode()
87 mode == mi->mode || raw_set_mode()
88 mode == (mi->y << 8)+mi->x) { raw_set_mode()
89 *real_mode = mi->mode; raw_set_mode()
98 /* Nothing found? Is it an "exceptional" (unprobed) mode? */ raw_set_mode()
100 if (mode >= card->xmode_first && raw_set_mode()
101 mode < card->xmode_first+card->xmode_n) { raw_set_mode()
103 *real_mode = mix.mode = mode; raw_set_mode()
144 /* Set mode (with recalc if specified) */ set_mode()
145 int set_mode(u16 mode) set_mode() argument
150 /* Very special mode numbers... */ set_mode()
151 if (mode == VIDEO_CURRENT_MODE) set_mode()
153 else if (mode == NORMAL_VGA) set_mode()
154 mode = VIDEO_80x25; set_mode()
155 else if (mode == EXTENDED_VGA) set_mode()
156 mode = VIDEO_8POINT; set_mode()
158 rv = raw_set_mode(mode, &real_mode); set_mode()
162 if (mode & VIDEO_RECALC) set_mode()
165 /* Save the canonical mode number for the kernel, not set_mode()
H A Dvideo-bios.c23 /* Set a conventional BIOS mode */
24 static int set_bios_mode(u8 mode);
28 return set_bios_mode(mi->mode - VIDEO_FIRST_BIOS); bios_set_mode()
31 static int set_bios_mode(u8 mode) set_bios_mode() argument
37 ireg.al = mode; /* AH=0x00 Set Video Mode */ set_bios_mode()
48 if (new_mode == mode) set_bios_mode()
55 video mode. */ set_bios_mode()
65 u8 mode; bios_probe() local
83 for (mode = 0x14; mode <= 0x7f; mode++) { bios_probe()
87 if (mode_defined(VIDEO_FIRST_BIOS+mode)) bios_probe()
90 if (set_bios_mode(mode)) bios_probe()
93 /* Try to verify that it's a text mode. */ bios_probe()
108 mi->mode = VIDEO_FIRST_BIOS+mode; bios_probe()
H A Dvideo-vga.c40 /* Set basic 80x25 mode */ vga_set_basic_mode()
44 u8 mode; vga_set_basic_mode() local
48 /* Query current mode */ vga_set_basic_mode()
51 mode = oreg.al; vga_set_basic_mode()
53 if (mode != 3 && mode != 7) vga_set_basic_mode()
54 mode = 3; vga_set_basic_mode()
56 /* Set the mode */ vga_set_basic_mode()
57 ireg.ax = mode; /* AH=0: set mode */ vga_set_basic_mode()
60 return mode; vga_set_basic_mode()
116 /* Set 80x43 mode on VGA (not EGA) */ vga_set_80x43()
126 /* Reset video mode */ vga_set_80x43()
193 static int vga_set_mode(struct mode_info *mode) vga_set_mode() argument
195 /* Set the basic mode */ vga_set_mode()
199 force_x = mode->x; vga_set_mode()
200 force_y = mode->y; vga_set_mode()
202 switch (mode->mode) { vga_set_mode()
H A Dvideo-vesa.c36 u16 mode; vesa_probe() local
56 while ((mode = rdfs16(mode_ptr)) != 0xffff) { vesa_probe()
60 break; /* Heap full, can't save mode info */ vesa_probe()
62 if (mode & ~0x1ff) vesa_probe()
68 ireg.cx = mode; vesa_probe()
79 mi->mode = mode + VIDEO_FIRST_VESA; vesa_probe()
89 /* Graphics mode, color, linear frame buffer vesa_probe()
90 supported. Only register the mode if vesa_probe()
94 mi->mode = mode + VIDEO_FIRST_VESA; vesa_probe()
106 static int vesa_set_mode(struct mode_info *mode) vesa_set_mode() argument
110 u16 vesa_mode = mode->mode - VIDEO_FIRST_VESA; vesa_set_mode()
124 /* It's a supported text mode */ vesa_set_mode()
128 /* It's a graphics mode with linear frame buffer */ vesa_set_mode()
133 return -1; /* Invalid mode */ vesa_set_mode()
147 /* Text mode */ vesa_set_mode()
148 force_x = mode->x; vesa_set_mode()
149 force_y = mode->y; vesa_set_mode()
152 /* Graphics mode */ vesa_set_mode()
162 /* Switch DAC to 8-bit mode */ vesa_dac_set_8bits()
168 /* If possible, switch the DAC to 8-bit mode */ vesa_dac_set_8bits()
190 /* Save the VESA protected mode info */ vesa_store_pm_info()
207 * Save video mode parameters for graphics mode
211 /* Tell the kernel we're in VESA graphics mode */ vesa_store_mode_params_graphics()
236 * after mode-setting.
H A Dvideo.c13 * Select video mode
56 * Store the video mode parameters for later usage by the kernel.
58 * parameters in the default 80x25 mode -- these are set directly,
66 /* For graphics mode, it is up to the mode-setting driver store_mode_params()
75 /* MDA, HGC, or VGA in monochrome mode */ store_mode_params()
166 u16 mode_id = mi->mode ? mi->mode : display_menu()
170 continue; /* Hidden mode */ display_menu()
222 puts("Enter a video mode or \"scan\" to scan for " mode_menu()
267 return; /* Can't restore onto a graphic mode */ restore_screen()
319 u16 mode = boot_params.hdr.vid_mode; set_video() local
328 if (mode == ASK_VGA) set_video()
329 mode = mode_menu(); set_video()
331 if (!set_mode(mode)) set_video()
334 printf("Undefined video mode number: %x\n", mode); set_video()
335 mode = ASK_VGA; set_video()
337 boot_params.hdr.vid_mode = mode; set_video()
/linux-4.1.27/arch/blackfin/lib/
H A Dgcclib.h10 typedef unsigned int UQItype __attribute__ ((mode(QI)));
11 typedef int SItype __attribute__ ((mode(SI)));
12 typedef unsigned int USItype __attribute__ ((mode(SI)));
13 typedef int DItype __attribute__ ((mode(DI)));
14 typedef int word_type __attribute__ ((mode(__word__)));
15 typedef unsigned int UDItype __attribute__ ((mode(DI)));
/linux-4.1.27/arch/x86/include/uapi/asm/
H A Dboot.h5 #define NORMAL_VGA 0xffff /* 80x25 mode */
6 #define EXTENDED_VGA 0xfffe /* 80x50 mode */
/linux-4.1.27/drivers/gpu/drm/omapdrm/
H A Domap_connector.c45 void copy_timings_omap_to_drm(struct drm_display_mode *mode, copy_timings_omap_to_drm() argument
48 mode->clock = timings->pixelclock / 1000; copy_timings_omap_to_drm()
50 mode->hdisplay = timings->x_res; copy_timings_omap_to_drm()
51 mode->hsync_start = mode->hdisplay + timings->hfp; copy_timings_omap_to_drm()
52 mode->hsync_end = mode->hsync_start + timings->hsw; copy_timings_omap_to_drm()
53 mode->htotal = mode->hsync_end + timings->hbp; copy_timings_omap_to_drm()
55 mode->vdisplay = timings->y_res; copy_timings_omap_to_drm()
56 mode->vsync_start = mode->vdisplay + timings->vfp; copy_timings_omap_to_drm()
57 mode->vsync_end = mode->vsync_start + timings->vsw; copy_timings_omap_to_drm()
58 mode->vtotal = mode->vsync_end + timings->vbp; copy_timings_omap_to_drm()
60 mode->flags = 0; copy_timings_omap_to_drm()
63 mode->flags |= DRM_MODE_FLAG_INTERLACE; copy_timings_omap_to_drm()
66 mode->flags |= DRM_MODE_FLAG_PHSYNC; copy_timings_omap_to_drm()
68 mode->flags |= DRM_MODE_FLAG_NHSYNC; copy_timings_omap_to_drm()
71 mode->flags |= DRM_MODE_FLAG_PVSYNC; copy_timings_omap_to_drm()
73 mode->flags |= DRM_MODE_FLAG_NVSYNC; copy_timings_omap_to_drm()
77 struct drm_display_mode *mode) copy_timings_drm_to_omap()
79 timings->pixelclock = mode->clock * 1000; copy_timings_drm_to_omap()
81 timings->x_res = mode->hdisplay; copy_timings_drm_to_omap()
82 timings->hfp = mode->hsync_start - mode->hdisplay; copy_timings_drm_to_omap()
83 timings->hsw = mode->hsync_end - mode->hsync_start; copy_timings_drm_to_omap()
84 timings->hbp = mode->htotal - mode->hsync_end; copy_timings_drm_to_omap()
86 timings->y_res = mode->vdisplay; copy_timings_drm_to_omap()
87 timings->vfp = mode->vsync_start - mode->vdisplay; copy_timings_drm_to_omap()
88 timings->vsw = mode->vsync_end - mode->vsync_start; copy_timings_drm_to_omap()
89 timings->vbp = mode->vtotal - mode->vsync_end; copy_timings_drm_to_omap()
91 timings->interlace = !!(mode->flags & DRM_MODE_FLAG_INTERLACE); copy_timings_drm_to_omap()
93 if (mode->flags & DRM_MODE_FLAG_PHSYNC) copy_timings_drm_to_omap()
98 if (mode->flags & DRM_MODE_FLAG_PVSYNC) copy_timings_drm_to_omap()
162 * LCD panels) we just return a single mode corresponding to the omap_connector_get_modes()
183 struct drm_display_mode *mode = drm_mode_create(dev); omap_connector_get_modes() local
188 copy_timings_omap_to_drm(mode, &timings); omap_connector_get_modes()
190 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; omap_connector_get_modes()
191 drm_mode_set_name(mode); omap_connector_get_modes()
192 drm_mode_probed_add(connector, mode); omap_connector_get_modes()
201 struct drm_display_mode *mode) omap_connector_mode_valid()
211 copy_timings_drm_to_omap(&timings, mode); omap_connector_mode_valid()
212 mode->vrefresh = drm_mode_vrefresh(mode); omap_connector_mode_valid()
234 new_mode = drm_mode_duplicate(dev, mode); omap_connector_mode_valid()
237 if (mode->vrefresh == drm_mode_vrefresh(new_mode)) omap_connector_mode_valid()
242 DBG("connector: mode %s: " omap_connector_mode_valid()
245 mode->base.id, mode->name, mode->vrefresh, mode->clock, omap_connector_mode_valid()
246 mode->hdisplay, mode->hsync_start, omap_connector_mode_valid()
247 mode->hsync_end, mode->htotal, omap_connector_mode_valid()
248 mode->vdisplay, mode->vsync_start, omap_connector_mode_valid()
249 mode->vsync_end, mode->vtotal, mode->type, mode->flags); omap_connector_mode_valid()
76 copy_timings_drm_to_omap(struct omap_video_timings *timings, struct drm_display_mode *mode) copy_timings_drm_to_omap() argument
200 omap_connector_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) omap_connector_mode_valid() argument
/linux-4.1.27/include/uapi/linux/netfilter/
H A Dxt_CONNSECMARK.h12 __u8 mode; member in struct:xt_connsecmark_target_info
H A Dxt_SECMARK.h10 * 'mode' refers to the specific security subsystem which the
17 __u8 mode; member in struct:xt_secmark_target_info
/linux-4.1.27/arch/mn10300/include/asm/
H A Dpio-regs.h20 #define P0MD __SYSREG(0xdb000000, u16) /* mode reg */
22 #define P0MD_0_IN 0x0000 /* input mode */
23 #define P0MD_0_OUT 0x0001 /* output mode */
24 #define P0MD_0_TM0IO 0x0002 /* timer 0 I/O mode */
29 #define P0MD_1_TM1IO 0x0008 /* timer 1 I/O mode */
34 #define P0MD_2_TM2IO 0x0020 /* timer 2 I/O mode */
38 #define P0MD_3_TM3IO 0x0080 /* timer 3 I/O mode */
42 #define P0MD_4_TM4IO 0x0200 /* timer 4 I/O mode */
47 #define P0MD_5_TM5IO 0x0800 /* timer 5 I/O mode */
51 #define P0MD_6_TM6IOA 0x2000 /* timer 6 I/O mode A */
55 #define P0MD_7_TM6IOB 0x8000 /* timer 6 I/O mode B */
79 #define P1MD __SYSREG(0xdb000100, u16) /* mode reg */
81 #define P1MD_0_IN 0x0000 /* input mode */
82 #define P1MD_0_OUT 0x0001 /* output mode */
83 #define P1MD_0_TM7IO 0x0002 /* timer 7 I/O mode */
84 #define P1MD_0_ADTRG 0x0003 /* A/D converter trigger mode */
88 #define P1MD_1_TM8IO 0x0008 /* timer 8 I/O mode */
89 #define P1MD_1_XDMR0 0x000c /* DMA request input 0 mode */
93 #define P1MD_2_TM9IO 0x0020 /* timer 9 I/O mode */
94 #define P1MD_2_XDMR1 0x0030 /* DMA request input 1 mode */
98 #define P1MD_3_TM10IO 0x0080 /* timer 10 I/O mode */
99 #define P1MD_3_FRQS0 0x00c0 /* CPU clock multiplier setting input 0 mode */
103 #define P1MD_4_TM11IO 0x0200 /* timer 11 I/O mode */
104 #define P1MD_4_FRQS1 0x0300 /* CPU clock multiplier setting input 1 mode */
121 #define P2MD __SYSREG(0xdb000200, u16) /* mode reg */
123 #define P2MD_0_IN 0x0000 /* input mode */
124 #define P2MD_0_OUT 0x0001 /* output mode */
125 #define P2MD_0_BOOTBW 0x0003 /* boot bus width selector mode */
129 #define P2MD_1_BOOTSEL 0x000c /* boot device selector mode */
136 #define P2MD_3_CKIO 0x00c0 /* mode */
140 #define P2MD_4_CMOD 0x0300 /* mode */
147 #define P3MD __SYSREG(0xdb000300, u16) /* mode reg */
149 #define P3MD_0_IN 0x0000 /* input mode */
150 #define P3MD_0_OUT 0x0001 /* output mode */
151 #define P3MD_0_AFRXD 0x0002 /* AFR interface mode */
155 #define P3MD_1_AFTXD 0x0008 /* AFR interface mode */
159 #define P3MD_2_AFSCLK 0x0020 /* AFR interface mode */
163 #define P3MD_3_AFFS 0x0080 /* AFR interface mode */
167 #define P3MD_4_AFEHC 0x0200 /* AFR interface mode */
173 #define P4MD __SYSREG(0xdb000400, u16) /* mode reg */
175 #define P4MD_0_IN 0x0000 /* input mode */
176 #define P4MD_0_OUT 0x0001 /* output mode */
177 #define P4MD_0_SCL0 0x0002 /* I2C/serial mode */
211 #define P5MD __SYSREG(0xdb000500, u16) /* mode reg */
213 #define P5MD_0_IN 0x0000 /* input mode */
214 #define P5MD_0_OUT 0x0001 /* output mode */
215 #define P5MD_0_IRTXD 0x0002 /* IrDA mode */
216 #define P5MD_0_SOUT 0x0004 /* serial mode */
220 #define P5MD_1_IRRXDS 0x0008 /* IrDA mode */
221 #define P5MD_1_SIN 0x000c /* serial mode */
225 #define P5MD_2_IRRXDF 0x0020 /* IrDA mode */
/linux-4.1.27/drivers/gpu/drm/msm/edp/
H A Dedp_bridge.c55 struct drm_display_mode *mode, edp_bridge_mode_set()
63 DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", edp_bridge_mode_set()
64 mode->base.id, mode->name, edp_bridge_mode_set()
65 mode->vrefresh, mode->clock, edp_bridge_mode_set()
66 mode->hdisplay, mode->hsync_start, edp_bridge_mode_set()
67 mode->hsync_end, mode->htotal, edp_bridge_mode_set()
68 mode->vdisplay, mode->vsync_start, edp_bridge_mode_set()
69 mode->vsync_end, mode->vtotal, edp_bridge_mode_set()
70 mode->type, mode->flags); edp_bridge_mode_set()
54 edp_bridge_mode_set(struct drm_bridge *bridge, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) edp_bridge_mode_set() argument
/linux-4.1.27/drivers/hid/
H A Dhid-saitek.c11 * Fixes the mode button which cycles through three constantly pressed
37 int mode; member in struct:saitek_sc
54 ssc->mode = -1; saitek_probe()
103 /* R.A.T.7 uses bits 13, 14, 15 for the mode */ saitek_raw_event()
104 int mode = -1; saitek_raw_event() local
106 mode = 0; saitek_raw_event()
108 mode = 1; saitek_raw_event()
110 mode = 2; saitek_raw_event()
112 /* clear mode bits */ saitek_raw_event()
115 if (mode != ssc->mode) { saitek_raw_event()
116 hid_dbg(hdev, "entered mode %d\n", mode); saitek_raw_event()
117 if (ssc->mode != -1) { saitek_raw_event()
118 /* use bit 13 as the mode button */ saitek_raw_event()
121 ssc->mode = mode; saitek_raw_event()
125 /* M.M.O.7 uses bits 8, 22, 23 for the mode */ saitek_raw_event()
126 int mode = -1; saitek_raw_event() local
128 mode = 0; saitek_raw_event()
130 mode = 1; saitek_raw_event()
132 mode = 2; saitek_raw_event()
134 /* clear mode bits */ saitek_raw_event()
138 if (mode != ssc->mode) { saitek_raw_event()
139 hid_dbg(hdev, "entered mode %d\n", mode); saitek_raw_event()
140 if (ssc->mode != -1) { saitek_raw_event()
141 /* use bit 8 as the mode button, bits 22 saitek_raw_event()
147 ssc->mode = mode; saitek_raw_event()
/linux-4.1.27/include/linux/platform_data/
H A Dad7791.h6 * @buffered: If set to true configure the device for buffered input mode.
8 * @unipolar: If set to true sample in unipolar mode, if set to false sample in
9 * bipolar mode.
H A Dad7266.h25 * enum ad7266_mode - AD7266 sample mode
26 * @AD7266_MODE_DIFF: Device is configured for full differential mode
28 * @AD7266_MODE_PSEUDO_DIFF: Device is configured for pseudo differential mode
30 * @AD7266_MODE_SINGLE_ENDED: Device is configured for single-ended mode
42 * @mode: Sample mode the device is configured for
49 enum ad7266_mode mode; member in struct:ad7266_platform_data
H A Dirda-pxaficp.h12 void (*transceiver_mode)(struct device *dev, int mode);
22 void pxa2xx_transceiver_mode(struct device *dev, int mode);
H A Dbfin_rotary.h13 /* mode bitmasks */
14 #define ROT_QUAD_ENC CNTMODE_QUADENC /* quadrature/grey code encoder mode */
15 #define ROT_BIN_ENC CNTMODE_BINENC /* binary encoder mode */
16 #define ROT_UD_CNT CNTMODE_UDCNT /* rotary counter mode */
17 #define ROT_DIR_CNT CNTMODE_DIRCNT /* direction counter mode */
41 unsigned short mode; member in struct:bfin_rotary_platform_data
59 #define CNTMODE_QUADENC (0 << CNTMODE_SHIFT) /* quadrature encoder mode */
60 #define CNTMODE_BINENC (1 << CNTMODE_SHIFT) /* binary encoder mode */
61 #define CNTMODE_UDCNT (2 << CNTMODE_SHIFT) /* up/down counter mode */
62 #define CNTMODE_DIRCNT (4 << CNTMODE_SHIFT) /* direction counter mode */
63 #define CNTMODE_DIRTMR (5 << CNTMODE_SHIFT) /* direction timer mode */
65 #define BNDMODE_COMP (0 << BNDMODE_SHIFT) /* boundary compare mode */
66 #define BNDMODE_ZERO (1 << BNDMODE_SHIFT) /* boundary compare and zero mode */
67 #define BNDMODE_CAPT (2 << BNDMODE_SHIFT) /* boundary capture mode */
68 #define BNDMODE_AEXT (3 << BNDMODE_SHIFT) /* boundary auto-extend mode */
H A Dad5449.h18 * @AD5449_SDO_OPEN_DRAIN: Operate the SDO pin in open-drain mode.
19 * @AD5449_SDO_DISABLED: Disable the SDO pin, in this mode it is not possible to
31 * @sdo_mode: SDO pin mode
H A Dusb-rcar-phy.h19 unsigned penc1:1; /* Output of the PENC1 pin in function mode */
22 /* Set to false on port 1 in function mode */
24 /* Set to true on port 1 in function mode */
/linux-4.1.27/drivers/gpu/drm/msm/mdp/mdp5/
H A Dmdp5_encoder.c114 const struct drm_display_mode *mode, mdp5_encoder_mode_fixup()
121 struct drm_display_mode *mode, mdp5_encoder_mode_set()
135 mode = adjusted_mode; mdp5_encoder_mode_set()
137 DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", mdp5_encoder_mode_set()
138 mode->base.id, mode->name, mdp5_encoder_mode_set()
139 mode->vrefresh, mode->clock, mdp5_encoder_mode_set()
140 mode->hdisplay, mode->hsync_start, mdp5_encoder_mode_set()
141 mode->hsync_end, mode->htotal, mdp5_encoder_mode_set()
142 mode->vdisplay, mode->vsync_start, mdp5_encoder_mode_set()
143 mode->vsync_end, mode->vtotal, mdp5_encoder_mode_set()
144 mode->type, mode->flags); mdp5_encoder_mode_set()
147 if (mode->flags & DRM_MODE_FLAG_NHSYNC) mdp5_encoder_mode_set()
149 if (mode->flags & DRM_MODE_FLAG_NVSYNC) mdp5_encoder_mode_set()
177 hsync_start_x = (mode->htotal - mode->hsync_start); mdp5_encoder_mode_set()
178 hsync_end_x = mode->htotal - (mode->hsync_start - mode->hdisplay) - 1; mdp5_encoder_mode_set()
180 vsync_period = mode->vtotal * mode->htotal; mdp5_encoder_mode_set()
181 vsync_len = (mode->vsync_end - mode->vsync_start) * mode->htotal; mdp5_encoder_mode_set()
182 display_v_start = (mode->vtotal - mode->vsync_start) * mode->htotal + dtv_hsync_skew; mdp5_encoder_mode_set()
183 display_v_end = vsync_period - ((mode->vsync_start - mode->vdisplay) * mode->htotal) + dtv_hsync_skew - 1; mdp5_encoder_mode_set()
191 display_v_start += mode->htotal - mode->hsync_start; mdp5_encoder_mode_set()
192 display_v_end -= mode->hsync_start - mode->hdisplay; mdp5_encoder_mode_set()
198 MDP5_INTF_HSYNC_CTL_PULSEW(mode->hsync_end - mode->hsync_start) | mdp5_encoder_mode_set()
199 MDP5_INTF_HSYNC_CTL_PERIOD(mode->htotal)); mdp5_encoder_mode_set()
303 /* Switch slave encoder's TimingGen Sync mode, mdp5_encoder_set_split_display()
317 /* Dumb Panel, Sync mode */ mdp5_encoder_set_split_display()
113 mdp5_encoder_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) mdp5_encoder_mode_fixup() argument
120 mdp5_encoder_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) mdp5_encoder_mode_set() argument
H A Dmdp5_cmd_encoder.c97 struct drm_display_mode *mode) pingpong_tearcheck_setup()
110 total_lines_x100 = mode->vtotal * mode->vrefresh; pingpong_tearcheck_setup()
113 __func__, mode->vtotal, mode->vrefresh); pingpong_tearcheck_setup()
133 REG_MDP5_PP_VSYNC_INIT_VAL(pp_id), mode->vdisplay); pingpong_tearcheck_setup()
134 mdp5_write(mdp5_kms, REG_MDP5_PP_RD_PTR_IRQ(pp_id), mode->vdisplay + 1); pingpong_tearcheck_setup()
135 mdp5_write(mdp5_kms, REG_MDP5_PP_START_POS(pp_id), mode->vdisplay); pingpong_tearcheck_setup()
190 const struct drm_display_mode *mode, mdp5_cmd_encoder_mode_fixup()
197 struct drm_display_mode *mode, mdp5_cmd_encoder_mode_set()
202 mode = adjusted_mode; mdp5_cmd_encoder_mode_set()
204 DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", mdp5_cmd_encoder_mode_set()
205 mode->base.id, mode->name, mdp5_cmd_encoder_mode_set()
206 mode->vrefresh, mode->clock, mdp5_cmd_encoder_mode_set()
207 mode->hdisplay, mode->hsync_start, mdp5_cmd_encoder_mode_set()
208 mode->hsync_end, mode->htotal, mdp5_cmd_encoder_mode_set()
209 mode->vdisplay, mode->vsync_start, mdp5_cmd_encoder_mode_set()
210 mode->vsync_end, mode->vtotal, mdp5_cmd_encoder_mode_set()
211 mode->type, mode->flags); mdp5_cmd_encoder_mode_set()
212 pingpong_tearcheck_setup(encoder, mode); mdp5_cmd_encoder_mode_set()
290 /* Smart Panel, Sync mode */ mdp5_cmd_encoder_set_split_display()
305 /* initialize command mode encoder */ mdp5_cmd_encoder_init()
314 (intf->mode != MDP5_INTF_DSI_MODE_COMMAND))) { mdp5_cmd_encoder_init()
96 pingpong_tearcheck_setup(struct drm_encoder *encoder, struct drm_display_mode *mode) pingpong_tearcheck_setup() argument
189 mdp5_cmd_encoder_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) mdp5_cmd_encoder_mode_fixup() argument
196 mdp5_cmd_encoder_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) mdp5_cmd_encoder_mode_set() argument
/linux-4.1.27/arch/x86/realmode/rm/
H A Dwakeup.h14 u16 video_mode; /* Video mode number */
15 u32 pmode_entry; /* Protected mode resume point, 32-bit only */
17 u32 pmode_cr0; /* Protected mode cr0 */
18 u32 pmode_cr3; /* Protected mode cr3 */
19 u32 pmode_cr4; /* Protected mode cr4 */
20 u32 pmode_efer_low; /* Protected mode EFER */
23 u32 pmode_misc_en_low; /* Protected mode MISC_ENABLE */
H A Dreboot.S10 * mode and jumping to the BIOS reset entry point, as if the CPU has
29 /* Disable paging to drop us out of long mode */
45 /* Set up the IDT for real mode. */
50 * mode. The GDT is not used in real mode; it is just needed here to
67 * This is 16-bit protected mode code to disable paging and the cache,
68 * switch to real mode and jump to the BIOS reset code.
70 * The instruction that switches to real mode by writing to CR0 must be
72 * valid value for real mode, and flushes the prefetch queue to avoid
74 * mode.
77 * (protected-mode enable) and TS (task switch for coprocessor state
130 .word 0xffff /* Length - real mode default value */
131 .long 0 /* Base - real mode default value */
137 .word 0xffff /* Length - real mode default value */
151 * base value 0x100; since this is consistent with real mode
H A Dtrampoline_32.S10 * in real mode with no stack, but the rest of the
16 * On entry to trampoline_start, the processor is in real mode
19 * of the real mode code before doing anything further.
48 * lgdt will not be able to load the address as in real mode default
55 movw $1, %dx # protected mode (PE) bit
56 lmsw %dx # into protected mode
/linux-4.1.27/drivers/ide/
H A Dide-xfer-mode.c20 * ide_xfer_verbose - return IDE mode names
21 * @mode: transfer mode
23 * Returns a constant string giving the name of the mode
27 const char *ide_xfer_verbose(u8 mode) ide_xfer_verbose() argument
30 u8 i = mode & 0xf; ide_xfer_verbose()
32 if (mode >= XFER_UDMA_0 && mode <= XFER_UDMA_7) ide_xfer_verbose()
34 else if (mode >= XFER_MW_DMA_0 && mode <= XFER_MW_DMA_4) ide_xfer_verbose()
36 else if (mode >= XFER_SW_DMA_0 && mode <= XFER_SW_DMA_2) ide_xfer_verbose()
38 else if (mode >= XFER_PIO_0 && mode <= XFER_PIO_6) ide_xfer_verbose()
40 else if (mode == XFER_PIO_SLOW) ide_xfer_verbose()
50 * ide_get_best_pio_mode - get PIO mode from drive
52 * @mode_wanted: preferred mode
53 * @max_mode: highest allowed mode
58 * Drive PIO mode is auto-selected if 255 is passed as mode_wanted.
122 int ide_set_pio_mode(ide_drive_t *drive, const u8 mode) ide_set_pio_mode() argument
135 * set transfer mode on the device in ->set_pio_mode method... ide_set_pio_mode()
138 drive->pio_mode = mode; ide_set_pio_mode()
144 if (ide_config_drive_speed(drive, mode)) ide_set_pio_mode()
146 drive->pio_mode = mode; ide_set_pio_mode()
150 drive->pio_mode = mode; ide_set_pio_mode()
152 return ide_config_drive_speed(drive, mode); ide_set_pio_mode()
156 int ide_set_dma_mode(ide_drive_t *drive, const u8 mode) ide_set_dma_mode() argument
168 if (ide_config_drive_speed(drive, mode)) ide_set_dma_mode()
170 drive->dma_mode = mode; ide_set_dma_mode()
174 drive->dma_mode = mode; ide_set_dma_mode()
176 return ide_config_drive_speed(drive, mode); ide_set_dma_mode()
200 * - report device max PIO mode ide_set_pio()
201 * - check req_pio != 255 against device max PIO mode ide_set_pio()
212 * ide_rate_filter - filter transfer mode
225 u8 mode = ide_find_dma_mode(drive, speed); ide_rate_filter() local
227 if (mode == 0) { ide_rate_filter()
229 mode = fls(hwif->pio_mask) - 1 + XFER_PIO_0; ide_rate_filter()
231 mode = XFER_PIO_4; ide_rate_filter()
234 /* printk("%s: mode 0x%02x, speed 0x%02x\n", __func__, mode, speed); */ ide_rate_filter()
236 return min(speed, mode); ide_rate_filter()
/linux-4.1.27/net/netfilter/
H A Dxt_SECMARK.c30 static u8 mode; variable
38 BUG_ON(info->mode != mode); secmark_tg()
40 switch (mode) { secmark_tg()
94 if (mode && mode != info->mode) { secmark_tg_check()
95 pr_info("mode already set to %hu cannot mix with " secmark_tg_check()
96 "rules for mode %hu\n", mode, info->mode); secmark_tg_check()
100 switch (info->mode) { secmark_tg_check()
104 pr_info("invalid mode: %hu\n", info->mode); secmark_tg_check()
112 if (!mode) secmark_tg_check()
113 mode = info->mode; secmark_tg_check()
119 switch (mode) { secmark_tg_destroy()
H A Dxt_HL.c40 switch (info->mode) { ttl_tg()
80 switch (info->mode) { hl_tg6()
108 if (info->mode > IPT_TTL_MAXMODE) { ttl_tg_check()
109 pr_info("TTL: invalid or unknown mode %u\n", info->mode); ttl_tg_check()
112 if (info->mode != IPT_TTL_SET && info->ttl == 0) ttl_tg_check()
121 if (info->mode > IP6T_HL_MAXMODE) { hl_tg6_check()
122 pr_info("invalid or unknown mode %u\n", info->mode); hl_tg6_check()
125 if (info->mode != IP6T_HL_SET && info->hop_limit == 0) { hl_tg6_check()
/linux-4.1.27/include/linux/
H A Dkbd_kern.h29 #define VC_SHIFTLOCK KG_SHIFT /* shift lock mode */
30 #define VC_ALTGRLOCK KG_ALTGR /* altgr lock mode */
31 #define VC_CTRLLOCK KG_CTRL /* control lock mode */
32 #define VC_ALTLOCK KG_ALT /* alt lock mode */
33 #define VC_SHIFTLLOCK KG_SHIFTL /* shiftl lock mode */
34 #define VC_SHIFTRLOCK KG_SHIFTR /* shiftr lock mode */
35 #define VC_CTRLLLOCK KG_CTRLL /* ctrll lock mode */
36 #define VC_CTRLRLOCK KG_CTRLR /* ctrlr lock mode */
45 #define VC_SCROLLOCK 0 /* scroll-lock mode */
46 #define VC_NUMLOCK 1 /* numeric lock mode */
47 #define VC_CAPSLOCK 2 /* capslock mode */
48 #define VC_KANALOCK 3 /* kanalock mode */
52 #define VC_MEDIUMRAW 1 /* medium raw (keycode) mode */
53 #define VC_RAW 2 /* raw (scancode) mode */
54 #define VC_UNICODE 3 /* Unicode mode */
55 #define VC_OFF 4 /* disabled mode */
58 #define VC_APPLIC 0 /* application key mode */
59 #define VC_CKMODE 1 /* cursor key mode */
H A Ddebugfs.h50 struct dentry *debugfs_create_file(const char *name, umode_t mode,
54 struct dentry *debugfs_create_file_size(const char *name, umode_t mode,
75 struct dentry *debugfs_create_u8(const char *name, umode_t mode,
77 struct dentry *debugfs_create_u16(const char *name, umode_t mode,
79 struct dentry *debugfs_create_u32(const char *name, umode_t mode,
81 struct dentry *debugfs_create_u64(const char *name, umode_t mode,
83 struct dentry *debugfs_create_x8(const char *name, umode_t mode,
85 struct dentry *debugfs_create_x16(const char *name, umode_t mode,
87 struct dentry *debugfs_create_x32(const char *name, umode_t mode,
89 struct dentry *debugfs_create_x64(const char *name, umode_t mode,
91 struct dentry *debugfs_create_size_t(const char *name, umode_t mode,
93 struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode,
95 struct dentry *debugfs_create_bool(const char *name, umode_t mode,
98 struct dentry *debugfs_create_blob(const char *name, umode_t mode,
102 struct dentry *debugfs_create_regset32(const char *name, umode_t mode,
109 struct dentry *debugfs_create_u32_array(const char *name, umode_t mode,
130 static inline struct dentry *debugfs_create_file(const char *name, umode_t mode, debugfs_create_file() argument
137 static inline struct dentry *debugfs_create_file_size(const char *name, umode_t mode, debugfs_create_file_size() argument
170 static inline struct dentry *debugfs_create_u8(const char *name, umode_t mode, debugfs_create_u8() argument
177 static inline struct dentry *debugfs_create_u16(const char *name, umode_t mode, debugfs_create_u16() argument
184 static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode, debugfs_create_u32() argument
191 static inline struct dentry *debugfs_create_u64(const char *name, umode_t mode, debugfs_create_u64() argument
198 static inline struct dentry *debugfs_create_x8(const char *name, umode_t mode, debugfs_create_x8() argument
205 static inline struct dentry *debugfs_create_x16(const char *name, umode_t mode, debugfs_create_x16() argument
212 static inline struct dentry *debugfs_create_x32(const char *name, umode_t mode, debugfs_create_x32() argument
219 static inline struct dentry *debugfs_create_x64(const char *name, umode_t mode, debugfs_create_x64() argument
226 static inline struct dentry *debugfs_create_size_t(const char *name, umode_t mode, debugfs_create_size_t() argument
233 static inline struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, debugfs_create_atomic_t() argument
239 static inline struct dentry *debugfs_create_bool(const char *name, umode_t mode, debugfs_create_bool() argument
246 static inline struct dentry *debugfs_create_blob(const char *name, umode_t mode, debugfs_create_blob() argument
254 umode_t mode, struct dentry *parent, debugfs_create_regset32()
270 static inline struct dentry *debugfs_create_u32_array(const char *name, umode_t mode, debugfs_create_u32_array() argument
253 debugfs_create_regset32(const char *name, umode_t mode, struct dentry *parent, struct debugfs_regset32 *regset) debugfs_create_regset32() argument
H A Ddevice_cgroup.h5 extern int devcgroup_inode_mknod(int mode, dev_t dev); devcgroup_inode_permission()
17 static inline int devcgroup_inode_mknod(int mode, dev_t dev) devcgroup_inode_mknod() argument
H A Di2c-algo-pca.h33 #define I2C_PCA_ICOUNT 0x00 /* Byte Count for buffered mode */
39 #define I2C_PCA_IMODE 0x06 /* I2C Bus mode */
41 /* PCA9665 I2C bus mode */
42 #define I2C_PCA_MODE_STD 0x00 /* Standard mode */
43 #define I2C_PCA_MODE_FAST 0x01 /* Fast mode */
44 #define I2C_PCA_MODE_FASTP 0x02 /* Fast Plus mode */
45 #define I2C_PCA_MODE_TURBO 0x03 /* Turbo mode */
H A Dproc_fs.h31 const char *name, umode_t mode, struct proc_dir_entry *parent, proc_create()
34 return proc_create_data(name, mode, parent, proc_fops, NULL); proc_create()
60 umode_t mode, struct proc_dir_entry *parent, void *data) { return NULL; } proc_mkdir_mode()
62 umode_t mode, struct proc_dir_entry *parent) { return NULL; }
63 #define proc_create(name, mode, parent, proc_fops) ({NULL;})
64 #define proc_create_data(name, mode, parent, proc_fops, data) ({NULL;})
30 proc_create( const char *name, umode_t mode, struct proc_dir_entry *parent, const struct file_operations *proc_fops) proc_create() argument
59 proc_mkdir_data(const char *name, umode_t mode, struct proc_dir_entry *parent, void *data) proc_mkdir_data() argument
61 proc_mkdir_mode(const char *name, umode_t mode, struct proc_dir_entry *parent) proc_mkdir_mode() argument
/linux-4.1.27/drivers/gpu/drm/msm/mdp/mdp4/
H A Dmdp4_dtv_encoder.c98 const struct drm_display_mode *mode, mdp4_dtv_encoder_mode_fixup()
105 struct drm_display_mode *mode, mdp4_dtv_encoder_mode_set()
114 mode = adjusted_mode; mdp4_dtv_encoder_mode_set()
116 DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", mdp4_dtv_encoder_mode_set()
117 mode->base.id, mode->name, mdp4_dtv_encoder_mode_set()
118 mode->vrefresh, mode->clock, mdp4_dtv_encoder_mode_set()
119 mode->hdisplay, mode->hsync_start, mdp4_dtv_encoder_mode_set()
120 mode->hsync_end, mode->htotal, mdp4_dtv_encoder_mode_set()
121 mode->vdisplay, mode->vsync_start, mdp4_dtv_encoder_mode_set()
122 mode->vsync_end, mode->vtotal, mdp4_dtv_encoder_mode_set()
123 mode->type, mode->flags); mdp4_dtv_encoder_mode_set()
125 mdp4_dtv_encoder->pixclock = mode->clock * 1000; mdp4_dtv_encoder_mode_set()
130 if (mode->flags & DRM_MODE_FLAG_NHSYNC) mdp4_dtv_encoder_mode_set()
132 if (mode->flags & DRM_MODE_FLAG_NVSYNC) mdp4_dtv_encoder_mode_set()
138 hsync_start_x = (mode->htotal - mode->hsync_start); mdp4_dtv_encoder_mode_set()
139 hsync_end_x = mode->htotal - (mode->hsync_start - mode->hdisplay) - 1; mdp4_dtv_encoder_mode_set()
141 vsync_period = mode->vtotal * mode->htotal; mdp4_dtv_encoder_mode_set()
142 vsync_len = (mode->vsync_end - mode->vsync_start) * mode->htotal; mdp4_dtv_encoder_mode_set()
143 display_v_start = (mode->vtotal - mode->vsync_start) * mode->htotal + dtv_hsync_skew; mdp4_dtv_encoder_mode_set()
144 display_v_end = vsync_period - ((mode->vsync_start - mode->vdisplay) * mode->htotal) + dtv_hsync_skew - 1; mdp4_dtv_encoder_mode_set()
147 MDP4_DTV_HSYNC_CTRL_PULSEW(mode->hsync_end - mode->hsync_start) | mdp4_dtv_encoder_mode_set()
148 MDP4_DTV_HSYNC_CTRL_PERIOD(mode->htotal)); mdp4_dtv_encoder_mode_set()
97 mdp4_dtv_encoder_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) mdp4_dtv_encoder_mode_fixup() argument
104 mdp4_dtv_encoder_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) mdp4_dtv_encoder_mode_set() argument
H A Dmdp4_lcdc_encoder.c263 const struct drm_display_mode *mode, mdp4_lcdc_encoder_mode_fixup()
270 struct drm_display_mode *mode, mdp4_lcdc_encoder_mode_set()
280 mode = adjusted_mode; mdp4_lcdc_encoder_mode_set()
282 DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", mdp4_lcdc_encoder_mode_set()
283 mode->base.id, mode->name, mdp4_lcdc_encoder_mode_set()
284 mode->vrefresh, mode->clock, mdp4_lcdc_encoder_mode_set()
285 mode->hdisplay, mode->hsync_start, mdp4_lcdc_encoder_mode_set()
286 mode->hsync_end, mode->htotal, mdp4_lcdc_encoder_mode_set()
287 mode->vdisplay, mode->vsync_start, mdp4_lcdc_encoder_mode_set()
288 mode->vsync_end, mode->vtotal, mdp4_lcdc_encoder_mode_set()
289 mode->type, mode->flags); mdp4_lcdc_encoder_mode_set()
291 mdp4_lcdc_encoder->pixclock = mode->clock * 1000; mdp4_lcdc_encoder_mode_set()
296 if (mode->flags & DRM_MODE_FLAG_NHSYNC) mdp4_lcdc_encoder_mode_set()
298 if (mode->flags & DRM_MODE_FLAG_NVSYNC) mdp4_lcdc_encoder_mode_set()
304 hsync_start_x = (mode->htotal - mode->hsync_start); mdp4_lcdc_encoder_mode_set()
305 hsync_end_x = mode->htotal - (mode->hsync_start - mode->hdisplay) - 1; mdp4_lcdc_encoder_mode_set()
307 vsync_period = mode->vtotal * mode->htotal; mdp4_lcdc_encoder_mode_set()
308 vsync_len = (mode->vsync_end - mode->vsync_start) * mode->htotal; mdp4_lcdc_encoder_mode_set()
309 display_v_start = (mode->vtotal - mode->vsync_start) * mode->htotal + lcdc_hsync_skew; mdp4_lcdc_encoder_mode_set()
310 display_v_end = vsync_period - ((mode->vsync_start - mode->vdisplay) * mode->htotal) + lcdc_hsync_skew - 1; mdp4_lcdc_encoder_mode_set()
313 MDP4_LCDC_HSYNC_CTRL_PULSEW(mode->hsync_end - mode->hsync_start) | mdp4_lcdc_encoder_mode_set()
314 MDP4_LCDC_HSYNC_CTRL_PERIOD(mode->htotal)); mdp4_lcdc_encoder_mode_set()
262 mdp4_lcdc_encoder_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) mdp4_lcdc_encoder_mode_fixup() argument
269 mdp4_lcdc_encoder_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) mdp4_lcdc_encoder_mode_set() argument
/linux-4.1.27/net/ceph/
H A Dceph_fs.c33 int mode; ceph_flags_to_mode() local
42 mode = CEPH_FILE_MODE_WR; ceph_flags_to_mode()
45 mode = CEPH_FILE_MODE_RD; ceph_flags_to_mode()
49 mode = CEPH_FILE_MODE_RDWR; ceph_flags_to_mode()
54 mode |= CEPH_FILE_MODE_LAZY; ceph_flags_to_mode()
57 return mode; ceph_flags_to_mode()
61 int ceph_caps_for_mode(int mode) ceph_caps_for_mode() argument
65 if (mode & CEPH_FILE_MODE_RD) ceph_caps_for_mode()
68 if (mode & CEPH_FILE_MODE_WR) ceph_caps_for_mode()
73 if (mode & CEPH_FILE_MODE_LAZY) ceph_caps_for_mode()
/linux-4.1.27/arch/x86/kernel/
H A Dsysfb_simplefb.c13 * Try to convert "screen_info" into a "simple-framebuffer" compatible mode.
14 * If the mode is incompatible, we return "false" and let the caller create
30 /* try parsing x86 screen_info into a simple-framebuffer mode struct */ parse_mode()
32 struct simplefb_platform_data *mode) parse_mode()
53 mode->format = f->name; parse_mode()
54 mode->width = si->lfb_width; parse_mode()
55 mode->height = si->lfb_height; parse_mode()
56 mode->stride = si->lfb_linelength; parse_mode()
65 const struct simplefb_platform_data *mode) create_simplefb()
73 len = mode->height * mode->stride; create_simplefb()
90 &res, 1, mode, sizeof(*mode)); create_simplefb()
31 parse_mode(const struct screen_info *si, struct simplefb_platform_data *mode) parse_mode() argument
64 create_simplefb(const struct screen_info *si, const struct simplefb_platform_data *mode) create_simplefb() argument
/linux-4.1.27/drivers/net/wireless/ath/ath5k/
H A Deeprom.c41 unsigned int mode) ath5k_eeprom_bin2freq()
48 if (mode == AR5K_EEPROM_MODE_11A) { ath5k_eeprom_bin2freq()
190 unsigned int mode) ath5k_eeprom_read_ants()
198 ee->ee_switch_settling[mode] = (val >> 8) & 0x7f; ath5k_eeprom_read_ants()
199 ee->ee_atn_tx_rx[mode] = (val >> 2) & 0x3f; ath5k_eeprom_read_ants()
200 ee->ee_ant_control[mode][i] = (val << 4) & 0x3f; ath5k_eeprom_read_ants()
203 ee->ee_ant_control[mode][i++] |= (val >> 12) & 0xf; ath5k_eeprom_read_ants()
204 ee->ee_ant_control[mode][i++] = (val >> 6) & 0x3f; ath5k_eeprom_read_ants()
205 ee->ee_ant_control[mode][i++] = val & 0x3f; ath5k_eeprom_read_ants()
208 ee->ee_ant_control[mode][i++] = (val >> 10) & 0x3f; ath5k_eeprom_read_ants()
209 ee->ee_ant_control[mode][i++] = (val >> 4) & 0x3f; ath5k_eeprom_read_ants()
210 ee->ee_ant_control[mode][i] = (val << 2) & 0x3f; ath5k_eeprom_read_ants()
213 ee->ee_ant_control[mode][i++] |= (val >> 14) & 0x3; ath5k_eeprom_read_ants()
214 ee->ee_ant_control[mode][i++] = (val >> 8) & 0x3f; ath5k_eeprom_read_ants()
215 ee->ee_ant_control[mode][i++] = (val >> 2) & 0x3f; ath5k_eeprom_read_ants()
216 ee->ee_ant_control[mode][i] = (val << 4) & 0x3f; ath5k_eeprom_read_ants()
219 ee->ee_ant_control[mode][i++] |= (val >> 12) & 0xf; ath5k_eeprom_read_ants()
220 ee->ee_ant_control[mode][i++] = (val >> 6) & 0x3f; ath5k_eeprom_read_ants()
221 ee->ee_ant_control[mode][i++] = val & 0x3f; ath5k_eeprom_read_ants()
224 ah->ah_ant_ctl[mode][AR5K_ANT_CTL] = ath5k_eeprom_read_ants()
225 (ee->ee_ant_control[mode][0] << 4); ath5k_eeprom_read_ants()
226 ah->ah_ant_ctl[mode][AR5K_ANT_SWTABLE_A] = ath5k_eeprom_read_ants()
227 ee->ee_ant_control[mode][1] | ath5k_eeprom_read_ants()
228 (ee->ee_ant_control[mode][2] << 6) | ath5k_eeprom_read_ants()
229 (ee->ee_ant_control[mode][3] << 12) | ath5k_eeprom_read_ants()
230 (ee->ee_ant_control[mode][4] << 18) | ath5k_eeprom_read_ants()
231 (ee->ee_ant_control[mode][5] << 24); ath5k_eeprom_read_ants()
232 ah->ah_ant_ctl[mode][AR5K_ANT_SWTABLE_B] = ath5k_eeprom_read_ants()
233 ee->ee_ant_control[mode][6] | ath5k_eeprom_read_ants()
234 (ee->ee_ant_control[mode][7] << 6) | ath5k_eeprom_read_ants()
235 (ee->ee_ant_control[mode][8] << 12) | ath5k_eeprom_read_ants()
236 (ee->ee_ant_control[mode][9] << 18) | ath5k_eeprom_read_ants()
237 (ee->ee_ant_control[mode][10] << 24); ath5k_eeprom_read_ants()
246 * Read supported modes and some mode-specific calibration data
250 unsigned int mode) ath5k_eeprom_read_modes()
256 ee->ee_n_piers[mode] = 0; ath5k_eeprom_read_modes()
258 ee->ee_adc_desired_size[mode] = (s8)((val >> 8) & 0xff); ath5k_eeprom_read_modes()
259 switch (mode) { ath5k_eeprom_read_modes()
261 ee->ee_ob[mode][3] = (val >> 5) & 0x7; ath5k_eeprom_read_modes()
262 ee->ee_db[mode][3] = (val >> 2) & 0x7; ath5k_eeprom_read_modes()
263 ee->ee_ob[mode][2] = (val << 1) & 0x7; ath5k_eeprom_read_modes()
266 ee->ee_ob[mode][2] |= (val >> 15) & 0x1; ath5k_eeprom_read_modes()
267 ee->ee_db[mode][2] = (val >> 12) & 0x7; ath5k_eeprom_read_modes()
268 ee->ee_ob[mode][1] = (val >> 9) & 0x7; ath5k_eeprom_read_modes()
269 ee->ee_db[mode][1] = (val >> 6) & 0x7; ath5k_eeprom_read_modes()
270 ee->ee_ob[mode][0] = (val >> 3) & 0x7; ath5k_eeprom_read_modes()
271 ee->ee_db[mode][0] = val & 0x7; ath5k_eeprom_read_modes()
275 ee->ee_ob[mode][1] = (val >> 4) & 0x7; ath5k_eeprom_read_modes()
276 ee->ee_db[mode][1] = val & 0x7; ath5k_eeprom_read_modes()
281 ee->ee_tx_end2xlna_enable[mode] = (val >> 8) & 0xff; ath5k_eeprom_read_modes()
282 ee->ee_thr_62[mode] = val & 0xff; ath5k_eeprom_read_modes()
285 ee->ee_thr_62[mode] = mode == AR5K_EEPROM_MODE_11A ? 15 : 28; ath5k_eeprom_read_modes()
288 ee->ee_tx_end2xpa_disable[mode] = (val >> 8) & 0xff; ath5k_eeprom_read_modes()
289 ee->ee_tx_frm2xpa_enable[mode] = val & 0xff; ath5k_eeprom_read_modes()
292 ee->ee_pga_desired_size[mode] = (val >> 8) & 0xff; ath5k_eeprom_read_modes()
295 ee->ee_noise_floor_thr[mode] = -((((val & 0xff) ^ 0xff)) + 1); ath5k_eeprom_read_modes()
297 ee->ee_noise_floor_thr[mode] = val & 0xff; ath5k_eeprom_read_modes()
300 ee->ee_noise_floor_thr[mode] = ath5k_eeprom_read_modes()
301 mode == AR5K_EEPROM_MODE_11A ? -54 : -1; ath5k_eeprom_read_modes()
304 ee->ee_xlna_gain[mode] = (val >> 5) & 0xff; ath5k_eeprom_read_modes()
305 ee->ee_x_gain[mode] = (val >> 1) & 0xf; ath5k_eeprom_read_modes()
306 ee->ee_xpd[mode] = val & 0x1; ath5k_eeprom_read_modes()
309 mode != AR5K_EEPROM_MODE_11B) ath5k_eeprom_read_modes()
310 ee->ee_fixed_bias[mode] = (val >> 13) & 0x1; ath5k_eeprom_read_modes()
314 ee->ee_false_detect[mode] = (val >> 6) & 0x7f; ath5k_eeprom_read_modes()
316 if (mode == AR5K_EEPROM_MODE_11A) ath5k_eeprom_read_modes()
317 ee->ee_xr_power[mode] = val & 0x3f; ath5k_eeprom_read_modes()
320 ee->ee_ob[mode][0] = val & 0x7; ath5k_eeprom_read_modes()
321 ee->ee_db[mode][0] = (val >> 3) & 0x7; ath5k_eeprom_read_modes()
326 ee->ee_i_gain[mode] = AR5K_EEPROM_I_GAIN; ath5k_eeprom_read_modes()
329 ee->ee_i_gain[mode] = (val >> 13) & 0x7; ath5k_eeprom_read_modes()
332 ee->ee_i_gain[mode] |= (val << 3) & 0x38; ath5k_eeprom_read_modes()
334 if (mode == AR5K_EEPROM_MODE_11G) { ath5k_eeprom_read_modes()
342 mode == AR5K_EEPROM_MODE_11A) { ath5k_eeprom_read_modes()
343 ee->ee_i_cal[mode] = (val >> 8) & 0x3f; ath5k_eeprom_read_modes()
344 ee->ee_q_cal[mode] = (val >> 3) & 0x1f; ath5k_eeprom_read_modes()
353 switch (mode) { ath5k_eeprom_read_modes()
359 ee->ee_margin_tx_rx[mode] = val & 0x3f; ath5k_eeprom_read_modes()
365 ath5k_eeprom_bin2freq(ee, val & 0xff, mode); ath5k_eeprom_read_modes()
367 ee->ee_n_piers[mode]++; ath5k_eeprom_read_modes()
370 ath5k_eeprom_bin2freq(ee, (val >> 8) & 0xff, mode); ath5k_eeprom_read_modes()
372 ee->ee_n_piers[mode]++; ath5k_eeprom_read_modes()
376 ath5k_eeprom_bin2freq(ee, val & 0xff, mode); ath5k_eeprom_read_modes()
378 ee->ee_n_piers[mode]++; ath5k_eeprom_read_modes()
381 ee->ee_margin_tx_rx[mode] = (val >> 8) & 0x3f; ath5k_eeprom_read_modes()
387 ath5k_eeprom_bin2freq(ee, val & 0xff, mode); ath5k_eeprom_read_modes()
389 ee->ee_n_piers[mode]++; ath5k_eeprom_read_modes()
392 ath5k_eeprom_bin2freq(ee, (val >> 8) & 0xff, mode); ath5k_eeprom_read_modes()
394 ee->ee_n_piers[mode]++; ath5k_eeprom_read_modes()
397 ee->ee_turbo_max_power[mode] = val & 0x7f; ath5k_eeprom_read_modes()
398 ee->ee_xr_power[mode] = (val >> 7) & 0x3f; ath5k_eeprom_read_modes()
402 ath5k_eeprom_bin2freq(ee, val & 0xff, mode); ath5k_eeprom_read_modes()
404 ee->ee_n_piers[mode]++; ath5k_eeprom_read_modes()
407 ee->ee_margin_tx_rx[mode] = (val >> 8) & 0x3f; ath5k_eeprom_read_modes()
410 ee->ee_i_cal[mode] = (val >> 5) & 0x3f; ath5k_eeprom_read_modes()
411 ee->ee_q_cal[mode] = val & 0x1f; ath5k_eeprom_read_modes()
421 * Read turbo mode information on newer EEPROM versions ath5k_eeprom_read_modes()
426 switch (mode) { ath5k_eeprom_read_modes()
428 ee->ee_switch_settling_turbo[mode] = (val >> 6) & 0x7f; ath5k_eeprom_read_modes()
430 ee->ee_atn_tx_rx_turbo[mode] = (val >> 13) & 0x7; ath5k_eeprom_read_modes()
432 ee->ee_atn_tx_rx_turbo[mode] |= (val & 0x7) << 3; ath5k_eeprom_read_modes()
433 ee->ee_margin_tx_rx_turbo[mode] = (val >> 3) & 0x3f; ath5k_eeprom_read_modes()
435 ee->ee_adc_desired_size_turbo[mode] = (val >> 9) & 0x7f; ath5k_eeprom_read_modes()
437 ee->ee_adc_desired_size_turbo[mode] |= (val & 0x1) << 7; ath5k_eeprom_read_modes()
438 ee->ee_pga_desired_size_turbo[mode] = (val >> 1) & 0xff; ath5k_eeprom_read_modes()
444 ee->ee_switch_settling_turbo[mode] = (val >> 8) & 0x7f; ath5k_eeprom_read_modes()
446 ee->ee_atn_tx_rx_turbo[mode] = (val >> 15) & 0x7; ath5k_eeprom_read_modes()
448 ee->ee_atn_tx_rx_turbo[mode] |= (val & 0x1f) << 1; ath5k_eeprom_read_modes()
449 ee->ee_margin_tx_rx_turbo[mode] = (val >> 5) & 0x3f; ath5k_eeprom_read_modes()
451 ee->ee_adc_desired_size_turbo[mode] = (val >> 11) & 0x7f; ath5k_eeprom_read_modes()
453 ee->ee_adc_desired_size_turbo[mode] |= (val & 0x7) << 5; ath5k_eeprom_read_modes()
454 ee->ee_pga_desired_size_turbo[mode] = (val >> 3) & 0xff; ath5k_eeprom_read_modes()
465 /* Read mode-specific data (except power calibration data) */
471 unsigned int mode; ath5k_eeprom_init_modes() local
485 for (mode = AR5K_EEPROM_MODE_11A; mode <= AR5K_EEPROM_MODE_11G; mode++) { ath5k_eeprom_init_modes()
486 offset = mode_offset[mode]; ath5k_eeprom_init_modes()
488 ret = ath5k_eeprom_read_ants(ah, &offset, mode); ath5k_eeprom_init_modes()
492 ret = ath5k_eeprom_read_modes(ah, &offset, mode); ath5k_eeprom_init_modes()
507 /* Read the frequency piers for each mode (mostly used on newer eeproms with 0xff
511 struct ath5k_chan_pcal_info *pc, unsigned int mode) ath5k_eeprom_read_freq_list()
519 ee->ee_n_piers[mode] = 0; ath5k_eeprom_read_freq_list()
528 freq1, mode); ath5k_eeprom_read_freq_list()
529 ee->ee_n_piers[mode]++; ath5k_eeprom_read_freq_list()
536 freq2, mode); ath5k_eeprom_read_freq_list()
537 ee->ee_n_piers[mode]++; ath5k_eeprom_read_freq_list()
601 ath5k_eeprom_init_11bg_2413(struct ath5k_hw *ah, unsigned int mode, int offset) ath5k_eeprom_init_11bg_2413() argument
606 switch (mode) { ath5k_eeprom_init_11bg_2413()
619 mode); ath5k_eeprom_init_11bg_2413()
667 ath5k_eeprom_free_pcal_info(struct ath5k_hw *ah, int mode) ath5k_eeprom_free_pcal_info() argument
673 switch (mode) { ath5k_eeprom_free_pcal_info()
693 for (pier = 0; pier < ee->ee_n_piers[mode]; pier++) { ath5k_eeprom_free_pcal_info()
714 ath5k_eeprom_convert_pcal_info_5111(struct ath5k_hw *ah, int mode, ath5k_eeprom_convert_pcal_info_5111() argument
721 u8 *pdgain_idx = ee->ee_pdc_to_idx[mode]; ath5k_eeprom_convert_pcal_info_5111()
724 for (pier = 0; pier < ee->ee_n_piers[mode]; pier++) { ath5k_eeprom_convert_pcal_info_5111()
743 if (!((ee->ee_x_gain[mode] >> idx) & 0x1)) { ath5k_eeprom_convert_pcal_info_5111()
749 ee->ee_pd_gains[mode] = 1; ath5k_eeprom_convert_pcal_info_5111()
787 ath5k_eeprom_free_pcal_info(ah, mode); ath5k_eeprom_convert_pcal_info_5111()
793 ath5k_eeprom_read_pcal_info_5111(struct ath5k_hw *ah, int mode) ath5k_eeprom_read_pcal_info_5111() argument
802 switch (mode) { ath5k_eeprom_read_pcal_info_5111()
827 ee->ee_n_piers[mode] = 3; ath5k_eeprom_read_pcal_info_5111()
840 ee->ee_n_piers[mode] = 3; ath5k_eeprom_read_pcal_info_5111()
846 for (i = 0; i < ee->ee_n_piers[mode]; i++) { ath5k_eeprom_read_pcal_info_5111()
880 return ath5k_eeprom_convert_pcal_info_5111(ah, mode, pcal); ath5k_eeprom_read_pcal_info_5111()
902 ath5k_eeprom_convert_pcal_info_5112(struct ath5k_hw *ah, int mode, ath5k_eeprom_convert_pcal_info_5112() argument
907 u8 *pdgain_idx = ee->ee_pdc_to_idx[mode]; ath5k_eeprom_convert_pcal_info_5112()
911 for (pier = 0; pier < ee->ee_n_piers[mode]; pier++) { ath5k_eeprom_convert_pcal_info_5112()
925 for (pdg = 0; pdg < ee->ee_pd_gains[mode]; pdg++) { ath5k_eeprom_convert_pcal_info_5112()
1010 ath5k_eeprom_free_pcal_info(ah, mode); ath5k_eeprom_convert_pcal_info_5112()
1016 ath5k_eeprom_read_pcal_info_5112(struct ath5k_hw *ah, int mode) ath5k_eeprom_read_pcal_info_5112() argument
1021 u8 *pdgain_idx = ee->ee_pdc_to_idx[mode]; ath5k_eeprom_read_pcal_info_5112()
1033 /* ee_x_gain[mode] is x gain mask */ ath5k_eeprom_read_pcal_info_5112()
1034 if ((ee->ee_x_gain[mode] >> i) & 0x1) ath5k_eeprom_read_pcal_info_5112()
1037 ee->ee_pd_gains[mode] = pd_gains; ath5k_eeprom_read_pcal_info_5112()
1042 switch (mode) { ath5k_eeprom_read_pcal_info_5112()
1058 /* NB: frequency piers parsed during mode init */ ath5k_eeprom_read_pcal_info_5112()
1068 /* NB: frequency piers parsed during mode init */ ath5k_eeprom_read_pcal_info_5112()
1075 for (i = 0; i < ee->ee_n_piers[mode]; i++) { ath5k_eeprom_read_pcal_info_5112()
1124 return ath5k_eeprom_convert_pcal_info_5112(ah, mode, gen_chan_info); ath5k_eeprom_read_pcal_info_5112()
1144 * if a mode is not supported, its section is missing -not zeroed-.
1148 /* Return the size of each section based on the mode and the number of pd
1151 ath5k_pdgains_size_2413(struct ath5k_eeprom_info *ee, unsigned int mode) ath5k_pdgains_size_2413() argument
1156 sz = pdgains_size[ee->ee_pd_gains[mode] - 1]; ath5k_pdgains_size_2413()
1157 sz *= ee->ee_n_piers[mode]; ath5k_pdgains_size_2413()
1165 ath5k_cal_data_offset_2413(struct ath5k_eeprom_info *ee, int mode) ath5k_cal_data_offset_2413() argument
1169 switch (mode) { ath5k_cal_data_offset_2413()
1194 ath5k_eeprom_convert_pcal_info_2413(struct ath5k_hw *ah, int mode, ath5k_eeprom_convert_pcal_info_2413() argument
1199 u8 *pdgain_idx = ee->ee_pdc_to_idx[mode]; ath5k_eeprom_convert_pcal_info_2413()
1203 for (pier = 0; pier < ee->ee_n_piers[mode]; pier++) { ath5k_eeprom_convert_pcal_info_2413()
1217 for (pdg = 0; pdg < ee->ee_pd_gains[mode]; pdg++) { ath5k_eeprom_convert_pcal_info_2413()
1225 if (pdg == ee->ee_pd_gains[mode] - 1) ath5k_eeprom_convert_pcal_info_2413()
1264 if (pdg == ee->ee_pd_gains[mode] - 1) ath5k_eeprom_convert_pcal_info_2413()
1273 ath5k_eeprom_free_pcal_info(ah, mode); ath5k_eeprom_convert_pcal_info_2413()
1279 ath5k_eeprom_read_pcal_info_2413(struct ath5k_hw *ah, int mode) ath5k_eeprom_read_pcal_info_2413() argument
1284 u8 *pdgain_idx = ee->ee_pdc_to_idx[mode]; ath5k_eeprom_read_pcal_info_2413()
1296 /* ee_x_gain[mode] is x gain mask */ ath5k_eeprom_read_pcal_info_2413()
1297 if ((ee->ee_x_gain[mode] >> idx) & 0x1) ath5k_eeprom_read_pcal_info_2413()
1301 ee->ee_pd_gains[mode] = pd_gains; ath5k_eeprom_read_pcal_info_2413()
1306 offset = ath5k_cal_data_offset_2413(ee, mode); ath5k_eeprom_read_pcal_info_2413()
1307 switch (mode) { ath5k_eeprom_read_pcal_info_2413()
1320 ath5k_eeprom_init_11bg_2413(ah, mode, offset); ath5k_eeprom_read_pcal_info_2413()
1328 ath5k_eeprom_init_11bg_2413(ah, mode, offset); ath5k_eeprom_read_pcal_info_2413()
1336 for (i = 0; i < ee->ee_n_piers[mode]; i++) { ath5k_eeprom_read_pcal_info_2413()
1458 return ath5k_eeprom_convert_pcal_info_2413(ah, mode, chinfo); ath5k_eeprom_read_pcal_info_2413()
1470 ath5k_eeprom_read_target_rate_pwr_info(struct ath5k_hw *ah, unsigned int mode) ath5k_eeprom_read_target_rate_pwr_info() argument
1480 rate_target_pwr_num = &ee->ee_rate_target_pwr_num[mode]; ath5k_eeprom_read_target_rate_pwr_info()
1481 switch (mode) { ath5k_eeprom_read_target_rate_pwr_info()
1485 ee->ee_rate_target_pwr_num[mode] = AR5K_EEPROM_N_5GHZ_RATE_CHAN; ath5k_eeprom_read_target_rate_pwr_info()
1490 ee->ee_rate_target_pwr_num[mode] = 2; /* 3rd is g mode's 1st */ ath5k_eeprom_read_target_rate_pwr_info()
1495 ee->ee_rate_target_pwr_num[mode] = AR5K_EEPROM_N_2GHZ_CHAN; ath5k_eeprom_read_target_rate_pwr_info()
1506 ath5k_eeprom_bin2freq(ee, (val >> 9) & 0x7f, mode); ath5k_eeprom_read_target_rate_pwr_info()
1527 ath5k_eeprom_bin2freq(ee, (val >> 8) & 0xff, mode); ath5k_eeprom_read_target_rate_pwr_info()
1568 int (*read_pcal)(struct ath5k_hw *hw, int mode); ath5k_eeprom_read_pcal_info()
1569 int mode; ath5k_eeprom_read_pcal_info() local
1582 for (mode = AR5K_EEPROM_MODE_11A; mode <= AR5K_EEPROM_MODE_11G; ath5k_eeprom_read_pcal_info()
1583 mode++) { ath5k_eeprom_read_pcal_info()
1584 err = read_pcal(ah, mode); ath5k_eeprom_read_pcal_info()
1588 err = ath5k_eeprom_read_target_rate_pwr_info(ah, mode); ath5k_eeprom_read_pcal_info()
1775 u8 mode; ath5k_eeprom_detach() local
1777 for (mode = AR5K_EEPROM_MODE_11A; mode <= AR5K_EEPROM_MODE_11G; mode++) ath5k_eeprom_detach()
1778 ath5k_eeprom_free_pcal_info(ah, mode); ath5k_eeprom_detach()
40 ath5k_eeprom_bin2freq(struct ath5k_eeprom_info *ee, u16 bin, unsigned int mode) ath5k_eeprom_bin2freq() argument
189 ath5k_eeprom_read_ants(struct ath5k_hw *ah, u32 *offset, unsigned int mode) ath5k_eeprom_read_ants() argument
249 ath5k_eeprom_read_modes(struct ath5k_hw *ah, u32 *offset, unsigned int mode) ath5k_eeprom_read_modes() argument
510 ath5k_eeprom_read_freq_list(struct ath5k_hw *ah, int *offset, int max, struct ath5k_chan_pcal_info *pc, unsigned int mode) ath5k_eeprom_read_freq_list() argument
/linux-4.1.27/drivers/gpu/drm/sti/
H A Dsti_vtg.c125 int type, const struct drm_display_mode *mode) vtg_set_mode()
130 vtg_set_mode(vtg->slave, VTG_TYPE_SLAVE_BY_EXT0, mode); vtg_set_mode()
132 writel(mode->htotal, vtg->regs + VTG_CLKLN); vtg_set_mode()
133 writel(mode->vtotal * 2, vtg->regs + VTG_HLFLN); vtg_set_mode()
135 tmp = (mode->vtotal - mode->vsync_start + 1) << 16; vtg_set_mode()
136 tmp |= mode->htotal - mode->hsync_start; vtg_set_mode()
140 tmp = (mode->vdisplay + mode->vtotal - mode->vsync_start + 1) << 16; vtg_set_mode()
141 tmp |= mode->hdisplay + mode->htotal - mode->hsync_start; vtg_set_mode()
146 tmp = (mode->hsync_end - mode->hsync_start + HDMI_DELAY) << 16; vtg_set_mode()
150 tmp = (mode->vsync_end - mode->vsync_start + 1) << 16; vtg_set_mode()
158 tmp = (mode->hsync_end - mode->hsync_start) << 16; vtg_set_mode()
161 tmp = (mode->vsync_end - mode->vsync_start + 1) << 16; vtg_set_mode()
168 /* prepare VTG set 3 for HD Analog in HD mode */ vtg_set_mode()
169 tmp = (mode->hsync_end - mode->hsync_start + AWG_DELAY_HD) << 16; vtg_set_mode()
170 tmp |= mode->htotal + AWG_DELAY_HD; vtg_set_mode()
173 tmp = (mode->vsync_end - mode->vsync_start) << 16; vtg_set_mode()
174 tmp |= mode->vtotal; vtg_set_mode()
178 tmp = (mode->htotal + AWG_DELAY_HD) << 16; vtg_set_mode()
179 tmp |= mode->htotal + AWG_DELAY_HD; vtg_set_mode()
184 tmp = (mode->hsync_end - mode->hsync_start) << 16; vtg_set_mode()
187 tmp = (mode->vsync_end - mode->vsync_start + 1) << 16; vtg_set_mode()
194 /* mode */ vtg_set_mode()
207 const struct drm_display_mode *mode) sti_vtg_set_config()
210 vtg_set_mode(vtg, VTG_TYPE_MASTER, mode); sti_vtg_set_config()
225 * @mode: display mode to be used
228 * Return the line number according to the display mode taking
234 u32 sti_vtg_get_line_number(struct drm_display_mode mode, int y) sti_vtg_get_line_number() argument
236 u32 start_line = mode.vtotal - mode.vsync_start + 1; sti_vtg_get_line_number()
238 if (mode.flags & DRM_MODE_FLAG_INTERLACE) sti_vtg_get_line_number()
248 * @mode: display mode to be used
251 * Return the pixel number according to the display mode taking
255 u32 sti_vtg_get_pixel_number(struct drm_display_mode mode, int x) sti_vtg_get_pixel_number() argument
257 return mode.htotal - mode.hsync_start + x; sti_vtg_get_pixel_number()
124 vtg_set_mode(struct sti_vtg *vtg, int type, const struct drm_display_mode *mode) vtg_set_mode() argument
206 sti_vtg_set_config(struct sti_vtg *vtg, const struct drm_display_mode *mode) sti_vtg_set_config() argument
H A Dsti_vtg.h19 const struct drm_display_mode *mode);
25 u32 sti_vtg_get_line_number(struct drm_display_mode mode, int y);
26 u32 sti_vtg_get_pixel_number(struct drm_display_mode mode, int x);
H A Dsti_mixer.c91 struct drm_display_mode *mode) sti_mixer_set_background_area()
95 ydo = sti_vtg_get_line_number(*mode, 0); sti_mixer_set_background_area()
96 yds = sti_vtg_get_line_number(*mode, mode->vdisplay - 1); sti_mixer_set_background_area()
97 xdo = sti_vtg_get_pixel_number(*mode, 0); sti_mixer_set_background_area()
98 xds = sti_vtg_get_pixel_number(*mode, mode->hdisplay - 1); sti_mixer_set_background_area()
158 struct drm_display_mode *mode) sti_mixer_active_video_area()
162 ydo = sti_vtg_get_line_number(*mode, 0); sti_mixer_active_video_area()
163 yds = sti_vtg_get_line_number(*mode, mode->vdisplay - 1); sti_mixer_active_video_area()
164 xdo = sti_vtg_get_pixel_number(*mode, 0); sti_mixer_active_video_area()
165 xds = sti_vtg_get_pixel_number(*mode, mode->hdisplay - 1); sti_mixer_active_video_area()
174 sti_mixer_set_background_area(mixer, mode); sti_mixer_active_video_area()
90 sti_mixer_set_background_area(struct sti_mixer *mixer, struct drm_display_mode *mode) sti_mixer_set_background_area() argument
157 sti_mixer_active_video_area(struct sti_mixer *mixer, struct drm_display_mode *mode) sti_mixer_active_video_area() argument
H A Dsti_drm_crtc.c22 static void sti_drm_crtc_dpms(struct drm_crtc *crtc, int mode) sti_drm_crtc_dpms() argument
74 const struct drm_display_mode *mode, sti_drm_crtc_mode_fixup()
82 sti_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode) sti_drm_crtc_mode_set() argument
88 int rate = mode->clock * 1000; sti_drm_crtc_mode_set()
91 DRM_DEBUG_KMS("CRTC:%d (%s) mode:%d (%s)\n", sti_drm_crtc_mode_set()
93 mode->base.id, mode->name); sti_drm_crtc_mode_set()
96 mode->vrefresh, mode->clock, sti_drm_crtc_mode_set()
97 mode->hdisplay, sti_drm_crtc_mode_set()
98 mode->hsync_start, mode->hsync_end, sti_drm_crtc_mode_set()
99 mode->htotal, sti_drm_crtc_mode_set()
100 mode->vdisplay, sti_drm_crtc_mode_set()
101 mode->vsync_start, mode->vsync_end, sti_drm_crtc_mode_set()
102 mode->vtotal, mode->type, mode->flags); sti_drm_crtc_mode_set()
121 compo->vtg_main : compo->vtg_aux, &crtc->mode); sti_drm_crtc_mode_set()
123 res = sti_mixer_active_video_area(mixer, &crtc->mode); sti_drm_crtc_mode_set()
73 sti_drm_crtc_mode_fixup(struct drm_crtc *crtc, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) sti_drm_crtc_mode_fixup() argument
H A Dsti_cursor.c102 struct drm_display_mode *mode = layer->mode; sti_cursor_prepare_layer() local
147 /* AWS and AWE depend on the mode */ sti_cursor_prepare_layer()
148 y = sti_vtg_get_line_number(*mode, 0); sti_cursor_prepare_layer()
149 x = sti_vtg_get_pixel_number(*mode, 0); sti_cursor_prepare_layer()
152 y = sti_vtg_get_line_number(*mode, mode->vdisplay - 1); sti_cursor_prepare_layer()
153 x = sti_vtg_get_pixel_number(*mode, mode->hdisplay - 1); sti_cursor_prepare_layer()
169 struct drm_display_mode *mode = layer->mode; sti_cursor_commit_layer() local
179 ydo = sti_vtg_get_line_number(*mode, layer->dst_y); sti_cursor_commit_layer()
180 xdo = sti_vtg_get_pixel_number(*mode, layer->dst_y); sti_cursor_commit_layer()
/linux-4.1.27/drivers/video/fbdev/
H A Dmacmodes.c26 * MacOS video mode definitions
133 * Mapping between MacOS video mode numbers and video mode definitions
142 const struct fb_videomode *mode; member in struct:mode_map
178 * Mapping between monitor sense values and MacOS video mode numbers
210 * @vmode: MacOS video mode
211 * @cmode: MacOS color mode
212 * @var: frame buffer video mode structure
215 * mode structure.
223 const struct fb_videomode *mode = NULL; mac_vmode_to_var() local
228 mode = map->mode; mac_vmode_to_var()
231 if (!mode) mac_vmode_to_var()
271 var->xres = mode->xres; mac_vmode_to_var()
272 var->yres = mode->yres; mac_vmode_to_var()
273 var->xres_virtual = mode->xres; mac_vmode_to_var()
274 var->yres_virtual = mode->yres; mac_vmode_to_var()
277 var->pixclock = mode->pixclock; mac_vmode_to_var()
278 var->left_margin = mode->left_margin; mac_vmode_to_var()
279 var->right_margin = mode->right_margin; mac_vmode_to_var()
280 var->upper_margin = mode->upper_margin; mac_vmode_to_var()
281 var->lower_margin = mode->lower_margin; mac_vmode_to_var()
282 var->hsync_len = mode->hsync_len; mac_vmode_to_var()
283 var->vsync_len = mode->vsync_len; mac_vmode_to_var()
284 var->sync = mode->sync; mac_vmode_to_var()
285 var->vmode = mode->vmode; mac_vmode_to_var()
292 * @var: frame buffer video mode structure
293 * @vmode: MacOS video mode
294 * @cmode: MacOS color mode
296 * Converts a frame buffer video mode structure to a MacOS
322 const struct fb_videomode *mode = map->mode; mac_var_to_vmode() local
324 if (var->xres > mode->xres || var->yres > mode->yres) mac_var_to_vmode()
326 if (var->xres_virtual > mode->xres || var->yres_virtual > mode->yres) mac_var_to_vmode()
328 if (var->pixclock > mode->pixclock) mac_var_to_vmode()
330 if ((var->vmode & FB_VMODE_MASK) != mode->vmode) mac_var_to_vmode()
340 const struct fb_videomode *clk_mode = map->mode; mac_var_to_vmode()
342 if (mode->xres != clk_mode->xres || mode->yres != clk_mode->yres) mac_var_to_vmode()
344 if (var->pixclock > mode->pixclock) mac_var_to_vmode()
346 if (mode->vmode != clk_mode->vmode) mac_var_to_vmode()
363 * Returns MacOS vmode video mode number.
379 * mac_find_mode - find a video mode
382 * @mode_option: video mode name (see mac_modedb[])
385 * Finds a suitable video mode. Tries to set mode specified
386 * by @mode_option. If the name of the wanted mode begins with
387 * 'mac', the Mac video mode database will be used, otherwise it
388 * will fall back to the standard video mode database.
H A Dauo_k1900fb.c25 * mode4 handwriting mode (strange behaviour)
26 * mode5 automatic selection of update mode
85 static void auok1900_update_region(struct auok190xfb_par *par, int mode, auok1900_update_region() argument
102 dev_dbg(dev, "update (x,y,w,h,mode)=(%d,%d,%d,%d,%d)\n", auok1900_update_region()
103 1, y1+1, xres, y2-y1, mode); auok1900_update_region()
106 args[0] = mode | 1; auok1900_update_region()
126 int mode; auok1900fb_dpy_update_pages() local
129 mode = AUOK190X_UPDATE_MODE(1); auok1900fb_dpy_update_pages()
132 mode = AUOK190X_UPDATE_MODE(par->update_mode); auok1900fb_dpy_update_pages()
137 mode |= AUOK190X_UPDATE_NONFLASH; auok1900fb_dpy_update_pages()
139 auok1900_update_region(par, mode, y1, y2); auok1900fb_dpy_update_pages()
144 int mode; auok1900fb_dpy_update() local
147 mode = AUOK190X_UPDATE_MODE(0); auok1900fb_dpy_update()
150 mode = AUOK190X_UPDATE_MODE(par->update_mode); auok1900fb_dpy_update()
155 mode |= AUOK190X_UPDATE_NONFLASH; auok1900fb_dpy_update()
157 auok1900_update_region(par, mode, 0, par->info->var.yres); auok1900fb_dpy_update()
H A Dvalkyriefb.h69 struct vpreg mode; member in struct:valkyrie_regs
86 unsigned char mode; member in struct:valkyrie_regvals
94 /* Register values for 1024x768, 75Hz mode (17) */
95 /* I'm not sure which mode this is (16 or 17), so I'm defining it as 17,
96 * since the equivalent mode in controlfb (which I adapted this from) is
111 /* Register values for 1024x768, 72Hz mode (15) */
113 * that didn't match MacOS in the same video mode on this chip, and it also
114 * caused the 15" Apple Studio Display to not work in this mode. While this
115 * mode still doesn't match MacOS exactly (as far as I can tell), it's a lot
130 /* Register values for 1024x768, 60Hz mode (14) */
139 /* Register values for 832x624, 75Hz mode (13) */
147 /* Register values for 800x600, 72Hz mode (11) */
155 /* Register values for 800x600, 60Hz mode (10) */
164 /* Register values for 640x480, 67Hz mode (6) */
172 /* Register values for 640x480, 60Hz mode (5) */
H A Damba-clcd-versatile.c8 .mode = {
32 .mode = {
57 .mode = {
81 .mode = {
106 .mode = {
142 if (strcmp(panels[i]->mode.name, name) == 0) versatile_clcd_get_panel()
/linux-4.1.27/arch/arm64/kvm/
H A Dregmap.c109 * Return a pointer to the register number valid in the current mode of
115 unsigned long mode = *vcpu_cpsr(vcpu) & COMPAT_PSR_MODE_MASK; vcpu_reg32() local
117 switch (mode) { vcpu_reg32()
119 mode &= ~PSR_MODE32_BIT; /* 0 ... 3 */ vcpu_reg32()
123 mode = 4; vcpu_reg32()
127 mode = 5; vcpu_reg32()
131 mode = 0; /* SYS maps to USR */ vcpu_reg32()
138 return reg_array + vcpu_reg_offsets[mode][reg_num]; vcpu_reg32()
142 * Return the SPSR for the current mode of the virtual CPU.
146 unsigned long mode = *vcpu_cpsr(vcpu) & COMPAT_PSR_MODE_MASK; vcpu_spsr32() local
147 switch (mode) { vcpu_spsr32()
149 mode = KVM_SPSR_SVC; vcpu_spsr32()
152 mode = KVM_SPSR_ABT; vcpu_spsr32()
155 mode = KVM_SPSR_UND; vcpu_spsr32()
158 mode = KVM_SPSR_IRQ; vcpu_spsr32()
161 mode = KVM_SPSR_FIQ; vcpu_spsr32()
167 return (unsigned long *)&vcpu_gp_regs(vcpu)->spsr[mode]; vcpu_spsr32()
/linux-4.1.27/arch/score/include/asm/
H A Dscoreregs.h35 /* bit6 Time output mode */
44 /* bit 10..11 Operating mode */
45 #define TMR_M_FREE 0x0000 /* free running timer mode */
46 #define TMR_M_PERIODIC 0x0400 /* periodic timer mode */
47 #define TMR_M_FC 0x0800 /* free running counter mode */
48 #define TMR_M_PC 0x0c00 /* periodic counter mode */
/linux-4.1.27/net/x25/
H A Dsysctl_net_x25.c25 .mode = 0644,
34 .mode = 0644,
43 .mode = 0644,
52 .mode = 0644,
61 .mode = 0644,
70 .mode = 0644,
/linux-4.1.27/drivers/scsi/
H A Dscsi_sysctl.c19 .mode = 0644,
26 .mode = 0555,
33 .mode = 0555,
/linux-4.1.27/net/netrom/
H A Dsysctl_net_netrom.c42 .mode = 0644,
51 .mode = 0644,
60 .mode = 0644,
69 .mode = 0644,
78 .mode = 0644,
87 .mode = 0644,
96 .mode = 0644,
105 .mode = 0644,
114 .mode = 0644,
123 .mode = 0644,
132 .mode = 0644,
141 .mode = 0644,
/linux-4.1.27/net/ipv4/
H A Dsysctl_net_ipv4.c66 .mode = table->mode, ipv4_local_port_range()
124 .mode = table->mode, ipv4_ping_group_range()
255 .mode = 0644,
262 .mode = 0644,
269 .mode = 0644,
276 .mode = 0644,
283 .mode = 0644,
292 .mode = 0644,
301 .mode = 0644,
308 .mode = 0644,
315 .mode = 0644,
322 .mode = 0644,
329 .mode = 0644,
336 .mode = 0644,
343 .mode = 0644,
350 .mode = 0644,
357 .mode = 0644,
365 .mode = 0644,
372 .mode = 0644,
380 .mode = 0644,
388 .mode = 0644,
393 .mode = 0600,
401 .mode = 0644,
408 .mode = 0644,
415 .mode = 0644,
422 .mode = 0644,
429 .mode = 0644,
436 .mode = 0644,
443 .mode = 0644,
451 .mode = 0644,
460 .mode = 0644,
467 .mode = 0644,
474 .mode = 0644,
481 .mode = 0644,
488 .mode = 0644,
495 .mode = 0644,
502 .mode = 0644,
509 .mode = 0644,
516 .mode = 0644,
523 .mode = 0644,
531 .mode = 0644,
538 .mode = 0644,
546 .mode = 0644,
553 .mode = 0644,
562 .mode = 0644,
569 .mode = 0644,
576 .mode = 0644,
583 .mode = 0644,
590 .mode = 0644,
597 .mode = 0644,
602 .mode = 0644,
610 .mode = 0644,
617 .mode = 0644,
624 .mode = 0644,
631 .mode = 0644,
639 .mode = 0644,
646 .mode = 0644,
653 .mode = 0644,
660 .mode = 0644,
667 .mode = 0444,
673 .mode = 0644,
680 .mode = 0644,
687 .mode = 0644,
694 .mode = 0644,
703 .mode = 0644,
712 .mode = 0644,
721 .mode = 0644,
728 .mode = 0644,
736 .mode = 0644,
744 .mode = 0644,
751 .mode = 0644,
759 .mode = 0644,
771 .mode = 0644,
778 .mode = 0644,
785 .mode = 0644,
792 .mode = 0644,
799 .mode = 0644,
806 .mode = 0644,
813 .mode = 0644,
820 .mode = 0644,
827 .mode = 0644,
834 .mode = 0644,
841 .mode = 0644,
848 .mode = 0644,
855 .mode = 0644,
862 .mode = 0644,
869 .mode = 0644,
876 .mode = 0644,
883 .mode = 0644,
890 .mode = 0644,
897 .mode = 0644,
/linux-4.1.27/drivers/gpu/drm/
H A Ddrm_modes.c45 * drm_mode_debug_printmodeline - print a mode to dmesg
46 * @mode: mode to print
48 * Describe @mode using DRM_DEBUG.
50 void drm_mode_debug_printmodeline(const struct drm_display_mode *mode) drm_mode_debug_printmodeline() argument
54 mode->base.id, mode->name, mode->vrefresh, mode->clock, drm_mode_debug_printmodeline()
55 mode->hdisplay, mode->hsync_start, drm_mode_debug_printmodeline()
56 mode->hsync_end, mode->htotal, drm_mode_debug_printmodeline()
57 mode->vdisplay, mode->vsync_start, drm_mode_debug_printmodeline()
58 mode->vsync_end, mode->vtotal, mode->type, mode->flags); drm_mode_debug_printmodeline()
63 * drm_mode_create - create a new display mode
70 * Pointer to new mode on success, NULL on error.
90 * drm_mode_destroy - remove a mode
92 * @mode: mode to remove
94 * Release @mode's unique ID, then free it @mode structure itself using kfree.
96 void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode) drm_mode_destroy() argument
98 if (!mode) drm_mode_destroy()
101 drm_mode_object_put(dev, &mode->base); drm_mode_destroy()
103 kfree(mode); drm_mode_destroy()
108 * drm_mode_probed_add - add a mode to a connector's probed_mode list
109 * @connector: connector the new mode
110 * @mode: mode data
112 * Add @mode to @connector's probed_mode list for later use. This list should
117 struct drm_display_mode *mode) drm_mode_probed_add()
121 list_add_tail(&mode->head, &connector->probed_modes); drm_mode_probed_add()
132 * @interlaced: whether to compute an interlaced mode
146 * The display mode object is allocated with drm_mode_create(). Returns NULL
147 * when no mode could be allocated.
328 /* ignore - just set the mode flag for interlaced */ drm_cvt_mode()
333 /* Fill the mode line name */ drm_cvt_mode()
352 * @interlaced: whether to compute an interlaced mode
364 * The display mode object is allocated with drm_mode_create(). Returns NULL
365 * when no mode could be allocated.
507 /* finally, pack the results in the mode struct */ drm_gtf_mode_complex()
540 * @interlaced: whether to compute an interlaced mode
563 * The display mode object is allocated with drm_mode_create(). Returns NULL
564 * when no mode could be allocated.
582 * Fills out @dmode using the display mode specified in @vm.
623 * Fills out @vm using the display mode specified in @dmode.
665 * This function is expensive and should only be used, if only one mode is to be
684 pr_debug("%s: got %dx%d display mode from %s\n", of_get_drm_display_mode()
695 * drm_mode_set_name - set the name on a mode
696 * @mode: name will be set in this mode
698 * Set the name of @mode to a standard format which is <hdisplay>x<vdisplay>
701 void drm_mode_set_name(struct drm_display_mode *mode) drm_mode_set_name() argument
703 bool interlaced = !!(mode->flags & DRM_MODE_FLAG_INTERLACE); drm_mode_set_name()
705 snprintf(mode->name, DRM_DISPLAY_MODE_LEN, "%dx%d%s", drm_mode_set_name()
706 mode->hdisplay, mode->vdisplay, drm_mode_set_name()
711 /** drm_mode_hsync - get the hsync of a mode
712 * @mode: mode
718 int drm_mode_hsync(const struct drm_display_mode *mode) drm_mode_hsync() argument
722 if (mode->hsync) drm_mode_hsync()
723 return mode->hsync; drm_mode_hsync()
725 if (mode->htotal < 0) drm_mode_hsync()
728 calc_val = (mode->clock * 1000) / mode->htotal; /* hsync in Hz */ drm_mode_hsync()
737 * drm_mode_vrefresh - get the vrefresh of a mode
738 * @mode: mode
744 int drm_mode_vrefresh(const struct drm_display_mode *mode) drm_mode_vrefresh() argument
749 if (mode->vrefresh > 0) drm_mode_vrefresh()
750 refresh = mode->vrefresh; drm_mode_vrefresh()
751 else if (mode->htotal > 0 && mode->vtotal > 0) { drm_mode_vrefresh()
753 vtotal = mode->vtotal; drm_mode_vrefresh()
755 calc_val = (mode->clock * 1000); drm_mode_vrefresh()
756 calc_val /= mode->htotal; drm_mode_vrefresh()
759 if (mode->flags & DRM_MODE_FLAG_INTERLACE) drm_mode_vrefresh()
761 if (mode->flags & DRM_MODE_FLAG_DBLSCAN) drm_mode_vrefresh()
763 if (mode->vscan > 1) drm_mode_vrefresh()
764 refresh /= mode->vscan; drm_mode_vrefresh()
772 * @p: mode
850 * drm_mode_copy - copy the mode
851 * @dst: mode to overwrite
852 * @src: mode to copy
854 * Copy an existing mode into another mode, preserving the object id and
855 * list head of the destination mode.
869 * drm_mode_duplicate - allocate and duplicate an existing mode
870 * @dev: drm_device to allocate the duplicated mode for
871 * @mode: mode to duplicate
873 * Just allocate a new mode, copy the existing mode into it, and return
877 * Pointer to duplicated mode on success, NULL on error.
880 const struct drm_display_mode *mode) drm_mode_duplicate()
888 drm_mode_copy(nmode, mode); drm_mode_duplicate()
896 * @mode1: first mode
897 * @mode2: second mode
930 * @mode1: first mode
931 * @mode2: second mode
961 * drm_mode_validate_basic - make sure the mode is somewhat sane
962 * @mode: mode to check
964 * Check that the mode timings are at least somewhat reasonable.
968 * The mode status
971 drm_mode_validate_basic(const struct drm_display_mode *mode) drm_mode_validate_basic() argument
973 if (mode->clock == 0) drm_mode_validate_basic()
976 if (mode->hdisplay == 0 || drm_mode_validate_basic()
977 mode->hsync_start < mode->hdisplay || drm_mode_validate_basic()
978 mode->hsync_end < mode->hsync_start || drm_mode_validate_basic()
979 mode->htotal < mode->hsync_end) drm_mode_validate_basic()
982 if (mode->vdisplay == 0 || drm_mode_validate_basic()
983 mode->vsync_start < mode->vdisplay || drm_mode_validate_basic()
984 mode->vsync_end < mode->vsync_start || drm_mode_validate_basic()
985 mode->vtotal < mode->vsync_end) drm_mode_validate_basic()
994 * @mode: mode to check
999 * limitations of the DRM device/connector. If a mode is too big its status
1004 * The mode status
1007 drm_mode_validate_size(const struct drm_display_mode *mode, drm_mode_validate_size() argument
1010 if (maxX > 0 && mode->hdisplay > maxX) drm_mode_validate_size()
1013 if (maxY > 0 && mode->vdisplay > maxY) drm_mode_validate_size()
1077 * drm_mode_prune_invalid - remove invalid modes from mode list
1082 * This helper function can be used to prune a display mode list after
1084 * removed from the list, and if @verbose the status code and mode name is also
1090 struct drm_display_mode *mode, *t; drm_mode_prune_invalid() local
1092 list_for_each_entry_safe(mode, t, mode_list, head) { list_for_each_entry_safe()
1093 if (mode->status != MODE_OK) { list_for_each_entry_safe()
1094 list_del(&mode->head); list_for_each_entry_safe()
1096 drm_mode_debug_printmodeline(mode); list_for_each_entry_safe()
1097 DRM_DEBUG_KMS("Not using %s mode: %s\n", list_for_each_entry_safe()
1098 mode->name, list_for_each_entry_safe()
1099 drm_get_mode_status_name(mode->status)); list_for_each_entry_safe()
1101 drm_mode_destroy(dev, mode); list_for_each_entry_safe()
1110 * @lh_a: list_head for first mode
1111 * @lh_b: list_head for second mode
1143 * drm_mode_sort - sort mode list
1155 * drm_mode_connector_list_update - update the mode list for the connector
1160 * to the actual mode list. It compares the probed mode against the current
1169 struct drm_display_mode *mode; drm_mode_connector_list_update() local
1178 /* go through current modes checking for the new probed mode */ drm_mode_connector_list_update()
1179 list_for_each_entry(mode, &connector->modes, head) { drm_mode_connector_list_update()
1180 if (drm_mode_equal(pmode, mode)) { drm_mode_connector_list_update()
1182 /* if equal delete the probed mode */ drm_mode_connector_list_update()
1183 mode->status = pmode->status; drm_mode_connector_list_update()
1186 mode->type |= pmode->type; drm_mode_connector_list_update()
1188 mode->type = pmode->type; drm_mode_connector_list_update()
1204 * @mode_option: optional per connector mode option
1206 * @mode: preallocated drm_cmdline_mode structure to fill out
1225 struct drm_cmdline_mode *mode) drm_mode_parse_command_line_for_connector()
1242 mode->specified = false; drm_mode_parse_command_line_for_connector()
1337 /* catch mode that begins with digits but has no 'x' */ drm_mode_parse_command_line_for_connector()
1343 "parse error at position %i in video mode '%s'\n", drm_mode_parse_command_line_for_connector()
1345 mode->specified = false; drm_mode_parse_command_line_for_connector()
1350 mode->specified = true; drm_mode_parse_command_line_for_connector()
1351 mode->xres = xres; drm_mode_parse_command_line_for_connector()
1352 mode->yres = yres; drm_mode_parse_command_line_for_connector()
1356 mode->refresh_specified = true; drm_mode_parse_command_line_for_connector()
1357 mode->refresh = refresh; drm_mode_parse_command_line_for_connector()
1361 mode->bpp_specified = true; drm_mode_parse_command_line_for_connector()
1362 mode->bpp = bpp; drm_mode_parse_command_line_for_connector()
1364 mode->rb = rb; drm_mode_parse_command_line_for_connector()
1365 mode->cvt = cvt; drm_mode_parse_command_line_for_connector()
1366 mode->interlace = interlace; drm_mode_parse_command_line_for_connector()
1367 mode->margins = margins; drm_mode_parse_command_line_for_connector()
1368 mode->force = force; drm_mode_parse_command_line_for_connector()
1375 * drm_mode_create_from_cmdline_mode - convert a command line modeline into a DRM display mode
1376 * @dev: DRM device to create the new mode for
1380 * Pointer to converted mode on success, NULL on error.
1386 struct drm_display_mode *mode; drm_mode_create_from_cmdline_mode() local
1389 mode = drm_cvt_mode(dev, drm_mode_create_from_cmdline_mode()
1395 mode = drm_gtf_mode(dev, drm_mode_create_from_cmdline_mode()
1400 if (!mode) drm_mode_create_from_cmdline_mode()
1403 mode->type |= DRM_MODE_TYPE_USERDEF; drm_mode_create_from_cmdline_mode()
1404 drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V); drm_mode_create_from_cmdline_mode()
1405 return mode; drm_mode_create_from_cmdline_mode()
116 drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode) drm_mode_probed_add() argument
879 drm_mode_duplicate(struct drm_device *dev, const struct drm_display_mode *mode) drm_mode_duplicate() argument
1223 drm_mode_parse_command_line_for_connector(const char *mode_option, struct drm_connector *connector, struct drm_cmdline_mode *mode) drm_mode_parse_command_line_for_connector() argument
H A Ddrm_edid.c54 /* First detailed mode wrong, use largest 60Hz mode */
58 /* Prefer the largest mode at 75 Hz */
68 /* use +hsync +vsync for detailed mode */
475 * modes are old-school Mac modes. The EDID spec says the 1152x864@75 mode
477 * mode.
1399 * @connector: has mode list to fix up
1402 * Walk the mode list for @connector, clearing the preferred status
1403 * on existing modes and setting it anew for the right mode ala @quirks.
1429 /* Largest mode is preferred */ edid_fixup_preferred()
1449 mode_is_rb(const struct drm_display_mode *mode) mode_is_rb() argument
1451 return (mode->htotal - mode->hdisplay == 160) && mode_is_rb()
1452 (mode->hsync_end - mode->hdisplay == 80) && mode_is_rb()
1453 (mode->hsync_end - mode->hsync_start == 32) && mode_is_rb()
1454 (mode->vsync_start - mode->vdisplay == 3); mode_is_rb()
1458 * drm_mode_find_dmt - Create a copy of a mode if present in DMT
1465 * Walk the DMT mode list looking for a match for the given parameters.
1467 * Return: A newly allocated copy of the mode, or NULL if not found.
1647 * drm_mode_std - convert standard mode info (width, height, refresh) into mode
1653 * and convert them into a real mode using CVT/GTF/DMT.
1660 struct drm_display_mode *m, *mode = NULL; drm_mode_std() local
1698 * If this connector already has a mode for this size and refresh drm_mode_std()
1710 mode = drm_cvt_mode(dev, 1366, 768, vrefresh_rate, 0, 0, drm_mode_std()
1712 mode->hdisplay = 1366; drm_mode_std()
1713 mode->hsync_start = mode->hsync_start - 1; drm_mode_std()
1714 mode->hsync_end = mode->hsync_end - 1; drm_mode_std()
1715 return mode; drm_mode_std()
1718 /* check whether it can be found in default mode table */ drm_mode_std()
1720 mode = drm_mode_find_dmt(dev, hsize, vsize, vrefresh_rate, drm_mode_std()
1722 if (mode) drm_mode_std()
1723 return mode; drm_mode_std()
1725 mode = drm_mode_find_dmt(dev, hsize, vsize, vrefresh_rate, false); drm_mode_std()
1726 if (mode) drm_mode_std()
1727 return mode; drm_mode_std()
1734 mode = drm_gtf_mode(dev, hsize, vsize, vrefresh_rate, 0, 0); drm_mode_std()
1742 mode = drm_gtf_mode(dev, hsize, vsize, vrefresh_rate, 0, 0); drm_mode_std()
1743 if (!mode) drm_mode_std()
1745 if (drm_mode_hsync(mode) > drm_gtf2_hbreak(edid)) { drm_mode_std()
1746 drm_mode_destroy(dev, mode); drm_mode_std()
1747 mode = drm_gtf_mode_complex(dev, hsize, vsize, drm_mode_std()
1756 mode = drm_cvt_mode(dev, hsize, vsize, vrefresh_rate, 0, 0, drm_mode_std()
1760 return mode; drm_mode_std()
1772 drm_mode_do_interlace_quirk(struct drm_display_mode *mode, drm_mode_do_interlace_quirk() argument
1792 if ((mode->hdisplay == cea_interlaced[i].w) && drm_mode_do_interlace_quirk()
1793 (mode->vdisplay == cea_interlaced[i].h / 2)) { drm_mode_do_interlace_quirk()
1794 mode->vdisplay *= 2; drm_mode_do_interlace_quirk()
1795 mode->vsync_start *= 2; drm_mode_do_interlace_quirk()
1796 mode->vsync_end *= 2; drm_mode_do_interlace_quirk()
1797 mode->vtotal *= 2; drm_mode_do_interlace_quirk()
1798 mode->vtotal |= 1; drm_mode_do_interlace_quirk()
1802 mode->flags |= DRM_MODE_FLAG_INTERLACE; drm_mode_do_interlace_quirk()
1806 * drm_mode_detailed - create a new mode from an EDID detailed timing section
1807 * @dev: DRM device (needed to create new mode)
1820 struct drm_display_mode *mode; drm_mode_detailed() local
1836 DRM_DEBUG_KMS("stereo mode not supported\n"); drm_mode_detailed()
1851 mode = drm_cvt_mode(dev, hactive, vactive, 60, true, false, false); drm_mode_detailed()
1852 if (!mode) drm_mode_detailed()
1858 mode = drm_mode_create(dev); drm_mode_detailed()
1859 if (!mode) drm_mode_detailed()
1865 mode->clock = le16_to_cpu(timing->pixel_clock) * 10; drm_mode_detailed()
1867 mode->hdisplay = hactive; drm_mode_detailed()
1868 mode->hsync_start = mode->hdisplay + hsync_offset; drm_mode_detailed()
1869 mode->hsync_end = mode->hsync_start + hsync_pulse_width; drm_mode_detailed()
1870 mode->htotal = mode->hdisplay + hblank; drm_mode_detailed()
1872 mode->vdisplay = vactive; drm_mode_detailed()
1873 mode->vsync_start = mode->vdisplay + vsync_offset; drm_mode_detailed()
1874 mode->vsync_end = mode->vsync_start + vsync_pulse_width; drm_mode_detailed()
1875 mode->vtotal = mode->vdisplay + vblank; drm_mode_detailed()
1878 if (mode->hsync_end > mode->htotal) drm_mode_detailed()
1879 mode->htotal = mode->hsync_end + 1; drm_mode_detailed()
1880 if (mode->vsync_end > mode->vtotal) drm_mode_detailed()
1881 mode->vtotal = mode->vsync_end + 1; drm_mode_detailed()
1883 drm_mode_do_interlace_quirk(mode, pt); drm_mode_detailed()
1889 mode->flags |= (pt->misc & DRM_EDID_PT_HSYNC_POSITIVE) ? drm_mode_detailed()
1891 mode->flags |= (pt->misc & DRM_EDID_PT_VSYNC_POSITIVE) ? drm_mode_detailed()
1895 mode->width_mm = pt->width_mm_lo | (pt->width_height_mm_hi & 0xf0) << 4; drm_mode_detailed()
1896 mode->height_mm = pt->height_mm_lo | (pt->width_height_mm_hi & 0xf) << 8; drm_mode_detailed()
1899 mode->width_mm *= 10; drm_mode_detailed()
1900 mode->height_mm *= 10; drm_mode_detailed()
1904 mode->width_mm = edid->width_cm * 10; drm_mode_detailed()
1905 mode->height_mm = edid->height_cm * 10; drm_mode_detailed()
1908 mode->type = DRM_MODE_TYPE_DRIVER; drm_mode_detailed()
1909 mode->vrefresh = drm_mode_vrefresh(mode); drm_mode_detailed()
1910 drm_mode_set_name(mode); drm_mode_detailed()
1912 return mode; drm_mode_detailed()
1916 mode_in_hsync_range(const struct drm_display_mode *mode, mode_in_hsync_range() argument
1927 hsync = drm_mode_hsync(mode); mode_in_hsync_range()
1933 mode_in_vsync_range(const struct drm_display_mode *mode, mode_in_vsync_range() argument
1944 vsync = drm_mode_vrefresh(mode); mode_in_vsync_range()
1965 mode_in_range(const struct drm_display_mode *mode, struct edid *edid, mode_in_range() argument
1971 if (!mode_in_hsync_range(mode, edid, t)) mode_in_range()
1974 if (!mode_in_vsync_range(mode, edid, t)) mode_in_range()
1978 if (mode->clock > max_clock) mode_in_range()
1983 if (t[13] && mode->hdisplay > 8 * (t[13] + (256 * (t[12]&0x3)))) mode_in_range()
1986 if (mode_is_rb(mode) && !drm_monitor_supports_rb(edid)) mode_in_range()
1993 const struct drm_display_mode *mode) valid_inferred_mode()
1999 if (mode->hdisplay == m->hdisplay && valid_inferred_mode()
2000 mode->vdisplay == m->vdisplay && valid_inferred_mode()
2001 drm_mode_vrefresh(mode) == drm_mode_vrefresh(m)) valid_inferred_mode()
2003 if (mode->hdisplay <= m->hdisplay && valid_inferred_mode()
2004 mode->vdisplay <= m->vdisplay) valid_inferred_mode()
2032 /* fix up 1366x768 mode from 1368x768;
2035 static void fixup_mode_1366x768(struct drm_display_mode *mode) fixup_mode_1366x768() argument
2037 if (mode->hdisplay == 1368 && mode->vdisplay == 768) { fixup_mode_1366x768()
2038 mode->hdisplay = 1366; fixup_mode_1366x768()
2039 mode->hsync_start--; fixup_mode_1366x768()
2040 mode->hsync_end--; fixup_mode_1366x768()
2041 drm_mode_set_name(mode); fixup_mode_1366x768()
2159 struct drm_display_mode *mode; drm_est3_modes() local
2168 mode = drm_mode_find_dmt(connector->dev, drm_est3_modes()
2173 if (mode) { drm_est3_modes()
2174 drm_mode_probed_add(connector, mode); drm_est3_modes()
2196 * @connector: connector to add mode(s) to
2259 * @connector: connector to add mode(s) to
2463 * Calculate the alternate clock for the CEA mode
2488 * drm_match_cea_mode - look for a CEA mode matching given mode
2489 * @to_match: display mode
2491 * Return: The CEA Video ID (VIC) of the mode or 0 if it isn't a CEA-861
2492 * mode.
2496 u8 mode; drm_match_cea_mode() local
2501 for (mode = 0; mode < ARRAY_SIZE(edid_cea_modes); mode++) { drm_match_cea_mode()
2502 const struct drm_display_mode *cea_mode = &edid_cea_modes[mode]; drm_match_cea_mode()
2512 return mode + 1; drm_match_cea_mode()
2520 * the input VIC from the CEA mode list
2539 * exception for the VIC 4 mode (4096x2160@24Hz): no alternate clock for this
2552 * drm_match_hdmi_mode - look for a HDMI mode matching given mode
2553 * @to_match: display mode
2555 * An HDMI mode is one defined in the HDMI vendor specific block.
2557 * Returns the HDMI Video ID (VIC) of the mode or 0 if it isn't one.
2561 u8 mode; drm_match_hdmi_mode() local
2566 for (mode = 0; mode < ARRAY_SIZE(edid_4k_modes); mode++) { drm_match_hdmi_mode()
2567 const struct drm_display_mode *hdmi_mode = &edid_4k_modes[mode]; drm_match_hdmi_mode()
2577 return mode + 1; drm_match_hdmi_mode()
2586 struct drm_display_mode *mode, *tmp; add_alternate_cea_modes() local
2595 * Go through all probed modes and create a new mode add_alternate_cea_modes()
2598 list_for_each_entry(mode, &connector->probed_modes, head) { add_alternate_cea_modes()
2601 u8 mode_idx = drm_match_cea_mode(mode) - 1; add_alternate_cea_modes()
2608 mode_idx = drm_match_hdmi_mode(mode) - 1; add_alternate_cea_modes()
2623 if (mode->clock != clock1 && mode->clock != clock2) add_alternate_cea_modes()
2631 newmode->flags |= mode->flags & DRM_MODE_FLAG_3D_MASK; add_alternate_cea_modes()
2634 * The current mode could be either variant. Make add_alternate_cea_modes()
2635 * sure to pick the "other" clock for the new mode. add_alternate_cea_modes()
2637 if (mode->clock != clock1) add_alternate_cea_modes()
2645 list_for_each_entry_safe(mode, tmp, &list, head) { add_alternate_cea_modes()
2646 list_del(&mode->head); add_alternate_cea_modes()
2647 drm_mode_probed_add(connector, mode); add_alternate_cea_modes()
2686 struct drm_display_mode *mode; do_cea_modes() local
2687 mode = drm_display_mode_from_vic_index(connector, db, len, i); do_cea_modes()
2688 if (mode) { do_cea_modes()
2689 drm_mode_probed_add(connector, mode); do_cea_modes()
2716 stereo_match_mandatory(const struct drm_display_mode *mode, stereo_match_mandatory() argument
2719 unsigned int interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE; stereo_match_mandatory()
2721 return mode->hdisplay == stereo_mode->width && stereo_match_mandatory()
2722 mode->vdisplay == stereo_mode->height && stereo_match_mandatory()
2724 drm_mode_vrefresh(mode) == stereo_mode->vrefresh; stereo_match_mandatory()
2730 const struct drm_display_mode *mode; add_hdmi_mandatory_stereo_modes() local
2736 list_for_each_entry(mode, &connector->probed_modes, head) { add_hdmi_mandatory_stereo_modes()
2741 if (!stereo_match_mandatory(mode, add_hdmi_mandatory_stereo_modes()
2746 new_mode = drm_mode_duplicate(dev, mode); add_hdmi_mandatory_stereo_modes()
3306 * @mode: the display mode
3312 struct drm_display_mode *mode) drm_av_sync_delay()
3314 int i = !!(mode->flags & DRM_MODE_FLAG_INTERLACE); drm_av_sync_delay()
3346 * @encoder: the encoder just changed display mode
3347 * @mode: the adjusted display mode
3356 struct drm_display_mode *mode) drm_select_eld()
3568 * Spec says that if any deep color mode is supported at all, for_each_cea_db()
3677 * Add the specified modes to the connector's mode list.
3699 * - preferred detailed mode drm_add_edid_modes()
3709 * XXX order for additional mode types in extension blocks? drm_add_edid_modes()
3741 * Add the specified modes to the connector's mode list. Only when the
3750 struct drm_display_mode *mode; drm_add_modes_noedid() local
3764 * whether the mode should be added to the mode list of drm_add_modes_noedid()
3773 mode = drm_mode_duplicate(dev, ptr); drm_add_modes_noedid()
3774 if (mode) { drm_add_modes_noedid()
3775 drm_mode_probed_add(connector, mode); drm_add_modes_noedid()
3784 * drm_set_preferred_mode - Sets the preferred mode of a connector
3785 * @connector: connector whose mode list should be processed
3786 * @hpref: horizontal resolution of preferred mode
3787 * @vpref: vertical resolution of preferred mode
3789 * Marks a mode as preferred if it matches the resolution specified by @hpref
3795 struct drm_display_mode *mode; drm_set_preferred_mode() local
3797 list_for_each_entry(mode, &connector->probed_modes, head) { drm_set_preferred_mode()
3798 if (mode->hdisplay == hpref && drm_set_preferred_mode()
3799 mode->vdisplay == vpref) drm_set_preferred_mode()
3800 mode->type |= DRM_MODE_TYPE_PREFERRED; drm_set_preferred_mode()
3807 * data from a DRM display mode
3809 * @mode: DRM display mode
3815 const struct drm_display_mode *mode) drm_hdmi_avi_infoframe_from_display_mode()
3819 if (!frame || !mode) drm_hdmi_avi_infoframe_from_display_mode()
3826 if (mode->flags & DRM_MODE_FLAG_DBLCLK) drm_hdmi_avi_infoframe_from_display_mode()
3829 frame->video_code = drm_match_cea_mode(mode); drm_hdmi_avi_infoframe_from_display_mode()
3835 * user input (if specified) or from the CEA mode list. drm_hdmi_avi_infoframe_from_display_mode()
3837 if (mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_4_3 || drm_hdmi_avi_infoframe_from_display_mode()
3838 mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_16_9) drm_hdmi_avi_infoframe_from_display_mode()
3839 frame->picture_aspect = mode->picture_aspect_ratio; drm_hdmi_avi_infoframe_from_display_mode()
3852 s3d_structure_from_display_mode(const struct drm_display_mode *mode) s3d_structure_from_display_mode() argument
3854 u32 layout = mode->flags & DRM_MODE_FLAG_3D_MASK; s3d_structure_from_display_mode()
3880 * data from a DRM display mode
3882 * @mode: DRM display mode
3885 * 4k or stereoscopic 3D mode. So when giving any other mode as input this
3892 const struct drm_display_mode *mode) drm_hdmi_vendor_infoframe_from_display_mode()
3898 if (!frame || !mode) drm_hdmi_vendor_infoframe_from_display_mode()
3901 vic = drm_match_hdmi_mode(mode); drm_hdmi_vendor_infoframe_from_display_mode()
3902 s3d_flags = mode->flags & DRM_MODE_FLAG_3D_MASK; drm_hdmi_vendor_infoframe_from_display_mode()
3917 frame->s3d_struct = s3d_structure_from_display_mode(mode); drm_hdmi_vendor_infoframe_from_display_mode()
1992 valid_inferred_mode(const struct drm_connector *connector, const struct drm_display_mode *mode) valid_inferred_mode() argument
3311 drm_av_sync_delay(struct drm_connector *connector, struct drm_display_mode *mode) drm_av_sync_delay() argument
3355 drm_select_eld(struct drm_encoder *encoder, struct drm_display_mode *mode) drm_select_eld() argument
3814 drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame, const struct drm_display_mode *mode) drm_hdmi_avi_infoframe_from_display_mode() argument
3891 drm_hdmi_vendor_infoframe_from_display_mode(struct hdmi_vendor_infoframe *frame, const struct drm_display_mode *mode) drm_hdmi_vendor_infoframe_from_display_mode() argument
H A Ddrm_crtc_helper.c103 * Checks whether @encoder is with the current mode setting output configuration
135 * Checks whether @crtc is with the current mode setting output configuration
210 * This function walks through the entire mode setting configuration of @dev. It
248 * drm_crtc_helper_set_mode - internal helper to set a mode
250 * @mode: mode to use
255 * Try to set @mode on @crtc. Give @crtc and its associated connectors a chance
256 * to fixup or reject the mode prior to trying to set it. This is an internal
261 * drm_crtc_helper_set_config() helper function to drive the mode setting
265 * True if the mode was set successfully, false otherwise.
268 struct drm_display_mode *mode, drm_crtc_helper_set_mode()
288 adjusted_mode = drm_mode_duplicate(dev, mode); drm_crtc_helper_set_mode()
294 saved_mode = crtc->mode; drm_crtc_helper_set_mode()
299 /* Update crtc values up front so the driver can rely on them for mode drm_crtc_helper_set_mode()
302 crtc->mode = *mode; drm_crtc_helper_set_mode()
306 /* Pass our mode to the connectors and the CRTC to give them a chance to drm_crtc_helper_set_mode()
308 * a chance to reject the mode entirely. drm_crtc_helper_set_mode()
317 encoder->bridge, mode, adjusted_mode); drm_crtc_helper_set_mode()
325 if (!(ret = encoder_funcs->mode_fixup(encoder, mode, drm_crtc_helper_set_mode()
332 if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) { drm_crtc_helper_set_mode()
340 /* Prepare the encoders and CRTCs before setting the mode. */ drm_crtc_helper_set_mode()
364 ret = !crtc_funcs->mode_set(crtc, mode, adjusted_mode, x, y, old_fb); drm_crtc_helper_set_mode()
375 mode->base.id, mode->name); drm_crtc_helper_set_mode()
377 encoder_funcs->mode_set(encoder, mode, adjusted_mode); drm_crtc_helper_set_mode()
380 encoder->bridge->funcs->mode_set(encoder->bridge, mode, drm_crtc_helper_set_mode()
413 crtc->mode = saved_mode; drm_crtc_helper_set_mode()
456 * @set: mode set configuration
461 * kernel mode setting with the crtc helper functions and the assorted
472 bool mode_changed = false; /* if true do a full mode set */ drm_crtc_helper_set_config()
488 BUG_ON(!set->mode && set->fb); drm_crtc_helper_set_config()
493 if (!set->mode) drm_crtc_helper_set_config()
542 save_set.mode = &set->crtc->mode; drm_crtc_helper_set_config()
550 /* If we have no fb then treat it as a full mode set */ drm_crtc_helper_set_config()
552 DRM_DEBUG_KMS("crtc has no fb, full mode set\n"); drm_crtc_helper_set_config()
566 if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) { drm_crtc_helper_set_config()
567 DRM_DEBUG_KMS("modes are different, full mode set\n"); drm_crtc_helper_set_config()
568 drm_mode_debug_printmodeline(&set->crtc->mode); drm_crtc_helper_set_config()
569 drm_mode_debug_printmodeline(set->mode); drm_crtc_helper_set_config()
589 DRM_DEBUG_KMS("connector dpms not on, full mode switch\n"); drm_crtc_helper_set_config()
598 DRM_DEBUG_KMS("encoder changed, full mode switch\n"); drm_crtc_helper_set_config()
636 DRM_DEBUG_KMS("crtc changed, full mode switch\n"); drm_crtc_helper_set_config()
656 DRM_DEBUG_KMS("attempting to set mode from" drm_crtc_helper_set_config()
658 drm_mode_debug_printmodeline(set->mode); drm_crtc_helper_set_config()
660 if (!drm_crtc_helper_set_mode(set->crtc, set->mode, drm_crtc_helper_set_config()
663 DRM_ERROR("failed to set mode on [CRTC:%d]\n", drm_crtc_helper_set_config()
709 !drm_crtc_helper_set_mode(save_set.crtc, save_set.mode, save_set.x, drm_crtc_helper_set_config()
733 static void drm_helper_encoder_dpms(struct drm_encoder *encoder, int mode) drm_helper_encoder_dpms() argument
739 if (mode == DRM_MODE_DPMS_ON) drm_helper_encoder_dpms()
747 encoder_funcs->dpms(encoder, mode); drm_helper_encoder_dpms()
750 if (mode == DRM_MODE_DPMS_ON) drm_helper_encoder_dpms()
773 * @mode: DPMS mode
780 void drm_helper_connector_dpms(struct drm_connector *connector, int mode) drm_helper_connector_dpms() argument
786 if (mode == connector->dpms) drm_helper_connector_dpms()
790 connector->dpms = mode; drm_helper_connector_dpms()
796 if (mode < old_dpms) { drm_helper_connector_dpms()
808 if (mode > old_dpms) { drm_helper_connector_dpms()
851 * drm_helper_resume_force_mode - force-restore mode setting configuration
854 * Drivers which use the mode setting helpers can use this function to
855 * force-restore the mode setting configuration e.g. on resume or when something
884 ret = drm_crtc_helper_set_mode(crtc, &crtc->mode, drm_helper_resume_force_mode()
889 DRM_ERROR("failed to set mode on crtc %p\n", crtc); drm_helper_resume_force_mode()
920 * @mode: DRM display mode which userspace requested
921 * @adjusted_mode: DRM display mode adjusted by ->mode_fixup callbacks
934 int drm_helper_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, drm_helper_crtc_mode_set() argument
956 drm_mode_copy(&crtc_state->mode, mode); drm_helper_crtc_mode_set()
1017 plane_state->crtc_h = crtc->mode.vdisplay; drm_helper_crtc_mode_set_base()
1018 plane_state->crtc_w = crtc->mode.hdisplay; drm_helper_crtc_mode_set_base()
1021 plane_state->src_h = crtc->mode.vdisplay << 16; drm_helper_crtc_mode_set_base()
1022 plane_state->src_w = crtc->mode.hdisplay << 16; drm_helper_crtc_mode_set_base()
267 drm_crtc_helper_set_mode(struct drm_crtc *crtc, struct drm_display_mode *mode, int x, int y, struct drm_framebuffer *old_fb) drm_crtc_helper_set_mode() argument
H A Ddrm_probe_helper.c62 drm_mode_validate_flag(const struct drm_display_mode *mode, drm_mode_validate_flag() argument
65 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) && drm_mode_validate_flag()
69 if ((mode->flags & DRM_MODE_FLAG_DBLSCAN) && drm_mode_validate_flag()
73 if ((mode->flags & DRM_MODE_FLAG_3D_MASK) && drm_mode_validate_flag()
82 struct drm_display_mode *mode; drm_helper_probe_add_cmdline_mode() local
87 mode = drm_mode_create_from_cmdline_mode(connector->dev, drm_helper_probe_add_cmdline_mode()
89 if (mode == NULL) drm_helper_probe_add_cmdline_mode()
92 drm_mode_probed_add(connector, mode); drm_helper_probe_add_cmdline_mode()
100 struct drm_display_mode *mode; drm_helper_probe_single_connector_modes_merge_bits() local
113 list_for_each_entry(mode, &connector->modes, head) drm_helper_probe_single_connector_modes_merge_bits()
114 mode->status = MODE_UNVERIFIED; drm_helper_probe_single_connector_modes_merge_bits()
197 list_for_each_entry(mode, &connector->modes, head) { drm_helper_probe_single_connector_modes_merge_bits()
198 if (mode->status == MODE_OK) drm_helper_probe_single_connector_modes_merge_bits()
199 mode->status = drm_mode_validate_basic(mode); drm_helper_probe_single_connector_modes_merge_bits()
201 if (mode->status == MODE_OK) drm_helper_probe_single_connector_modes_merge_bits()
202 mode->status = drm_mode_validate_size(mode, maxX, maxY); drm_helper_probe_single_connector_modes_merge_bits()
204 if (mode->status == MODE_OK) drm_helper_probe_single_connector_modes_merge_bits()
205 mode->status = drm_mode_validate_flag(mode, mode_flags); drm_helper_probe_single_connector_modes_merge_bits()
207 if (mode->status == MODE_OK && connector_funcs->mode_valid) drm_helper_probe_single_connector_modes_merge_bits()
208 mode->status = connector_funcs->mode_valid(connector, drm_helper_probe_single_connector_modes_merge_bits()
209 mode); drm_helper_probe_single_connector_modes_merge_bits()
218 list_for_each_entry(mode, &connector->modes, head) drm_helper_probe_single_connector_modes_merge_bits()
219 mode->vrefresh = drm_mode_vrefresh(mode); drm_helper_probe_single_connector_modes_merge_bits()
225 list_for_each_entry(mode, &connector->modes, head) { drm_helper_probe_single_connector_modes_merge_bits()
226 drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V); drm_helper_probe_single_connector_modes_merge_bits()
227 drm_mode_debug_printmodeline(mode); drm_helper_probe_single_connector_modes_merge_bits()
245 * @connector vfunc for drivers that use the crtc helpers for output mode
265 * replaces the mode bits instead of merging them for preferred modes.
287 * This function must be called from process context with no mode
483 * This function must be called from process context with no mode
/linux-4.1.27/drivers/net/ethernet/ibm/emac/
H A Dzmii.c50 static inline int zmii_valid_mode(int mode) zmii_valid_mode() argument
52 return mode == PHY_MODE_MII || zmii_valid_mode()
53 mode == PHY_MODE_RMII || zmii_valid_mode()
54 mode == PHY_MODE_SMII || zmii_valid_mode()
55 mode == PHY_MODE_NA; zmii_valid_mode()
58 static inline const char *zmii_mode_name(int mode) zmii_mode_name() argument
60 switch (mode) { zmii_mode_name()
72 static inline u32 zmii_mode_mask(int mode, int input) zmii_mode_mask() argument
74 switch (mode) { zmii_mode_mask()
86 int zmii_attach(struct platform_device *ofdev, int input, int *mode) zmii_attach() argument
91 ZMII_DBG(dev, "init(%d, %d)" NL, input, *mode); zmii_attach()
93 if (!zmii_valid_mode(*mode)) { zmii_attach()
104 /* Autodetect ZMII mode if not specified. zmii_attach()
106 * Please, always specify PHY mode in your board port to avoid zmii_attach()
109 if (dev->mode == PHY_MODE_NA) { zmii_attach()
110 if (*mode == PHY_MODE_NA) { zmii_attach()
113 ZMII_DBG(dev, "autodetecting mode, FER = 0x%08x" NL, r); zmii_attach()
116 dev->mode = PHY_MODE_MII; zmii_attach()
118 dev->mode = PHY_MODE_RMII; zmii_attach()
120 dev->mode = PHY_MODE_SMII; zmii_attach()
122 dev->mode = *mode; zmii_attach()
124 printk(KERN_NOTICE "%s: bridge in %s mode\n", zmii_attach()
126 zmii_mode_name(dev->mode)); zmii_attach()
128 /* All inputs must use the same mode */ zmii_attach()
129 if (*mode != PHY_MODE_NA && *mode != dev->mode) { zmii_attach()
131 "%s: invalid mode %d specified for input %d\n", zmii_attach()
132 ofdev->dev.of_node->full_name, *mode, input); zmii_attach()
138 /* Report back correct PHY mode, zmii_attach()
141 *mode = dev->mode; zmii_attach()
144 out_be32(&p->fer, in_be32(&p->fer) | zmii_mode_mask(dev->mode, input)); zmii_attach()
207 in_be32(&dev->base->fer) & ~zmii_mode_mask(dev->mode, input)); zmii_detach()
249 dev->mode = PHY_MODE_NA; zmii_probe()
/linux-4.1.27/arch/sparc/lib/
H A Dlibgcc.h6 typedef int word_type __attribute__ ((mode (__word__)));
/linux-4.1.27/drivers/usb/dwc2/
H A DMakefile16 # NOTE: The previous s3c-hsotg peripheral mode only driver has been moved to
18 # modules, dwc2.ko will get built for host mode, peripheral mode, and dual-role
19 # mode. The PCI bus interface module will called dwc2_pci.ko and the platform
/linux-4.1.27/fs/nfs/
H A Dnfs4sysctl.c24 .mode = 0644,
33 .mode = 0644,
42 .mode = 0555,
51 .mode = 0555,
H A Dsysctl.c21 .mode = 0644,
28 .mode = 0644,
37 .mode = 0555,
46 .mode = 0555,
/linux-4.1.27/arch/arm/mach-omap2/
H A Dam33xx-restart.c16 * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
22 void am33xx_restart(enum reboot_mode mode, const char *cmd) am33xx_restart() argument
24 /* TODO: Handle mode and cmd if necessary */ am33xx_restart()
H A Domap4-restart.c16 * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
22 void omap44xx_restart(enum reboot_mode mode, const char *cmd) omap44xx_restart() argument
H A Dti81xx-restart.c20 * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
27 * clocks to bypass mode.
29 void ti81xx_restart(enum reboot_mode mode, const char *cmd) ti81xx_restart() argument
H A Domap3-restart.c24 * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
30 void omap3xxx_restart(enum reboot_mode mode, const char *cmd) omap3xxx_restart() argument
/linux-4.1.27/fs/coda/
H A Dsysctl.c22 .mode = 0644,
29 .mode = 0644,
36 .mode = 0600,
45 .mode = 0555,
/linux-4.1.27/net/appletalk/
H A Dsysctl_net_atalk.c18 .mode = 0644,
25 .mode = 0644,
32 .mode = 0644,
39 .mode = 0644,
/linux-4.1.27/sound/soc/fsl/
H A Dmpc5200_psc_ac97.h2 * Freescale MPC5200 PSC in AC97 mode
/linux-4.1.27/drivers/gpu/drm/msm/hdmi/
H A Dhdmi_bridge.c133 struct drm_display_mode *mode, hdmi_bridge_mode_set()
141 mode = adjusted_mode; hdmi_bridge_mode_set()
143 hdmi->pixclock = mode->clock * 1000; hdmi_bridge_mode_set()
145 hdmi->hdmi_mode = drm_match_cea_mode(mode) > 1; hdmi_bridge_mode_set()
147 hstart = mode->htotal - mode->hsync_start; hdmi_bridge_mode_set()
148 hend = mode->htotal - mode->hsync_start + mode->hdisplay; hdmi_bridge_mode_set()
150 vstart = mode->vtotal - mode->vsync_start - 1; hdmi_bridge_mode_set()
151 vend = mode->vtotal - mode->vsync_start + mode->vdisplay - 1; hdmi_bridge_mode_set()
154 mode->htotal, mode->vtotal, hstart, hend, vstart, vend); hdmi_bridge_mode_set()
157 HDMI_TOTAL_H_TOTAL(mode->htotal - 1) | hdmi_bridge_mode_set()
158 HDMI_TOTAL_V_TOTAL(mode->vtotal - 1)); hdmi_bridge_mode_set()
167 if (mode->flags & DRM_MODE_FLAG_INTERLACE) { hdmi_bridge_mode_set()
169 HDMI_VSYNC_TOTAL_F2_V_TOTAL(mode->vtotal)); hdmi_bridge_mode_set()
182 if (mode->flags & DRM_MODE_FLAG_NHSYNC) hdmi_bridge_mode_set()
184 if (mode->flags & DRM_MODE_FLAG_NVSYNC) hdmi_bridge_mode_set()
186 if (mode->flags & DRM_MODE_FLAG_INTERLACE) hdmi_bridge_mode_set()
132 hdmi_bridge_mode_set(struct drm_bridge *bridge, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) hdmi_bridge_mode_set() argument
/linux-4.1.27/drivers/gpu/drm/nouveau/
H A Dnouveau_agp.c8 MODULE_PARM_DESC(agpmode, "AGP mode (0 to disable AGP)");
17 int mode; member in struct:nouveau_agpmode_quirk
33 unsigned long mode = info->mode; get_agp_mode() local
40 mode &= ~PCI_AGP_COMMAND_FW; get_agp_mode()
50 agpmode = quirk->mode; get_agp_mode()
51 NV_INFO(drm, "Forcing agp mode to %dX. Use agpmode to override.\n", get_agp_mode()
59 * AGP mode set in the command line. get_agp_mode()
62 bool agpv3 = mode & 0x8; get_agp_mode()
65 mode = (mode & ~0x7) | (rate & 0x7); get_agp_mode()
68 return mode; get_agp_mode()
117 dev->agp->mode) & PCI_AGP_COMMAND_FW) { nouveau_agp_reset()
119 struct drm_agp_mode mode; nouveau_agp_reset() local
125 mode.mode = get_agp_mode(drm, &info); nouveau_agp_reset()
126 mode.mode &= ~PCI_AGP_COMMAND_FW; nouveau_agp_reset()
128 ret = drm_agp_enable(dev, mode); nouveau_agp_reset()
153 struct drm_agp_mode mode; nouveau_agp_init() local
173 mode.mode = get_agp_mode(drm, &info); nouveau_agp_init()
175 ret = drm_agp_enable(dev, mode); nouveau_agp_init()
/linux-4.1.27/net/rxrpc/
H A Dsysctl.c36 .mode = 0644,
44 .mode = 0644,
52 .mode = 0644,
60 .mode = 0644,
70 .mode = 0644,
78 .mode = 0644,
88 .mode = 0644,
96 .mode = 0644,
106 .mode = 0644,
115 .mode = 0644,
124 .mode = 0644,
/linux-4.1.27/net/
H A Dsysctl_net.c40 /* Return standard mode bits for table entry. */ net_ctl_permissions()
51 int mode = (table->mode >> 6) & 7; net_ctl_permissions() local
52 return (mode << 6) | (mode << 3) | mode; net_ctl_permissions()
56 int mode = (table->mode >> 3) & 7; net_ctl_permissions() local
57 return (mode << 3) | mode; net_ctl_permissions()
59 return table->mode; net_ctl_permissions()
/linux-4.1.27/sound/soc/codecs/
H A Dwl1273.c38 enum wl1273_mode mode; member in struct:wl1273_priv
48 u16 mode; snd_wl1273_fm_set_i2s_mode() local
55 mode = core->i2s_mode & ~WL1273_IS2_WIDTH & ~WL1273_IS2_RATE; snd_wl1273_fm_set_i2s_mode()
59 mode |= WL1273_IS2_RATE_48K; snd_wl1273_fm_set_i2s_mode()
62 mode |= WL1273_IS2_RATE_44_1K; snd_wl1273_fm_set_i2s_mode()
65 mode |= WL1273_IS2_RATE_32K; snd_wl1273_fm_set_i2s_mode()
68 mode |= WL1273_IS2_RATE_22_05K; snd_wl1273_fm_set_i2s_mode()
71 mode |= WL1273_IS2_RATE_16K; snd_wl1273_fm_set_i2s_mode()
74 mode |= WL1273_IS2_RATE_12K; snd_wl1273_fm_set_i2s_mode()
77 mode |= WL1273_IS2_RATE_11_025; snd_wl1273_fm_set_i2s_mode()
80 mode |= WL1273_IS2_RATE_8K; snd_wl1273_fm_set_i2s_mode()
90 mode |= WL1273_IS2_WIDTH_32; snd_wl1273_fm_set_i2s_mode()
93 mode |= WL1273_IS2_WIDTH_40; snd_wl1273_fm_set_i2s_mode()
96 mode |= WL1273_IS2_WIDTH_48; snd_wl1273_fm_set_i2s_mode()
99 mode |= WL1273_IS2_WIDTH_50; snd_wl1273_fm_set_i2s_mode()
102 mode |= WL1273_IS2_WIDTH_60; snd_wl1273_fm_set_i2s_mode()
105 mode |= WL1273_IS2_WIDTH_64; snd_wl1273_fm_set_i2s_mode()
108 mode |= WL1273_IS2_WIDTH_80; snd_wl1273_fm_set_i2s_mode()
111 mode |= WL1273_IS2_WIDTH_96; snd_wl1273_fm_set_i2s_mode()
114 mode |= WL1273_IS2_WIDTH_128; snd_wl1273_fm_set_i2s_mode()
124 dev_dbg(dev, "mode: 0x%04x\n", mode); snd_wl1273_fm_set_i2s_mode()
126 if (core->i2s_mode != mode) { snd_wl1273_fm_set_i2s_mode()
127 r = core->write(core, WL1273_I2S_MODE_CONFIG_SET, mode); snd_wl1273_fm_set_i2s_mode()
131 core->i2s_mode = mode; snd_wl1273_fm_set_i2s_mode()
156 if (channel_number == 1 && core->mode == WL1273_MODE_RX) snd_wl1273_fm_set_channel_number()
158 else if (channel_number == 1 && core->mode == WL1273_MODE_TX) snd_wl1273_fm_set_channel_number()
160 else if (channel_number == 2 && core->mode == WL1273_MODE_RX) snd_wl1273_fm_set_channel_number()
162 else if (channel_number == 2 && core->mode == WL1273_MODE_TX) snd_wl1273_fm_set_channel_number()
178 ucontrol->value.integer.value[0] = wl1273->mode; snd_wl1273_get_audio_route()
196 if (wl1273->mode == ucontrol->value.integer.value[0]) snd_wl1273_set_audio_route()
207 wl1273->mode = ucontrol->value.integer.value[0]; snd_wl1273_set_audio_route()
308 switch (wl1273->mode) { wl1273_startup()
318 pr_err("Cannot play in RX mode.\n"); wl1273_startup()
324 pr_err("Cannot capture in TX mode.\n"); wl1273_startup()
353 if (wl1273->mode == WL1273_MODE_BT) { wl1273_hw_params()
367 if (wl1273->mode == WL1273_MODE_FM_TX && wl1273_hw_params()
373 if (wl1273->mode == WL1273_MODE_FM_RX && wl1273_hw_params()
379 if (wl1273->mode != WL1273_MODE_FM_RX && wl1273_hw_params()
380 wl1273->mode != WL1273_MODE_FM_TX) { wl1273_hw_params()
381 pr_err("Unexpected mode: %d.\n", wl1273->mode); wl1273_hw_params()
429 switch (wl1273->mode) { wl1273_get_format()
467 wl1273->mode = WL1273_MODE_BT; wl1273_probe()
/linux-4.1.27/arch/mips/include/asm/
H A Disadep.h18 * kernel or user mode? (CP0_STATUS)
26 * kernel or user mode?
H A Dfpu.h38 * This enum specifies a mode in which we want the FPU to operate, for cores
57 static inline int __enable_fpu(enum fpu_mode mode) __enable_fpu() argument
61 switch (mode) { __enable_fpu()
63 /* just enable the FPU in its current mode */ __enable_fpu()
90 fr = (int)mode & FPU_FR_MASK; __enable_fpu()
123 enum fpu_mode mode; __own_fpu() local
127 mode = FPU_HYBRID; __own_fpu()
129 mode = !test_thread_flag(TIF_32BIT_FPREGS); __own_fpu()
131 ret = __enable_fpu(mode); __own_fpu()
136 if (mode == FPU_64BIT || mode == FPU_HYBRID) __own_fpu()
138 else /* mode == FPU_32BIT */ __own_fpu()
/linux-4.1.27/fs/dlm/
H A Dast.c26 log_print("last_bast %x %llu flags %x mode %d sb %d %x", dlm_dump_lkb_callbacks()
30 lkb->lkb_last_bast.mode, dlm_dump_lkb_callbacks()
34 log_print("last_cast %x %llu flags %x mode %d sb %d %x", dlm_dump_lkb_callbacks()
38 lkb->lkb_last_cast.mode, dlm_dump_lkb_callbacks()
43 log_print("cb %x %llu flags %x mode %d sb %d %x", dlm_dump_lkb_callbacks()
47 lkb->lkb_callbacks[i].mode, dlm_dump_lkb_callbacks()
53 int dlm_add_lkb_callback(struct dlm_lkb *lkb, uint32_t flags, int mode, dlm_add_lkb_callback() argument
68 * is a bast for the same mode or a more restrictive mode. dlm_add_lkb_callback()
76 prev_mode = lkb->lkb_callbacks[i-1].mode; dlm_add_lkb_callback()
78 if ((prev_mode == mode) || dlm_add_lkb_callback()
79 (prev_mode > mode && prev_mode > DLM_LOCK_PR)) { dlm_add_lkb_callback()
81 log_debug(ls, "skip %x add bast %llu mode %d " dlm_add_lkb_callback()
82 "for bast %llu mode %d", dlm_add_lkb_callback()
85 mode, dlm_add_lkb_callback()
95 lkb->lkb_callbacks[i].mode = mode; dlm_add_lkb_callback()
103 log_error(ls, "no callbacks %x %llu flags %x mode %d sb %d %x", dlm_add_lkb_callback()
105 flags, mode, status, sbflags); dlm_add_lkb_callback()
142 /* if cb is a bast, it should be skipped if the blocking mode is dlm_rem_lkb_callback()
143 compatible with the last granted mode */ dlm_rem_lkb_callback()
146 if (dlm_modes_compat(cb->mode, lkb->lkb_last_cast.mode)) { dlm_rem_lkb_callback()
149 log_debug(ls, "skip %x bast %llu mode %d " dlm_rem_lkb_callback()
150 "for cast %llu mode %d", dlm_rem_lkb_callback()
153 cb->mode, dlm_rem_lkb_callback()
155 lkb->lkb_last_cast.mode); dlm_rem_lkb_callback()
175 void dlm_add_cb(struct dlm_lkb *lkb, uint32_t flags, int mode, int status, dlm_add_cb() argument
187 dlm_user_add_ast(lkb, flags, mode, status, sbflags, new_seq); dlm_add_cb()
194 rv = dlm_add_lkb_callback(lkb, flags, mode, status, sbflags, new_seq); dlm_add_cb()
218 void (*bastfn) (void *astparam, int mode); dlm_callback_work()
256 bastfn(lkb->lkb_astparam, callbacks[i].mode); dlm_callback_work()
/linux-4.1.27/net/dccp/
H A Dsysctl.c33 .mode = 0644,
42 .mode = 0644,
51 .mode = 0644,
60 .mode = 0644,
69 .mode = 0644,
78 .mode = 0644,
87 .mode = 0644,
95 .mode = 0644,
/linux-4.1.27/net/ax25/
H A Dsysctl_net_ax25.c36 .mode = 0644,
44 .mode = 0644,
52 .mode = 0644,
60 .mode = 0644,
68 .mode = 0644,
76 .mode = 0644,
84 .mode = 0644,
92 .mode = 0644,
100 .mode = 0644,
108 .mode = 0644,
116 .mode = 0644,
124 .mode = 0644,
132 .mode = 0644,
141 .mode = 0644,
/linux-4.1.27/arch/sh/include/mach-se/mach/
H A Dmrshpc.h24 /* common mode & bus width 16bit SWAP = 1*/ mrshpc_setup_windows()
27 /* common mode & bus width 16bit SWAP = 0*/ mrshpc_setup_windows()
33 /* attribute mode & bus width 16bit SWAP = 1*/ mrshpc_setup_windows()
36 /* attribute mode & bus width 16bit SWAP = 0*/ mrshpc_setup_windows()
41 __raw_writew(0x0008, MRSHPC_CDCR); /* I/O card mode */ mrshpc_setup_windows()
/linux-4.1.27/arch/arm/mach-imx/
H A Dpm-imx3.c19 * Set cpu low power mode before WFI instruction. This function is called
23 void mx3_cpu_lp_set(enum mx3_cpu_pwr_mode mode) mx3_cpu_lp_set() argument
28 switch (mode) { mx3_cpu_lp_set()
35 pr_err("Unknown cpu power mode: %d\n", mode); mx3_cpu_lp_set()
/linux-4.1.27/net/rose/
H A Dsysctl_net_rose.c32 .mode = 0644,
41 .mode = 0644,
50 .mode = 0644,
59 .mode = 0644,
68 .mode = 0644,
77 .mode = 0644,
86 .mode = 0644,
95 .mode = 0644,
104 .mode = 0644,
113 .mode = 0644,
/linux-4.1.27/drivers/parport/
H A Dieee1284.c226 /* Terminate a negotiated mode. */ parport_ieee1284_terminate()
233 switch (port->ieee1284.mode) { parport_ieee1284_terminate()
237 /* Terminate from EPP mode. */ parport_ieee1284_terminate()
311 port->ieee1284.mode = IEEE1284_MODE_COMPAT; parport_ieee1284_terminate()
314 DPRINTK (KERN_DEBUG "%s: In compatibility (forward idle) mode\n", parport_ieee1284_terminate()
320 * parport_negotiate - negotiate an IEEE 1284 mode
322 * @mode: mode to negotiate to
324 * Use this to negotiate to a particular IEEE 1284 transfer mode.
325 * The @mode parameter should be one of the constants in
329 * negotiation to the mode specified, -1 if the peripheral is not
334 int parport_negotiate (struct parport *port, int mode) parport_negotiate() argument
337 if (mode == IEEE1284_MODE_COMPAT) parport_negotiate()
342 int m = mode & ~IEEE1284_ADDR; parport_negotiate()
349 if (port->ieee1284.mode == mode) parport_negotiate()
353 if ((port->ieee1284.mode & ~IEEE1284_ADDR) == (mode & ~IEEE1284_ADDR)){ parport_negotiate()
354 port->ieee1284.mode = mode; parport_negotiate()
358 /* Go to compatibility forward idle mode */ parport_negotiate()
359 if (port->ieee1284.mode != IEEE1284_MODE_COMPAT) parport_negotiate()
362 if (mode == IEEE1284_MODE_COMPAT) parport_negotiate()
363 /* Compatibility mode: no negotiation. */ parport_negotiate()
366 switch (mode) { parport_negotiate()
378 if (mode & IEEE1284_EXT_LINK) parport_negotiate()
442 port->name, mode, port->ops->read_status (port)); parport_negotiate()
450 if (mode && !xflag) { parport_negotiate()
453 port->name, mode); parport_negotiate()
459 if (mode & IEEE1284_EXT_LINK) { parport_negotiate()
460 m = mode & 0x7f; parport_negotiate()
493 port->name, mode, parport_negotiate()
504 /* Extended mode not supported. */ parport_negotiate()
505 DPRINTK (KERN_DEBUG "%s: Extended mode 0x%02x not " parport_negotiate()
506 "supported\n", port->name, mode); parport_negotiate()
515 DPRINTK (KERN_DEBUG "%s: In mode 0x%02x\n", port->name, mode); parport_negotiate()
516 port->ieee1284.mode = mode; parport_negotiate()
519 if (!(mode & IEEE1284_EXT_LINK) && (m & IEEE1284_MODE_ECP)) { parport_negotiate()
539 } else switch (mode) { parport_negotiate()
596 * specified, using the IEEE 1284 transfer mode most recently
598 * mode supports forward transfers (host to peripheral).
613 int mode = port->ieee1284.mode; parport_write()
614 int addr = mode & IEEE1284_ADDR; parport_write()
618 mode &= ~(IEEE1284_DEVICEID | IEEE1284_ADDR); parport_write()
620 /* Use the mode we're in. */ parport_write()
621 switch (mode) { parport_write()
626 DPRINTK (KERN_DEBUG "%s: Using compatibility mode\n", parport_write()
632 DPRINTK (KERN_DEBUG "%s: Using EPP mode\n", port->name); parport_write()
640 DPRINTK (KERN_DEBUG "%s: Using software-emulated EPP mode\n", parport_write()
650 DPRINTK (KERN_DEBUG "%s: Using ECP mode\n", port->name); parport_write()
659 DPRINTK (KERN_DEBUG "%s: Using software-emulated ECP mode\n", parport_write()
671 DPRINTK (KERN_DEBUG "%s: Unknown mode 0x%02x\n", port->name, parport_write()
672 port->ieee1284.mode); parport_write()
689 * specified, using the IEEE 1284 transfer mode most recently
691 * mode supports reverse transfers (peripheral to host).
706 int mode = port->physport->ieee1284.mode; parport_read()
707 int addr = mode & IEEE1284_ADDR; parport_read()
711 mode &= ~(IEEE1284_DEVICEID | IEEE1284_ADDR); parport_read()
713 /* Use the mode we're in. */ parport_read()
714 switch (mode) { parport_read()
716 /* if we can tri-state use BYTE mode instead of NIBBLE mode, parport_read()
717 * if that fails, revert to NIBBLE mode -- ought to store somewhere parport_read()
718 * the device's ability to do BYTE mode reverse transfers, so we don't parport_read()
723 /* got into BYTE mode OK */ parport_read()
724 DPRINTK (KERN_DEBUG "%s: Using byte mode\n", port->name); parport_read()
733 DPRINTK (KERN_DEBUG "%s: Using nibble mode\n", port->name); parport_read()
738 DPRINTK (KERN_DEBUG "%s: Using byte mode\n", port->name); parport_read()
743 DPRINTK (KERN_DEBUG "%s: Using EPP mode\n", port->name); parport_read()
751 DPRINTK (KERN_DEBUG "%s: Using software-emulated EPP mode\n", parport_read()
761 DPRINTK (KERN_DEBUG "%s: Using ECP mode\n", port->name); parport_read()
766 DPRINTK (KERN_DEBUG "%s: Using software-emulated ECP mode\n", parport_read()
772 DPRINTK (KERN_DEBUG "%s: Unknown mode 0x%02x\n", port->name, parport_read()
773 port->physport->ieee1284.mode); parport_read()
/linux-4.1.27/drivers/video/fbdev/core/
H A Dmodedb.c2 * linux/drivers/video/modedb.c -- Standard video mode database management
33 * Standard video mode definitions (taken from XFree86)
587 * fb_try_mode - test a video mode
590 * @mode: frame buffer video mode structure
593 * Tries a video mode to test it's validity for device @info.
600 const struct fb_videomode *mode, unsigned int bpp) fb_try_mode()
604 DPRINTK("Trying mode %s %dx%d-%d@%d\n", fb_try_mode()
605 mode->name ? mode->name : "noname", fb_try_mode()
606 mode->xres, mode->yres, bpp, mode->refresh); fb_try_mode()
607 var->xres = mode->xres; fb_try_mode()
608 var->yres = mode->yres; fb_try_mode()
609 var->xres_virtual = mode->xres; fb_try_mode()
610 var->yres_virtual = mode->yres; fb_try_mode()
615 var->pixclock = mode->pixclock; fb_try_mode()
616 var->left_margin = mode->left_margin; fb_try_mode()
617 var->right_margin = mode->right_margin; fb_try_mode()
618 var->upper_margin = mode->upper_margin; fb_try_mode()
619 var->lower_margin = mode->lower_margin; fb_try_mode()
620 var->hsync_len = mode->hsync_len; fb_try_mode()
621 var->vsync_len = mode->vsync_len; fb_try_mode()
622 var->sync = mode->sync; fb_try_mode()
623 var->vmode = mode->vmode; fb_try_mode()
631 * fb_find_mode - finds a valid video mode
634 * @mode_option: string video mode to find
635 * @db: video mode database
637 * @default_mode: default video mode to fall back to
640 * Finds a suitable video mode, starting with the specified mode
642 * @default_mode fails, all modes in the video mode database will
645 * Valid mode specifiers for @mode_option:
657 * interlaced mode. If 'm' is present, add margins equal to 1.8%
668 * 3 if default mode is used, 4 if fall back to any valid mode.
692 /* Did the user specify a video mode? */ fb_find_mode()
768 DPRINTK("CVT mode %dx%d@%dHz%s%s%s\n", xres, yres, fb_find_mode()
787 DPRINTK("modedb CVT: CVT mode ok\n"); fb_find_mode()
791 DPRINTK("CVT mode invalid, getting mode from database\n"); fb_find_mode()
794 DPRINTK("Trying specified video mode%s %ix%i\n", fb_find_mode()
800 * If the caller has provided a custom mode database and fb_find_mode()
801 * a valid monspecs structure, we look for the mode with fb_find_mode()
803 * it and try to find a mode with a refresh rate closest fb_find_mode()
864 DPRINTK("Trying default video mode\n"); fb_find_mode()
873 DPRINTK("No valid mode found\n"); fb_find_mode()
879 * @mode: pointer to struct fb_videomode
882 void fb_var_to_videomode(struct fb_videomode *mode, fb_var_to_videomode() argument
887 mode->name = NULL; fb_var_to_videomode()
888 mode->xres = var->xres; fb_var_to_videomode()
889 mode->yres = var->yres; fb_var_to_videomode()
890 mode->pixclock = var->pixclock; fb_var_to_videomode()
891 mode->hsync_len = var->hsync_len; fb_var_to_videomode()
892 mode->vsync_len = var->vsync_len; fb_var_to_videomode()
893 mode->left_margin = var->left_margin; fb_var_to_videomode()
894 mode->right_margin = var->right_margin; fb_var_to_videomode()
895 mode->upper_margin = var->upper_margin; fb_var_to_videomode()
896 mode->lower_margin = var->lower_margin; fb_var_to_videomode()
897 mode->sync = var->sync; fb_var_to_videomode()
898 mode->vmode = var->vmode & FB_VMODE_MASK; fb_var_to_videomode()
899 mode->flag = FB_MODE_IS_FROM_VAR; fb_var_to_videomode()
900 mode->refresh = 0; fb_var_to_videomode()
918 mode->refresh = hfreq/vtotal; fb_var_to_videomode()
924 * @mode: pointer to struct fb_videomode
927 const struct fb_videomode *mode) fb_videomode_to_var()
929 var->xres = mode->xres; fb_videomode_to_var()
930 var->yres = mode->yres; fb_videomode_to_var()
931 var->xres_virtual = mode->xres; fb_videomode_to_var()
932 var->yres_virtual = mode->yres; fb_videomode_to_var()
935 var->pixclock = mode->pixclock; fb_videomode_to_var()
936 var->left_margin = mode->left_margin; fb_videomode_to_var()
937 var->right_margin = mode->right_margin; fb_videomode_to_var()
938 var->upper_margin = mode->upper_margin; fb_videomode_to_var()
939 var->lower_margin = mode->lower_margin; fb_videomode_to_var()
940 var->hsync_len = mode->hsync_len; fb_videomode_to_var()
941 var->vsync_len = mode->vsync_len; fb_videomode_to_var()
942 var->sync = mode->sync; fb_videomode_to_var()
943 var->vmode = mode->vmode & FB_VMODE_MASK; fb_videomode_to_var()
992 struct fb_videomode *mode, *best = NULL; fb_find_best_mode() local
999 mode = &modelist->mode; list_for_each()
1001 if (mode->xres >= var->xres && mode->yres >= var->yres) { list_for_each()
1002 d = (mode->xres - var->xres) + list_for_each()
1003 (mode->yres - var->yres); list_for_each()
1006 best = mode; list_for_each()
1008 mode->refresh > best->refresh) list_for_each()
1009 best = mode; list_for_each()
1018 * @mode: pointer to struct fb_videomode
1025 const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode, fb_find_nearest_mode() argument
1037 cmode = &modelist->mode; list_for_each()
1039 d = abs(cmode->xres - mode->xres) + list_for_each()
1040 abs(cmode->yres - mode->yres); list_for_each()
1043 diff_refresh = abs(cmode->refresh - mode->refresh); list_for_each()
1046 d = abs(cmode->refresh - mode->refresh); list_for_each()
1070 struct fb_videomode *m, mode; fb_match_mode() local
1072 fb_var_to_videomode(&mode, var); list_for_each()
1075 m = &modelist->mode; list_for_each()
1076 if (fb_mode_is_equal(m, &mode)) list_for_each()
1084 * @mode: videomode to add
1088 * Will only add unmatched mode entries
1090 int fb_add_videomode(const struct fb_videomode *mode, struct list_head *head) fb_add_videomode() argument
1099 m = &modelist->mode; list_for_each()
1100 if (fb_mode_is_equal(m, mode)) { list_for_each()
1111 modelist->mode = *mode;
1119 * @mode: videomode to remove
1123 * Will remove all matching mode entries
1125 void fb_delete_videomode(const struct fb_videomode *mode, fb_delete_videomode() argument
1134 m = &modelist->mode; list_for_each_safe()
1135 if (fb_mode_is_equal(m, mode)) { list_for_each_safe()
1158 * fb_videomode_to_modelist - convert mode array to mode list
1187 /* get the first detailed mode and the very first mode */ list_for_each()
1190 m = &modelist->mode; list_for_each()
1209 /* find best mode based on display width and height */
1223 /* use first detailed mode */
1229 /* last resort, use the very first mode */
599 fb_try_mode(struct fb_var_screeninfo *var, struct fb_info *info, const struct fb_videomode *mode, unsigned int bpp) fb_try_mode() argument
926 fb_videomode_to_var(struct fb_var_screeninfo *var, const struct fb_videomode *mode) fb_videomode_to_var() argument
H A Dfbmon.c382 struct fb_videomode *mode) calc_mode_timings()
393 mode->xres = xres; calc_mode_timings()
394 mode->yres = yres; calc_mode_timings()
395 mode->pixclock = var->pixclock; calc_mode_timings()
396 mode->refresh = refresh; calc_mode_timings()
397 mode->left_margin = var->left_margin; calc_mode_timings()
398 mode->right_margin = var->right_margin; calc_mode_timings()
399 mode->upper_margin = var->upper_margin; calc_mode_timings()
400 mode->lower_margin = var->lower_margin; calc_mode_timings()
401 mode->hsync_len = var->hsync_len; calc_mode_timings()
402 mode->vsync_len = var->vsync_len; calc_mode_timings()
403 mode->vmode = 0; calc_mode_timings()
404 mode->sync = 0; calc_mode_timings()
409 static int get_est_timing(unsigned char *block, struct fb_videomode *mode) get_est_timing() argument
416 calc_mode_timings(720, 400, 70, &mode[num]); get_est_timing()
417 mode[num++].flag = FB_MODE_IS_CALCULATED; get_est_timing()
421 calc_mode_timings(720, 400, 88, &mode[num]); get_est_timing()
422 mode[num++].flag = FB_MODE_IS_CALCULATED; get_est_timing()
426 mode[num++] = vesa_modes[3]; get_est_timing()
430 calc_mode_timings(640, 480, 67, &mode[num]); get_est_timing()
431 mode[num++].flag = FB_MODE_IS_CALCULATED; get_est_timing()
435 mode[num++] = vesa_modes[4]; get_est_timing()
439 mode[num++] = vesa_modes[5]; get_est_timing()
443 mode[num++] = vesa_modes[7]; get_est_timing()
447 mode[num++] = vesa_modes[8]; get_est_timing()
453 mode[num++] = vesa_modes[9]; get_est_timing()
457 mode[num++] = vesa_modes[10]; get_est_timing()
461 calc_mode_timings(832, 624, 75, &mode[num]); get_est_timing()
462 mode[num++].flag = FB_MODE_IS_CALCULATED; get_est_timing()
466 mode[num++] = vesa_modes[12]; get_est_timing()
470 mode[num++] = vesa_modes[13]; get_est_timing()
474 mode[num++] = vesa_modes[14]; get_est_timing()
478 mode[num++] = vesa_modes[15]; get_est_timing()
482 mode[num++] = vesa_modes[21]; get_est_timing()
487 mode[num++] = vesa_modes[17]; get_est_timing()
494 static int get_std_timing(unsigned char *block, struct fb_videomode *mode, get_std_timing() argument
505 if (i < DMT_SIZE && dmt_modes[i].mode) { get_std_timing()
506 /* DMT mode found */ get_std_timing()
507 *mode = *dmt_modes[i].mode; get_std_timing()
508 mode->flag |= FB_MODE_IS_STANDARD; get_std_timing()
540 calc_mode_timings(xres, yres, refresh, mode); get_std_timing()
543 /* Check the mode we got is within valid spec of the monitor */ get_std_timing()
545 && PICOS2KHZ(mode->pixclock) * 1000 > specs->dclkmax) { get_std_timing()
546 DPRINTK(" mode exceed max DCLK\n"); get_std_timing()
553 static int get_dst_timing(unsigned char *block, struct fb_videomode *mode, get_dst_timing() argument
559 num += get_std_timing(block, &mode[num], ver, rev, specs); get_dst_timing()
565 struct fb_videomode *mode) get_detailed_timing()
567 mode->xres = H_ACTIVE; get_detailed_timing()
568 mode->yres = V_ACTIVE; get_detailed_timing()
569 mode->pixclock = PIXEL_CLOCK; get_detailed_timing()
570 mode->pixclock /= 1000; get_detailed_timing()
571 mode->pixclock = KHZ2PICOS(mode->pixclock); get_detailed_timing()
572 mode->right_margin = H_SYNC_OFFSET; get_detailed_timing()
573 mode->left_margin = (H_ACTIVE + H_BLANKING) - get_detailed_timing()
575 mode->upper_margin = V_BLANKING - V_SYNC_OFFSET - get_detailed_timing()
577 mode->lower_margin = V_SYNC_OFFSET; get_detailed_timing()
578 mode->hsync_len = H_SYNC_WIDTH; get_detailed_timing()
579 mode->vsync_len = V_SYNC_WIDTH; get_detailed_timing()
581 mode->sync |= FB_SYNC_HOR_HIGH_ACT; get_detailed_timing()
583 mode->sync |= FB_SYNC_VERT_HIGH_ACT; get_detailed_timing()
584 mode->refresh = PIXEL_CLOCK/((H_ACTIVE + H_BLANKING) * get_detailed_timing()
587 mode->yres *= 2; get_detailed_timing()
588 mode->upper_margin *= 2; get_detailed_timing()
589 mode->lower_margin *= 2; get_detailed_timing()
590 mode->vsync_len *= 2; get_detailed_timing()
591 mode->vmode |= FB_VMODE_INTERLACED; get_detailed_timing()
593 mode->flag = FB_MODE_IS_DETAILED; get_detailed_timing()
605 * fb_create_modedb - create video mode database
612 * This function builds a mode database using the contents of the EDID
618 struct fb_videomode *mode, *m; fb_create_modedb() local
623 mode = kzalloc(50 * sizeof(struct fb_videomode), GFP_KERNEL); fb_create_modedb()
624 if (mode == NULL) fb_create_modedb()
629 kfree(mode); fb_create_modedb()
642 get_detailed_timing(block, &mode[num]); fb_create_modedb()
644 mode[num].flag |= FB_MODE_IS_FIRST; fb_create_modedb()
653 num += get_est_timing(block, &mode[num]); fb_create_modedb()
658 num += get_std_timing(block, &mode[num], ver, rev, specs); fb_create_modedb()
663 num += get_dst_timing(block + 5, &mode[num], fb_create_modedb()
669 kfree(mode); fb_create_modedb()
676 return mode; fb_create_modedb()
677 memmove(m, mode, num * sizeof(struct fb_videomode)); fb_create_modedb()
678 kfree(mode); fb_create_modedb()
683 * fb_destroy_modedb - destroys mode database
684 * @modedb: mode database to destroy
687 * Destroy mode database created by fb_create_modedb
719 struct fb_videomode *modes, *mode; fb_get_monitor_limits() local
731 mode = &modes[i]; fb_get_monitor_limits()
733 htotal = mode->xres + mode->right_margin + mode->hsync_len fb_get_monitor_limits()
734 + mode->left_margin; fb_get_monitor_limits()
735 vtotal = mode->yres + mode->lower_margin + mode->vsync_len fb_get_monitor_limits()
736 + mode->upper_margin; fb_get_monitor_limits()
738 if (mode->vmode & FB_VMODE_INTERLACED) fb_get_monitor_limits()
741 if (mode->vmode & FB_VMODE_DOUBLE) fb_get_monitor_limits()
1032 pr_debug("N%sative mode #%d\n", fb_edid_add_monspecs()
1271 * fb_get_mode - calculates video mode using VESA GTF
1281 * Calculates video mode based on monitor specs using VESA GTF.
1438 /* a mode must have htotal and vtotal != 0 or it is invalid */ fb_videomode_from_videomode()
1464 * This function is expensive and should only be used, if only one mode is to be
1480 pr_debug("%s: got %dx%d display mode from %s\n", of_get_fb_videomode()
1518 * Validates video mode against monitor capabilities specified in
381 calc_mode_timings(int xres, int yres, int refresh, struct fb_videomode *mode) calc_mode_timings() argument
564 get_detailed_timing(unsigned char *block, struct fb_videomode *mode) get_detailed_timing() argument
H A Dfbcvt.c271 struct fb_videomode *mode) fb_cvt_convert_to_mode()
273 mode->refresh = cvt->f_refresh; fb_cvt_convert_to_mode()
274 mode->pixclock = KHZ2PICOS(cvt->pixclock/1000); fb_cvt_convert_to_mode()
275 mode->left_margin = cvt->h_back_porch; fb_cvt_convert_to_mode()
276 mode->right_margin = cvt->h_front_porch; fb_cvt_convert_to_mode()
277 mode->hsync_len = cvt->hsync; fb_cvt_convert_to_mode()
278 mode->upper_margin = cvt->v_back_porch; fb_cvt_convert_to_mode()
279 mode->lower_margin = cvt->v_front_porch; fb_cvt_convert_to_mode()
280 mode->vsync_len = cvt->vsync; fb_cvt_convert_to_mode()
282 mode->sync &= ~(FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT); fb_cvt_convert_to_mode()
285 mode->sync |= FB_SYNC_HOR_HIGH_ACT; fb_cvt_convert_to_mode()
287 mode->sync |= FB_SYNC_VERT_HIGH_ACT; fb_cvt_convert_to_mode()
291 * fb_find_mode_cvt - calculate mode using VESA(TM) CVT
292 * @mode: pointer to fb_videomode; xres, yres, refresh and vmode must be
299 * @mode is filled with computed values. If interlaced, the refresh field
305 int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb) fb_find_mode_cvt() argument
317 if (mode->vmode & FB_VMODE_INTERLACED) fb_find_mode_cvt()
320 cvt.xres = mode->xres; fb_find_mode_cvt()
321 cvt.yres = mode->yres; fb_find_mode_cvt()
322 cvt.refresh = mode->refresh; fb_find_mode_cvt()
376 fb_cvt_convert_to_mode(&cvt, mode); fb_find_mode_cvt()
270 fb_cvt_convert_to_mode(struct fb_cvt_data *cvt, struct fb_videomode *mode) fb_cvt_convert_to_mode() argument
/linux-4.1.27/Documentation/spi/
H A Dspidev_test.c34 static uint32_t mode; variable
116 if (mode & SPI_TX_QUAD) transfer()
118 else if (mode & SPI_TX_DUAL) transfer()
120 if (mode & SPI_RX_QUAD) transfer()
122 else if (mode & SPI_RX_DUAL) transfer()
124 if (!(mode & SPI_LOOP)) { transfer()
125 if (mode & (SPI_TX_QUAD | SPI_TX_DUAL)) transfer()
127 else if (mode & (SPI_RX_QUAD | SPI_RX_DUAL)) transfer()
204 mode |= SPI_LOOP; parse_opts()
207 mode |= SPI_CPHA; parse_opts()
210 mode |= SPI_CPOL; parse_opts()
213 mode |= SPI_LSB_FIRST; parse_opts()
216 mode |= SPI_CS_HIGH; parse_opts()
219 mode |= SPI_3WIRE; parse_opts()
222 mode |= SPI_NO_CS; parse_opts()
228 mode |= SPI_READY; parse_opts()
234 mode |= SPI_TX_DUAL; parse_opts()
237 mode |= SPI_TX_QUAD; parse_opts()
244 if (mode & SPI_LOOP) { parse_opts()
245 if (mode & SPI_TX_DUAL) parse_opts()
246 mode |= SPI_RX_DUAL; parse_opts()
247 if (mode & SPI_TX_QUAD) parse_opts()
248 mode |= SPI_RX_QUAD; parse_opts()
267 * spi mode main()
269 ret = ioctl(fd, SPI_IOC_WR_MODE32, &mode); main()
271 pabort("can't set spi mode"); main()
273 ret = ioctl(fd, SPI_IOC_RD_MODE32, &mode); main()
275 pabort("can't get spi mode"); main()
299 printf("spi mode: 0x%x\n", mode); main()
/linux-4.1.27/include/drm/
H A Ddrm_modes.h42 MODE_H_ILLEGAL, /* mode has illegal horizontal timings */
43 MODE_V_ILLEGAL, /* mode has illegal horizontal timings */
45 MODE_NOMODE, /* no mode with a matching name */
46 MODE_NO_INTERLACE, /* interlaced mode not supported */
47 MODE_NO_DBLESCAN, /* doublescan mode not supported */
48 MODE_NO_VSCAN, /* multiscan mode not supported */
50 MODE_VIRTUAL_X, /* mode width too large for specified virtual size */
51 MODE_VIRTUAL_Y, /* mode height too large for specified virtual size */
56 MODE_CLOCK_RANGE, /* clock/mode isn't in a ClockRange */
69 MODE_INTERLACE_WIDTH, /* width too large for interlaced mode */
75 MODE_UNVERIFIED = -3, /* mode needs to reverified */
109 /* Proposed mode values */
127 /* Actual mode we give to hw */
143 /* Driver private mode info */
152 /* mode specified on the command line */
168 * drm_mode_is_stereo - check for stereo mode flags
169 * @mode: drm_display_mode to check
172 * True if the mode is one of the stereo modes (like side-by-side), false if
175 static inline bool drm_mode_is_stereo(const struct drm_display_mode *mode) drm_mode_is_stereo() argument
177 return mode->flags & DRM_MODE_FLAG_3D_MASK; drm_mode_is_stereo()
184 void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode);
185 void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode);
186 void drm_mode_debug_printmodeline(const struct drm_display_mode *mode);
209 void drm_mode_set_name(struct drm_display_mode *mode);
210 int drm_mode_hsync(const struct drm_display_mode *mode);
211 int drm_mode_vrefresh(const struct drm_display_mode *mode);
218 const struct drm_display_mode *mode);
225 enum drm_mode_status drm_mode_validate_basic(const struct drm_display_mode *mode);
226 enum drm_mode_status drm_mode_validate_size(const struct drm_display_mode *mode,
237 struct drm_cmdline_mode *mode);
/linux-4.1.27/arch/sh/kernel/cpu/shmobile/
H A Dpm.c30 * Sleep mode is just plain "sleep" instruction
31 * Sleep Self-Refresh mode is above plus RAM put in Self-Refresh
32 * Standby Self-Refresh mode is above plus stopped clocks
40 * U-standby mode is unsupported since it needs bootloader hacks
49 void sh_mobile_call_standby(unsigned long mode) sh_mobile_call_standby() argument
59 mode, NULL); sh_mobile_call_standby()
62 if (mode & SUSP_SH_MMU) sh_mobile_call_standby()
66 standby_onchip_mem(mode, RAM_BASE); sh_mobile_call_standby()
69 mode, NULL); sh_mobile_call_standby()
105 /* part 1: common code to enter sleep mode */ sh_mobile_register_self_refresh()
110 /* part 2: board specific code to enter self-refresh mode */ sh_mobile_register_self_refresh()
116 /* part 3: board specific code to resume from self-refresh mode */ sh_mobile_register_self_refresh()
122 /* part 4: common code to resume from sleep mode */ sh_mobile_register_self_refresh()
H A Dcpuidle.c22 SUSP_SH_SLEEP, /* regular sleep mode */
23 SUSP_SH_SLEEP | SUSP_SH_SF, /* sleep mode + self refresh */
24 SUSP_SH_STANDBY | SUSP_SH_SF, /* software standby mode + self refresh */
36 /* convert allowed mode to allowed state */ cpuidle_sleep_enter()
43 /* take the following into account for sleep mode selection: cpuidle_sleep_enter()
44 * - allowed_state: best mode allowed by hardware (clock deps) cpuidle_sleep_enter()
45 * - requested_state: best mode allowed by software (latencies) cpuidle_sleep_enter()
/linux-4.1.27/drivers/media/usb/dvb-usb-v2/
H A Dmxl111sf-phy.c69 int mxl1x1sf_set_device_mode(struct mxl111sf_state *state, int mode) mxl1x1sf_set_device_mode() argument
73 mxl_debug("(%s)", MXL_SOC_MODE == mode ? mxl1x1sf_set_device_mode()
76 /* set device mode */ mxl1x1sf_set_device_mode()
78 MXL_SOC_MODE == mode ? 0x01 : 0x00); mxl1x1sf_set_device_mode()
83 0x7d, 0x40, MXL_SOC_MODE == mode ? mxl1x1sf_set_device_mode()
91 state->device_mode = mode; mxl1x1sf_set_device_mode()
127 u8 mode, tmp; mxl111sf_config_mpeg_in() local
137 mxl111sf_read_reg(state, V6_MPEG_IN_CLK_INV_REG, &mode); mxl111sf_config_mpeg_in()
140 mode &= ~V6_INVERTED_CLK_PHASE; mxl111sf_config_mpeg_in()
142 mode |= V6_INVERTED_CLK_PHASE; mxl111sf_config_mpeg_in()
144 ret = mxl111sf_write_reg(state, V6_MPEG_IN_CLK_INV_REG, mode); mxl111sf_config_mpeg_in()
147 /* Configure data input mode, MPEG Valid polarity, MPEG Sync polarity mxl111sf_config_mpeg_in()
149 ret = mxl111sf_read_reg(state, V6_MPEG_IN_CTRL_REG, &mode); mxl111sf_config_mpeg_in()
152 /* Data Input mode */ mxl111sf_config_mpeg_in()
154 /* Disable serial mode */ mxl111sf_config_mpeg_in()
155 mode &= ~V6_MPEG_IN_DATA_SERIAL; mxl111sf_config_mpeg_in()
157 /* Enable Parallel mode */ mxl111sf_config_mpeg_in()
158 mode |= V6_MPEG_IN_DATA_PARALLEL; mxl111sf_config_mpeg_in()
160 /* Disable Parallel mode */ mxl111sf_config_mpeg_in()
161 mode &= ~V6_MPEG_IN_DATA_PARALLEL; mxl111sf_config_mpeg_in()
164 mode |= V6_MPEG_IN_DATA_SERIAL; mxl111sf_config_mpeg_in()
186 mode &= ~V6_INVERTED_MPEG_SYNC; mxl111sf_config_mpeg_in()
188 mode |= V6_INVERTED_MPEG_SYNC; mxl111sf_config_mpeg_in()
192 mode &= ~V6_INVERTED_MPEG_VALID; mxl111sf_config_mpeg_in()
194 mode |= V6_INVERTED_MPEG_VALID; mxl111sf_config_mpeg_in()
196 ret = mxl111sf_write_reg(state, V6_MPEG_IN_CTRL_REG, mode); mxl111sf_config_mpeg_in()
205 {0x1b, 0xff, 0x1e}, /* pin mux mode, Choose 656/I2S input */ mxl111sf_init_i2s_port()
318 /* enable current sinking in manual mode */ mxl111sf_idac_config()
321 /* disable current sinking in manual mode */ mxl111sf_idac_config()
/linux-4.1.27/drivers/gpu/drm/armada/
H A Darmada_fb.c38 struct drm_mode_fb_cmd2 *mode, struct armada_gem_object *obj) armada_framebuffer_create()
44 switch (mode->pixel_format) { armada_framebuffer_create()
84 drm_helper_mode_fill_fb_struct(&dfb->fb, mode); armada_framebuffer_create()
104 struct drm_file *dfile, struct drm_mode_fb_cmd2 *mode) armada_fb_create()
111 mode->width, mode->height, mode->pixel_format, armada_fb_create()
112 mode->flags, mode->pitches[0], mode->pitches[1], armada_fb_create()
113 mode->pitches[2]); armada_fb_create()
116 if (drm_format_num_planes(mode->pixel_format) > 1 && armada_fb_create()
117 (mode->handles[0] != mode->handles[1] || armada_fb_create()
118 mode->handles[0] != mode->handles[2])) { armada_fb_create()
123 obj = armada_gem_object_lookup(dev, dfile, mode->handles[0]); armada_fb_create()
141 dfb = armada_framebuffer_create(dev, mode, obj); armada_fb_create()
37 armada_framebuffer_create(struct drm_device *dev, struct drm_mode_fb_cmd2 *mode, struct armada_gem_object *obj) armada_framebuffer_create() argument
103 armada_fb_create(struct drm_device *dev, struct drm_file *dfile, struct drm_mode_fb_cmd2 *mode) armada_fb_create() argument
/linux-4.1.27/arch/arm/mach-lpc32xx/
H A Dpm.c18 * the CPU transistions through direct-run mode. For Linux, direct-run
19 * mode is not used in normal operation. Halt mode is used when the
22 * Run mode:
25 * the HCLK_PLL rate. Linux runs in this mode.
27 * Direct-run mode:
30 * source or the frequency of the main oscillator. In this mode, the
33 * Halt mode:
38 * wake the system up back into direct-run mode.
43 * SDRAM will still be accessible in direct-run mode. In DDR based systems,
44 * a transition to direct-run mode will stop all DDR accesses (no clocks).
53 * Places DRAMs in self-refresh mode
54 * Enter direct-run mode
57 * Enter halt mode - CPU and buses will stop
58 * System enters direct-run mode when an enabled event occurs
60 * Run mode is entered
61 * DRAMS are placed back into normal mode
64 * Suspend mode is exited
/linux-4.1.27/lib/
H A Dfault-inject.c162 static struct dentry *debugfs_create_ul(const char *name, umode_t mode, debugfs_create_ul() argument
165 return debugfs_create_file(name, mode, parent, value, &fops_ul); debugfs_create_ul()
182 const char *name, umode_t mode, debugfs_create_stacktrace_depth()
185 return debugfs_create_file(name, mode, parent, value, debugfs_create_stacktrace_depth()
194 umode_t mode = S_IFREG | S_IRUSR | S_IWUSR; fault_create_debugfs_attr() local
201 if (!debugfs_create_ul("probability", mode, dir, &attr->probability)) fault_create_debugfs_attr()
203 if (!debugfs_create_ul("interval", mode, dir, &attr->interval)) fault_create_debugfs_attr()
205 if (!debugfs_create_atomic_t("times", mode, dir, &attr->times)) fault_create_debugfs_attr()
207 if (!debugfs_create_atomic_t("space", mode, dir, &attr->space)) fault_create_debugfs_attr()
209 if (!debugfs_create_ul("verbose", mode, dir, &attr->verbose)) fault_create_debugfs_attr()
211 if (!debugfs_create_u32("verbose_ratelimit_interval_ms", mode, dir, fault_create_debugfs_attr()
214 if (!debugfs_create_u32("verbose_ratelimit_burst", mode, dir, fault_create_debugfs_attr()
217 if (!debugfs_create_bool("task-filter", mode, dir, &attr->task_filter)) fault_create_debugfs_attr()
222 if (!debugfs_create_stacktrace_depth("stacktrace-depth", mode, dir, fault_create_debugfs_attr()
225 if (!debugfs_create_ul("require-start", mode, dir, fault_create_debugfs_attr()
228 if (!debugfs_create_ul("require-end", mode, dir, &attr->require_end)) fault_create_debugfs_attr()
230 if (!debugfs_create_ul("reject-start", mode, dir, &attr->reject_start)) fault_create_debugfs_attr()
232 if (!debugfs_create_ul("reject-end", mode, dir, &attr->reject_end)) fault_create_debugfs_attr()
181 debugfs_create_stacktrace_depth( const char *name, umode_t mode, struct dentry *parent, unsigned long *value) debugfs_create_stacktrace_depth() argument
/linux-4.1.27/drivers/gpu/drm/radeon/
H A Dradeon_agp.c128 struct drm_agp_mode mode; radeon_agp_init() local
157 mode.mode = info.mode; radeon_agp_init()
159 * Just use the whatever mode the host sets up. radeon_agp_init()
162 agp_status = (RREG32(RADEON_AGP_STATUS) | RADEON_AGPv3_MODE) & mode.mode; radeon_agp_init()
164 agp_status = mode.mode; radeon_agp_init()
201 DRM_INFO("AGP mode requested: %d\n", radeon_agpmode); radeon_agp_init()
207 mode.mode &= ~RADEON_AGP_MODE_MASK; radeon_agp_init()
211 mode.mode |= RADEON_AGPv3_8X_MODE; radeon_agp_init()
215 mode.mode |= RADEON_AGPv3_4X_MODE; radeon_agp_init()
221 mode.mode |= RADEON_AGP_4X_MODE; radeon_agp_init()
224 mode.mode |= RADEON_AGP_2X_MODE; radeon_agp_init()
228 mode.mode |= RADEON_AGP_1X_MODE; radeon_agp_init()
233 mode.mode &= ~RADEON_AGP_FW_MODE; /* disable fw */ radeon_agp_init()
234 ret = drm_agp_enable(rdev->ddev, mode); radeon_agp_init()
236 DRM_ERROR("Unable to enable AGP (mode = 0x%lx)\n", mode.mode); radeon_agp_init()
/linux-4.1.27/include/trace/events/
H A Dmigrate.h48 enum migrate_mode mode, int reason),
50 TP_ARGS(succeeded, failed, mode, reason),
55 __field( enum migrate_mode, mode)
62 __entry->mode = mode;
66 TP_printk("nr_succeeded=%lu nr_failed=%lu mode=%s reason=%s",
69 __print_symbolic(__entry->mode, MIGRATE_MODE),
/linux-4.1.27/drivers/gpu/drm/rcar-du/
H A Drcar_du_lvdscon.c34 struct videomode mode; member in struct:rcar_du_lvds_connector::__anon4404
45 struct drm_display_mode *mode; rcar_du_lvds_connector_get_modes() local
47 mode = drm_mode_create(connector->dev); rcar_du_lvds_connector_get_modes()
48 if (mode == NULL) rcar_du_lvds_connector_get_modes()
51 mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER; rcar_du_lvds_connector_get_modes()
53 drm_display_mode_from_videomode(&lvdscon->panel.mode, mode); rcar_du_lvds_connector_get_modes()
55 drm_mode_probed_add(connector, mode); rcar_du_lvds_connector_get_modes()
105 videomode_from_timing(&timing, &lvdscon->panel.mode); rcar_du_lvds_connector_init()
/linux-4.1.27/kernel/time/
H A Dtick-oneshot.c35 * tick_resume_onshot - resume oneshot mode
46 * tick_setup_oneshot - setup the event device for oneshot mode (hres or nohz)
58 * tick_switch_to_oneshot - switch to oneshot mode
69 "could not switch to one-shot mode:"); tick_switch_to_oneshot()
76 printk(" %s does not support one-shot mode.\n", tick_switch_to_oneshot()
82 td->mode = TICKDEV_MODE_ONESHOT; tick_switch_to_oneshot()
90 * tick_check_oneshot_mode - check whether the system is in oneshot mode
100 ret = __this_cpu_read(tick_cpu_device.mode) == TICKDEV_MODE_ONESHOT; tick_oneshot_mode_active()
108 * tick_init_highres - switch to high resolution mode
/linux-4.1.27/drivers/isdn/hisax/
H A Dhisax_fcpcipnp.h16 u_char mode; member in struct:hdlc_stat_reg
22 u_char mode;
30 int mode; member in struct:fritz_bcs
/linux-4.1.27/include/uapi/asm-generic/
H A Dtermbits.h12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
H A Dtermios.h23 unsigned short c_iflag; /* input mode flags */
24 unsigned short c_oflag; /* output mode flags */
25 unsigned short c_cflag; /* control mode flags */
26 unsigned short c_lflag; /* local mode flags */
/linux-4.1.27/arch/parisc/include/uapi/asm/
H A Dtermbits.h12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
H A Dtermios.h16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
/linux-4.1.27/arch/avr32/include/uapi/asm/
H A Dtermbits.h12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
H A Dtermios.h23 unsigned short c_iflag; /* input mode flags */
24 unsigned short c_oflag; /* output mode flags */
25 unsigned short c_cflag; /* control mode flags */
26 unsigned short c_lflag; /* local mode flags */
/linux-4.1.27/tools/perf/util/
H A Ddata.h17 enum perf_data_mode mode; member in struct:perf_data_file
22 return file->mode == PERF_DATA_MODE_READ; perf_data_file__is_read()
27 return file->mode == PERF_DATA_MODE_WRITE; perf_data_file__is_write()
/linux-4.1.27/include/linux/clk/
H A Dshmobile.h19 void r8a7778_clocks_init(u32 mode);
20 void r8a7779_clocks_init(u32 mode);
21 void rcar_gen2_clocks_init(u32 mode);
/linux-4.1.27/drivers/gpu/drm/tilcdc/
H A Dtilcdc_crtc.c99 (crtc->mode.vdisplay * fb->pitches[0]); update_scanout()
170 static void tilcdc_crtc_dpms(struct drm_crtc *crtc, int mode) tilcdc_crtc_dpms() argument
177 if (mode != DRM_MODE_DPMS_ON) tilcdc_crtc_dpms()
178 mode = DRM_MODE_DPMS_OFF; tilcdc_crtc_dpms()
180 if (tilcdc_crtc->dpms == mode) tilcdc_crtc_dpms()
183 tilcdc_crtc->dpms = mode; tilcdc_crtc_dpms()
187 if (mode == DRM_MODE_DPMS_ON) { tilcdc_crtc_dpms()
213 const struct drm_display_mode *mode, tilcdc_crtc_mode_fixup()
230 struct drm_display_mode *mode, tilcdc_crtc_mode_set()
242 ret = tilcdc_crtc_mode_valid(crtc, mode); tilcdc_crtc_mode_set()
276 hbp = mode->htotal - mode->hsync_end; tilcdc_crtc_mode_set()
277 hfp = mode->hsync_start - mode->hdisplay; tilcdc_crtc_mode_set()
278 hsw = mode->hsync_end - mode->hsync_start; tilcdc_crtc_mode_set()
279 vbp = mode->vtotal - mode->vsync_end; tilcdc_crtc_mode_set()
280 vfp = mode->vsync_start - mode->vdisplay; tilcdc_crtc_mode_set()
281 vsw = mode->vsync_end - mode->vsync_start; tilcdc_crtc_mode_set()
284 mode->hdisplay, mode->vdisplay, hbp, hfp, hsw, vbp, vfp, vsw); tilcdc_crtc_mode_set()
304 reg = (((mode->hdisplay >> 4) - 1) << 4) | tilcdc_crtc_mode_set()
309 reg |= (((mode->hdisplay >> 4) - 1) & 0x40) >> 3; tilcdc_crtc_mode_set()
312 reg = ((mode->vdisplay - 1) & 0x3ff) | tilcdc_crtc_mode_set()
324 if ((mode->vdisplay - 1) & 0x400) { tilcdc_crtc_mode_set()
386 if (mode->flags & DRM_MODE_FLAG_NVSYNC) tilcdc_crtc_mode_set()
441 int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode) tilcdc_crtc_mode_valid() argument
451 if (mode->hdisplay > tilcdc_crtc_max_width(crtc)) tilcdc_crtc_mode_valid()
455 if (mode->hdisplay & 0xf) tilcdc_crtc_mode_valid()
458 if (mode->vdisplay > 2048) tilcdc_crtc_mode_valid()
461 DBG("Processing mode %dx%d@%d with pixel clock %d", tilcdc_crtc_mode_valid()
462 mode->hdisplay, mode->vdisplay, tilcdc_crtc_mode_valid()
463 drm_mode_vrefresh(mode), mode->clock); tilcdc_crtc_mode_valid()
465 hbp = mode->htotal - mode->hsync_end; tilcdc_crtc_mode_valid()
466 hfp = mode->hsync_start - mode->hdisplay; tilcdc_crtc_mode_valid()
467 hsw = mode->hsync_end - mode->hsync_start; tilcdc_crtc_mode_valid()
468 vbp = mode->vtotal - mode->vsync_end; tilcdc_crtc_mode_valid()
469 vfp = mode->vsync_start - mode->vdisplay; tilcdc_crtc_mode_valid()
470 vsw = mode->vsync_end - mode->vsync_start; tilcdc_crtc_mode_valid()
473 DBG("Pruning mode: Horizontal Back Porch out of range"); tilcdc_crtc_mode_valid()
478 DBG("Pruning mode: Horizontal Front Porch out of range"); tilcdc_crtc_mode_valid()
483 DBG("Pruning mode: Horizontal Sync Width out of range"); tilcdc_crtc_mode_valid()
488 DBG("Pruning mode: Vertical Back Porch out of range"); tilcdc_crtc_mode_valid()
493 DBG("Pruning mode: Vertical Front Porch out of range"); tilcdc_crtc_mode_valid()
498 DBG("Pruning mode: Vertical Sync Width out of range"); tilcdc_crtc_mode_valid()
506 if (mode->clock > priv->max_pixelclock) { tilcdc_crtc_mode_valid()
507 DBG("Pruning mode: pixel clock too high"); tilcdc_crtc_mode_valid()
515 if (mode->hdisplay > priv->max_width) tilcdc_crtc_mode_valid()
519 bandwidth = mode->hdisplay * mode->vdisplay * tilcdc_crtc_mode_valid()
520 drm_mode_vrefresh(mode); tilcdc_crtc_mode_valid()
522 DBG("Pruning mode: exceeds defined bandwidth limit"); tilcdc_crtc_mode_valid()
550 /* in raster mode, minimum divisor is 2: */ tilcdc_crtc_update_clk()
551 ret = clk_set_rate(priv->disp_clk, crtc->mode.clock * 1000 * 2); tilcdc_crtc_update_clk()
554 crtc->mode.clock); tilcdc_crtc_update_clk()
559 div = lcd_clk / (crtc->mode.clock * 1000); tilcdc_crtc_update_clk()
561 DBG("lcd_clk=%u, mode clock=%d, div=%u", lcd_clk, crtc->mode.clock, div); tilcdc_crtc_update_clk()
212 tilcdc_crtc_mode_fixup(struct drm_crtc *crtc, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) tilcdc_crtc_mode_fixup() argument
229 tilcdc_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode, int x, int y, struct drm_framebuffer *old_fb) tilcdc_crtc_mode_set() argument
/linux-4.1.27/drivers/gpu/ipu-v3/
H A Dipu-di.c210 u32 h_total = sig->mode.hactive + sig->mode.hsync_len + ipu_di_sync_config_interlaced()
211 sig->mode.hback_porch + sig->mode.hfront_porch; ipu_di_sync_config_interlaced()
212 u32 v_total = sig->mode.vactive + sig->mode.vsync_len + ipu_di_sync_config_interlaced()
213 sig->mode.vback_porch + sig->mode.vfront_porch; ipu_di_sync_config_interlaced()
232 .offset_count = sig->mode.vback_porch, ipu_di_sync_config_interlaced()
238 .repeat_count = sig->mode.vactive / 2, ipu_di_sync_config_interlaced()
252 .offset_count = sig->mode.hback_porch, ipu_di_sync_config_interlaced()
254 .repeat_count = sig->mode.hactive, ipu_di_sync_config_interlaced()
280 u32 h_total = sig->mode.hactive + sig->mode.hsync_len + ipu_di_sync_config_noninterlaced()
281 sig->mode.hback_porch + sig->mode.hfront_porch; ipu_di_sync_config_noninterlaced()
282 u32 v_total = sig->mode.vactive + sig->mode.vsync_len + ipu_di_sync_config_noninterlaced()
283 sig->mode.vback_porch + sig->mode.vfront_porch; ipu_di_sync_config_noninterlaced()
297 .cnt_down = sig->mode.hsync_len * 2, ipu_di_sync_config_noninterlaced()
304 .cnt_down = sig->mode.vsync_len * 2, ipu_di_sync_config_noninterlaced()
308 .offset_count = sig->mode.vsync_len + ipu_di_sync_config_noninterlaced()
309 sig->mode.vback_porch, ipu_di_sync_config_noninterlaced()
311 .repeat_count = sig->mode.vactive, ipu_di_sync_config_noninterlaced()
316 .offset_count = sig->mode.hsync_len + ipu_di_sync_config_noninterlaced()
317 sig->mode.hback_porch, ipu_di_sync_config_noninterlaced()
319 .repeat_count = sig->mode.hactive, ipu_di_sync_config_noninterlaced()
344 .offset_count = sig->mode.vsync_len + ipu_di_sync_config_noninterlaced()
345 sig->mode.vback_porch, ipu_di_sync_config_noninterlaced()
347 .repeat_count = sig->mode.vactive, ipu_di_sync_config_noninterlaced()
357 .cnt_down = sig->mode.hsync_len * 2, ipu_di_sync_config_noninterlaced()
361 .offset_count = sig->mode.hsync_len + ipu_di_sync_config_noninterlaced()
362 sig->mode.hback_porch, ipu_di_sync_config_noninterlaced()
364 .repeat_count = sig->mode.hactive, ipu_di_sync_config_noninterlaced()
374 .cnt_down = sig->mode.vsync_len * 2, ipu_di_sync_config_noninterlaced()
383 .cnt_down = sig->mode.hsync_len * 2, ipu_di_sync_config_noninterlaced()
392 .cnt_down = sig->mode.vsync_len * 2, ipu_di_sync_config_noninterlaced()
440 clk_set_rate(clk, sig->mode.pixelclock); ipu_di_config_clock()
443 div = DIV_ROUND_CLOSEST(in_rate, sig->mode.pixelclock); ipu_di_config_clock()
460 div = DIV_ROUND_CLOSEST(clkrate, sig->mode.pixelclock); ipu_di_config_clock()
464 error = rate / (sig->mode.pixelclock / 1000); ipu_di_config_clock()
480 clk_set_rate(clk, sig->mode.pixelclock); ipu_di_config_clock()
483 div = DIV_ROUND_CLOSEST(in_rate, sig->mode.pixelclock); ipu_di_config_clock()
510 sig->mode.pixelclock, ipu_di_config_clock()
518 * This function is called to adjust a video mode to IPU restrictions.
521 int ipu_di_adjust_videomode(struct ipu_di *di, struct videomode *mode) ipu_di_adjust_videomode() argument
525 if (mode->vfront_porch >= 2) ipu_di_adjust_videomode()
528 diff = 2 - mode->vfront_porch; ipu_di_adjust_videomode()
530 if (mode->vback_porch >= diff) { ipu_di_adjust_videomode()
531 mode->vfront_porch = 2; ipu_di_adjust_videomode()
532 mode->vback_porch -= diff; ipu_di_adjust_videomode()
533 } else if (mode->vsync_len > diff) { ipu_di_adjust_videomode()
534 mode->vfront_porch = 2; ipu_di_adjust_videomode()
535 mode->vsync_len = mode->vsync_len - diff; ipu_di_adjust_videomode()
553 di->id, sig->mode.hactive, sig->mode.vactive); ipu_di_init_sync_panel()
555 if ((sig->mode.vsync_len == 0) || (sig->mode.hsync_len == 0)) ipu_di_init_sync_panel()
561 sig->mode.pixelclock); ipu_di_init_sync_panel()
580 if (sig->mode.flags & DISPLAY_FLAGS_INTERLACED) { ipu_di_init_sync_panel()
590 if (sig->mode.flags & DISPLAY_FLAGS_HSYNC_HIGH) ipu_di_init_sync_panel()
592 if (sig->mode.flags & DISPLAY_FLAGS_VSYNC_HIGH) ipu_di_init_sync_panel()
606 if (sig->mode.flags & DISPLAY_FLAGS_HSYNC_HIGH) { ipu_di_init_sync_panel()
614 if (sig->mode.flags & DISPLAY_FLAGS_VSYNC_HIGH) { ipu_di_init_sync_panel()
/linux-4.1.27/arch/mips/include/asm/mach-au1x00/
H A Dau1xxx_ide.h90 /* Timing parameters PIO mode 0 */
100 /* Timing parameters PIO mode 1 */
110 /* Timing parameters PIO mode 2 */
120 /* Timing parameters PIO mode 3 */
130 /* Timing parameters PIO mode 4 */
140 /* Timing parameters MDMA mode 0 */
150 /* Timing parameters MDMA mode 1 */
160 /* Timing parameters MDMA mode 2 */
171 #define SBC_IDE_TIMING(mode) \
172 (SBC_IDE_##mode##_TWCS | \
173 SBC_IDE_##mode##_TCSH | \
174 SBC_IDE_##mode##_TCSOFF | \
175 SBC_IDE_##mode##_TWP | \
176 SBC_IDE_##mode##_TCSW | \
177 SBC_IDE_##mode##_TPM | \
178 SBC_IDE_##mode##_TA)
/linux-4.1.27/fs/xfs/
H A Dxfs_sysctl.c82 .mode = 0644,
91 .mode = 0644,
100 .mode = 0644,
110 .mode = 0644,
119 .mode = 0644,
128 .mode = 0644,
137 .mode = 0644,
146 .mode = 0644,
155 .mode = 0644,
164 .mode = 0644,
173 .mode = 0644,
182 .mode = 0644,
191 .mode = 0644,
202 .mode = 0644,
215 .mode = 0555,
224 .mode = 0555,
/linux-4.1.27/include/sound/
H A Dl3.h12 int mode; member in struct:l3_pins
/linux-4.1.27/include/uapi/linux/netfilter_ipv4/
H A Dipt_TTL.h18 __u8 mode; member in struct:ipt_TTL_info
/linux-4.1.27/include/uapi/linux/netfilter_ipv6/
H A Dip6t_HL.h19 __u8 mode; member in struct:ip6t_HL_info
/linux-4.1.27/arch/s390/include/uapi/asm/
H A Dtermios.h22 unsigned short c_iflag; /* input mode flags */
23 unsigned short c_oflag; /* output mode flags */
24 unsigned short c_cflag; /* control mode flags */
25 unsigned short c_lflag; /* local mode flags */
/linux-4.1.27/arch/avr32/mach-at32ap/
H A Dhsmc.c141 u32 setup, pulse, cycle, mode; smc_set_configuration() local
161 mode = HSMC_BF(DBW, HSMC_DBW_8_BITS); smc_set_configuration()
164 mode = HSMC_BF(DBW, HSMC_DBW_16_BITS); smc_set_configuration()
167 mode = HSMC_BF(DBW, HSMC_DBW_32_BITS); smc_set_configuration()
175 mode |= HSMC_BF(EXNW_MODE, HSMC_EXNW_MODE_DISABLED); smc_set_configuration()
178 mode |= HSMC_BF(EXNW_MODE, HSMC_EXNW_MODE_RESERVED); smc_set_configuration()
181 mode |= HSMC_BF(EXNW_MODE, HSMC_EXNW_MODE_FROZEN); smc_set_configuration()
184 mode |= HSMC_BF(EXNW_MODE, HSMC_EXNW_MODE_READY); smc_set_configuration()
191 mode |= HSMC_BF(TDF_CYCLES, config->tdf_cycles); smc_set_configuration()
195 mode |= HSMC_BIT(READ_MODE); smc_set_configuration()
197 mode |= HSMC_BIT(WRITE_MODE); smc_set_configuration()
199 mode |= HSMC_BIT(BAT); smc_set_configuration()
201 mode |= HSMC_BIT(TDF_MODE); smc_set_configuration()
203 pr_debug("smc cs%d: setup/%08x pulse/%08x cycle/%08x mode/%08x\n", smc_set_configuration()
204 cs, setup, pulse, cycle, mode); smc_set_configuration()
210 hsmc_writel(hsmc, MODE0 + offset, mode); smc_set_configuration()
/linux-4.1.27/arch/cris/include/uapi/asm/
H A Dtermios.h18 unsigned short c_iflag; /* input mode flags */
19 unsigned short c_oflag; /* output mode flags */
20 unsigned short c_cflag; /* control mode flags */
21 unsigned short c_lflag; /* local mode flags */
H A Dtermbits.h14 tcflag_t c_iflag; /* input mode flags */
15 tcflag_t c_oflag; /* output mode flags */
16 tcflag_t c_cflag; /* control mode flags */
17 tcflag_t c_lflag; /* local mode flags */
23 tcflag_t c_iflag; /* input mode flags */
24 tcflag_t c_oflag; /* output mode flags */
25 tcflag_t c_cflag; /* control mode flags */
26 tcflag_t c_lflag; /* local mode flags */
34 tcflag_t c_iflag; /* input mode flags */
35 tcflag_t c_oflag; /* output mode flags */
36 tcflag_t c_cflag; /* control mode flags */
37 tcflag_t c_lflag; /* local mode flags */
/linux-4.1.27/arch/frv/include/uapi/asm/
H A Dtermios.h16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
H A Dtermbits.h12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
/linux-4.1.27/arch/ia64/include/uapi/asm/
H A Dtermios.h23 unsigned short c_iflag; /* input mode flags */
24 unsigned short c_oflag; /* output mode flags */
25 unsigned short c_cflag; /* control mode flags */
26 unsigned short c_lflag; /* local mode flags */
H A Dtermbits.h21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
30 tcflag_t c_iflag; /* input mode flags */
31 tcflag_t c_oflag; /* output mode flags */
32 tcflag_t c_cflag; /* control mode flags */
33 tcflag_t c_lflag; /* local mode flags */
41 tcflag_t c_iflag; /* input mode flags */
42 tcflag_t c_oflag; /* output mode flags */
43 tcflag_t c_cflag; /* control mode flags */
44 tcflag_t c_lflag; /* local mode flags */
/linux-4.1.27/arch/m32r/include/uapi/asm/
H A Dtermios.h16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
H A Dtermbits.h12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
/linux-4.1.27/arch/arm/mach-pxa/
H A Dpxa2xx.c45 void pxa2xx_transceiver_mode(struct device *dev, int mode) pxa2xx_transceiver_mode() argument
47 if (mode & IR_OFF) { pxa2xx_transceiver_mode()
49 } else if (mode & IR_SIRMODE) { pxa2xx_transceiver_mode()
51 } else if (mode & IR_FIRMODE) { pxa2xx_transceiver_mode()
/linux-4.1.27/arch/arm/include/asm/
H A Dv7m.h43 * state information, SBOP otherwise. Bit [3] defines the mode that is returned
44 * to (0 -> handler mode; 1 -> thread mode). Bit [2] defines which sp is used
54 void armv7m_restart(enum reboot_mode mode, const char *cmd);
/linux-4.1.27/arch/arm/include/asm/xen/
H A Dhypervisor.h7 /* Lazy mode for batching updates / context switch */
/linux-4.1.27/net/core/
H A Dsysctl_net_core.c42 .mode = table->mode rps_sock_flow_sysctl()
240 .mode = 0644,
248 .mode = 0644,
256 .mode = 0644,
264 .mode = 0644,
272 .mode = 0644,
279 .mode = 0644,
286 .mode = 0444,
294 .mode = 0644,
302 .mode = 0644,
309 .mode = 0644,
316 .mode = 0644,
323 .mode = 0644,
330 .mode = 0644,
339 .mode = 0644,
346 .mode = 0644,
353 .mode = 0644,
362 .mode = 0644,
369 .mode = 0644,
376 .mode = 0644,
386 .mode = 0644,
393 .mode = 0644,
400 .mode = 0644,
413 .mode = 0644,
/linux-4.1.27/net/llc/
H A Dsysctl_net_llc.c22 .mode = 0644,
29 .mode = 0644,
36 .mode = 0644,
43 .mode = 0644,
/linux-4.1.27/lib/xz/
H A Dxz_private.h53 /* If no specific decoding mode is requested, enable support for all modes. */
62 * The DEC_IS_foo(mode) macros are used in "if" statements. If only some
67 # define DEC_IS_SINGLE(mode) ((mode) == XZ_SINGLE)
69 # define DEC_IS_SINGLE(mode) (false)
73 # define DEC_IS_PREALLOC(mode) ((mode) == XZ_PREALLOC)
75 # define DEC_IS_PREALLOC(mode) (false)
79 # define DEC_IS_DYNALLOC(mode) ((mode) == XZ_DYNALLOC)
81 # define DEC_IS_DYNALLOC(mode) (false)
85 # define DEC_IS_MULTI(mode) (true)
87 # define DEC_IS_MULTI(mode) ((mode) != XZ_SINGLE)
89 # define DEC_IS_MULTI(mode) (false)
109 XZ_EXTERN struct xz_dec_lzma2 *xz_dec_lzma2_create(enum xz_mode mode,
/linux-4.1.27/include/linux/i2c/
H A Dds620.h11 * Thermostat output pin PO mode:
/linux-4.1.27/include/linux/input/
H A Dsh_keysc.h8 SH_KEYSC_MODE_4, SH_KEYSC_MODE_5, SH_KEYSC_MODE_6 } mode; member in struct:sh_keysc_info
/linux-4.1.27/arch/sparc/include/uapi/asm/
H A Dipcbuf.h11 * - on sparc for 32 bit mode (it is 32 bit on sparc64)
25 __kernel_mode_t mode; member in struct:ipc64_perm
/linux-4.1.27/security/apparmor/include/
H A Dipc.h23 unsigned int mode);
26 unsigned int mode);
H A Dapparmorfs.h31 umode_t mode; member in struct:aa_fs_entry
45 { .name = (_name), .mode = 0444, \
49 { .name = (_name), .mode = 0444, \
53 { .name = (_name), .mode = 0444, \
58 .mode = (_mode), .file_ops = (_fops) }
/linux-4.1.27/include/linux/lockd/
H A Dshare.h20 u32 s_access; /* access mode */
21 u32 s_mode; /* deny mode */
/linux-4.1.27/kernel/
H A Dsysctl.c236 .mode = 0555,
241 .mode = 0555,
246 .mode = 0555,
251 .mode = 0555,
256 .mode = 0555,
283 .mode = 0644,
291 .mode = 0644,
300 .mode = 0644,
309 .mode = 0644,
319 .mode = 0644,
328 .mode = 0644,
335 .mode = 0644,
342 .mode = 0644,
349 .mode = 0644,
356 .mode = 0644,
367 .mode = 0644,
374 .mode = 0644,
381 .mode = 0644,
388 .mode = 0644,
396 .mode = 0644,
407 .mode = 0644,
414 .mode = 0644,
421 .mode = 0644,
429 .mode = 0644,
440 .mode = 0644,
450 .mode = 0644,
459 .mode = 0644,
467 .mode = 0644,
475 .mode = 0644,
482 .mode = 0644,
489 .mode = 0644,
497 .mode = 0644,
504 .mode = 0644,
515 .mode = 0644,
524 .mode = 0644,
532 .mode = 0644,
540 .mode = 0644,
547 .mode = 0644,
554 .mode = 0644,
563 .mode = 0644,
572 .mode = 0644,
581 .mode = 0644,
589 .mode = 0644,
597 .mode = 0644,
606 .mode = 0644,
615 .mode = 0644,
622 .mode = 0644,
629 .mode = 0644,
638 .mode = 0644,
650 .mode = 0644,
657 .mode = 0644,
669 .mode = 0644,
678 .mode = 0444,
687 .mode = 0644,
696 .mode = 0644,
705 .mode = 0600,
713 .mode = 0644,
718 .mode = 0555,
723 .mode = 0555,
730 .mode = 0644,
739 .mode = 0644,
750 .mode = 0644,
758 .mode = 0644,
766 .mode = 0644,
775 .mode = 0644,
783 .mode = 0644,
790 .mode = 0644,
797 .mode = 0644,
804 .mode = 0644,
813 .mode = 0644,
822 .mode = 0644,
832 .mode = 0444,
839 .mode = 0444,
847 .mode = 0644,
856 .mode = 0644,
865 .mode = 0644,
878 .mode = 0644,
887 .mode = 0644,
897 .mode = 0644,
909 .mode = 0644,
918 .mode = 0644,
925 .mode = 0644,
933 .mode = 0644,
941 .mode = 0444,
948 .mode = 0444,
955 .mode = 0644,
962 .mode = 0644,
971 .mode = 0644,
980 .mode = 0644,
989 .mode = 0644,
998 .mode = 0644,
1007 .mode = 0644,
1016 .mode = 0644,
1025 .mode = 0644,
1033 .mode = 0644,
1041 .mode = 0644,
1051 .mode = 0644,
1060 .mode = 0644,
1068 .mode = 0644,
1074 .mode = 0555,
1089 .mode = 0644,
1096 .mode = 0644,
1103 .mode = 0644,
1111 .mode = 0644,
1122 .mode = 0644,
1130 .mode = 0644,
1143 .mode = 0644,
1152 .mode = 0644,
1161 .mode = 0644,
1168 .mode = 0644,
1175 .mode = 0644,
1182 .mode = 0644,
1189 .mode = 0644,
1197 .mode = 0644,
1206 .mode = 0644,
1214 .mode = 0644,
1223 .mode = 0644,
1231 .mode = 0644,
1238 .mode = 0644,
1246 .mode = 0644,
1252 .mode = 0444 /* read-only */,
1259 .mode = 0644,
1269 .mode = 0644,
1277 .mode = 0644,
1285 .mode = 0644,
1292 .mode = 0644,
1299 .mode = 0644,
1307 .mode = 0644,
1314 .mode = 0644,
1324 .mode = 0200,
1331 .mode = 0644,
1340 .mode = 0644,
1351 .mode = 0644,
1359 .mode = 0644,
1368 .mode = 0644,
1377 .mode = 0644,
1386 .mode = 0644,
1393 .mode = 0644,
1401 .mode = 0644,
1410 .mode = 0644,
1420 .mode = 0644,
1428 .mode = 0644,
1437 .mode = 0644,
1448 .mode = 0644,
1457 .mode = 0644,
1466 .mode = 0644,
1481 .mode = 0644,
1491 .mode = 0644,
1502 .mode = 0644,
1511 .mode = 0644,
1521 .mode = 0644,
1528 .mode = 0644,
1539 .mode = 0444,
1546 .mode = 0444,
1553 .mode = 0444,
1560 .mode = 0644,
1567 .mode = 0644,
1576 .mode = 0444,
1583 .mode = 0644,
1592 .mode = 0644,
1602 .mode = 0644,
1611 .mode = 0644,
1621 .mode = 0644,
1630 .mode = 0444,
1637 .mode = 0644,
1644 .mode = 0555,
1651 .mode = 0555,
1660 .mode = 0600,
1669 .mode = 0600,
1678 .mode = 0644,
1686 .mode = 0555,
1694 .mode = 0644,
1707 .mode = 0644,
1716 .mode = 0644,
/linux-4.1.27/arch/x86/boot/compressed/
H A Deboot.h42 u32 mode; member in struct:efi_graphics_output_protocol_mode_32
51 u32 mode; member in struct:efi_graphics_output_protocol_mode_64
60 u32 mode; member in struct:efi_graphics_output_protocol_mode
71 u32 mode; member in struct:efi_graphics_output_protocol_32
78 u64 mode; member in struct:efi_graphics_output_protocol_64
85 struct efi_graphics_output_protocol_mode *mode; member in struct:efi_graphics_output_protocol
/linux-4.1.27/security/keys/
H A Dsysctl.c23 .mode = 0644,
32 .mode = 0644,
41 .mode = 0644,
50 .mode = 0644,
59 .mode = 0644,
69 .mode = 0644,
/linux-4.1.27/drivers/char/
H A Dppdev.c24 * SETPHASE set the IEEE 1284 phase of a particular mode. Not to be
40 * GETMODE gets the current IEEE1284 mode
115 int mode; pp_read() local
132 mode = pport->ieee1284.mode & ~(IEEE1284_DEVICEID | IEEE1284_ADDR); pp_read()
142 if (mode == IEEE1284_MODE_EPP) { pp_read()
143 /* various specials for EPP mode */ pp_read()
153 if (pport->ieee1284.mode & IEEE1284_ADDR) { pp_read()
197 int mode; pp_write() local
211 mode = pport->ieee1284.mode & ~(IEEE1284_DEVICEID | IEEE1284_ADDR); pp_write()
226 if ((pp->flags & PP_FASTWRITE) && (mode == IEEE1284_MODE_EPP)) { pp_write()
228 if (pport->ieee1284.mode & IEEE1284_ADDR) { pp_write()
314 static enum ieee1284_phase init_phase (int mode) init_phase() argument
316 switch (mode & ~(IEEE1284_DEVICEID init_phase()
364 pp->saved_state.mode = info->mode; pp_do_ioctl()
366 info->mode = pp->state.mode; pp_do_ioctl()
390 int mode; pp_do_ioctl() local
391 if (copy_from_user (&mode, argp, sizeof (mode))) pp_do_ioctl()
393 /* FIXME: validate mode */ pp_do_ioctl()
394 pp->state.mode = mode; pp_do_ioctl()
395 pp->state.phase = init_phase (mode); pp_do_ioctl()
398 pp->pdev->port->ieee1284.mode = mode; pp_do_ioctl()
406 int mode; pp_do_ioctl() local
409 mode = pp->pdev->port->ieee1284.mode; pp_do_ioctl()
411 mode = pp->state.mode; pp_do_ioctl()
413 if (copy_to_user (argp, &mode, sizeof (mode))) { pp_do_ioctl()
497 int mode; pp_do_ioctl() local
524 pp->state.mode = info->mode; pp_do_ioctl()
526 info->mode = pp->saved_state.mode; pp_do_ioctl()
555 if (copy_from_user (&mode, argp, sizeof (mode))) pp_do_ioctl()
557 if (mode) pp_do_ioctl()
564 if (copy_from_user (&mode, argp, sizeof (mode))) pp_do_ioctl()
566 switch ((ret = parport_negotiate (port, mode))) { pp_do_ioctl()
571 case 1: /* handshake succeeded, peripheral rejected mode */ pp_do_ioctl()
650 pp->state.mode = IEEE1284_MODE_COMPAT; pp_open()
651 pp->state.phase = init_phase (pp->state.mode); pp_open()
675 (pp->state.mode != IEEE1284_MODE_COMPAT)) { pp_release()
678 /* parport released, but not in compatibility mode */ pp_release()
682 pp->saved_state.mode = info->mode; pp_release()
684 info->mode = pp->state.mode; pp_release()
688 (pp->pdev->port->ieee1284.mode != IEEE1284_MODE_COMPAT)) { pp_release()
694 "mode because user-space forgot\n", minor); pp_release()
701 pp->state.mode = info->mode; pp_release()
703 info->mode = pp->saved_state.mode; pp_release()
/linux-4.1.27/drivers/leds/
H A Dleds-netxbig.c138 enum netxbig_led_mode mode; member in struct:netxbig_led_data
143 static int netxbig_led_get_timer_mode(enum netxbig_led_mode *mode, netxbig_led_get_timer_mode() argument
154 *mode = timer[i].mode; netxbig_led_get_timer_mode()
167 enum netxbig_led_mode mode; netxbig_led_blink_set() local
171 /* Look for a LED mode with the requested timer frequency. */ netxbig_led_blink_set()
172 ret = netxbig_led_get_timer_mode(&mode, *delay_on, *delay_off, netxbig_led_blink_set()
177 mode_val = led_dat->mode_val[mode]; netxbig_led_blink_set()
184 led_dat->mode = mode; netxbig_led_blink_set()
196 enum netxbig_led_mode mode; netxbig_led_set() local
204 mode = NETXBIG_LED_OFF; netxbig_led_set()
208 mode = NETXBIG_LED_SATA; netxbig_led_set()
209 else if (led_dat->mode == NETXBIG_LED_OFF) netxbig_led_set()
210 mode = NETXBIG_LED_ON; netxbig_led_set()
211 else /* Keep 'timer' mode. */ netxbig_led_set()
212 mode = led_dat->mode; netxbig_led_set()
214 mode_val = led_dat->mode_val[mode]; netxbig_led_set()
217 led_dat->mode = mode; netxbig_led_set()
241 enum netxbig_led_mode mode; netxbig_led_sata_store() local
258 if (led_dat->mode != NETXBIG_LED_ON && netxbig_led_sata_store()
259 led_dat->mode != NETXBIG_LED_SATA) netxbig_led_sata_store()
260 mode = led_dat->mode; /* Keep modes 'off' and 'timer'. */ netxbig_led_sata_store()
262 mode = NETXBIG_LED_SATA; netxbig_led_sata_store()
264 mode = NETXBIG_LED_ON; netxbig_led_sata_store()
266 mode_val = led_dat->mode_val[mode]; netxbig_led_sata_store()
273 led_dat->mode = mode; netxbig_led_sata_store()
H A Dleds-lp8501.c75 #define LP8501_ENG1_IS_LOADING(mode) \
76 ((mode & LP8501_MODE_ENG1_M) == LP8501_LOAD_ENG1)
77 #define LP8501_ENG2_IS_LOADING(mode) \
78 ((mode & LP8501_MODE_ENG2_M) == LP8501_LOAD_ENG2)
79 #define LP8501_ENG3_IS_LOADING(mode) \
80 ((mode & LP8501_MODE_ENG3_M) == LP8501_LOAD_ENG3)
163 u8 mode; lp8501_run_engine() local
175 * operation mode and enable register should updated at the same time lp8501_run_engine()
178 ret = lp55xx_read(chip, LP8501_REG_OP_MODE, &mode); lp8501_run_engine()
186 /* change operation mode to RUN only when each engine is loading */ lp8501_run_engine()
187 if (LP8501_ENG1_IS_LOADING(mode)) { lp8501_run_engine()
188 mode = (mode & ~LP8501_MODE_ENG1_M) | LP8501_RUN_ENG1; lp8501_run_engine()
192 if (LP8501_ENG2_IS_LOADING(mode)) { lp8501_run_engine()
193 mode = (mode & ~LP8501_MODE_ENG2_M) | LP8501_RUN_ENG2; lp8501_run_engine()
197 if (LP8501_ENG3_IS_LOADING(mode)) { lp8501_run_engine()
198 mode = (mode & ~LP8501_MODE_ENG3_M) | LP8501_RUN_ENG3; lp8501_run_engine()
202 lp55xx_write(chip, LP8501_REG_OP_MODE, mode); lp8501_run_engine()
267 * 1) set engine mode to "LOAD" lp8501_firmware_loaded()
H A Dleds-ns2.c58 enum ns2_led_modes mode; member in struct:ns2_led_mode_value
74 unsigned char sata; /* True when SATA mode active. */
79 enum ns2_led_modes *mode) ns2_led_get_mode()
94 *mode = ns2_led_modval[i].mode; ns2_led_get_mode()
106 enum ns2_led_modes mode) ns2_led_set_mode()
114 if (mode == ns2_led_modval[i].mode) { ns2_led_set_mode()
130 enum ns2_led_modes mode; ns2_led_set() local
133 mode = NS_V2_LED_OFF; ns2_led_set()
135 mode = NS_V2_LED_SATA; ns2_led_set()
137 mode = NS_V2_LED_ON; ns2_led_set()
139 ns2_led_set_mode(led_dat, mode); ns2_led_set()
151 enum ns2_led_modes mode; ns2_led_sata_store() local
162 ret = ns2_led_get_mode(led_dat, &mode); ns2_led_sata_store()
166 if (enable && mode == NS_V2_LED_ON) ns2_led_sata_store()
168 if (!enable && mode == NS_V2_LED_SATA) ns2_led_sata_store()
199 enum ns2_led_modes mode; create_ns2_led() local
232 ret = ns2_led_get_mode(led_dat, &mode); create_ns2_led()
237 led_dat->sata = (mode == NS_V2_LED_SATA) ? 1 : 0; create_ns2_led()
239 (mode == NS_V2_LED_OFF) ? LED_OFF : LED_FULL; create_ns2_led()
78 ns2_led_get_mode(struct ns2_led_data *led_dat, enum ns2_led_modes *mode) ns2_led_get_mode() argument
105 ns2_led_set_mode(struct ns2_led_data *led_dat, enum ns2_led_modes mode) ns2_led_set_mode() argument
H A Dleds-lm3530.c86 const char *mode; member in struct:lm3530_mode_map
101 * @mode: mode of operation - manual, ALS, PWM
110 enum lm3530_mode mode; member in struct:lm3530_data
150 if (sysfs_streq(str, mode_map[i].mode)) lm3530_get_mode_from_str()
242 switch (drvdata->mode) { lm3530_init_registers()
287 /* do not update brightness register when pwm mode */ lm3530_init_registers()
289 drvdata->mode == LM3530_BL_MODE_PWM) { lm3530_init_registers()
315 switch (drvdata->mode) { lm3530_brightness_set()
359 if (drvdata->mode == mode_map[i].mode_val) lm3530_mode_get()
360 len += sprintf(buf + len, "[%s] ", mode_map[i].mode); lm3530_mode_get()
362 len += sprintf(buf + len, "%s ", mode_map[i].mode); lm3530_mode_get()
376 int mode, err; lm3530_mode_set() local
381 mode = lm3530_get_mode_from_str(buf); lm3530_mode_set()
382 if (mode < 0) { lm3530_mode_set()
383 dev_err(dev, "Invalid mode\n"); lm3530_mode_set()
384 return mode; lm3530_mode_set()
387 drvdata->mode = mode; lm3530_mode_set()
390 if (mode != LM3530_BL_MODE_PWM && pwm->pwm_set_intensity) lm3530_mode_set()
399 return sizeof(drvdata->mode); lm3530_mode_set()
401 static DEVICE_ATTR(mode, 0644, lm3530_mode_get, lm3530_mode_set);
421 /* BL mode */ lm3530_probe()
422 if (pdata->mode > LM3530_BL_MODE_PWM) { lm3530_probe()
437 drvdata->mode = pdata->mode; lm3530_probe()
H A Dleds-lp5521.c73 #define LP5521_PWRSAVE_EN 0x20 /* 1 = Power save mode */
75 #define LP5521_CP_MODE_BYPASS 8 /* CP forced to bypass mode */
76 #define LP5521_CP_MODE_1X5 0x10 /* CP forced to 1.5x mode */
77 #define LP5521_CP_MODE_AUTO 0x18 /* Automatic mode selection */
100 #define LP5521_R_IS_LOADING(mode) \
101 ((mode & LP5521_MODE_R_M) == LP5521_LOAD_R)
102 #define LP5521_G_IS_LOADING(mode) \
103 ((mode & LP5521_MODE_G_M) == LP5521_LOAD_G)
104 #define LP5521_B_IS_LOADING(mode) \
105 ((mode & LP5521_MODE_B_M) == LP5521_LOAD_B)
117 /* operation mode change needs to be longer than 153 us */ lp5521_wait_opmode_done()
177 u8 mode; lp5521_run_engine() local
190 * operation mode and enable register should updated at the same time lp5521_run_engine()
193 ret = lp55xx_read(chip, LP5521_REG_OP_MODE, &mode); lp5521_run_engine()
201 /* change operation mode to RUN only when each engine is loading */ lp5521_run_engine()
202 if (LP5521_R_IS_LOADING(mode)) { lp5521_run_engine()
203 mode = (mode & ~LP5521_MODE_R_M) | LP5521_RUN_R; lp5521_run_engine()
207 if (LP5521_G_IS_LOADING(mode)) { lp5521_run_engine()
208 mode = (mode & ~LP5521_MODE_G_M) | LP5521_RUN_G; lp5521_run_engine()
212 if (LP5521_B_IS_LOADING(mode)) { lp5521_run_engine()
213 mode = (mode & ~LP5521_MODE_B_M) | LP5521_RUN_B; lp5521_run_engine()
217 lp55xx_write(chip, LP5521_REG_OP_MODE, mode); lp5521_run_engine()
285 * 1) set engine mode to "LOAD" lp5521_firmware_loaded()
318 /* Set all PWMs to direct control mode */ lp5521_post_init_device()
383 enum lp55xx_engine_mode mode = chip->engines[nr - 1].mode; show_engine_mode() local
385 switch (mode) { show_engine_mode()
413 engine->mode = LP55XX_ENGINE_RUN; store_engine_mode()
417 engine->mode = LP55XX_ENGINE_LOAD; store_engine_mode()
420 engine->mode = LP55XX_ENGINE_DISABLED; store_engine_mode()
/linux-4.1.27/usr/
H A Dgen_init_cpio.c81 0, /* mode */ cpio_trailer()
103 unsigned int mode, uid_t uid, gid_t gid) cpio_mkslink()
113 S_IFLNK | mode, /* mode */ cpio_mkslink()
137 unsigned int mode; cpio_mkslink_line() local
142 if (5 != sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, target, &mode, &uid, &gid)) { cpio_mkslink_line()
146 rc = cpio_mkslink(name, target, mode, uid, gid); cpio_mkslink_line()
151 static int cpio_mkgeneric(const char *name, unsigned int mode, cpio_mkgeneric() argument
162 mode, /* mode */ cpio_mkgeneric()
187 mode_t mode; member in struct:generic_type
193 .mode = S_IFDIR
197 .mode = S_IFIFO
201 .mode = S_IFSOCK
208 unsigned int mode; cpio_mkgeneric_line() local
213 if (4 != sscanf(line, "%" str(PATH_MAX) "s %o %d %d", name, &mode, &uid, &gid)) { cpio_mkgeneric_line()
218 mode |= generic_type_table[gt].mode; cpio_mkgeneric_line()
219 rc = cpio_mkgeneric(name, mode, uid, gid); cpio_mkgeneric_line()
239 static int cpio_mknod(const char *name, unsigned int mode, cpio_mknod() argument
246 mode |= S_IFBLK; cpio_mknod()
248 mode |= S_IFCHR; cpio_mknod()
256 mode, /* mode */ cpio_mknod()
276 unsigned int mode; cpio_mknod_line() local
285 name, &mode, &uid, &gid, &dev_type, &maj, &min)) { cpio_mknod_line()
289 rc = cpio_mknod(name, mode, uid, gid, dev_type, maj, min); cpio_mknod_line()
295 unsigned int mode, uid_t uid, gid_t gid, cpio_mkfile()
308 mode |= S_IFREG; cpio_mkfile()
346 mode, /* mode */ cpio_mkfile()
404 unsigned int mode; cpio_mkfile_line() local
413 name, location, &mode, &uid, &gid, &end)) { cpio_mkfile_line()
445 mode, uid, gid, nlinks); cpio_mkfile_line()
460 "file <name> <location> <mode> <uid> <gid> [<hard links>]\n" usage()
461 "dir <name> <mode> <uid> <gid>\n" usage()
462 "nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>\n" usage()
463 "slink <name> <target> <mode> <uid> <gid>\n" usage()
464 "pipe <name> <mode> <uid> <gid>\n" usage()
465 "sock <name> <mode> <uid> <gid>\n" usage()
471 "<mode> mode/permissions of the file\n" usage()
102 cpio_mkslink(const char *name, const char *target, unsigned int mode, uid_t uid, gid_t gid) cpio_mkslink() argument
294 cpio_mkfile(const char *name, const char *location, unsigned int mode, uid_t uid, gid_t gid, unsigned int nlinks) cpio_mkfile() argument
/linux-4.1.27/drivers/net/ethernet/ti/
H A Dcpsw-phy-sel.c48 u32 mode = 0; cpsw_gmii_sel_am3352() local
54 mode = AM33XX_GMII_SEL_MODE_RMII; cpsw_gmii_sel_am3352()
61 mode = AM33XX_GMII_SEL_MODE_RGMII; cpsw_gmii_sel_am3352()
66 mode = AM33XX_GMII_SEL_MODE_MII; cpsw_gmii_sel_am3352()
71 mode <<= slave * 2; cpsw_gmii_sel_am3352()
75 mode |= AM33XX_GMII_SEL_RMII1_IO_CLK_EN; cpsw_gmii_sel_am3352()
77 mode |= AM33XX_GMII_SEL_RMII2_IO_CLK_EN; cpsw_gmii_sel_am3352()
81 reg |= mode; cpsw_gmii_sel_am3352()
91 u32 mode = 0; cpsw_gmii_sel_dra7xx() local
97 mode = AM33XX_GMII_SEL_MODE_RMII; cpsw_gmii_sel_dra7xx()
104 mode = AM33XX_GMII_SEL_MODE_RGMII; cpsw_gmii_sel_dra7xx()
109 mode = AM33XX_GMII_SEL_MODE_MII; cpsw_gmii_sel_dra7xx()
119 mode <<= 4; cpsw_gmii_sel_dra7xx()
130 reg |= mode; cpsw_gmii_sel_dra7xx()
150 dev_err(dev, "Phy mode driver DT not found\n"); cpsw_phy_sel()
/linux-4.1.27/drivers/gpu/drm/shmobile/
H A Dshmob_drm_crtc.c77 const struct drm_display_mode *mode = &crtc->mode; shmob_drm_crtc_setup_geometry() local
81 | ((mode->flags & DRM_MODE_FLAG_PVSYNC) ? 0 : LDMT1R_VPOL) shmob_drm_crtc_setup_geometry()
82 | ((mode->flags & DRM_MODE_FLAG_PHSYNC) ? 0 : LDMT1R_HPOL) shmob_drm_crtc_setup_geometry()
108 value = ((mode->hdisplay / 8) << 16) /* HDCN */ shmob_drm_crtc_setup_geometry()
109 | (mode->htotal / 8); /* HTCN */ shmob_drm_crtc_setup_geometry()
112 value = (((mode->hsync_end - mode->hsync_start) / 8) << 16) /* HSYNW */ shmob_drm_crtc_setup_geometry()
113 | (mode->hsync_start / 8); /* HSYNP */ shmob_drm_crtc_setup_geometry()
116 value = ((mode->hdisplay & 7) << 24) | ((mode->htotal & 7) << 16) shmob_drm_crtc_setup_geometry()
117 | (((mode->hsync_end - mode->hsync_start) & 7) << 8) shmob_drm_crtc_setup_geometry()
118 | (mode->hsync_start & 7); shmob_drm_crtc_setup_geometry()
121 value = ((mode->vdisplay) << 16) /* VDLN */ shmob_drm_crtc_setup_geometry()
122 | mode->vtotal; /* VTLN */ shmob_drm_crtc_setup_geometry()
125 value = ((mode->vsync_end - mode->vsync_start) << 16) /* VSYNW */ shmob_drm_crtc_setup_geometry()
126 | mode->vsync_start; /* VSYNP */ shmob_drm_crtc_setup_geometry()
218 /* Setup geometry, format, frame buffer memory and operation mode. */ shmob_drm_crtc_start()
347 static void shmob_drm_crtc_dpms(struct drm_crtc *crtc, int mode) shmob_drm_crtc_dpms() argument
351 if (scrtc->dpms == mode) shmob_drm_crtc_dpms()
354 if (mode == DRM_MODE_DPMS_ON) shmob_drm_crtc_dpms()
359 scrtc->dpms = mode; shmob_drm_crtc_dpms()
363 const struct drm_display_mode *mode, shmob_drm_crtc_mode_fixup()
375 struct drm_display_mode *mode, shmob_drm_crtc_mode_set()
536 static void shmob_drm_encoder_dpms(struct drm_encoder *encoder, int mode) shmob_drm_encoder_dpms() argument
542 if (senc->dpms == mode) shmob_drm_encoder_dpms()
545 shmob_drm_backlight_dpms(scon, mode); shmob_drm_encoder_dpms()
547 senc->dpms = mode; shmob_drm_encoder_dpms()
551 const struct drm_display_mode *mode, shmob_drm_encoder_mode_fixup()
564 /* The flat panel mode is fixed, just copy it to the adjusted mode. */ shmob_drm_encoder_mode_fixup()
578 struct drm_display_mode *mode, shmob_drm_encoder_mode_set()
651 struct drm_display_mode *mode; shmob_drm_connector_get_modes() local
653 mode = drm_mode_create(connector->dev); shmob_drm_connector_get_modes()
654 if (mode == NULL) shmob_drm_connector_get_modes()
657 mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER; shmob_drm_connector_get_modes()
658 mode->clock = sdev->pdata->panel.mode.clock; shmob_drm_connector_get_modes()
659 mode->hdisplay = sdev->pdata->panel.mode.hdisplay; shmob_drm_connector_get_modes()
660 mode->hsync_start = sdev->pdata->panel.mode.hsync_start; shmob_drm_connector_get_modes()
661 mode->hsync_end = sdev->pdata->panel.mode.hsync_end; shmob_drm_connector_get_modes()
662 mode->htotal = sdev->pdata->panel.mode.htotal; shmob_drm_connector_get_modes()
663 mode->vdisplay = sdev->pdata->panel.mode.vdisplay; shmob_drm_connector_get_modes()
664 mode->vsync_start = sdev->pdata->panel.mode.vsync_start; shmob_drm_connector_get_modes()
665 mode->vsync_end = sdev->pdata->panel.mode.vsync_end; shmob_drm_connector_get_modes()
666 mode->vtotal = sdev->pdata->panel.mode.vtotal; shmob_drm_connector_get_modes()
667 mode->flags = sdev->pdata->panel.mode.flags; shmob_drm_connector_get_modes()
669 drm_mode_set_name(mode); shmob_drm_connector_get_modes()
670 drm_mode_probed_add(connector, mode); shmob_drm_connector_get_modes()
362 shmob_drm_crtc_mode_fixup(struct drm_crtc *crtc, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) shmob_drm_crtc_mode_fixup() argument
374 shmob_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode, int x, int y, struct drm_framebuffer *old_fb) shmob_drm_crtc_mode_set() argument
550 shmob_drm_encoder_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) shmob_drm_encoder_mode_fixup() argument
577 shmob_drm_encoder_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) shmob_drm_encoder_mode_set() argument
/linux-4.1.27/drivers/media/i2c/
H A Dsony-btf-mpx.c175 int mode = t->mpxmode; mpx_setup() local
190 mode++; mpx_setup()
192 if (mpx_audio_modes[mode].audio_mode != AUD_MONO) { mpx_setup()
195 switch (mpx_audio_modes[mode].audio_mode) { mpx_setup()
197 source = mpx_audio_modes[mode].source; mpx_setup()
210 source = mpx_audio_modes[mode].source; mpx_setup()
219 source |= mpx_audio_modes[mode].source & 0x00ff; mpx_setup()
221 source = mpx_audio_modes[mode].source; mpx_setup()
223 mpx_write(client, 0x10, 0x0030, mpx_audio_modes[mode].modus); mpx_setup()
225 mpx_write(client, 0x12, 0x0013, mpx_audio_modes[mode].acb); mpx_setup()
227 mpx_audio_modes[mode].fm_prescale); mpx_setup()
229 mpx_audio_modes[mode].nicam_prescale); mpx_setup()
231 mpx_audio_modes[mode].scart_prescale); mpx_setup()
232 mpx_write(client, 0x10, 0x0020, mpx_audio_modes[mode].system); mpx_setup()
233 mpx_write(client, 0x12, 0x0000, mpx_audio_modes[mode].volume); mpx_setup()
234 if (mpx_audio_modes[mode].audio_mode == AUD_A2) mpx_setup()
245 mpx_audio_modes[mode].modus, mpx_setup()
247 mpx_audio_modes[mode].acb, mpx_setup()
248 mpx_audio_modes[mode].fm_prescale, mpx_setup()
249 mpx_audio_modes[mode].nicam_prescale, mpx_setup()
250 mpx_audio_modes[mode].scart_prescale, mpx_setup()
251 mpx_audio_modes[mode].system, mpx_setup()
252 mpx_audio_modes[mode].volume); mpx_setup()
/linux-4.1.27/arch/mips/include/asm/octeon/
H A Dcvmx-spi.h49 int (*reset_cb) (int interface, cvmx_spi_mode_t mode);
52 int (*calendar_setup_cb) (int interface, cvmx_spi_mode_t mode,
56 int (*clock_detect_cb) (int interface, cvmx_spi_mode_t mode,
60 int (*training_cb) (int interface, cvmx_spi_mode_t mode, int timeout);
63 int (*calendar_sync_cb) (int interface, cvmx_spi_mode_t mode,
67 int (*interface_up_cb) (int interface, cvmx_spi_mode_t mode);
88 * @mode: The operating mode for the SPI interface. The interface
97 extern int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode,
106 * @mode: The operating mode for the SPI interface. The interface
113 extern int cvmx_spi_restart_interface(int interface, cvmx_spi_mode_t mode,
175 * @mode: The operating mode for the SPI interface. The interface
183 extern int cvmx_spi_reset_cb(int interface, cvmx_spi_mode_t mode);
191 * @mode: The operating mode for the SPI interface. The interface
200 extern int cvmx_spi_calendar_setup_cb(int interface, cvmx_spi_mode_t mode,
208 * @mode: The operating mode for the SPI interface. The interface
217 extern int cvmx_spi_clock_detect_cb(int interface, cvmx_spi_mode_t mode,
225 * @mode: The operating mode for the SPI interface. The interface
234 extern int cvmx_spi_training_cb(int interface, cvmx_spi_mode_t mode,
242 * @mode: The operating mode for the SPI interface. The interface
251 extern int cvmx_spi_calendar_sync_cb(int interface, cvmx_spi_mode_t mode,
259 * @mode: The operating mode for the SPI interface. The interface
267 extern int cvmx_spi_interface_up_cb(int interface, cvmx_spi_mode_t mode);
/linux-4.1.27/drivers/net/ethernet/brocade/bna/
H A Dbna.h240 #define is_xxx_enable(mode, bitmask, xxx) ((bitmask & xxx) && (mode & xxx))
242 #define is_xxx_disable(mode, bitmask, xxx) ((bitmask & xxx) && !(mode & xxx))
244 #define xxx_enable(mode, bitmask, xxx) \
247 mode |= xxx; \
250 #define xxx_disable(mode, bitmask, xxx) \
253 mode &= ~xxx; \
256 #define xxx_inactive(mode, bitmask, xxx) \
259 mode &= ~xxx; \
262 #define is_promisc_enable(mode, bitmask) \
263 is_xxx_enable(mode, bitmask, BNA_RXMODE_PROMISC)
265 #define is_promisc_disable(mode, bitmask) \
266 is_xxx_disable(mode, bitmask, BNA_RXMODE_PROMISC)
268 #define promisc_enable(mode, bitmask) \
269 xxx_enable(mode, bitmask, BNA_RXMODE_PROMISC)
271 #define promisc_disable(mode, bitmask) \
272 xxx_disable(mode, bitmask, BNA_RXMODE_PROMISC)
274 #define promisc_inactive(mode, bitmask) \
275 xxx_inactive(mode, bitmask, BNA_RXMODE_PROMISC)
277 #define is_default_enable(mode, bitmask) \
278 is_xxx_enable(mode, bitmask, BNA_RXMODE_DEFAULT)
280 #define is_default_disable(mode, bitmask) \
281 is_xxx_disable(mode, bitmask, BNA_RXMODE_DEFAULT)
283 #define default_enable(mode, bitmask) \
284 xxx_enable(mode, bitmask, BNA_RXMODE_DEFAULT)
286 #define default_disable(mode, bitmask) \
287 xxx_disable(mode, bitmask, BNA_RXMODE_DEFAULT)
289 #define default_inactive(mode, bitmask) \
290 xxx_inactive(mode, bitmask, BNA_RXMODE_DEFAULT)
292 #define is_allmulti_enable(mode, bitmask) \
293 is_xxx_enable(mode, bitmask, BNA_RXMODE_ALLMULTI)
295 #define is_allmulti_disable(mode, bitmask) \
296 is_xxx_disable(mode, bitmask, BNA_RXMODE_ALLMULTI)
298 #define allmulti_enable(mode, bitmask) \
299 xxx_enable(mode, bitmask, BNA_RXMODE_ALLMULTI)
301 #define allmulti_disable(mode, bitmask) \
302 xxx_disable(mode, bitmask, BNA_RXMODE_ALLMULTI)
304 #define allmulti_inactive(mode, bitmask) \
305 xxx_inactive(mode, bitmask, BNA_RXMODE_ALLMULTI)
/linux-4.1.27/drivers/crypto/qce/
H A Dcommon.h75 #define IS_CBC(mode) (mode & QCE_MODE_CBC)
76 #define IS_ECB(mode) (mode & QCE_MODE_ECB)
77 #define IS_CTR(mode) (mode & QCE_MODE_CTR)
78 #define IS_XTS(mode) (mode & QCE_MODE_XTS)
79 #define IS_CCM(mode) (mode & QCE_MODE_CCM)
/linux-4.1.27/include/uapi/linux/
H A Divtv.h30 mode.
33 YUV mode you need to call IVTV_IOC_DMA_FRAME with y_source == NULL
35 DMA_FRAME is called the mode switch is done automatically).
37 When you close the file handle the user DMA mode is exited again.
39 While in one mode, you cannot use another mode (EBUSY is returned).
42 for the user DMA YUV mode you first need to do call IVTV_IOC_DMA_FRAME
53 then just switch to user DMA YUV output mode */
63 /* Select the passthrough mode (if the argument is non-zero). In the passthrough
64 mode the output of the encoder is passed immediately into the decoder. */
H A Dmempolicy.h12 * Both the MPOL_* mempolicy mode and the MPOL_F_* optional mode flags are
14 * The MPOL_MODE_FLAGS macro determines the legal set of optional mode flags.
39 * MPOL_MODE_FLAGS is the union of all possible optional mode flags passed to
45 #define MPOL_F_NODE (1<<0) /* return next IL mode instead of node mask */
63 * "mode flags". These flags are allocated from bit 0 up, as they
64 * are never OR'ed into the mode in mempolicy API arguments.
/linux-4.1.27/arch/arm/mach-ks8695/
H A Dirq.c69 unsigned long ctrl, mode; ks8695_irq_set_type() local
76 mode = IOPC_TM_HIGH; ks8695_irq_set_type()
80 mode = IOPC_TM_LOW; ks8695_irq_set_type()
84 mode = IOPC_TM_RISING; ks8695_irq_set_type()
87 mode = IOPC_TM_FALLING; ks8695_irq_set_type()
90 mode = IOPC_TM_EDGE; ks8695_irq_set_type()
99 ctrl |= IOPC_IOEINT0_MODE(mode); ks8695_irq_set_type()
103 ctrl |= IOPC_IOEINT1_MODE(mode); ks8695_irq_set_type()
107 ctrl |= IOPC_IOEINT2_MODE(mode); ks8695_irq_set_type()
111 ctrl |= IOPC_IOEINT3_MODE(mode); ks8695_irq_set_type()
/linux-4.1.27/drivers/acpi/acpica/
H A Dhwacpi.c55 * PARAMETERS: mode - SYS_MODE_ACPI or SYS_MODE_LEGACY
59 * DESCRIPTION: Transitions the system into the requested mode.
62 acpi_status acpi_hw_set_mode(u32 mode) acpi_hw_set_mode() argument
69 /* If the Hardware Reduced flag is set, machine is always in acpi mode */ acpi_hw_set_mode()
77 * system does not support mode transition. acpi_hw_set_mode()
81 "No SMI_CMD in FADT, mode transition failed")); acpi_hw_set_mode()
88 * As old systems may have used zero for mode transition, acpi_hw_set_mode()
94 "No ACPI mode transition supported in this system " acpi_hw_set_mode()
99 switch (mode) { acpi_hw_set_mode()
107 "Attempting to enable ACPI mode\n")); acpi_hw_set_mode()
118 "Attempting to enable Legacy (non-ACPI) mode\n")); acpi_hw_set_mode()
128 "Could not write ACPI mode change")); acpi_hw_set_mode()
155 /* If the Hardware Reduced flag is set, machine is always in acpi mode */ acpi_hw_get_mode()
163 * system does not support mode transition. acpi_hw_get_mode()
/linux-4.1.27/drivers/mtd/nand/
H A Dnand_timings.c243 * timings according to the given ONFI timing mode
244 * @mode: ONFI timing mode
246 const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode) onfi_async_timing_mode_to_sdr_timings() argument
248 if (mode < 0 || mode >= ARRAY_SIZE(onfi_sdr_timings)) onfi_async_timing_mode_to_sdr_timings()
251 return &onfi_sdr_timings[mode]; onfi_async_timing_mode_to_sdr_timings()
/linux-4.1.27/drivers/clk/shmobile/
H A Dclk-r8a7778.c132 void __init r8a7778_clocks_init(u32 mode) r8a7778_clocks_init() argument
134 BUG_ON(!(mode & BIT(19))); r8a7778_clocks_init()
136 cpg_mode_rates = (!!(mode & BIT(18)) << 2) | r8a7778_clocks_init()
137 (!!(mode & BIT(12)) << 1) | r8a7778_clocks_init()
138 (!!(mode & BIT(11))); r8a7778_clocks_init()
139 cpg_mode_divs = (!!(mode & BIT(2)) << 1) | r8a7778_clocks_init()
140 (!!(mode & BIT(1))); r8a7778_clocks_init()
/linux-4.1.27/ipc/
H A Dmq_sysctl.c61 .mode = 0644,
68 .mode = 0644,
77 .mode = 0644,
86 .mode = 0644,
95 .mode = 0644,
106 .mode = 0555,
115 .mode = 0555,
H A Dipc_sysctl.c108 .mode = 0644,
115 .mode = 0644,
122 .mode = 0644,
129 .mode = 0644,
138 .mode = 0644,
147 .mode = 0644,
156 .mode = 0644,
165 .mode = 0644,
174 .mode = 0644,
182 .mode = 0644,
191 .mode = 0644,
200 .mode = 0644,
212 .mode = 0555,
/linux-4.1.27/arch/sh/include/asm/
H A Dsuspend.h14 void sh_mobile_call_standby(unsigned long mode);
59 /* current sleep mode (SUSP_SH_...) */
60 unsigned long mode; member in struct:sh_sleep_data
88 #define SUSP_SH_SLEEP (1 << 0) /* Regular sleep mode */
89 #define SUSP_SH_STANDBY (1 << 1) /* SH-Mobile Software standby mode */
90 #define SUSP_SH_RSTANDBY (1 << 2) /* SH-Mobile R-standby mode */
91 #define SUSP_SH_USTANDBY (1 << 3) /* SH-Mobile U-standby mode */
/linux-4.1.27/net/sctp/
H A Dsysctl.c82 .mode = 0644,
89 .mode = 0644,
96 .mode = 0644,
108 .mode = 0644,
117 .mode = 0644,
126 .mode = 0644,
135 .mode = 0644,
144 .mode = 0644,
153 .mode = 0644,
162 .mode = 0644,
169 .mode = 0644,
176 .mode = 0644,
185 .mode = 0644,
194 .mode = 0644,
203 .mode = 0644,
212 .mode = 0644,
221 .mode = 0644,
230 .mode = 0644,
239 .mode = 0644,
246 .mode = 0644,
253 .mode = 0644,
260 .mode = 0644,
267 .mode = 0644,
274 .mode = 0644,
281 .mode = 0644,
288 .mode = 0644,
297 .mode = 0644,
306 .mode = 0644,
/linux-4.1.27/fs/debugfs/
H A Dfile.c74 * @mode: the permission that the file should have
82 * contains the value of the variable @value. If the @mode variable is so
95 struct dentry *debugfs_create_u8(const char *name, umode_t mode, debugfs_create_u8() argument
99 if (!(mode & S_IWUGO)) debugfs_create_u8()
100 return debugfs_create_file(name, mode, parent, value, &fops_u8_ro); debugfs_create_u8()
102 if (!(mode & S_IRUGO)) debugfs_create_u8()
103 return debugfs_create_file(name, mode, parent, value, &fops_u8_wo); debugfs_create_u8()
105 return debugfs_create_file(name, mode, parent, value, &fops_u8); debugfs_create_u8()
126 * @mode: the permission that the file should have
134 * contains the value of the variable @value. If the @mode variable is so
147 struct dentry *debugfs_create_u16(const char *name, umode_t mode, debugfs_create_u16() argument
151 if (!(mode & S_IWUGO)) debugfs_create_u16()
152 return debugfs_create_file(name, mode, parent, value, &fops_u16_ro); debugfs_create_u16()
154 if (!(mode & S_IRUGO)) debugfs_create_u16()
155 return debugfs_create_file(name, mode, parent, value, &fops_u16_wo); debugfs_create_u16()
157 return debugfs_create_file(name, mode, parent, value, &fops_u16); debugfs_create_u16()
178 * @mode: the permission that the file should have
186 * contains the value of the variable @value. If the @mode variable is so
199 struct dentry *debugfs_create_u32(const char *name, umode_t mode, debugfs_create_u32() argument
203 if (!(mode & S_IWUGO)) debugfs_create_u32()
204 return debugfs_create_file(name, mode, parent, value, &fops_u32_ro); debugfs_create_u32()
206 if (!(mode & S_IRUGO)) debugfs_create_u32()
207 return debugfs_create_file(name, mode, parent, value, &fops_u32_wo); debugfs_create_u32()
209 return debugfs_create_file(name, mode, parent, value, &fops_u32); debugfs_create_u32()
231 * @mode: the permission that the file should have
239 * contains the value of the variable @value. If the @mode variable is so
252 struct dentry *debugfs_create_u64(const char *name, umode_t mode, debugfs_create_u64() argument
256 if (!(mode & S_IWUGO)) debugfs_create_u64()
257 return debugfs_create_file(name, mode, parent, value, &fops_u64_ro); debugfs_create_u64()
259 if (!(mode & S_IRUGO)) debugfs_create_u64()
260 return debugfs_create_file(name, mode, parent, value, &fops_u64_wo); debugfs_create_u64()
262 return debugfs_create_file(name, mode, parent, value, &fops_u64); debugfs_create_u64()
291 * @mode: the permission that the file should have
298 struct dentry *debugfs_create_x8(const char *name, umode_t mode, debugfs_create_x8() argument
302 if (!(mode & S_IWUGO)) debugfs_create_x8()
303 return debugfs_create_file(name, mode, parent, value, &fops_x8_ro); debugfs_create_x8()
305 if (!(mode & S_IRUGO)) debugfs_create_x8()
306 return debugfs_create_file(name, mode, parent, value, &fops_x8_wo); debugfs_create_x8()
308 return debugfs_create_file(name, mode, parent, value, &fops_x8); debugfs_create_x8()
315 * @mode: the permission that the file should have
322 struct dentry *debugfs_create_x16(const char *name, umode_t mode, debugfs_create_x16() argument
326 if (!(mode & S_IWUGO)) debugfs_create_x16()
327 return debugfs_create_file(name, mode, parent, value, &fops_x16_ro); debugfs_create_x16()
329 if (!(mode & S_IRUGO)) debugfs_create_x16()
330 return debugfs_create_file(name, mode, parent, value, &fops_x16_wo); debugfs_create_x16()
332 return debugfs_create_file(name, mode, parent, value, &fops_x16); debugfs_create_x16()
339 * @mode: the permission that the file should have
346 struct dentry *debugfs_create_x32(const char *name, umode_t mode, debugfs_create_x32() argument
350 if (!(mode & S_IWUGO)) debugfs_create_x32()
351 return debugfs_create_file(name, mode, parent, value, &fops_x32_ro); debugfs_create_x32()
353 if (!(mode & S_IRUGO)) debugfs_create_x32()
354 return debugfs_create_file(name, mode, parent, value, &fops_x32_wo); debugfs_create_x32()
356 return debugfs_create_file(name, mode, parent, value, &fops_x32); debugfs_create_x32()
363 * @mode: the permission that the file should have
370 struct dentry *debugfs_create_x64(const char *name, umode_t mode, debugfs_create_x64() argument
373 return debugfs_create_file(name, mode, parent, value, &fops_x64); debugfs_create_x64()
394 * @mode: the permission that the file should have
401 struct dentry *debugfs_create_size_t(const char *name, umode_t mode, debugfs_create_size_t() argument
404 return debugfs_create_file(name, mode, parent, value, &fops_size_t); debugfs_create_size_t()
427 * @mode: the permission that the file should have
434 struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, debugfs_create_atomic_t() argument
438 if (!(mode & S_IWUGO)) debugfs_create_atomic_t()
439 return debugfs_create_file(name, mode, parent, value, debugfs_create_atomic_t()
442 if (!(mode & S_IRUGO)) debugfs_create_atomic_t()
443 return debugfs_create_file(name, mode, parent, value, debugfs_create_atomic_t()
446 return debugfs_create_file(name, mode, parent, value, &fops_atomic_t); debugfs_create_atomic_t()
494 * @mode: the permission that the file should have
502 * contains the value of the variable @value. If the @mode variable is so
515 struct dentry *debugfs_create_bool(const char *name, umode_t mode, debugfs_create_bool() argument
518 return debugfs_create_file(name, mode, parent, value, &fops_bool); debugfs_create_bool()
539 * @mode: the permission that the file should have
547 * @blob->data as a binary blob. If the @mode variable is so set it can be
560 struct dentry *debugfs_create_blob(const char *name, umode_t mode, debugfs_create_blob() argument
564 return debugfs_create_file(name, mode, parent, blob, &fops_blob); debugfs_create_blob()
642 * @mode: the permission that the file should have.
650 * @array as data. If the @mode variable is so set it can be read from.
657 struct dentry *debugfs_create_u32_array(const char *name, umode_t mode, debugfs_create_u32_array() argument
669 return debugfs_create_file(name, mode, parent, data, &u32_array_fops); debugfs_create_u32_array()
735 * @mode: the permission that the file should have
744 * the names and values of a set of 32-bit registers. If the @mode variable
757 struct dentry *debugfs_create_regset32(const char *name, umode_t mode, debugfs_create_regset32() argument
761 return debugfs_create_file(name, mode, parent, regset, &fops_regset32); debugfs_create_regset32()
/linux-4.1.27/drivers/gpu/drm/nouveau/dispnv04/
H A Dtvnv17.c216 struct drm_display_mode *mode; nv17_tv_get_ld_modes() local
218 mode = drm_mode_duplicate(encoder->dev, tv_mode); nv17_tv_get_ld_modes()
220 mode->clock = tv_norm->tv_enc_mode.vrefresh * nv17_tv_get_ld_modes()
221 mode->htotal / 1000 * nv17_tv_get_ld_modes()
222 mode->vtotal / 1000; nv17_tv_get_ld_modes()
224 if (mode->flags & DRM_MODE_FLAG_DBLSCAN) nv17_tv_get_ld_modes()
225 mode->clock *= 2; nv17_tv_get_ld_modes()
227 if (mode->hdisplay == tv_norm->tv_enc_mode.hdisplay && nv17_tv_get_ld_modes()
228 mode->vdisplay == tv_norm->tv_enc_mode.vdisplay) nv17_tv_get_ld_modes()
229 mode->type |= DRM_MODE_TYPE_PREFERRED; nv17_tv_get_ld_modes()
231 drm_mode_probed_add(connector, mode); nv17_tv_get_ld_modes()
242 struct drm_display_mode *output_mode = &tv_norm->ctv_enc_mode.mode; nv17_tv_get_hd_modes()
243 struct drm_display_mode *mode; nv17_tv_get_hd_modes() local
267 mode = drm_mode_duplicate(encoder->dev, output_mode); nv17_tv_get_hd_modes()
268 mode->type |= DRM_MODE_TYPE_PREFERRED; nv17_tv_get_hd_modes()
271 mode = drm_cvt_mode(encoder->dev, modes[i].hdisplay, nv17_tv_get_hd_modes()
280 mode->htotal = output_mode->htotal; nv17_tv_get_hd_modes()
281 mode->hsync_start = (mode->hdisplay + (mode->htotal nv17_tv_get_hd_modes()
282 - mode->hdisplay) * 9 / 10) & ~7; nv17_tv_get_hd_modes()
283 mode->hsync_end = mode->hsync_start + 8; nv17_tv_get_hd_modes()
287 mode->vtotal = output_mode->vtotal; nv17_tv_get_hd_modes()
288 mode->vsync_start = output_mode->vsync_start; nv17_tv_get_hd_modes()
289 mode->vsync_end = output_mode->vsync_end; nv17_tv_get_hd_modes()
292 mode->type |= DRM_MODE_TYPE_DRIVER; nv17_tv_get_hd_modes()
293 drm_mode_probed_add(connector, mode); nv17_tv_get_hd_modes()
312 struct drm_display_mode *mode) nv17_tv_mode_valid()
318 &tv_norm->ctv_enc_mode.mode; nv17_tv_mode_valid()
320 if (mode->clock > 400000) nv17_tv_mode_valid()
323 if (mode->hdisplay > output_mode->hdisplay || nv17_tv_mode_valid()
324 mode->vdisplay > output_mode->vdisplay) nv17_tv_mode_valid()
327 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) != nv17_tv_mode_valid()
331 if (mode->flags & DRM_MODE_FLAG_DBLSCAN) nv17_tv_mode_valid()
337 if (mode->clock > 70000) nv17_tv_mode_valid()
340 if (abs(drm_mode_vrefresh(mode) * 1000 - nv17_tv_mode_valid()
345 if (mode->flags & DRM_MODE_FLAG_INTERLACE) nv17_tv_mode_valid()
353 const struct drm_display_mode *mode, nv17_tv_mode_fixup()
362 adjusted_mode->clock = tv_norm->ctv_enc_mode.mode.clock; nv17_tv_mode_fixup()
369 static void nv17_tv_dpms(struct drm_encoder *encoder, int mode) nv17_tv_dpms() argument
377 if (nouveau_encoder(encoder)->last_dpms == mode) nv17_tv_dpms()
379 nouveau_encoder(encoder)->last_dpms = mode; nv17_tv_dpms()
381 NV_INFO(drm, "Setting dpms mode %d on TV encoder (output %d)\n", nv17_tv_dpms()
382 mode, nouveau_encoder(encoder)->dcb->index); nv17_tv_dpms()
387 nv04_dfp_update_fp_control(encoder, mode); nv17_tv_dpms()
392 if (mode == DRM_MODE_DPMS_ON) nv17_tv_dpms()
398 gpio->set(gpio, 0, DCB_GPIO_TVDAC1, 0xff, mode == DRM_MODE_DPMS_ON); nv17_tv_dpms()
399 gpio->set(gpio, 0, DCB_GPIO_TVDAC0, 0xff, mode == DRM_MODE_DPMS_ON); nv17_tv_dpms()
401 nv04_dac_update_dacclk(encoder, mode == DRM_MODE_DPMS_ON); nv17_tv_dpms()
479 regs->ramdac_630 = 0x2; /* turn off green mode (tv test pattern?) */ nv17_tv_mode_set()
528 &tv_norm->ctv_enc_mode.mode; nv17_tv_mode_set()
311 nv17_tv_mode_valid(struct drm_encoder *encoder, struct drm_display_mode *mode) nv17_tv_mode_valid() argument
352 nv17_tv_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) nv17_tv_mode_fixup() argument
/linux-4.1.27/drivers/block/paride/
H A Ddstr.c28 /* mode codes: 0 nybble reads, 8-bit writes
30 2 8-bit EPP mode
54 if (pi->mode) { w0(0x11); } else { w0(1); } dstr_read_regr()
57 switch (pi->mode) { dstr_read_regr()
81 if (pi->mode >= 2) { w0(0x11); } else { w0(1); } dstr_write_regr()
84 switch (pi->mode) { dstr_write_regr()
120 if (pi->mode) { w0(0x19); } else { w0(9); } dstr_read_block()
123 switch (pi->mode) { dstr_read_block()
162 if (pi->mode) { w0(0x19); } else { w0(9); } dstr_write_block()
165 switch (pi->mode) { dstr_write_block()
200 printk("mode %d (%s), delay %d\n",pi->mode, dstr_log_adapter()
201 mode_string[pi->mode],pi->delay); dstr_log_adapter()
H A Dbpck.c54 switch (pi->mode) { bpck_read_regr()
85 switch (pi->mode) { bpck_write_regr()
112 switch (pi->mode) { bpck_write_block()
153 switch (pi->mode) { bpck_read_block()
226 switch (pi->mode) { bpck_connect()
256 if (pi->mode >= 2) { w2(9); w2(0); } else t2(2); bpck_disconnect()
285 switch (pi->mode) { bpck_test_proto()
308 case 4: om = pi->mode; bpck_test_proto()
309 pi->mode = 0; bpck_test_proto()
315 pi->mode = om; bpck_test_proto()
319 switch (pi->mode) { bpck_test_proto()
337 printk("%s: bpck: 0x%x unit %d mode %d: ", bpck_test_proto()
338 pi->device,pi->port,pi->unit,pi->mode); bpck_test_proto()
354 om = pi->mode; od = pi->delay; bpck_read_eeprom()
355 pi->mode = 0; pi->delay = 6; bpck_read_eeprom()
397 pi->mode = om; pi->delay = od; bpck_read_eeprom()
442 printk(" at 0x%x, mode %d (%s), delay %d\n",pi->port, bpck_log_adapter()
443 pi->mode,mode_string[pi->mode],pi->delay); bpck_log_adapter()
/linux-4.1.27/net/decnet/
H A Dsysctl_net_decnet.c253 .mode = 0644,
260 .mode = 0644,
266 .mode = 0644,
273 .mode = 0644,
282 .mode = 0644,
291 .mode = 0644,
300 .mode = 0644,
309 .mode = 0644,
318 .mode = 0644,
327 .mode = 0644,
334 .mode = 0644,
341 .mode = 0644,
348 .mode = 0644,
/linux-4.1.27/net/irda/
H A Dirsysctl.c119 .mode = 0644,
126 .mode = 0644,
134 .mode = 0644,
142 .mode = 0644,
151 .mode = 0644,
158 .mode = 0644,
167 .mode = 0644,
176 .mode = 0644,
185 .mode = 0644,
194 .mode = 0644,
203 .mode = 0644,
212 .mode = 0644,
221 .mode = 0644,
/linux-4.1.27/arch/s390/include/asm/
H A Dscsw.h16 * struct cmd_scsw - command-mode subchannel status word
62 * struct tm_scsw - transport-mode subchannel status word
134 * @cmd: command-mode SCSW
135 * @tm: transport-mode SCSW
214 * scsw_is_tm - check for transport mode scsw
217 * Return non-zero if the specified scsw is a transport mode scsw, zero
230 * whether it is a transport mode or command mode scsw.
245 * whether it is a transport mode or command mode scsw.
260 * whether it is a transport mode or command mode scsw.
275 * whether it is a transport mode or command mode scsw.
290 * whether it is a transport mode or command mode scsw.
305 * whether it is a transport mode or command mode scsw.
320 * whether it is a transport mode or command mode scsw.
335 * whether it is a transport mode or command mode scsw.
350 * whether it is a transport mode or command mode scsw.
365 * whether it is a transport mode or command mode scsw.
379 * Return non-zero if the key field of the specified command mode scsw is
391 * Return non-zero if the fctl field of the specified command mode scsw is
403 * Return non-zero if the eswf field of the specified command mode scsw is
415 * Return non-zero if the cc field of the specified command mode scsw is
428 * Return non-zero if the fmt field of the specified command mode scsw is
440 * Return non-zero if the pfch field of the specified command mode scsw is
452 * Return non-zero if the isic field of the specified command mode scsw is
464 * Return non-zero if the alcc field of the specified command mode scsw is
476 * Return non-zero if the ssi field of the specified command mode scsw is
488 * Return non-zero if the zcc field of the specified command mode scsw is
501 * Return non-zero if the ectl field of the specified command mode scsw is
515 * Return non-zero if the pno field of the specified command mode scsw is
531 * Return non-zero if the fctl field of the specified command mode scsw is
544 * Return non-zero if the actl field of the specified command mode scsw is
557 * Return non-zero if the stctl field of the specified command mode scsw is
570 * Return non-zero if the dstat field of the specified command mode scsw is
583 * Return non-zero if the cstat field of the specified command mode scsw is
596 * Return non-zero if the key field of the specified transport mode scsw is
608 * Return non-zero if the eswf field of the specified transport mode scsw is
620 * Return non-zero if the cc field of the specified transport mode scsw is
633 * Return non-zero if the fmt field of the specified transport mode scsw is
645 * Return non-zero if the x field of the specified transport mode scsw is
657 * Return non-zero if the q field of the specified transport mode scsw is
669 * Return non-zero if the ectl field of the specified transport mode scsw is
683 * Return non-zero if the pno field of the specified transport mode scsw is
699 * Return non-zero if the fctl field of the specified transport mode scsw is
712 * Return non-zero if the actl field of the specified transport mode scsw is
725 * Return non-zero if the stctl field of the specified transport mode scsw is
738 * Return non-zero if the dstat field of the specified transport mode scsw is
751 * Return non-zero if the cstat field of the specified transport mode scsw is
764 * Return non-zero if the fcxs field of the specified transport mode scsw is
776 * Return non-zero if the schxs field of the specified transport mode scsw is
792 * regardless of whether it is a transport mode or command mode scsw.
808 * regardless of whether it is a transport mode or command mode scsw.
824 * regardless of whether it is a transport mode or command mode scsw.
840 * regardless of whether it is a transport mode or command mode scsw.
856 * regardless of whether it is a transport mode or command mode scsw.
872 * regardless of whether it is a transport mode or command mode scsw.
888 * regardless of whether it is a transport mode or command mode scsw.
904 * regardless of whether it is a transport mode or command mode scsw.
920 * regardless of whether it is a transport mode or command mode scsw.
936 * regardless of whether it is a transport mode or command mode scsw.
951 * Return non-zero if the command mode scsw indicates that the associated
964 * Return non-zero if the transport mode scsw indicates that the associated
977 * Return non-zero if the transport or command mode scsw indicates that the
/linux-4.1.27/arch/ia64/kernel/
H A Desi_stub.S8 * identical to the one for EFI phys-mode calls, except that ESI
12 * This stub allows us to make ESI calls in physical mode with interrupts
13 * turned off. ESI calls may not support calling from virtual mode.
71 mov ar.rsc=0 // put RSE in enforced lazy, LE mode
86 .ret1: mov ar.rsc=0 // put RSE in enforced lazy, LE mode
87 mov r16=loc3 // save virtual mode psr
88 mov r19=loc5 // save virtual mode bspstore
89 mov r20=loc6 // save virtual mode sp
90 br.call.sptk.many rp=ia64_switch_mode_virt // return to virtual mode
/linux-4.1.27/net/ipv6/
H A Dsysctl_net_ipv6.c26 .mode = 0644,
33 .mode = 0644,
40 .mode = 0644,
47 .mode = 0644,
54 .mode = 0644,
61 .mode = 0644,
68 .mode = 0644,
79 .mode = 0644,
86 .mode = 0644,
/linux-4.1.27/drivers/net/ethernet/broadcom/
H A Dbnx2_fw.h13 .mode = BNX2_COM_CPU_MODE,
29 .mode = BNX2_CP_CPU_MODE,
45 .mode = BNX2_RXP_CPU_MODE,
61 .mode = BNX2_TPAT_CPU_MODE,
77 .mode = BNX2_TXP_CPU_MODE,
/linux-4.1.27/arch/um/drivers/
H A Dtty.c43 int fd, err, mode = 0; tty_open() local
46 mode = O_RDWR; tty_open()
48 mode = O_RDONLY; tty_open()
50 mode = O_WRONLY; tty_open()
52 fd = open(data->dev, mode); tty_open()
/linux-4.1.27/arch/powerpc/include/asm/
H A Dreg_8xx.h27 #define DC_SFWT 0x01000000 /* Set forced writethrough mode */
28 #define DC_CFWT 0x03000000 /* Clear forced writethrough mode */
29 #define DC_SLES 0x05000000 /* Set little endian swap mode */
30 #define DC_CLES 0x07000000 /* Clear little endian swap mode */
40 #define DC_LES 0x20000000 /* Caches are little endian mode */
/linux-4.1.27/arch/arm/kernel/
H A Disa.c28 .mode = 0444,
34 .mode = 0444,
40 .mode = 0444,
50 .mode = 0555,
58 .mode = 0555,
/linux-4.1.27/drivers/zorro/
H A Dgen-devlist.c33 int mode = 0; main() local
51 switch (mode) { main()
91 mode = 1; main()
94 fprintf(stderr, "Line %d: Syntax error in mode %d: %s\n", lino, mode, line); main()
/linux-4.1.27/arch/m68k/include/asm/
H A Ddma.h8 * address mode emits a source address, and expects that the device will either
12 * devices will find single mode transfers useful. Dual address DMA mode
15 * is useful for 8 and 16 bit devices. This is the mode that is supported
55 #define DMA_MODE_SINGLE_BIT 0x08 /* single-address-mode */
57 /* I/O to memory, 8 bits, mode */
59 /* memory to I/O, 8 bits, mode */
61 /* I/O to memory, 16 bits, mode */
63 /* memory to I/O, 16 bits, mode */
65 /* I/O to memory, 32 bits, mode */
67 /* memory to I/O, 32 bits, mode */
69 /* I/O to memory, 8 bits, single-address-mode */
71 /* memory to I/O, 8 bits, single-address-mode */
73 /* I/O to memory, 16 bits, single-address-mode */
75 /* memory to I/O, 16 bits, single-address-mode */
77 /* I/O to memory, 32 bits, single-address-mode */
79 /* memory to I/O, 32 bits, single-address-mode */
84 /* Source static-address mode */
90 /* Destination static-address mode */
104 * do not include the SINGLE mode modifiers since the MCF5272 does not have a
105 * mode where the device is in control of its addressing.
108 /* I/O to memory, 8 bits, mode */
110 /* memory to I/O, 8 bits, mode */
112 /* I/O to memory, 16 bits, mode */
114 /* memory to I/O, 16 bits, mode */
116 /* I/O to memory, 32 bits, mode */
118 /* memory to I/O, 32 bits, mode */
168 /* set mode (above) for a specific DMA channel */ set_dma_mode()
169 static __inline__ void set_dma_mode(unsigned int dmanr, char mode) set_dma_mode() argument
176 printk("set_dma_mode(dmanr=%d,mode=%d)\n", dmanr, mode); set_dma_mode()
190 /* single-address-mode */ set_dma_mode()
191 ((mode & DMA_MODE_SINGLE_BIT) ? MCFDMA_DCR_SAA : 0) | set_dma_mode()
193 ((mode & DMA_MODE_WRITE_BIT) ? MCFDMA_DCR_S_RW : 0) | set_dma_mode()
195 ((mode & DMA_MODE_WRITE_BIT) ? MCFDMA_DCR_SINC : MCFDMA_DCR_DINC) | set_dma_mode()
197 ((mode & DMA_MODE_WORD_BIT) ? MCFDMA_DCR_SSIZE_WORD : set_dma_mode()
198 ((mode & DMA_MODE_LONG_BIT) ? MCFDMA_DCR_SSIZE_LONG : set_dma_mode()
200 ((mode & DMA_MODE_WORD_BIT) ? MCFDMA_DCR_DSIZE_WORD : set_dma_mode()
201 ((mode & DMA_MODE_LONG_BIT) ? MCFDMA_DCR_DSIZE_LONG : set_dma_mode()
247 * Should be called after the mode set call, and before set DMA address.
359 /* set mode (above) for a specific DMA channel */ set_dma_mode()
360 static __inline__ void set_dma_mode(unsigned int dmanr, char mode) set_dma_mode() argument
367 printk("set_dma_mode(dmanr=%d,mode=%d)\n", dmanr, mode); set_dma_mode()
380 /* source static-address-mode */ set_dma_mode()
381 ((mode & DMA_MODE_SRC_SA_BIT) ? MCFDMA_DMR_SRCM_SA : MCFDMA_DMR_SRCM_IA) | set_dma_mode()
382 /* dest static-address-mode */ set_dma_mode()
383 ((mode & DMA_MODE_DES_SA_BIT) ? MCFDMA_DMR_DSTM_SA : MCFDMA_DMR_DSTM_IA) | set_dma_mode()
385 (((mode & DMA_MODE_SSIZE_MASK) >> DMA_MODE_SSIZE_OFF) << MCFDMA_DMR_DSTS_OFF) | set_dma_mode()
386 (((mode & DMA_MODE_SSIZE_MASK) >> DMA_MODE_SSIZE_OFF) << MCFDMA_DMR_SRCS_OFF); set_dma_mode()
431 * Should be called after the mode set call, and before set DMA address.
/linux-4.1.27/fs/9p/
H A Dvfs_inode.c58 * unixmode2p9mode - convert unix mode bits to plan 9
60 * @mode: mode to convert
64 static u32 unixmode2p9mode(struct v9fs_session_info *v9ses, umode_t mode) unixmode2p9mode() argument
67 res = mode & 0777; unixmode2p9mode()
68 if (S_ISDIR(mode)) unixmode2p9mode()
72 if (S_ISSOCK(mode)) unixmode2p9mode()
74 if (S_ISFIFO(mode)) unixmode2p9mode()
76 if (S_ISBLK(mode)) unixmode2p9mode()
78 if (S_ISCHR(mode)) unixmode2p9mode()
82 if ((mode & S_ISUID) == S_ISUID) unixmode2p9mode()
84 if ((mode & S_ISGID) == S_ISGID) unixmode2p9mode()
86 if ((mode & S_ISVTX) == S_ISVTX) unixmode2p9mode()
93 * p9mode2perm- convert plan9 mode bits to unix permission bits
95 * @stat: p9_wstat from which mode need to be derived
102 int mode = stat->mode; p9mode2perm() local
104 res = mode & S_IALLUGO; p9mode2perm()
106 if ((mode & P9_DMSETUID) == P9_DMSETUID) p9mode2perm()
109 if ((mode & P9_DMSETGID) == P9_DMSETGID) p9mode2perm()
112 if ((mode & P9_DMSETVTX) == P9_DMSETVTX) p9mode2perm()
119 * p9mode2unixmode- convert plan9 mode bits to unix mode bits
121 * @stat: p9_wstat from which mode need to be derived
129 u32 mode = stat->mode; p9mode2unixmode() local
134 if ((mode & P9_DMDIR) == P9_DMDIR) p9mode2unixmode()
136 else if ((mode & P9_DMSYMLINK) && (v9fs_proto_dotu(v9ses))) p9mode2unixmode()
138 else if ((mode & P9_DMSOCKET) && (v9fs_proto_dotu(v9ses)) p9mode2unixmode()
141 else if ((mode & P9_DMNAMEDPIPE) && (v9fs_proto_dotu(v9ses)) p9mode2unixmode()
144 else if ((mode & P9_DMDEVICE) && (v9fs_proto_dotu(v9ses)) p9mode2unixmode()
170 * v9fs_uflags2omode- convert posix open flags to plan 9 mode bits
220 wstat->mode = ~0; v9fs_blank_wstat()
272 struct inode *inode, umode_t mode, dev_t rdev) v9fs_init_inode()
276 inode_init_owner(inode, NULL, mode); v9fs_init_inode()
282 switch (mode & S_IFMT) { v9fs_init_inode()
293 "special files without extended mode\n"); v9fs_init_inode()
353 p9_debug(P9_DEBUG_ERROR, "BAD mode 0x%hx S_IFMT 0x%x\n", v9fs_init_inode()
354 mode, mode & S_IFMT); v9fs_init_inode()
366 * @mode: mode to setup inode with
370 struct inode *v9fs_get_inode(struct super_block *sb, umode_t mode, dev_t rdev) v9fs_get_inode() argument
376 p9_debug(P9_DEBUG_VFS, "super block: %p mode: %ho\n", sb, mode); v9fs_get_inode()
384 err = v9fs_init_inode(v9ses, inode, mode, rdev); v9fs_get_inode()
638 * @mode: open mode
643 struct dentry *dentry, char *extension, u32 perm, u8 mode) v9fs_create()
671 err = p9_client_fcreate(ofid, name, perm, mode, extension); v9fs_create()
719 * @mode: create permissions
724 v9fs_vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, v9fs_vfs_create() argument
728 u32 perm = unixmode2p9mode(v9ses, mode); v9fs_vfs_create()
746 * @mode: mode for new directory
750 static int v9fs_vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) v9fs_vfs_mkdir() argument
760 perm = unixmode2p9mode(v9ses, mode | S_IFDIR); v9fs_vfs_mkdir()
816 * unlink. For cached mode create calls request for new v9fs_vfs_lookup()
846 struct file *file, unsigned flags, umode_t mode, v9fs_vfs_atomic_open()
872 perm = unixmode2p9mode(v9ses, mode); v9fs_vfs_atomic_open()
1109 wstat.mode = unixmode2p9mode(v9ses, iattr->ia_mode); v9fs_vfs_setattr()
1159 umode_t mode; v9fs_stat2inode() local
1195 mode = p9mode2perm(v9ses, stat); v9fs_stat2inode()
1196 mode |= inode->i_mode & ~S_IALLUGO; v9fs_stat2inode()
1197 inode->i_mode = mode; v9fs_stat2inode()
1255 if (!(st->mode & P9_DMSYMLINK)) { v9fs_readlink()
1326 * @perm: mode to create special file
1417 * @mode: mode for creation
1423 v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) v9fs_vfs_mknod() argument
1430 p9_debug(P9_DEBUG_VFS, " %lu,%pd mode: %hx MAJOR: %u MINOR: %u\n", v9fs_vfs_mknod()
1431 dir->i_ino, dentry, mode, v9fs_vfs_mknod()
1441 if (S_ISBLK(mode)) v9fs_vfs_mknod()
1443 else if (S_ISCHR(mode)) v9fs_vfs_mknod()
1445 else if (S_ISFIFO(mode)) v9fs_vfs_mknod()
1447 else if (S_ISSOCK(mode)) v9fs_vfs_mknod()
1454 perm = unixmode2p9mode(v9ses, mode); v9fs_vfs_mknod()
271 v9fs_init_inode(struct v9fs_session_info *v9ses, struct inode *inode, umode_t mode, dev_t rdev) v9fs_init_inode() argument
642 v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir, struct dentry *dentry, char *extension, u32 perm, u8 mode) v9fs_create() argument
845 v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, struct file *file, unsigned flags, umode_t mode, int *opened) v9fs_vfs_atomic_open() argument
/linux-4.1.27/drivers/media/i2c/m5mols/
H A Dm5mols_reg.h46 * Category 0 - SYSTEM mode
48 * The SYSTEM mode in the M-5MOLS means area available to handle with the whole
49 * & all-round system of sensor. It deals with version/interrupt/setting mode &
66 #define REG_SYSINIT 0x00 /* SYSTEM mode */
67 #define REG_PARAMETER 0x01 /* PARAMETER mode */
68 #define REG_MONITOR 0x02 /* MONITOR mode */
69 #define REG_CAPTURE 0x03 /* CAPTURE mode */
76 /* SYSTEM mode status */
94 * category 1 - PARAMETER mode
101 /* Resolution in the MONITOR mode */
121 * Category 2 - MONITOR mode
123 * The MONITOR mode is same as preview mode as we said. The M-5MOLS has another
124 * mode named "Preview", but this preview mode is used at the case specific
125 * vider-recording mode. This mmode supports only YUYV format. On the other
126 * hand, the JPEG & RAW formats is supports by CAPTURE mode. And, there are
128 * mode)/anti hand shaking algorithm.
166 * camera. This category supports AE locking/various AE mode(range of exposure)
170 * each MONITOR and CAPTURE mode has each gain/shutter/max exposure values.
178 /* Auto Exposure algorithm mode */
212 /* Manual gain in MONITOR mode */
214 /* Maximum gain in MONITOR mode */
216 /* Manual gain in CAPTURE mode */
355 * This mode provides functions about internal flash stuff and system startup.
/linux-4.1.27/drivers/gpu/drm/i2c/
H A Dch7006_mode.c107 .mode = { \
178 struct ch7006_mode *mode; ch7006_lookup_mode() local
180 for (mode = ch7006_modes; mode->mode.clock; mode++) { ch7006_lookup_mode()
182 if (~mode->valid_norms & 1<<priv->norm) ch7006_lookup_mode()
185 if (mode->mode.hdisplay != drm_mode->hdisplay || ch7006_lookup_mode()
186 mode->mode.vdisplay != drm_mode->vdisplay || ch7006_lookup_mode()
187 mode->mode.vtotal != drm_mode->vtotal || ch7006_lookup_mode()
188 mode->mode.htotal != drm_mode->htotal || ch7006_lookup_mode()
189 mode->mode.clock != drm_mode->clock) ch7006_lookup_mode()
192 return mode; ch7006_lookup_mode()
237 struct ch7006_mode *mode = priv->mode; ch7006_setup_subcarrier() local
240 subc_inc = round_fixed((mode->subc_coeff >> 8) ch7006_setup_subcarrier()
260 struct ch7006_mode *mode = priv->mode; ch7006_setup_pll() local
269 if (abs(freq - mode->mode.clock) < ch7006_setup_pll()
270 abs(best_freq - mode->mode.clock)) { ch7006_setup_pll()
332 struct ch7006_mode *ch_mode = priv->mode; ch7006_setup_properties()
333 struct drm_display_mode *mode = &ch_mode->mode; ch7006_setup_properties() local
347 do_div(scale, mode->vtotal); ch7006_setup_properties()
352 hpos = round_fixed((norm->hvirtual * aspect - mode->hdisplay * scale) ch7006_setup_properties()
353 * priv->hmargin * mode->vtotal) / norm->vtotal / 100 / 4; ch7006_setup_properties()
358 vpos = max(0, norm->vdisplay - round_fixed(mode->vdisplay*scale) ch7006_setup_properties()
/linux-4.1.27/drivers/md/
H A Dfaulty.c33 * A mode can be one-shot or recurrent with the recurrence being
35 * The bottom 5 bits of the "layout" indicate the mode. The
94 static int check_mode(struct faulty_conf *conf, int mode) check_mode() argument
96 if (conf->period[mode] == 0 && check_mode()
97 atomic_read(&conf->counters[mode]) <= 0) check_mode()
101 if (atomic_dec_and_test(&conf->counters[mode])) { check_mode()
102 if (conf->period[mode]) check_mode()
103 atomic_set(&conf->counters[mode], conf->period[mode]); check_mode()
133 static void add_sector(struct faulty_conf *conf, sector_t start, int mode) add_sector() argument
139 switch(mode) { add_sector()
140 case NoPersist: conf->modes[i] = mode; return; add_sector()
168 conf->modes[n] = mode; add_sector()
264 int mode = mddev->new_layout & ModeMask; reshape() local
272 if (mode == ClearFaults) reshape()
274 else if (mode == ClearErrors) { reshape()
280 } else if (mode < Modes) { reshape()
281 conf->period[mode] = count; reshape()
283 atomic_set(&conf->counters[mode], count); reshape()
/linux-4.1.27/fs/hostfs/
H A Dhostfs_user.c24 p->mode = buf->st_mode; stat64_to_hostfs()
57 int mode = 0; access_file() local
60 mode = R_OK; access_file()
62 mode |= W_OK; access_file()
64 mode |= X_OK; access_file()
65 if (access(path, mode) != 0) access_file()
72 int mode = 0, fd; open_file() local
75 mode = O_RDONLY; open_file()
77 mode = O_WRONLY; open_file()
79 mode = O_RDWR; open_file()
80 else panic("Impossible mode in open_file"); open_file()
83 mode |= O_APPEND; open_file()
84 fd = open64(path, mode); open_file()
184 int file_create(char *name, int mode) file_create() argument
188 fd = open64(name, O_CREAT | O_RDWR, mode); file_create()
297 int do_mkdir(const char *file, int mode) do_mkdir() argument
301 err = mkdir(file, mode); do_mkdir()
317 int do_mknod(const char *file, int mode, unsigned int major, unsigned int minor) do_mknod() argument
321 err = mknod(file, mode, os_makedev(major, minor)); do_mknod()
/linux-4.1.27/drivers/media/tuners/
H A Dqm1d1c0042.h28 bool fast_srch; /* enable fast search mode, no LPF */
30 u32 fast_srch_wait; /* with fast-search mode, no LPF. [ms] */
31 u32 normal_srch_wait; /* with no LPF/fast-search mode. [ms] */
/linux-4.1.27/drivers/staging/iio/adc/
H A Dad7192.h28 * @chop_en: CHOP mode enable
29 * @buf_en: buffered input mode enable
30 * @unipolar_en: unipolar mode enable
/linux-4.1.27/arch/xtensa/include/uapi/asm/
H A Dtermbits.h25 tcflag_t c_iflag; /* input mode flags */
26 tcflag_t c_oflag; /* output mode flags */
27 tcflag_t c_cflag; /* control mode flags */
28 tcflag_t c_lflag; /* local mode flags */
34 tcflag_t c_iflag; /* input mode flags */
35 tcflag_t c_oflag; /* output mode flags */
36 tcflag_t c_cflag; /* control mode flags */
37 tcflag_t c_lflag; /* local mode flags */
45 tcflag_t c_iflag; /* input mode flags */
46 tcflag_t c_oflag; /* output mode flags */
47 tcflag_t c_cflag; /* control mode flags */
48 tcflag_t c_lflag; /* local mode flags */
/linux-4.1.27/arch/unicore32/include/asm/
H A Dptrace.h31 /* Are the current registers suitable for user mode?
36 unsigned long mode = regs->UCreg_asr & MODE_MASK; valid_user_regs() local
44 if (mode == USER_MODE) valid_user_regs()
/linux-4.1.27/arch/mips/kernel/
H A Dirq_txx9.c63 unsigned char mode; member in struct:__anon2133
108 if (unlikely(TXx9_IRCR_EDGE(txx9irq[irq_nr].mode))) txx9_irq_mask_ack()
118 int mode; txx9_irq_set_type() local
123 case IRQF_TRIGGER_RISING: mode = TXx9_IRCR_UP; break; txx9_irq_set_type()
124 case IRQF_TRIGGER_FALLING: mode = TXx9_IRCR_DOWN; break; txx9_irq_set_type()
125 case IRQF_TRIGGER_HIGH: mode = TXx9_IRCR_HIGH; break; txx9_irq_set_type()
126 case IRQF_TRIGGER_LOW: mode = TXx9_IRCR_LOW; break; txx9_irq_set_type()
134 cr |= (mode & 0x3) << ofs; txx9_irq_set_type()
136 txx9irq[irq_nr].mode = mode; txx9_irq_set_type()
156 txx9irq[i].mode = TXx9_IRCR_LOW; txx9_irq_init()
165 /* setup IRC interrupt mode (Low Active) */ txx9_irq_init()
/linux-4.1.27/arch/mips/lasat/
H A Dsysctl.c169 .mode = 0444,
176 .mode = 0444,
183 .mode = 0444,
190 .mode = 0644,
198 .mode = 0644,
205 .mode = 0644,
214 .mode = 0600,
221 .mode = 0644,
229 .mode = 0644,
237 .mode = 0444,
244 .mode = 0444,
253 .mode = 0555,
/linux-4.1.27/arch/mips/txx9/generic/
H A Dirq_tx4939.c50 unsigned char mode; member in struct:__anon2161
95 if (TXx9_IRCR_EDGE(tx4939irq[irq_nr].mode)) { tx4939_irq_mask_ack()
110 int mode; tx4939_irq_set_type() local
116 mode = TXx9_IRCR_UP; tx4939_irq_set_type()
119 mode = TXx9_IRCR_DOWN; tx4939_irq_set_type()
122 mode = TXx9_IRCR_HIGH; tx4939_irq_set_type()
125 mode = TXx9_IRCR_LOW; tx4939_irq_set_type()
140 cr |= (mode & 0x3) << ofs; tx4939_irq_set_type()
142 tx4939irq[irq_nr].mode = mode; tx4939_irq_set_type()
178 tx4939irq[i].mode = TXx9_IRCR_LOW; tx4939_irq_init()
187 /* setup IRC interrupt mode (Low Active) */ tx4939_irq_init()
/linux-4.1.27/arch/mn10300/include/uapi/asm/
H A Dtermbits.h12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
/linux-4.1.27/arch/arm/plat-samsung/include/plat/
H A Dregs-spi.h20 #define S3C2410_SPCON_SMOD_DMA (2 << 5) /* DMA mode */
21 #define S3C2410_SPCON_SMOD_INT (1 << 5) /* interrupt mode */
22 #define S3C2410_SPCON_SMOD_POLL (0 << 5) /* polling mode */
/linux-4.1.27/arch/arm/mach-davinci/
H A Dmux.h26 .mode = mux_mode, \
37 .mode = mux_mode, \
48 .mode = mux_mode, \
/linux-4.1.27/mm/
H A Dfailslab.c38 umode_t mode = S_IFREG | S_IRUSR | S_IWUSR; failslab_debugfs_init() local
44 if (!debugfs_create_bool("ignore-gfp-wait", mode, dir, failslab_debugfs_init()
47 if (!debugfs_create_bool("cache-filter", mode, dir, failslab_debugfs_init()
/linux-4.1.27/drivers/media/usb/pwc/
H A Dpwc-timon.h29 It lists the bandwidth requirements for said mode by its alternate interface
30 number. An alternate of 0 means that the mode is unavailable.
37 When an uncompressed mode is not available, the next available compressed mode
54 unsigned char mode[13]; /* precomputed mode settings for cam */ member in struct:Timon_table_entry
/linux-4.1.27/drivers/gpu/drm/panel/
H A Dpanel-sharp-lq101r1sx01.c34 const struct drm_display_mode *mode; member in struct:sharp_panel
44 unsigned int refresh = drm_mode_vrefresh(sharp->mode); sharp_wait_frames()
125 dev_err(panel->dev, "failed to enter sleep mode: %d\n", err); sharp_panel_unprepare()
138 const struct drm_display_mode *mode) sharp_setup_symmetrical_split()
142 err = mipi_dsi_dcs_set_column_address(left, 0, mode->hdisplay / 2 - 1); sharp_setup_symmetrical_split()
148 err = mipi_dsi_dcs_set_page_address(left, 0, mode->vdisplay - 1); sharp_setup_symmetrical_split()
154 err = mipi_dsi_dcs_set_column_address(right, mode->hdisplay / 2, sharp_setup_symmetrical_split()
155 mode->hdisplay - 1); sharp_setup_symmetrical_split()
161 err = mipi_dsi_dcs_set_page_address(right, 0, mode->vdisplay - 1); sharp_setup_symmetrical_split()
186 * mode to make sure the panel is ready. Throw in another 20 ms for sharp_panel_prepare()
193 dev_err(panel->dev, "failed to exit sleep mode: %d\n", err); sharp_panel_prepare()
206 /* set left-right mode */ sharp_panel_prepare()
209 dev_err(panel->dev, "failed to set left-right mode: %d\n", err); sharp_panel_prepare()
213 /* enable command mode */ sharp_panel_prepare()
216 dev_err(panel->dev, "failed to enable command mode: %d\n", err); sharp_panel_prepare()
229 * right split. To support a different mode a mechanism needs to be sharp_panel_prepare()
234 sharp->mode); sharp_panel_prepare()
291 struct drm_display_mode *mode; sharp_panel_get_modes() local
293 mode = drm_mode_duplicate(panel->drm, &default_mode); sharp_panel_get_modes()
294 if (!mode) { sharp_panel_get_modes()
295 dev_err(panel->drm->dev, "failed to add mode %ux%ux@%u\n", sharp_panel_get_modes()
301 drm_mode_set_name(mode); sharp_panel_get_modes()
303 drm_mode_probed_add(panel->connector, mode); sharp_panel_get_modes()
330 sharp->mode = &default_mode; sharp_panel_add()
136 sharp_setup_symmetrical_split(struct mipi_dsi_device *left, struct mipi_dsi_device *right, const struct drm_display_mode *mode) sharp_setup_symmetrical_split() argument
/linux-4.1.27/drivers/pinctrl/spear/
H A Dpinctrl-spear300.c42 .mode = NAND_MODE,
50 .mode = NOR_MODE,
57 .name = "photo frame mode",
58 .mode = PHOTO_FRAME_MODE,
65 .name = "lend ip phone mode",
66 .mode = LEND_IP_PHONE_MODE,
73 .name = "hend ip phone mode",
74 .mode = HEND_IP_PHONE_MODE,
81 .name = "lend wifi phone mode",
82 .mode = LEND_WIFI_PHONE_MODE,
89 .name = "hend wifi phone mode",
90 .mode = HEND_WIFI_PHONE_MODE,
97 .name = "ata pabx wi2s mode",
98 .mode = ATA_PABX_WI2S_MODE,
105 .name = "ata pabx i2s mode",
106 .mode = ATA_PABX_I2S_MODE,
113 .name = "caml lcdw mode",
114 .mode = CAML_LCDW_MODE,
121 .name = "camu lcd mode",
122 .mode = CAMU_LCD_MODE,
129 .name = "camu wlcd mode",
130 .mode = CAMU_WLCD_MODE,
137 .name = "caml lcd mode",
138 .mode = CAML_LCD_MODE,
/linux-4.1.27/include/media/
H A Dupd64083.h25 to select the correct routing: the operating mode and the selection
32 YCNR mode is used for S-Video inputs.
41 /* YCS mode: Y/C separation (burst locked clocking) */
43 /* YCS+ mode: 2D Y/C separation and YCNR (burst locked clocking) */
48 /* MNNR mode: frame comb type YNR+C delay (line locked clocking) */
50 /* YCNR mode: frame recursive YCNR (burst locked clocking) */
/linux-4.1.27/arch/m68k/ifpsp060/
H A Dos.S59 | instructions for supervisor mode applications and call _copyin()/_copyout()
60 | for user mode applications.
76 | Writes to data memory while in supervisor mode.
82 | 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode
107 | Reads from data/instruction memory while in supervisor mode.
113 | 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode
144 | 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode
167 | 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode
178 | 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode
203 | 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode
214 | 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode
239 | 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode
261 | 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode
285 | 0x4(%a6),bit5 - 1 = supervisor mode, 0 = user mode

Completed in 4216 milliseconds

1234567891011>>