/linux-6.1.9/arch/m68k/sun3x/ |
D | time.c | 50 h->sec = bin2bcd(t->tm_sec); in sun3x_hwclk() 51 h->min = bin2bcd(t->tm_min); in sun3x_hwclk() 52 h->hour = bin2bcd(t->tm_hour); in sun3x_hwclk() 53 h->wday = bin2bcd(t->tm_wday); in sun3x_hwclk() 54 h->mday = bin2bcd(t->tm_mday); in sun3x_hwclk() 55 h->month = bin2bcd(t->tm_mon + 1); in sun3x_hwclk() 56 h->year = bin2bcd(t->tm_year % 100); in sun3x_hwclk()
|
/linux-6.1.9/drivers/rtc/ |
D | rtc-ds1347.c | 101 buf[0] = bin2bcd(dt->tm_sec); in ds1347_set_time() 102 buf[1] = bin2bcd(dt->tm_min); in ds1347_set_time() 103 buf[2] = (bin2bcd(dt->tm_hour) & 0x3F); in ds1347_set_time() 104 buf[3] = bin2bcd(dt->tm_mday); in ds1347_set_time() 105 buf[4] = bin2bcd(dt->tm_mon + 1); in ds1347_set_time() 106 buf[5] = bin2bcd(dt->tm_wday + 1); in ds1347_set_time() 107 buf[6] = bin2bcd(dt->tm_year % 100); in ds1347_set_time() 108 buf[7] = bin2bcd(0x00); in ds1347_set_time() 115 err = regmap_write(map, DS1347_CENTURY_REG, bin2bcd(century)); in ds1347_set_time()
|
D | rtc-max6902.c | 94 max6902_set_reg(dev, MAX6902_REG_SECONDS, bin2bcd(dt->tm_sec)); in max6902_set_time() 95 max6902_set_reg(dev, MAX6902_REG_MINUTES, bin2bcd(dt->tm_min)); in max6902_set_time() 96 max6902_set_reg(dev, MAX6902_REG_HOURS, bin2bcd(dt->tm_hour)); in max6902_set_time() 98 max6902_set_reg(dev, MAX6902_REG_DATE, bin2bcd(dt->tm_mday)); in max6902_set_time() 99 max6902_set_reg(dev, MAX6902_REG_MONTH, bin2bcd(dt->tm_mon + 1)); in max6902_set_time() 100 max6902_set_reg(dev, MAX6902_REG_DAY, bin2bcd(dt->tm_wday)); in max6902_set_time() 101 max6902_set_reg(dev, MAX6902_REG_YEAR, bin2bcd(dt->tm_year % 100)); in max6902_set_time() 102 max6902_set_reg(dev, MAX6902_REG_CENTURY, bin2bcd(dt->tm_year / 100)); in max6902_set_time()
|
D | rtc-max6916.c | 89 buf[1] = bin2bcd(dt->tm_sec); in max6916_set_time() 90 buf[2] = bin2bcd(dt->tm_min); in max6916_set_time() 91 buf[3] = (bin2bcd(dt->tm_hour) & 0X3F); in max6916_set_time() 92 buf[4] = bin2bcd(dt->tm_mday); in max6916_set_time() 93 buf[5] = bin2bcd(dt->tm_mon + 1); in max6916_set_time() 94 buf[6] = bin2bcd(dt->tm_wday + 1); in max6916_set_time() 95 buf[7] = bin2bcd(dt->tm_year % 100); in max6916_set_time() 96 buf[8] = bin2bcd(0x00); in max6916_set_time()
|
D | rtc-rc5t583.c | 89 rtc_data[0] = bin2bcd(tm->tm_sec); in rc5t583_rtc_set_time() 90 rtc_data[1] = bin2bcd(tm->tm_min); in rc5t583_rtc_set_time() 91 rtc_data[2] = bin2bcd(tm->tm_hour); in rc5t583_rtc_set_time() 92 rtc_data[3] = bin2bcd(tm->tm_wday); in rc5t583_rtc_set_time() 93 rtc_data[4] = bin2bcd(tm->tm_mday); in rc5t583_rtc_set_time() 94 rtc_data[5] = bin2bcd(tm->tm_mon + 1); in rc5t583_rtc_set_time() 95 rtc_data[6] = bin2bcd(tm->tm_year - 100); in rc5t583_rtc_set_time() 149 alarm_data[0] = bin2bcd(alm->time.tm_min); in rc5t583_rtc_set_alarm() 150 alarm_data[1] = bin2bcd(alm->time.tm_hour); in rc5t583_rtc_set_alarm() 151 alarm_data[2] = bin2bcd(alm->time.tm_mday); in rc5t583_rtc_set_alarm() [all …]
|
D | rtc-mv.c | 52 rtc_reg = (bin2bcd(tm->tm_sec) << RTC_SECONDS_OFFS) | in mv_rtc_set_time() 53 (bin2bcd(tm->tm_min) << RTC_MINUTES_OFFS) | in mv_rtc_set_time() 54 (bin2bcd(tm->tm_hour) << RTC_HOURS_OFFS) | in mv_rtc_set_time() 55 (bin2bcd(tm->tm_wday) << RTC_WDAY_OFFS); in mv_rtc_set_time() 58 rtc_reg = (bin2bcd(tm->tm_mday) << RTC_MDAY_OFFS) | in mv_rtc_set_time() 59 (bin2bcd(tm->tm_mon + 1) << RTC_MONTH_OFFS) | in mv_rtc_set_time() 60 (bin2bcd(tm->tm_year - 100) << RTC_YEAR_OFFS); in mv_rtc_set_time() 137 rtc_reg |= (RTC_ALARM_VALID | bin2bcd(alm->time.tm_sec)) in mv_rtc_set_alarm() 140 rtc_reg |= (RTC_ALARM_VALID | bin2bcd(alm->time.tm_min)) in mv_rtc_set_alarm() 143 rtc_reg |= (RTC_ALARM_VALID | bin2bcd(alm->time.tm_hour)) in mv_rtc_set_alarm() [all …]
|
D | rtc-wilco-ec.c | 139 rtc.century = bin2bcd(year / 100); in wilco_ec_rtc_write() 140 rtc.year = bin2bcd(year % 100); in wilco_ec_rtc_write() 141 rtc.month = bin2bcd(tm->tm_mon + 1); in wilco_ec_rtc_write() 142 rtc.day = bin2bcd(tm->tm_mday); in wilco_ec_rtc_write() 143 rtc.hour = bin2bcd(tm->tm_hour); in wilco_ec_rtc_write() 144 rtc.minute = bin2bcd(tm->tm_min); in wilco_ec_rtc_write() 145 rtc.second = bin2bcd(tm->tm_sec); in wilco_ec_rtc_write() 146 rtc.weekday = bin2bcd(wday); in wilco_ec_rtc_write()
|
D | rtc-rc5t619.c | 59 return bin2bcd(hour); in rtc5t619_12hour_bin2bcd() 64 return bin2bcd(hour - 12) | HOUR_PMFLAG; in rtc5t619_12hour_bin2bcd() 187 buff[0] = bin2bcd(tm->tm_sec); in rc5t619_rtc_set_time() 188 buff[1] = bin2bcd(tm->tm_min); in rc5t619_rtc_set_time() 191 buff[2] = bin2bcd(tm->tm_hour); in rc5t619_rtc_set_time() 195 buff[3] = bin2bcd(tm->tm_wday); in rc5t619_rtc_set_time() 196 buff[4] = bin2bcd(tm->tm_mday); in rc5t619_rtc_set_time() 197 buff[5] = bin2bcd(tm->tm_mon + 1); /* system set 0-11 */ in rc5t619_rtc_set_time() 198 buff[6] = bin2bcd(tm->tm_year - cent_flag * 100); in rc5t619_rtc_set_time() 300 buff[0] = bin2bcd(alrm->time.tm_sec); in rc5t619_rtc_set_alarm() [all …]
|
D | rtc-vt8500.c | 125 writel((bin2bcd(tm->tm_year % 100) << DATE_YEAR_S) in vt8500_rtc_set_time() 126 | (bin2bcd(tm->tm_mon + 1) << DATE_MONTH_S) in vt8500_rtc_set_time() 127 | (bin2bcd(tm->tm_mday)) in vt8500_rtc_set_time() 130 writel((bin2bcd(tm->tm_wday) << TIME_DOW_S) in vt8500_rtc_set_time() 131 | (bin2bcd(tm->tm_hour) << TIME_HOUR_S) in vt8500_rtc_set_time() 132 | (bin2bcd(tm->tm_min) << TIME_MIN_S) in vt8500_rtc_set_time() 133 | (bin2bcd(tm->tm_sec)), in vt8500_rtc_set_time() 163 | (bin2bcd(alrm->time.tm_mday) << ALARM_DAY_S) in vt8500_rtc_set_alarm() 164 | (bin2bcd(alrm->time.tm_hour) << TIME_HOUR_S) in vt8500_rtc_set_alarm() 165 | (bin2bcd(alrm->time.tm_min) << TIME_MIN_S) in vt8500_rtc_set_alarm() [all …]
|
D | rtc-em3027.c | 92 buf[1] = bin2bcd(tm->tm_sec); in em3027_set_time() 93 buf[2] = bin2bcd(tm->tm_min); in em3027_set_time() 94 buf[3] = bin2bcd(tm->tm_hour); in em3027_set_time() 95 buf[4] = bin2bcd(tm->tm_mday); in em3027_set_time() 96 buf[5] = bin2bcd(tm->tm_wday); in em3027_set_time() 97 buf[6] = bin2bcd(tm->tm_mon + 1); in em3027_set_time() 98 buf[7] = bin2bcd(tm->tm_year % 100); in em3027_set_time()
|
D | rtc-palmas.c | 72 rtc_data[0] = bin2bcd(tm->tm_sec); in palmas_rtc_set_time() 73 rtc_data[1] = bin2bcd(tm->tm_min); in palmas_rtc_set_time() 74 rtc_data[2] = bin2bcd(tm->tm_hour); in palmas_rtc_set_time() 75 rtc_data[3] = bin2bcd(tm->tm_mday); in palmas_rtc_set_time() 76 rtc_data[4] = bin2bcd(tm->tm_mon + 1); in palmas_rtc_set_time() 77 rtc_data[5] = bin2bcd(tm->tm_year - 100); in palmas_rtc_set_time() 158 alarm_data[0] = bin2bcd(alm->time.tm_sec); in palmas_rtc_set_alarm() 159 alarm_data[1] = bin2bcd(alm->time.tm_min); in palmas_rtc_set_alarm() 160 alarm_data[2] = bin2bcd(alm->time.tm_hour); in palmas_rtc_set_alarm() 161 alarm_data[3] = bin2bcd(alm->time.tm_mday); in palmas_rtc_set_alarm() [all …]
|
D | rtc-max6900.c | 177 regs[MAX6900_REG_SC] = bin2bcd(tm->tm_sec); in max6900_rtc_set_time() 178 regs[MAX6900_REG_MN] = bin2bcd(tm->tm_min); in max6900_rtc_set_time() 179 regs[MAX6900_REG_HR] = bin2bcd(tm->tm_hour); in max6900_rtc_set_time() 180 regs[MAX6900_REG_DT] = bin2bcd(tm->tm_mday); in max6900_rtc_set_time() 181 regs[MAX6900_REG_MO] = bin2bcd(tm->tm_mon + 1); in max6900_rtc_set_time() 182 regs[MAX6900_REG_DW] = bin2bcd(tm->tm_wday); in max6900_rtc_set_time() 183 regs[MAX6900_REG_YR] = bin2bcd(tm->tm_year % 100); in max6900_rtc_set_time() 184 regs[MAX6900_REG_CENTURY] = bin2bcd((tm->tm_year + 1900) / 100); in max6900_rtc_set_time()
|
D | rtc-rs5c348.c | 85 txp[RS5C348_REG_SECS] = bin2bcd(tm->tm_sec); in rs5c348_rtc_set_time() 86 txp[RS5C348_REG_MINS] = bin2bcd(tm->tm_min); in rs5c348_rtc_set_time() 88 txp[RS5C348_REG_HOURS] = bin2bcd(tm->tm_hour); in rs5c348_rtc_set_time() 91 txp[RS5C348_REG_HOURS] = bin2bcd((tm->tm_hour + 11) % 12 + 1) | in rs5c348_rtc_set_time() 94 txp[RS5C348_REG_WDAY] = bin2bcd(tm->tm_wday); in rs5c348_rtc_set_time() 95 txp[RS5C348_REG_DAY] = bin2bcd(tm->tm_mday); in rs5c348_rtc_set_time() 96 txp[RS5C348_REG_MONTH] = bin2bcd(tm->tm_mon + 1) | in rs5c348_rtc_set_time() 98 txp[RS5C348_REG_YEAR] = bin2bcd(tm->tm_year % 100); in rs5c348_rtc_set_time()
|
D | rtc-m41t94.c | 41 buf[M41T94_REG_SECONDS] = bin2bcd(tm->tm_sec); in m41t94_set_time() 42 buf[M41T94_REG_MINUTES] = bin2bcd(tm->tm_min); in m41t94_set_time() 43 buf[M41T94_REG_HOURS] = bin2bcd(tm->tm_hour); in m41t94_set_time() 44 buf[M41T94_REG_WDAY] = bin2bcd(tm->tm_wday + 1); in m41t94_set_time() 45 buf[M41T94_REG_DAY] = bin2bcd(tm->tm_mday); in m41t94_set_time() 46 buf[M41T94_REG_MONTH] = bin2bcd(tm->tm_mon + 1); in m41t94_set_time() 51 buf[M41T94_REG_YEAR] = bin2bcd(tm->tm_year % 100); in m41t94_set_time()
|
D | rtc-mcp795.c | 200 data[0] = (data[0] & 0x80) | bin2bcd(tim->tm_sec); in mcp795_set_time() 201 data[1] = (data[1] & 0x80) | bin2bcd(tim->tm_min); in mcp795_set_time() 202 data[2] = bin2bcd(tim->tm_hour); in mcp795_set_time() 203 data[3] = (data[3] & 0xF8) | bin2bcd(tim->tm_wday + 1); in mcp795_set_time() 204 data[4] = bin2bcd(tim->tm_mday); in mcp795_set_time() 205 data[5] = (data[5] & MCP795_LP_BIT) | bin2bcd(tim->tm_mon + 1); in mcp795_set_time() 210 data[6] = bin2bcd(tim->tm_year); in mcp795_set_time() 294 tmp[0] = (tmp[0] & 0x80) | bin2bcd(alm->time.tm_sec); in mcp795_set_alarm() 295 tmp[1] = (tmp[1] & 0x80) | bin2bcd(alm->time.tm_min); in mcp795_set_alarm() 296 tmp[2] = (tmp[2] & 0xE0) | bin2bcd(alm->time.tm_hour); in mcp795_set_alarm() [all …]
|
D | rtc-ds1511.c | 146 rtc_write(bin2bcd(deciseconds % 100), DS1511_WD_MSEC); in ds1511_wdog_set() 147 rtc_write(bin2bcd(deciseconds / 100), DS1511_WD_SEC); in ds1511_wdog_set() 209 sec = bin2bcd(sec) & 0x7f; in ds1511_rtc_set_time() 210 min = bin2bcd(min) & 0x7f; in ds1511_rtc_set_time() 211 hrs = bin2bcd(hrs) & 0x3f; in ds1511_rtc_set_time() 212 day = bin2bcd(day) & 0x3f; in ds1511_rtc_set_time() 213 mon = bin2bcd(mon) & 0x1f; in ds1511_rtc_set_time() 214 yrs = bin2bcd(yrs) & 0xff; in ds1511_rtc_set_time() 215 cen = bin2bcd(cen) & 0xff; in ds1511_rtc_set_time() 289 0x80 : bin2bcd(pdata->alrm_mday) & 0x3f, in ds1511_rtc_update_alarm() [all …]
|
D | rtc-ds1553.c | 77 century = bin2bcd((tm->tm_year + 1900) / 100); in ds1553_rtc_set_time() 81 writeb(bin2bcd(tm->tm_year % 100), ioaddr + RTC_YEAR); in ds1553_rtc_set_time() 82 writeb(bin2bcd(tm->tm_mon + 1), ioaddr + RTC_MONTH); in ds1553_rtc_set_time() 83 writeb(bin2bcd(tm->tm_wday) & RTC_DAY_MASK, ioaddr + RTC_DAY); in ds1553_rtc_set_time() 84 writeb(bin2bcd(tm->tm_mday), ioaddr + RTC_DATE); in ds1553_rtc_set_time() 85 writeb(bin2bcd(tm->tm_hour), ioaddr + RTC_HOURS); in ds1553_rtc_set_time() 86 writeb(bin2bcd(tm->tm_min), ioaddr + RTC_MINUTES); in ds1553_rtc_set_time() 87 writeb(bin2bcd(tm->tm_sec) & RTC_SECONDS_MASK, ioaddr + RTC_SECONDS); in ds1553_rtc_set_time() 135 0x80 : bin2bcd(pdata->alrm_mday), in ds1553_rtc_update_alarm() 138 0x80 : bin2bcd(pdata->alrm_hour), in ds1553_rtc_update_alarm() [all …]
|
D | rtc-rk808.c | 157 rtc_data[0] = bin2bcd(tm->tm_sec); in rk808_rtc_set_time() 158 rtc_data[1] = bin2bcd(tm->tm_min); in rk808_rtc_set_time() 159 rtc_data[2] = bin2bcd(tm->tm_hour); in rk808_rtc_set_time() 160 rtc_data[3] = bin2bcd(tm->tm_mday); in rk808_rtc_set_time() 161 rtc_data[4] = bin2bcd(tm->tm_mon + 1); in rk808_rtc_set_time() 162 rtc_data[5] = bin2bcd(tm->tm_year - 100); in rk808_rtc_set_time() 163 rtc_data[6] = bin2bcd(tm->tm_wday); in rk808_rtc_set_time() 268 alrm_data[0] = bin2bcd(alrm->time.tm_sec); in rk808_rtc_setalarm() 269 alrm_data[1] = bin2bcd(alrm->time.tm_min); in rk808_rtc_setalarm() 270 alrm_data[2] = bin2bcd(alrm->time.tm_hour); in rk808_rtc_setalarm() [all …]
|
D | rtc-r9701.c | 93 ret = write_reg(dev, RHRCNT, bin2bcd(dt->tm_hour)); in r9701_set_datetime() 94 ret = ret ? ret : write_reg(dev, RMINCNT, bin2bcd(dt->tm_min)); in r9701_set_datetime() 95 ret = ret ? ret : write_reg(dev, RSECCNT, bin2bcd(dt->tm_sec)); in r9701_set_datetime() 96 ret = ret ? ret : write_reg(dev, RDAYCNT, bin2bcd(dt->tm_mday)); in r9701_set_datetime() 97 ret = ret ? ret : write_reg(dev, RMONCNT, bin2bcd(dt->tm_mon + 1)); in r9701_set_datetime() 98 ret = ret ? ret : write_reg(dev, RYRCNT, bin2bcd(dt->tm_year - 100)); in r9701_set_datetime()
|
D | rtc-tps65910.c | 105 rtc_data[0] = bin2bcd(tm->tm_sec); in tps65910_rtc_set_time() 106 rtc_data[1] = bin2bcd(tm->tm_min); in tps65910_rtc_set_time() 107 rtc_data[2] = bin2bcd(tm->tm_hour); in tps65910_rtc_set_time() 108 rtc_data[3] = bin2bcd(tm->tm_mday); in tps65910_rtc_set_time() 109 rtc_data[4] = bin2bcd(tm->tm_mon + 1); in tps65910_rtc_set_time() 110 rtc_data[5] = bin2bcd(tm->tm_year - 100); in tps65910_rtc_set_time() 181 alarm_data[0] = bin2bcd(alm->time.tm_sec); in tps65910_rtc_set_alarm() 182 alarm_data[1] = bin2bcd(alm->time.tm_min); in tps65910_rtc_set_alarm() 183 alarm_data[2] = bin2bcd(alm->time.tm_hour); in tps65910_rtc_set_alarm() 184 alarm_data[3] = bin2bcd(alm->time.tm_mday); in tps65910_rtc_set_alarm() [all …]
|
/linux-6.1.9/arch/m68k/bvme6000/ |
D | rtc.c | 113 rtc->bcd_sec = bin2bcd(sec); in rtc_ioctl() 114 rtc->bcd_min = bin2bcd(min); in rtc_ioctl() 115 rtc->bcd_hr = bin2bcd(hrs); in rtc_ioctl() 116 rtc->bcd_dom = bin2bcd(day); in rtc_ioctl() 117 rtc->bcd_mth = bin2bcd(mon); in rtc_ioctl() 118 rtc->bcd_year = bin2bcd(yrs%100); in rtc_ioctl() 120 rtc->bcd_dow = bin2bcd(rtc_tm.tm_wday+1); in rtc_ioctl()
|
/linux-6.1.9/arch/m68k/mvme16x/ |
D | rtc.c | 104 rtc->bcd_sec = bin2bcd(sec); in rtc_ioctl() 105 rtc->bcd_min = bin2bcd(min); in rtc_ioctl() 106 rtc->bcd_hr = bin2bcd(hrs); in rtc_ioctl() 107 rtc->bcd_dom = bin2bcd(day); in rtc_ioctl() 108 rtc->bcd_mth = bin2bcd(mon); in rtc_ioctl() 109 rtc->bcd_year = bin2bcd(yrs%100); in rtc_ioctl()
|
/linux-6.1.9/arch/mips/sibyte/swarm/ |
D | rtc_m41t81.c | 154 tm.tm_sec = bin2bcd(tm.tm_sec); in m41t81_set_time() 157 tm.tm_min = bin2bcd(tm.tm_min); in m41t81_set_time() 160 tm.tm_hour = bin2bcd(tm.tm_hour); in m41t81_set_time() 166 tm.tm_wday = bin2bcd(tm.tm_wday); in m41t81_set_time() 169 tm.tm_mday = bin2bcd(tm.tm_mday); in m41t81_set_time() 174 tm.tm_mon = bin2bcd(tm.tm_mon); in m41t81_set_time() 179 tm.tm_year = bin2bcd(tm.tm_year); in m41t81_set_time()
|
/linux-6.1.9/arch/m68k/q40/ |
D | config.c | 216 Q40_RTC_SECS = bin2bcd(t->tm_sec); in q40_hwclk() 217 Q40_RTC_MINS = bin2bcd(t->tm_min); in q40_hwclk() 218 Q40_RTC_HOUR = bin2bcd(t->tm_hour); in q40_hwclk() 219 Q40_RTC_DATE = bin2bcd(t->tm_mday); in q40_hwclk() 220 Q40_RTC_MNTH = bin2bcd(t->tm_mon + 1); in q40_hwclk() 221 Q40_RTC_YEAR = bin2bcd(t->tm_year%100); in q40_hwclk() 223 Q40_RTC_DOW = bin2bcd(t->tm_wday+1); in q40_hwclk()
|
/linux-6.1.9/arch/powerpc/platforms/chrp/ |
D | time.c | 102 tm.tm_sec = bin2bcd(tm.tm_sec); in chrp_set_rtc_time() 103 tm.tm_min = bin2bcd(tm.tm_min); in chrp_set_rtc_time() 104 tm.tm_hour = bin2bcd(tm.tm_hour); in chrp_set_rtc_time() 105 tm.tm_mon = bin2bcd(tm.tm_mon); in chrp_set_rtc_time() 106 tm.tm_mday = bin2bcd(tm.tm_mday); in chrp_set_rtc_time() 107 tm.tm_year = bin2bcd(tm.tm_year); in chrp_set_rtc_time()
|