• Home
  • Raw
  • Download

Lines Matching refs:dt

212 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()
239 dev_dbg(dev, "tm_sec : %i\n", dt->tm_sec); in v3020_read_time()
240 dev_dbg(dev, "tm_year: %i\n", dt->tm_year); in v3020_read_time()
241 dev_dbg(dev, "tm_mon : %i\n", dt->tm_mon); in v3020_read_time()
242 dev_dbg(dev, "tm_mday: %i\n", dt->tm_mday); in v3020_read_time()
243 dev_dbg(dev, "tm_wday: %i\n", dt->tm_wday); in v3020_read_time()
249 static int v3020_set_time(struct device *dev, struct rtc_time *dt) in v3020_set_time() argument
254 dev_dbg(dev, "tm_sec : %i\n", dt->tm_sec); in v3020_set_time()
255 dev_dbg(dev, "tm_min : %i\n", dt->tm_min); in v3020_set_time()
256 dev_dbg(dev, "tm_hour: %i\n", dt->tm_hour); in v3020_set_time()
257 dev_dbg(dev, "tm_mday: %i\n", dt->tm_mday); in v3020_set_time()
258 dev_dbg(dev, "tm_wday: %i\n", dt->tm_wday); in v3020_set_time()
259 dev_dbg(dev, "tm_year: %i\n", dt->tm_year); in v3020_set_time()
262 v3020_set_reg(chip, V3020_SECONDS, bin2bcd(dt->tm_sec)); in v3020_set_time()
263 v3020_set_reg(chip, V3020_MINUTES, bin2bcd(dt->tm_min)); in v3020_set_time()
264 v3020_set_reg(chip, V3020_HOURS, bin2bcd(dt->tm_hour)); in v3020_set_time()
265 v3020_set_reg(chip, V3020_MONTH_DAY, bin2bcd(dt->tm_mday)); in v3020_set_time()
266 v3020_set_reg(chip, V3020_MONTH, bin2bcd(dt->tm_mon + 1)); in v3020_set_time()
267 v3020_set_reg(chip, V3020_WEEK_DAY, bin2bcd(dt->tm_wday)); in v3020_set_time()
268 v3020_set_reg(chip, V3020_YEAR, bin2bcd(dt->tm_year % 100)); in v3020_set_time()