Home
last modified time | relevance | path

Searched refs:dt (Results 1 – 25 of 70) sorted by relevance

123

/drivers/input/misc/
Dgp2ap002a00f.c42 static int gp2a_report(struct gp2a_data *dt) in gp2a_report() argument
44 int vo = gpio_get_value(dt->pdata->vout_gpio); in gp2a_report()
46 input_report_switch(dt->input, SW_FRONT_PROXIMITY, !vo); in gp2a_report()
47 input_sync(dt->input); in gp2a_report()
54 struct gp2a_data *dt = handle; in gp2a_irq() local
56 gp2a_report(dt); in gp2a_irq()
61 static int gp2a_enable(struct gp2a_data *dt) in gp2a_enable() argument
63 return i2c_smbus_write_byte_data(dt->i2c_client, GP2A_ADDR_OPMOD, in gp2a_enable()
67 static int gp2a_disable(struct gp2a_data *dt) in gp2a_disable() argument
69 return i2c_smbus_write_byte_data(dt->i2c_client, GP2A_ADDR_OPMOD, in gp2a_disable()
[all …]
/drivers/rtc/
Drtc-r9701.c71 static int r9701_get_datetime(struct device *dev, struct rtc_time *dt) in r9701_get_datetime() argument
81 memset(dt, 0, sizeof(*dt)); in r9701_get_datetime()
83 dt->tm_sec = bcd2bin(buf[0]); /* RSECCNT */ in r9701_get_datetime()
84 dt->tm_min = bcd2bin(buf[1]); /* RMINCNT */ in r9701_get_datetime()
85 dt->tm_hour = bcd2bin(buf[2]); /* RHRCNT */ in r9701_get_datetime()
87 dt->tm_mday = bcd2bin(buf[3]); /* RDAYCNT */ in r9701_get_datetime()
88 dt->tm_mon = bcd2bin(buf[4]) - 1; /* RMONCNT */ in r9701_get_datetime()
89 dt->tm_year = bcd2bin(buf[5]) + 100; /* RYRCNT */ in r9701_get_datetime()
95 return rtc_valid_tm(dt); in r9701_get_datetime()
98 static int r9701_set_datetime(struct device *dev, struct rtc_time *dt) in r9701_set_datetime() argument
[all …]
Drtc-max6902.c56 static int max6902_read_time(struct device *dev, struct rtc_time *dt) in max6902_read_time() argument
70 dt->tm_sec = bcd2bin(buf[0]); in max6902_read_time()
71 dt->tm_min = bcd2bin(buf[1]); in max6902_read_time()
72 dt->tm_hour = bcd2bin(buf[2]); in max6902_read_time()
73 dt->tm_mday = bcd2bin(buf[3]); in max6902_read_time()
74 dt->tm_mon = bcd2bin(buf[4]) - 1; in max6902_read_time()
75 dt->tm_wday = bcd2bin(buf[5]); in max6902_read_time()
76 dt->tm_year = bcd2bin(buf[6]); in max6902_read_time()
85 dt->tm_year += century; in max6902_read_time()
86 dt->tm_year -= 1900; in max6902_read_time()
[all …]
Drtc-max6916.c57 static int max6916_read_time(struct device *dev, struct rtc_time *dt) in max6916_read_time() argument
70 dt->tm_sec = bcd2bin(buf[0]); in max6916_read_time()
71 dt->tm_min = bcd2bin(buf[1]); in max6916_read_time()
72 dt->tm_hour = bcd2bin(buf[2] & 0x3F); in max6916_read_time()
73 dt->tm_mday = bcd2bin(buf[3]); in max6916_read_time()
74 dt->tm_mon = bcd2bin(buf[4]) - 1; in max6916_read_time()
75 dt->tm_wday = bcd2bin(buf[5]) - 1; in max6916_read_time()
76 dt->tm_year = bcd2bin(buf[6]) + 100; in max6916_read_time()
78 return rtc_valid_tm(dt); in max6916_read_time()
81 static int max6916_set_time(struct device *dev, struct rtc_time *dt) in max6916_set_time() argument
[all …]
Drtc-ds1347.c48 static int ds1347_read_time(struct device *dev, struct rtc_time *dt) in ds1347_read_time() argument
61 dt->tm_sec = bcd2bin(buf[0]); in ds1347_read_time()
62 dt->tm_min = bcd2bin(buf[1]); in ds1347_read_time()
63 dt->tm_hour = bcd2bin(buf[2] & 0x3F); in ds1347_read_time()
64 dt->tm_mday = bcd2bin(buf[3]); in ds1347_read_time()
65 dt->tm_mon = bcd2bin(buf[4]) - 1; in ds1347_read_time()
66 dt->tm_wday = bcd2bin(buf[5]) - 1; in ds1347_read_time()
67 dt->tm_year = bcd2bin(buf[6]) + 100; in ds1347_read_time()
69 return rtc_valid_tm(dt); in ds1347_read_time()
72 static int ds1347_set_time(struct device *dev, struct rtc_time *dt) in ds1347_set_time() argument
[all …]
Drtc-v3020.c212 static int v3020_read_time(struct device *dev, struct rtc_time *dt) in v3020_read_time() argument
222 dt->tm_sec = bcd2bin(tmp); in v3020_read_time()
224 dt->tm_min = bcd2bin(tmp); in v3020_read_time()
226 dt->tm_hour = bcd2bin(tmp); in v3020_read_time()
228 dt->tm_mday = bcd2bin(tmp); in v3020_read_time()
230 dt->tm_mon = bcd2bin(tmp) - 1; in v3020_read_time()
232 dt->tm_wday = bcd2bin(tmp); in v3020_read_time()
234 dt->tm_year = bcd2bin(tmp)+100; in v3020_read_time()
237 dev_dbg(dev, "tm_hour: %i\n", dt->tm_hour); in v3020_read_time()
238 dev_dbg(dev, "tm_min : %i\n", dt->tm_min); in v3020_read_time()
[all …]
Drtc-ds1390.c130 static int ds1390_read_time(struct device *dev, struct rtc_time *dt) in ds1390_read_time() argument
146 dt->tm_sec = bcd2bin(chip->txrx_buf[0]); in ds1390_read_time()
147 dt->tm_min = bcd2bin(chip->txrx_buf[1]); in ds1390_read_time()
148 dt->tm_hour = bcd2bin(chip->txrx_buf[2]); in ds1390_read_time()
149 dt->tm_wday = bcd2bin(chip->txrx_buf[3]); in ds1390_read_time()
150 dt->tm_mday = bcd2bin(chip->txrx_buf[4]); in ds1390_read_time()
152 dt->tm_mon = bcd2bin(chip->txrx_buf[5] & 0x7f) - 1; in ds1390_read_time()
154 dt->tm_year = bcd2bin(chip->txrx_buf[6]) + ((chip->txrx_buf[5] & 0x80) ? 100 : 0); in ds1390_read_time()
156 return rtc_valid_tm(dt); in ds1390_read_time()
159 static int ds1390_set_time(struct device *dev, struct rtc_time *dt) in ds1390_set_time() argument
[all …]
Drtc-rx8025.c182 static int rx8025_get_time(struct device *dev, struct rtc_time *dt) in rx8025_get_time() argument
201 dt->tm_sec = bcd2bin(date[RX8025_REG_SEC] & 0x7f); in rx8025_get_time()
202 dt->tm_min = bcd2bin(date[RX8025_REG_MIN] & 0x7f); in rx8025_get_time()
204 dt->tm_hour = bcd2bin(date[RX8025_REG_HOUR] & 0x3f); in rx8025_get_time()
206 dt->tm_hour = bcd2bin(date[RX8025_REG_HOUR] & 0x1f) % 12 in rx8025_get_time()
209 dt->tm_mday = bcd2bin(date[RX8025_REG_MDAY] & 0x3f); in rx8025_get_time()
210 dt->tm_mon = bcd2bin(date[RX8025_REG_MONTH] & 0x1f) - 1; in rx8025_get_time()
211 dt->tm_year = bcd2bin(date[RX8025_REG_YEAR]) + 100; in rx8025_get_time()
214 dt->tm_sec, dt->tm_min, dt->tm_hour, in rx8025_get_time()
215 dt->tm_mday, dt->tm_mon, dt->tm_year); in rx8025_get_time()
[all …]
Drtc-pcf8583.c52 static int pcf8583_get_datetime(struct i2c_client *client, struct rtc_time *dt) in pcf8583_get_datetime() argument
74 dt->tm_year = buf[4] >> 6; in pcf8583_get_datetime()
75 dt->tm_wday = buf[5] >> 5; in pcf8583_get_datetime()
80 dt->tm_sec = bcd2bin(buf[1]); in pcf8583_get_datetime()
81 dt->tm_min = bcd2bin(buf[2]); in pcf8583_get_datetime()
82 dt->tm_hour = bcd2bin(buf[3]); in pcf8583_get_datetime()
83 dt->tm_mday = bcd2bin(buf[4]); in pcf8583_get_datetime()
84 dt->tm_mon = bcd2bin(buf[5]) - 1; in pcf8583_get_datetime()
90 static int pcf8583_set_datetime(struct i2c_client *client, struct rtc_time *dt, int datetoo) in pcf8583_set_datetime() argument
98 buf[3] = bin2bcd(dt->tm_sec); in pcf8583_set_datetime()
[all …]
Drtc-rx8010.c107 static int rx8010_get_time(struct device *dev, struct rtc_time *dt) in rx8010_get_time() argument
128 dt->tm_sec = bcd2bin(date[RX8010_SEC - RX8010_SEC] & 0x7f); in rx8010_get_time()
129 dt->tm_min = bcd2bin(date[RX8010_MIN - RX8010_SEC] & 0x7f); in rx8010_get_time()
130 dt->tm_hour = bcd2bin(date[RX8010_HOUR - RX8010_SEC] & 0x3f); in rx8010_get_time()
131 dt->tm_mday = bcd2bin(date[RX8010_MDAY - RX8010_SEC] & 0x3f); in rx8010_get_time()
132 dt->tm_mon = bcd2bin(date[RX8010_MONTH - RX8010_SEC] & 0x1f) - 1; in rx8010_get_time()
133 dt->tm_year = bcd2bin(date[RX8010_YEAR - RX8010_SEC]) + 100; in rx8010_get_time()
134 dt->tm_wday = ffs(date[RX8010_WDAY - RX8010_SEC] & 0x7f); in rx8010_get_time()
136 return rtc_valid_tm(dt); in rx8010_get_time()
139 static int rx8010_set_time(struct device *dev, struct rtc_time *dt) in rx8010_set_time() argument
[all …]
Drtc-ds1343.c371 static int ds1343_read_time(struct device *dev, struct rtc_time *dt) in ds1343_read_time() argument
381 dt->tm_sec = bcd2bin(buf[0]); in ds1343_read_time()
382 dt->tm_min = bcd2bin(buf[1]); in ds1343_read_time()
383 dt->tm_hour = bcd2bin(buf[2] & 0x3F); in ds1343_read_time()
384 dt->tm_wday = bcd2bin(buf[3]) - 1; in ds1343_read_time()
385 dt->tm_mday = bcd2bin(buf[4]); in ds1343_read_time()
386 dt->tm_mon = bcd2bin(buf[5] & 0x1F) - 1; in ds1343_read_time()
387 dt->tm_year = bcd2bin(buf[6]) + 100; /* year offset from 1900 */ in ds1343_read_time()
389 return rtc_valid_tm(dt); in ds1343_read_time()
392 static int ds1343_set_time(struct device *dev, struct rtc_time *dt) in ds1343_set_time() argument
[all …]
/drivers/video/
Dof_display_timing.c60 struct display_timing *dt) in of_parse_display_timing() argument
65 memset(dt, 0, sizeof(*dt)); in of_parse_display_timing()
67 ret |= parse_timing_property(np, "hback-porch", &dt->hback_porch); in of_parse_display_timing()
68 ret |= parse_timing_property(np, "hfront-porch", &dt->hfront_porch); in of_parse_display_timing()
69 ret |= parse_timing_property(np, "hactive", &dt->hactive); in of_parse_display_timing()
70 ret |= parse_timing_property(np, "hsync-len", &dt->hsync_len); in of_parse_display_timing()
71 ret |= parse_timing_property(np, "vback-porch", &dt->vback_porch); in of_parse_display_timing()
72 ret |= parse_timing_property(np, "vfront-porch", &dt->vfront_porch); in of_parse_display_timing()
73 ret |= parse_timing_property(np, "vactive", &dt->vactive); in of_parse_display_timing()
74 ret |= parse_timing_property(np, "vsync-len", &dt->vsync_len); in of_parse_display_timing()
[all …]
Dvideomode.c14 void videomode_from_timing(const struct display_timing *dt, in videomode_from_timing() argument
17 vm->pixelclock = dt->pixelclock.typ; in videomode_from_timing()
18 vm->hactive = dt->hactive.typ; in videomode_from_timing()
19 vm->hfront_porch = dt->hfront_porch.typ; in videomode_from_timing()
20 vm->hback_porch = dt->hback_porch.typ; in videomode_from_timing()
21 vm->hsync_len = dt->hsync_len.typ; in videomode_from_timing()
23 vm->vactive = dt->vactive.typ; in videomode_from_timing()
24 vm->vfront_porch = dt->vfront_porch.typ; in videomode_from_timing()
25 vm->vback_porch = dt->vback_porch.typ; in videomode_from_timing()
26 vm->vsync_len = dt->vsync_len.typ; in videomode_from_timing()
[all …]
/drivers/iio/
Dindustrialio-sw-device.c71 void iio_unregister_sw_device_type(struct iio_sw_device_type *dt) in iio_unregister_sw_device_type() argument
76 iter = __iio_find_sw_device_type(dt->name, strlen(dt->name)); in iio_unregister_sw_device_type()
78 list_del(&dt->list); in iio_unregister_sw_device_type()
81 configfs_unregister_default_group(dt->group); in iio_unregister_sw_device_type()
88 struct iio_sw_device_type *dt; in iio_get_sw_device_type() local
91 dt = __iio_find_sw_device_type(name, strlen(name)); in iio_get_sw_device_type()
92 if (dt && !try_module_get(dt->owner)) in iio_get_sw_device_type()
93 dt = NULL; in iio_get_sw_device_type()
96 return dt; in iio_get_sw_device_type()
102 struct iio_sw_device_type *dt; in iio_sw_device_create() local
[all …]
/drivers/mtd/nand/
Ddenali_dt.c45 struct denali_dt *dt; in denali_dt_probe() local
58 dt = devm_kzalloc(&ofdev->dev, sizeof(*dt), GFP_KERNEL); in denali_dt_probe()
59 if (!dt) in denali_dt_probe()
61 denali = &dt->denali; in denali_dt_probe()
88 dt->clk = devm_clk_get(&ofdev->dev, NULL); in denali_dt_probe()
89 if (IS_ERR(dt->clk)) { in denali_dt_probe()
91 return PTR_ERR(dt->clk); in denali_dt_probe()
93 clk_prepare_enable(dt->clk); in denali_dt_probe()
99 platform_set_drvdata(ofdev, dt); in denali_dt_probe()
103 clk_disable_unprepare(dt->clk); in denali_dt_probe()
[all …]
/drivers/bus/
Darm-ccn.c149 struct arm_ccn_dt, pmu), struct arm_ccn, dt)
189 struct arm_ccn_dt dt; member
471 return &ccn->dt.cmp_mask[i].l; in arm_ccn_pmu_get_cmp_mask()
473 return &ccn->dt.cmp_mask[i].h; in arm_ccn_pmu_get_cmp_mask()
561 return cpumap_print_to_pagebuf(true, buf, &ccn->dt.cpu); in arm_ccn_pmu_cpumask_show()
657 ccn->dt.pmu_counters_mask)) in arm_ccn_pmu_event_alloc()
661 ccn->dt.pmu_counters[CCN_IDX_PMU_CYCLE_COUNTER].event = event; in arm_ccn_pmu_event_alloc()
667 hw->idx = arm_ccn_pmu_alloc_bit(ccn->dt.pmu_counters_mask, in arm_ccn_pmu_event_alloc()
678 ccn->dt.pmu_counters[hw->idx].source = source; in arm_ccn_pmu_event_alloc()
690 clear_bit(hw->idx, ccn->dt.pmu_counters_mask); in arm_ccn_pmu_event_alloc()
[all …]
/drivers/clocksource/
Dtimer-digicolor.c73 struct digicolor_timer *dt = dc_timer(ce); in dc_timer_disable() local
74 writeb(CONTROL_DISABLE, dt->base + CONTROL(dt->timer_id)); in dc_timer_disable()
79 struct digicolor_timer *dt = dc_timer(ce); in dc_timer_enable() local
80 writeb(CONTROL_ENABLE | mode, dt->base + CONTROL(dt->timer_id)); in dc_timer_enable()
86 struct digicolor_timer *dt = dc_timer(ce); in dc_timer_set_count() local
87 writel(count, dt->base + COUNT(dt->timer_id)); in dc_timer_set_count()
105 struct digicolor_timer *dt = dc_timer(ce); in digicolor_clkevt_set_periodic() local
108 dc_timer_set_count(ce, dt->ticks_per_jiffy); in digicolor_clkevt_set_periodic()
/drivers/block/drbd/
Ddrbd_proc.c116 unsigned long db, dt, dbdt, rt, rs_total, rs_left; in drbd_syncer_progress() local
165 dt = (jiffies - device->rs_mark_time[i]) / HZ; in drbd_syncer_progress()
166 if (dt > 180) in drbd_syncer_progress()
169 if (!dt) in drbd_syncer_progress()
170 dt++; in drbd_syncer_progress()
172 rt = (dt * (rs_left / (db/100+1)))/100; /* seconds */ in drbd_syncer_progress()
177 dbdt = Bit2KB(db/dt); in drbd_syncer_progress()
185 dt = (jiffies - device->rs_mark_time[i]) / HZ; in drbd_syncer_progress()
186 if (!dt) in drbd_syncer_progress()
187 dt++; in drbd_syncer_progress()
[all …]
/drivers/macintosh/
Dvia-pmu-led.c84 struct device_node *dt; in via_pmu_led_init() local
91 dt = of_find_node_by_path("/"); in via_pmu_led_init()
92 if (dt == NULL) in via_pmu_led_init()
94 model = of_get_property(dt, "model", NULL); in via_pmu_led_init()
96 of_node_put(dt); in via_pmu_led_init()
103 of_node_put(dt); in via_pmu_led_init()
107 of_node_put(dt); in via_pmu_led_init()
/drivers/iio/pressure/
Dms5611_core.c129 s64 off, sens, dt; in ms5611_temp_and_pressure_compensate() local
131 dt = t - (chip_info->prom[5] << 8); in ms5611_temp_and_pressure_compensate()
132 off = ((s64)chip_info->prom[2] << 16) + ((chip_info->prom[4] * dt) >> 7); in ms5611_temp_and_pressure_compensate()
133 sens = ((s64)chip_info->prom[1] << 15) + ((chip_info->prom[3] * dt) >> 8); in ms5611_temp_and_pressure_compensate()
135 t = 2000 + ((chip_info->prom[6] * dt) >> 23); in ms5611_temp_and_pressure_compensate()
139 t2 = (dt * dt) >> 31; in ms5611_temp_and_pressure_compensate()
165 s64 off, sens, dt; in ms5607_temp_and_pressure_compensate() local
167 dt = t - (chip_info->prom[5] << 8); in ms5607_temp_and_pressure_compensate()
168 off = ((s64)chip_info->prom[2] << 17) + ((chip_info->prom[4] * dt) >> 6); in ms5607_temp_and_pressure_compensate()
169 sens = ((s64)chip_info->prom[1] << 16) + ((chip_info->prom[3] * dt) >> 7); in ms5607_temp_and_pressure_compensate()
[all …]
/drivers/edac/
Dsynopsys_edac.c268 enum dev_type dt; in synps_edac_get_dtype() local
276 dt = DEV_X2; in synps_edac_get_dtype()
279 dt = DEV_X4; in synps_edac_get_dtype()
282 dt = DEV_UNKNOWN; in synps_edac_get_dtype()
285 return dt; in synps_edac_get_dtype()
298 enum dev_type dt; in synps_edac_get_eccstate() local
302 dt = synps_edac_get_dtype(base); in synps_edac_get_eccstate()
303 if (dt == DEV_UNKNOWN) in synps_edac_get_eccstate()
307 if ((ecctype == SCRUB_MODE_SECDED) && (dt == DEV_X2)) in synps_edac_get_eccstate()
/drivers/staging/i4l/pcbit/
Dlayer2.h173 static __inline__ void pcbit_writeb(struct pcbit_dev *dev, unsigned char dt) in pcbit_writeb() argument
175 writeb(dt, dev->writeptr++); in pcbit_writeb()
180 static __inline__ void pcbit_writew(struct pcbit_dev *dev, unsigned short dt) in pcbit_writew() argument
187 writew(dt, dev->writeptr); in pcbit_writew()
191 writeb((u_char) (dt & 0x00ffU), dev->writeptr); in pcbit_writew()
193 writeb((u_char) (dt >> 8), dev->writeptr++); in pcbit_writew()
196 writew(dt, dev->writeptr); in pcbit_writew()
/drivers/iio/common/ms_sensors/
Dms_sensors_i2c.c579 s32 dt, temp; in ms_sensors_read_temp_and_pressure() local
607 dt = (s32)t_adc - (prom[5] << 8); in ms_sensors_read_temp_and_pressure()
610 temp = 2000 + (((s64)dt * prom[6]) >> 23); in ms_sensors_read_temp_and_pressure()
616 t2 = (3 * ((s64)dt * (s64)dt)) >> 33; in ms_sensors_read_temp_and_pressure()
627 t2 = (5 * ((s64)dt * (s64)dt)) >> 38; in ms_sensors_read_temp_and_pressure()
633 off = (((s64)prom[2]) << 17) + ((((s64)prom[4]) * (s64)dt) >> 6); in ms_sensors_read_temp_and_pressure()
637 sens = (((s64)prom[1]) << 16) + (((s64)prom[3] * dt) >> 7); in ms_sensors_read_temp_and_pressure()
/drivers/gpu/drm/nouveau/nvkm/subdev/fb/
Dgddr5.c38 int WL, CL, WR, at[2], dt, ds; in nvkm_gddr5_calc() local
63 dt = ram->next->bios.timing_20_2e_03; in nvkm_gddr5_calc()
83 ram->mr[1] |= (dt & 0x03) << 2; in nvkm_gddr5_calc()
/drivers/scsi/
Dch.c112 struct scsi_device **dt; /* ptrs to data transfer elements */ member
359 ch->dt = kcalloc(ch->counts[CHET_DT], sizeof(*ch->dt), in ch_readconfig()
362 if (!ch->dt) { in ch_readconfig()
383 ch->dt[elem] = NULL; in ch_readconfig()
386 ch->dt[elem] = NULL; in ch_readconfig()
396 ch->dt[elem] = in ch_readconfig()
400 if (!ch->dt[elem]) { in ch_readconfig()
405 ch->dt[elem]->vendor, in ch_readconfig()
406 ch->dt[elem]->model, in ch_readconfig()
407 ch->dt[elem]->rev); in ch_readconfig()
[all …]

123