/linux-master/drivers/media/platform/ti/cal/ |
H A D | Makefile | 2 obj-$(CONFIG_VIDEO_TI_CAL) += ti-cal.o 3 ti-cal-y := cal.o cal-camerarx.o cal-video.o
|
H A D | cal.c | 30 #include "cal.h" 243 void cal_quickdump_regs(struct cal_dev *cal) argument 247 cal_info(cal, "CAL Registers @ 0x%pa:\n", &cal->res->start); 249 (__force const void *)cal->base, 250 resource_size(cal->res), false); 252 for (i = 0; i < cal->data->num_csi2_phy; ++i) { 253 struct cal_camerarx *phy = cal->phy[i]; 255 cal_info(cal, "CSI2 Core %u Registers @ %pa:\n", i, 271 static int cal_reserve_pix_proc(struct cal_dev *cal) argument 291 cal_release_pix_proc(struct cal_dev *cal, unsigned int pix_proc_num) argument 603 struct cal_dev *cal = ctx->cal; local 722 struct cal_dev *cal = data; local 828 struct cal_dev *cal = container_of(notifier, struct cal_dev, notifier); local 863 cal_async_notifier_register(struct cal_dev *cal) argument 905 cal_async_notifier_unregister(struct cal_dev *cal) argument 920 cal_media_register(struct cal_dev *cal) argument 947 cal_media_unregister(struct cal_dev *cal) argument 963 cal_media_init(struct cal_dev *cal) argument 994 cal_media_cleanup(struct cal_dev *cal) argument 1007 cal_ctx_create(struct cal_dev *cal, int inst) argument 1063 cal_get_hwinfo(struct cal_dev *cal) argument 1090 cal_init_camerarx_regmap(struct cal_dev *cal) argument 1149 struct cal_dev *cal; local 1268 struct cal_dev *cal = platform_get_drvdata(pdev); local 1296 struct cal_dev *cal = dev_get_drvdata(dev); local [all...] |
H A D | cal.h | 31 #define CAL_MODULE_NAME "cal" 154 * the CAMERARX instances. Instances of struct cal_dev are named cal through the 170 struct cal_dev *cal; member in struct:cal_camerarx 225 struct cal_dev *cal; member in struct:cal_ctx 257 #define cal_dbg(level, cal, fmt, arg...) \ 260 dev_printk(KERN_DEBUG, (cal)->dev, fmt, ##arg); \ 262 #define cal_info(cal, fmt, arg...) \ 263 dev_info((cal)->dev, fmt, ##arg) 264 #define cal_err(cal, fmt, arg...) \ 265 dev_err((cal) 281 cal_read(struct cal_dev *cal, u32 offset) argument 286 cal_write(struct cal_dev *cal, u32 offset, u32 val) argument 291 cal_read_field(struct cal_dev *cal, u32 offset, u32 mask) argument 296 cal_write_field(struct cal_dev *cal, u32 offset, u32 value, u32 mask) argument [all...] |
H A D | cal-camerarx.c | 25 #include "cal.h" 82 u32 val = cal_read(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance)); 103 cal_write(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance), val); 110 u32 num_lanes = phy->cal->data->camerarx[phy->instance].num_lanes; 176 cal_write_field(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance), 182 current_state = cal_read_field(phy->cal, 203 if (cal_read_field(phy->cal, 211 if (cal_read_field(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance), 223 if (cal_read_field(phy->cal, 230 if (cal_read_field(phy->cal, CAL_CSI2_TIMIN 490 cal_camerarx_regmap_init(struct cal_dev *cal, struct cal_camerarx *phy) argument 810 cal_camerarx_create(struct cal_dev *cal, unsigned int instance) argument [all...] |
/linux-master/drivers/media/platform/ti/ |
H A D | Makefile | 3 obj-y += cal/
|
/linux-master/drivers/net/wireless/mediatek/mt76/ |
H A D | mt76x02_phy.c | 171 u8 limit = dev->cal.low_gain > 0 ? 16 : 4; 177 dev->cal.false_cca = false_cca; 178 if (false_cca > 800 && dev->cal.agc_gain_adjust < limit) { 179 dev->cal.agc_gain_adjust += 2; 181 } else if ((false_cca < 10 && dev->cal.agc_gain_adjust > 0) || 182 (dev->cal.agc_gain_adjust >= limit && false_cca < 500)) { 183 dev->cal.agc_gain_adjust -= 2; 187 dev->cal.agc_lowest_gain = dev->cal.agc_gain_adjust >= limit; 195 dev->cal [all...] |
H A D | mt76x02_debugfs.c | 79 seq_printf(file, "avg_rssi: %d\n", dev->cal.avg_rssi_all); 80 seq_printf(file, "low_gain: %d\n", dev->cal.low_gain); 81 seq_printf(file, "false_cca: %d\n", dev->cal.false_cca); 82 seq_printf(file, "agc_gain_adjust: %d\n", dev->cal.agc_gain_adjust); 142 debugfs_create_u8("temperature", 0400, dir, &dev->cal.temp);
|
/linux-master/drivers/input/gameport/ |
H A D | lightning.c | 104 static int l4_getcal(int port, int *cal) argument 127 cal[i] = inb(L4_PORT); 140 static int l4_setcal(int port, int *cal) argument 163 outb(cal[i], L4_PORT); 180 int cal[4]; local 183 if (l4_getcal(l4->port, cal)) 187 t = (max[i] * cal[i]) / 200; 189 axes[i] = (axes[i] < 0) ? -1 : (axes[i] * cal[i]) / t; 191 cal[i] = t; 194 if (l4_setcal(l4->port, cal)) 238 int cal[4] = { 255, 255, 255, 255 }; local 309 int cal[4] = { 59, 59, 59, 59 }; local [all...] |
/linux-master/drivers/net/wireless/mediatek/mt76/mt76x2/ |
H A D | phy.c | 35 s8 *gain_adj = dev->cal.rx.high_gain; 209 if (!dev->cal.tssi_cal_done) 212 if (!dev->cal.tssi_comp_pending) { 216 dev->cal.tssi_comp_pending = true; 221 dev->cal.tssi_comp_pending = false; 234 if (t.pa_mode || dev->cal.dpd_cal_done || dev->ed_tx_blocked) 239 dev->cal.dpd_cal_done = true; 250 gain_val[0] = dev->cal.agc_gain_cur[0] - dev->cal.agc_gain_adjust; 251 gain_val[1] = dev->cal [all...] |
H A D | usb_phy.c | 16 if (dev->cal.channel_cal_done) 39 dev->cal.channel_cal_done = true; 90 dev->cal.channel_cal_done = false; 141 mt76x2_mcu_init_gain(dev, channel, dev->cal.rx.mcu_gain, true); 147 if (!dev->cal.init_cal_done) { 157 if (!dev->cal.init_cal_done) 159 dev->cal.init_cal_done = true; 194 dev->cal.tssi_cal_done = true;
|
H A D | pci_phy.c | 31 dev->cal.tssi_cal_done = true; 41 if (dev->cal.channel_cal_done) 47 if (!dev->cal.tssi_cal_done) 68 dev->cal.channel_cal_done = true; 152 dev->cal.channel_cal_done = false; 204 mt76x2_mcu_init_gain(dev, channel, dev->cal.rx.mcu_gain, true); 212 if (!dev->cal.init_cal_done) { 222 if (!dev->cal.init_cal_done) 225 dev->cal.init_cal_done = true; 265 dev->cal [all...] |
H A D | eeprom.c | 185 s8 *dest = dev->cal.rx.high_gain; 200 s8 *dest = dev->cal.rx.rssi_offset; 274 dev->cal.rx.mcu_gain = (lna_2g & 0xff); 275 dev->cal.rx.mcu_gain |= (lna_5g[0] & 0xff) << 8; 276 dev->cal.rx.mcu_gain |= (lna_5g[1] & 0xff) << 16; 277 dev->cal.rx.mcu_gain |= (lna_5g[2] & 0xff) << 24; 288 dev->cal.rx.lna_gain = mt76x02_sign_extend(lna, 8);
|
/linux-master/drivers/net/wireless/broadcom/b43/ |
H A D | lo.c | 731 struct b43_lo_calib *cal; local 769 cal = kmalloc(sizeof(*cal), GFP_KERNEL); 770 if (!cal) { 774 memcpy(&cal->bbatt, bbatt, sizeof(*bbatt)); 775 memcpy(&cal->rfatt, rfatt, sizeof(*rfatt)); 776 memcpy(&cal->ctl, &loctl, sizeof(loctl)); 777 cal->calib_time = jiffies; 778 INIT_LIST_HEAD(&cal->list); 780 return cal; 830 struct b43_lo_calib *cal; local 889 struct b43_lo_calib *cal; local 906 struct b43_lo_calib *cal; local 927 struct b43_lo_calib *cal, *tmp; local 986 struct b43_lo_calib *cal, *tmp; local [all...] |
H A D | debugfs.c | 431 struct b43_lo_calib *cal; local 455 list_for_each_entry(cal, &lo->calib_list, list) { 458 active = (b43_compare_bbatt(&cal->bbatt, &phy->g->bbatt) && 459 b43_compare_rfatt(&cal->rfatt, &phy->g->rfatt)); 462 cal->bbatt.att, 463 cal->rfatt.att, cal->rfatt.with_padmix, 464 cal->ctl.i, cal->ctl.q, 465 calc_expire_secs(now, cal [all...] |
/linux-master/sound/soc/codecs/ |
H A D | cs-amp-lib.c | 131 dev_err(dev, "EFI cal variable truncated\n"); 151 dev_err(dev, "EFI cal variable truncated\n"); 174 struct cirrus_amp_cal_data *cal = NULL; local 190 cal = &efi_data->data[i]; 196 if (!cal && (amp_index >= 0) && (amp_index < efi_data->count)) { 206 cal = &efi_data->data[amp_index]; 211 if (cal) { 212 memcpy(out_data, cal, sizeof(*out_data));
|
/linux-master/drivers/net/wireless/mediatek/mt76/mt76x0/ |
H A D | phy.c | 416 gain -= dev->cal.rx.lna_gain * 2; 527 dev->cal.tssi_dc = mt76_rr(dev, MT_BBP(CORE, 35)) & 0xff; 776 tssi_db = mt76x0_phy_lin2db(ltssi - dev->cal.tssi_dc) * tssi_slope; 789 ((ltssi - dev->cal.tssi_dc) < 1 && tssi_target < 0)) { 794 if ((dev->cal.tssi_target ^ tssi_target) < 0 && 795 dev->cal.tssi_target > -4096 && dev->cal.tssi_target < 4096 && 798 tssi_target + dev->cal.tssi_target > 0) || 800 tssi_target + dev->cal.tssi_target <= 0)) 803 dev->cal [all...] |
H A D | eeprom.c | 88 dev->cal.rx.temp_offset = mt76x02_sign_extend(val, 8); 90 dev->cal.rx.temp_offset = -10; 95 struct mt76x02_rx_freq_cal *caldata = &dev->cal.rx; 113 struct mt76x02_rx_freq_cal *caldata = &dev->cal.rx;
|
/linux-master/drivers/rtc/ |
H A D | rtc-ma35d1.c | 122 u32 time, cal, wday; local 126 cal = rtc_reg_read(rtc, MA35_REG_RTC_CAL); 129 cal != rtc_reg_read(rtc, MA35_REG_RTC_CAL)); 131 tm->tm_mday = bcd2bin(cal >> 0); 133 tm->tm_mon = bcd2bin(cal >> 8); 135 tm->tm_year = bcd2bin(cal >> 16) + 100;
|
H A D | rtc-stk17ta8.c | 259 unsigned int cal; local 284 cal = readb(ioaddr + RTC_CALIBRATION); 285 if (cal & RTC_STOP) { 286 cal &= RTC_CAL_MASK; 289 writeb(cal, ioaddr + RTC_CALIBRATION);
|
/linux-master/drivers/net/wireless/mediatek/mt7601u/ |
H A D | mcu.h | 83 mt7601u_mcu_calibrate(struct mt7601u_dev *dev, enum mcu_calibrate cal, u32 val);
|
/linux-master/drivers/net/wireless/ath/ath9k/ |
H A D | calib.c | 64 s16 calib_nf = ath9k_hw_get_nf_limits(ah, chan)->cal[chain]; 88 struct ath9k_hw_cal_data *cal, 98 h = cal->nfCalHist; 128 (test_bit(NFCAL_INTF, &cal->cal_flags) ? 139 if (!test_bit(NFCAL_INTF, &cal->cal_flags)) 150 clear_bit(NFCAL_INTF, &cal->cal_flags); 274 ath9k_hw_get_nf_limits(ah, chan)->cal[i]; 285 * stop NF cal if ongoing to ensure NF load completes immediately 339 * here, the baseband nf cal will just be capped by our present 87 ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah, struct ath9k_hw_cal_data *cal, int16_t *nfarray) argument
|
/linux-master/drivers/net/ethernet/microchip/sparx5/ |
H A D | sparx5_calendar.c | 162 u32 cal[7], value, idx, portno; local 168 memset(cal, 0, sizeof(cal)); 193 cal[reg] |= spd << (offset * SPX5_CALBITS_PER_PORT); 216 for (idx = 0; idx < ARRAY_SIZE(cal); idx++) 217 spx5_wr(cal[idx], sparx5, QSYS_CAL_AUTO(idx)); 254 static u32 sparx5_dsm_cal_len(u32 *cal) argument 259 if (cal[idx] != SPX5_DSM_CAL_EMPTY)
|
/linux-master/drivers/net/wireless/mediatek/mt76/mt7915/ |
H A D | eeprom.c | 23 dev->cal = devm_kzalloc(mdev->dev, val, GFP_KERNEL); 24 if (!dev->cal) 29 ret = mt76_get_of_data_from_mtd(mdev, dev->cal, offs, val); 33 return mt76_get_of_data_from_nvmem(mdev, dev->cal, "precal", val);
|
/linux-master/drivers/iio/pressure/ |
H A D | icp10100.c | 44 int16_t cal[4]; member in struct:icp10100_state 214 st->cal[i] = be16_to_cpu(val); 215 dev_dbg(&st->client->dev, "cal[%d] = %d\n", i, st->cal[i]); 294 val1 = (int64_t)st->cal[0] * (int64_t)t_square; 296 val1 = (int64_t)st->cal[1] * (int64_t)t_square; 297 p_lut[1] = offset_factor * st->cal[3] + 299 val1 = (int64_t)st->cal[2] * (int64_t)t_square;
|
/linux-master/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/ |
H A D | phy.c | 3709 u32 tx_fail, rx_fail, delay_count, iqk_ready, cal_retry, cal = 0, temp_reg65; local 3725 while (cal < cal_num) { 3843 tx_dt[cal] = (vdf_y[1]>>20)-(vdf_y[0]>>20); 3844 tx_dt[cal] = ((16*tx_dt[cal])*10000/15708); 3845 tx_dt[cal] = (tx_dt[cal] >> 1)+(tx_dt[cal] & BIT(0)); 3849 rtl_set_bbreg(hw, 0xce8, 0x3fff0000, tx_dt[cal] & 0x00003fff); 3902 tx_x0[cal] [all...] |