/drivers/rtc/ |
D | rtc-rx8025.c | 417 static int rx8025_get_clock_adjust(struct device *dev, int *adj) in rx8025_get_clock_adjust() argument 426 *adj = digoff >= 64 ? digoff - 128 : digoff; in rx8025_get_clock_adjust() 427 if (*adj > 0) in rx8025_get_clock_adjust() 428 (*adj)--; in rx8025_get_clock_adjust() 429 *adj *= -RX8025_ADJ_RESOLUTION; in rx8025_get_clock_adjust() 434 static int rx8025_set_clock_adjust(struct device *dev, int adj) in rx8025_set_clock_adjust() argument 440 adj /= -RX8025_ADJ_RESOLUTION; in rx8025_set_clock_adjust() 441 if (adj > RX8025_ADJ_DATA_MAX) in rx8025_set_clock_adjust() 442 adj = RX8025_ADJ_DATA_MAX; in rx8025_set_clock_adjust() 443 else if (adj < RX8025_ADJ_DATA_MIN) in rx8025_set_clock_adjust() [all …]
|
/drivers/gpu/drm/atmel-hlcdc/ |
D | atmel_hlcdc_crtc.c | 69 struct drm_display_mode *adj = &c->state->adjusted_mode; in atmel_hlcdc_crtc_mode_set_nofb() local 78 vm.vfront_porch = adj->crtc_vsync_start - adj->crtc_vdisplay; in atmel_hlcdc_crtc_mode_set_nofb() 79 vm.vback_porch = adj->crtc_vtotal - adj->crtc_vsync_end; in atmel_hlcdc_crtc_mode_set_nofb() 80 vm.vsync_len = adj->crtc_vsync_end - adj->crtc_vsync_start; in atmel_hlcdc_crtc_mode_set_nofb() 81 vm.hfront_porch = adj->crtc_hsync_start - adj->crtc_hdisplay; in atmel_hlcdc_crtc_mode_set_nofb() 82 vm.hback_porch = adj->crtc_htotal - adj->crtc_hsync_end; in atmel_hlcdc_crtc_mode_set_nofb() 83 vm.hsync_len = adj->crtc_hsync_end - adj->crtc_hsync_start; in atmel_hlcdc_crtc_mode_set_nofb() 95 (adj->crtc_hdisplay - 1) | in atmel_hlcdc_crtc_mode_set_nofb() 96 ((adj->crtc_vdisplay - 1) << 16)); in atmel_hlcdc_crtc_mode_set_nofb() 104 mode_rate = adj->crtc_clock * 1000; in atmel_hlcdc_crtc_mode_set_nofb() [all …]
|
/drivers/net/ethernet/cadence/ |
D | macb_ptp.c | 123 u64 adj; in gem_ptp_adjfine() local 136 adj = (u64)scaled_ppm * word; in gem_ptp_adjfine() 140 adj += (USEC_PER_SEC >> 1); in gem_ptp_adjfine() 141 adj >>= PPM_FRACTION; /* remove fractions */ in gem_ptp_adjfine() 142 adj = div_u64(adj, USEC_PER_SEC); in gem_ptp_adjfine() 143 adj = neg_adj ? (word - adj) : (word + adj); in gem_ptp_adjfine() 145 incr_spec.ns = (adj >> GEM_SUBNSINCR_SIZE) in gem_ptp_adjfine() 147 incr_spec.sub_ns = adj & ((1 << GEM_SUBNSINCR_SIZE) - 1); in gem_ptp_adjfine() 156 u32 adj, sign = 0; in gem_ptp_adjtime() local 170 adj = (sign << GEM_ADDSUB_OFFSET) | delta; in gem_ptp_adjtime() [all …]
|
/drivers/ide/ |
D | pdc202xx_new.c | 131 u8 adj = (drive->dn & 1) ? 0x08 : 0x00; in pdcnew_set_dma_mode() local 146 set_indexed_reg(hwif, 0x10 + adj, in pdcnew_set_dma_mode() 148 set_indexed_reg(hwif, 0x11 + adj, in pdcnew_set_dma_mode() 150 set_indexed_reg(hwif, 0x12 + adj, in pdcnew_set_dma_mode() 153 set_indexed_reg(hwif, 0x0e + adj, in pdcnew_set_dma_mode() 155 set_indexed_reg(hwif, 0x0f + adj, in pdcnew_set_dma_mode() 160 u8 tmp = get_indexed_reg(hwif, 0x10 + adj); in pdcnew_set_dma_mode() 162 set_indexed_reg(hwif, 0x10 + adj, tmp & 0x7f); in pdcnew_set_dma_mode() 169 u8 adj = (drive->dn & 1) ? 0x08 : 0x00; in pdcnew_set_pio_mode() local 173 set_indexed_reg(hwif, 0x0c + adj, pio_timings[pio].reg0c); in pdcnew_set_pio_mode() [all …]
|
/drivers/gpu/drm/armada/ |
D | armada_crtc.c | 200 const struct drm_display_mode *mode, struct drm_display_mode *adj) in armada_drm_crtc_mode_fixup() argument 210 drm_mode_set_crtcinfo(adj, CRTC_INTERLACE_HALVE_V); in armada_drm_crtc_mode_fixup() 216 if (armada_drm_crtc_mode_valid(crtc, adj) != MODE_OK) in armada_drm_crtc_mode_fixup() 220 ret = dcrtc->variant->compute_clock(dcrtc, adj, NULL); in armada_drm_crtc_mode_fixup() 332 struct drm_display_mode *adj = &crtc->state->adjusted_mode; in armada_drm_crtc_mode_set_nofb() local 338 bool interlaced = !!(adj->flags & DRM_MODE_FLAG_INTERLACE); in armada_drm_crtc_mode_set_nofb() 341 rm = adj->crtc_hsync_start - adj->crtc_hdisplay; in armada_drm_crtc_mode_set_nofb() 342 lm = adj->crtc_htotal - adj->crtc_hsync_end; in armada_drm_crtc_mode_set_nofb() 343 bm = adj->crtc_vsync_start - adj->crtc_vdisplay; in armada_drm_crtc_mode_set_nofb() 344 tm = adj->crtc_vtotal - adj->crtc_vsync_end; in armada_drm_crtc_mode_set_nofb() [all …]
|
/drivers/block/drbd/ |
D | drbd_vli.h | 136 u64 adj = 1; in vli_decode_bits() local 141 *out = ((in & ((~0ULL) >> (64-t))) >> b) + adj; \ in vli_decode_bits() 144 adj += 1ULL << (t - b); \ in vli_decode_bits() 159 u64 adj = 1; in __vli_encode_bits() local 168 *out = ((in - adj) << b) | v; \ in __vli_encode_bits() 171 adj = max + 1; \ in __vli_encode_bits()
|
/drivers/net/ethernet/cavium/common/ |
D | cavium_ptp.c | 96 u64 adj; in cavium_ptp_adjfine() local 120 adj = comp * scaled_ppm; in cavium_ptp_adjfine() 121 adj >>= 16; in cavium_ptp_adjfine() 122 adj = div_u64(adj, 1000000ull); in cavium_ptp_adjfine() 123 comp = neg_adj ? comp - adj : comp + adj; in cavium_ptp_adjfine()
|
/drivers/usb/gadget/udc/ |
D | r8a66597-udc.h | 200 int adj = 0; in r8a66597_write_fifo() local 222 adj = 0x03; /* 32-bit wide */ in r8a66597_write_fifo() 224 adj = 0x01; /* 16-bit wide */ in r8a66597_write_fifo() 230 iowrite8(buf[i], fifoaddr + adj - (i & adj)); in r8a66597_write_fifo()
|
/drivers/macintosh/ |
D | windfarm_pid.c | 91 s32 error, target, sval, adj; in wf_cpu_pid_run() local 120 adj = min(st->param.ttarget, sval); in wf_cpu_pid_run() 122 DBG("integ: %lx, sval: %lx, adj: %lx\n", integ, sval, adj); in wf_cpu_pid_run() 131 prop = st->last_delta = (new_temp - adj); in wf_cpu_pid_run()
|
/drivers/net/ethernet/stmicro/stmmac/ |
D | stmmac_ptp.c | 28 u64 adj; in stmmac_adjust_freq() local 36 adj = addend; in stmmac_adjust_freq() 37 adj *= ppb; in stmmac_adjust_freq() 38 diff = div_u64(adj, 1000000000ULL); in stmmac_adjust_freq()
|
/drivers/video/backlight/ |
D | corgi_lcd.c | 190 int adj; in lcdtg_set_phadadj() local 195 adj = sharpsl_param.phadadj; in lcdtg_set_phadadj() 196 adj = (adj < 0) ? PHACTRL_PHASE_MANUAL : in lcdtg_set_phadadj() 197 PHACTRL_PHASE_MANUAL | ((adj & 0xf) << 1); in lcdtg_set_phadadj() 202 adj = (DEFAULT_PHAD_QVGA << 1) | PHACTRL_PHASE_MANUAL; in lcdtg_set_phadadj() 206 corgi_ssp_lcdtg_send(lcd, PHACTRL_ADRS, adj); in lcdtg_set_phadadj()
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | en_clock.c | 123 u64 adj; in mlx4_en_phc_adjfreq() local 135 adj = mult; in mlx4_en_phc_adjfreq() 136 adj *= delta; in mlx4_en_phc_adjfreq() 137 diff = div_u64(adj, 1000000000ULL); in mlx4_en_phc_adjfreq()
|
/drivers/ptp/ |
D | ptp_ixp46x.c | 125 u64 adj; in ptp_ixp_adjfreq() local 136 adj = addend; in ptp_ixp_adjfreq() 137 adj *= ppb; in ptp_ixp_adjfreq() 138 diff = div_u64(adj, 1000000000ULL); in ptp_ixp_adjfreq()
|
D | ptp_qoriq.c | 197 u64 adj, diff; in ptp_qoriq_adjfine() local 208 adj = tmr_add; in ptp_qoriq_adjfine() 213 adj *= scaled_ppm; in ptp_qoriq_adjfine() 214 diff = div_u64(adj, 8000000); in ptp_qoriq_adjfine()
|
D | ptp_pch.c | 402 u64 adj; in ptp_pch_adjfreq() local 413 adj = addend; in ptp_pch_adjfreq() 414 adj *= ppb; in ptp_pch_adjfreq() 415 diff = div_u64(adj, 1000000000ULL); in ptp_pch_adjfreq()
|
/drivers/net/ethernet/intel/i40e/ |
D | i40e_ptp.c | 105 u64 adj, freq, diff; in i40e_ptp_adjfreq() local 118 adj = I40E_PTP_40GB_INCVAL - diff; in i40e_ptp_adjfreq() 120 adj = I40E_PTP_40GB_INCVAL + diff; in i40e_ptp_adjfreq() 130 adj *= READ_ONCE(pf->ptp_adj_mult); in i40e_ptp_adjfreq() 132 wr32(hw, I40E_PRTTSYN_INC_L, adj & 0xFFFFFFFF); in i40e_ptp_adjfreq() 133 wr32(hw, I40E_PRTTSYN_INC_H, adj >> 32); in i40e_ptp_adjfreq()
|
/drivers/gpu/drm/bridge/ |
D | sii902x.c | 351 const struct drm_display_mode *adj) in sii902x_bridge_mode_set() argument 357 u16 pixel_clock_10kHz = adj->clock / 10; in sii902x_bridge_mode_set() 362 buf[2] = adj->vrefresh; in sii902x_bridge_mode_set() 364 buf[4] = adj->hdisplay; in sii902x_bridge_mode_set() 365 buf[5] = adj->hdisplay >> 8; in sii902x_bridge_mode_set() 366 buf[6] = adj->vdisplay; in sii902x_bridge_mode_set() 367 buf[7] = adj->vdisplay >> 8; in sii902x_bridge_mode_set() 380 &sii902x->connector, adj); in sii902x_bridge_mode_set()
|
D | tc358767.c | 1277 struct drm_display_mode *adj) in tc_bridge_mode_fixup() argument 1280 adj->flags = mode->flags; in tc_bridge_mode_fixup() 1281 adj->flags |= (DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC); in tc_bridge_mode_fixup() 1282 adj->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC); in tc_bridge_mode_fixup() 1309 const struct drm_display_mode *adj) in tc_bridge_mode_set() argument
|
/drivers/net/wireless/mediatek/mt76/mt7603/ |
D | mac.c | 1580 u32 adj; in mt7603_adjust_sensitivity() local 1585 adj = 7 + (dev->sensitivity + 92) / 2; in mt7603_adjust_sensitivity() 1588 agc0 |= adj << 12; in mt7603_adjust_sensitivity() 1589 agc0 |= adj << 16; in mt7603_adjust_sensitivity() 1592 adj = 7 + (dev->sensitivity + 80) / 2; in mt7603_adjust_sensitivity() 1595 agc0 |= adj << 8; in mt7603_adjust_sensitivity() 1596 agc0 |= adj << 12; in mt7603_adjust_sensitivity() 1597 agc0 |= adj << 16; in mt7603_adjust_sensitivity() 1604 adj = 7 + (dev->sensitivity + 80) / 2; in mt7603_adjust_sensitivity() 1607 agc0 |= adj << 4; in mt7603_adjust_sensitivity() [all …]
|
/drivers/net/dsa/mv88e6xxx/ |
D | ptp.c | 205 u64 adj; in mv88e6xxx_ptp_adjfine() local 213 adj = ptp_ops->cc_mult_num; in mv88e6xxx_ptp_adjfine() 214 adj *= scaled_ppm; in mv88e6xxx_ptp_adjfine() 215 diff = div_u64(adj, ptp_ops->cc_mult_dem); in mv88e6xxx_ptp_adjfine()
|
/drivers/gpu/drm/i915/ |
D | i915_irq.c | 1176 int new_delay, adj, min, max; in gen6_pm_rps_work() local 1195 adj = rps->last_adj; in gen6_pm_rps_work() 1203 adj = 0; in gen6_pm_rps_work() 1205 if (adj > 0) in gen6_pm_rps_work() 1206 adj *= 2; in gen6_pm_rps_work() 1208 adj = IS_CHERRYVIEW(dev_priv) ? 2 : 1; in gen6_pm_rps_work() 1211 adj = 0; in gen6_pm_rps_work() 1213 adj = 0; in gen6_pm_rps_work() 1219 adj = 0; in gen6_pm_rps_work() 1221 if (adj < 0) in gen6_pm_rps_work() [all …]
|
/drivers/media/platform/ |
D | rcar_jpu.c | 913 struct jpu_q_data *src_q_data, *dst_q_data, *orig, adj, *ref; in jpu_streamon() local 920 adj = *src_q_data; in jpu_streamon() 925 adj = *dst_q_data; in jpu_streamon() 931 adj.format.width = ref->format.width; in jpu_streamon() 932 adj.format.height = ref->format.height; in jpu_streamon() 934 __jpu_try_fmt(ctx, NULL, &adj.format, adj_type); in jpu_streamon() 936 if (adj.format.width != orig->format.width || in jpu_streamon() 937 adj.format.height != orig->format.height) { in jpu_streamon()
|
/drivers/net/ethernet/ti/ |
D | cpts.c | 218 u64 adj; in cpts_ptp_adjfreq() local 229 adj = mult; in cpts_ptp_adjfreq() 230 adj *= ppb; in cpts_ptp_adjfreq() 231 diff = div_u64(adj, 1000000000ULL); in cpts_ptp_adjfreq()
|
/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
D | clock.c | 195 u64 adj; in mlx5_ptp_adjfreq() local 207 adj = clock->nominal_c_mult; in mlx5_ptp_adjfreq() 208 adj *= delta; in mlx5_ptp_adjfreq() 209 diff = div_u64(adj, 1000000000ULL); in mlx5_ptp_adjfreq()
|
/drivers/net/ethernet/mscc/ |
D | ocelot.c | 1925 u64 adj = 0; in ocelot_ptp_adjfine() local 1937 adj = PSEC_PER_SEC << 16; in ocelot_ptp_adjfine() 1938 do_div(adj, scaled_ppm); in ocelot_ptp_adjfine() 1939 do_div(adj, 1000); in ocelot_ptp_adjfine() 1942 if (adj >= (1L << 30)) { in ocelot_ptp_adjfine() 1944 do_div(adj, 1000); in ocelot_ptp_adjfine() 1948 if (adj >= (1L << 30)) in ocelot_ptp_adjfine() 1951 ocelot_write(ocelot, unit | adj, PTP_CLK_CFG_ADJ_FREQ); in ocelot_ptp_adjfine()
|