/linux-6.6.21/drivers/net/slip/ |
D | slip.c | 104 static void slip_unesc(struct slip *sl, unsigned char c); 107 static void slip_unesc6(struct slip *sl, unsigned char c); 130 static int sl_alloc_bufs(struct slip *sl, int mtu) in sl_alloc_bufs() argument 171 spin_lock_bh(&sl->lock); in sl_alloc_bufs() 172 if (sl->tty == NULL) { in sl_alloc_bufs() 173 spin_unlock_bh(&sl->lock); in sl_alloc_bufs() 177 sl->mtu = mtu; in sl_alloc_bufs() 178 sl->buffsize = len; in sl_alloc_bufs() 179 sl->rcount = 0; in sl_alloc_bufs() 180 sl->xleft = 0; in sl_alloc_bufs() [all …]
|
/linux-6.6.21/drivers/net/can/slcan/ |
D | slcan-core.c | 112 struct slcan *sl = netdev_priv(ndev); in slcan_err_rst_on_open() local 114 return !!test_bit(CF_ERR_RST, &sl->cmd_flags); in slcan_err_rst_on_open() 119 struct slcan *sl = netdev_priv(ndev); in slcan_enable_err_rst_on_open() local 125 set_bit(CF_ERR_RST, &sl->cmd_flags); in slcan_enable_err_rst_on_open() 127 clear_bit(CF_ERR_RST, &sl->cmd_flags); in slcan_enable_err_rst_on_open() 171 static void slcan_bump_frame(struct slcan *sl) in slcan_bump_frame() argument 177 char *cmd = sl->rbuff; in slcan_bump_frame() 179 skb = alloc_can_skb(sl->dev, &cf); in slcan_bump_frame() 181 sl->dev->stats.rx_dropped++; in slcan_bump_frame() 191 cf->len = sl->rbuff[SLCAN_CMD_LEN + SLCAN_SFF_ID_LEN]; in slcan_bump_frame() [all …]
|
/linux-6.6.21/drivers/w1/slaves/ |
D | w1_therm.c | 101 #define SLAVE_SPECIFIC_FUNC(sl) \ argument 102 (((struct w1_therm_family_data *)(sl->family_data))->specific_functions) 108 #define SLAVE_POWERMODE(sl) \ argument 109 (((struct w1_therm_family_data *)(sl->family_data))->external_powered) 115 #define SLAVE_RESOLUTION(sl) \ argument 116 (((struct w1_therm_family_data *)(sl->family_data))->resolution) 122 #define SLAVE_CONV_TIME_OVERRIDE(sl) \ argument 123 (((struct w1_therm_family_data *)(sl->family_data))->conv_time_override) 129 #define SLAVE_FEATURES(sl) \ argument 130 (((struct w1_therm_family_data *)(sl->family_data))->features) [all …]
|
D | w1_ds28e17.c | 85 static int w1_f19_i2c_busy_wait(struct w1_slave *sl, size_t count) in w1_f19_i2c_busy_wait() argument 88 struct w1_f19_data *data = sl->family_data; in w1_f19_i2c_busy_wait() 92 if (w1_touch_bit(sl->master, 1) == 0) in w1_f19_i2c_busy_wait() 108 if (w1_touch_bit(sl->master, 1) == 0) in w1_f19_i2c_busy_wait() 116 dev_warn(&sl->dev, "busy timeout\n"); in w1_f19_i2c_busy_wait() 122 static size_t w1_f19_error(struct w1_slave *sl, u8 w1_buf[]) in w1_f19_error() argument 126 dev_warn(&sl->dev, "crc16 mismatch\n"); in w1_f19_error() 128 dev_warn(&sl->dev, "i2c device not responding\n"); in w1_f19_error() 131 dev_warn(&sl->dev, "i2c short write, %d bytes not acknowledged\n", in w1_f19_error() 149 static int __w1_f19_i2c_write(struct w1_slave *sl, in __w1_f19_i2c_write() argument [all …]
|
D | w1_ds2438.c | 61 static int w1_ds2438_get_page(struct w1_slave *sl, int pageno, u8 *buf) in w1_ds2438_get_page() argument 69 if (w1_reset_select_slave(sl)) in w1_ds2438_get_page() 73 w1_write_block(sl->master, w1_buf, 2); in w1_ds2438_get_page() 75 if (w1_reset_select_slave(sl)) in w1_ds2438_get_page() 79 w1_write_block(sl->master, w1_buf, 2); in w1_ds2438_get_page() 81 count = w1_read_block(sl->master, buf, DS2438_PAGE_SIZE + 1); in w1_ds2438_get_page() 93 static int w1_ds2438_get_temperature(struct w1_slave *sl, int16_t *temperature) in w1_ds2438_get_temperature() argument 101 mutex_lock(&sl->master->bus_mutex); in w1_ds2438_get_temperature() 104 if (w1_reset_select_slave(sl)) in w1_ds2438_get_temperature() 106 w1_write_8(sl->master, W1_DS2438_CONVERT_TEMP); in w1_ds2438_get_temperature() [all …]
|
D | w1_ds2408.c | 38 static int _read_reg(struct w1_slave *sl, u8 address, unsigned char *buf) in _read_reg() argument 42 dev_dbg(&sl->dev, "Reading with slave: %p, reg addr: %0#4x, buff addr: %p", in _read_reg() 43 sl, (unsigned int)address, buf); in _read_reg() 48 mutex_lock(&sl->master->bus_mutex); in _read_reg() 49 dev_dbg(&sl->dev, "mutex locked"); in _read_reg() 51 if (w1_reset_select_slave(sl)) { in _read_reg() 52 mutex_unlock(&sl->master->bus_mutex); in _read_reg() 59 w1_write_block(sl->master, wrbuf, 3); in _read_reg() 60 *buf = w1_read_8(sl->master); in _read_reg() 62 mutex_unlock(&sl->master->bus_mutex); in _read_reg() [all …]
|
D | w1_ds28e04.c | 71 static int w1_f1C_refresh_block(struct w1_slave *sl, struct w1_f1C_data *data, in w1_f1C_refresh_block() argument 80 if (w1_reset_select_slave(sl)) { in w1_f1C_refresh_block() 88 w1_write_block(sl->master, wrbuf, 3); in w1_f1C_refresh_block() 89 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE); in w1_f1C_refresh_block() 98 static int w1_f1C_read(struct w1_slave *sl, int addr, int len, char *data) in w1_f1C_read() argument 103 if (w1_reset_select_slave(sl)) in w1_f1C_read() 110 w1_write_block(sl->master, wrbuf, sizeof(wrbuf)); in w1_f1C_read() 111 return w1_read_block(sl->master, data, len); in w1_f1C_read() 118 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_read() local 119 struct w1_f1C_data *data = sl->family_data; in eeprom_read() [all …]
|
D | w1_ds2433.c | 61 static int w1_f23_refresh_block(struct w1_slave *sl, struct w1_f23_data *data, in w1_f23_refresh_block() argument 70 if (w1_reset_select_slave(sl)) { in w1_f23_refresh_block() 78 w1_write_block(sl->master, wrbuf, 3); in w1_f23_refresh_block() 79 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE); in w1_f23_refresh_block() 93 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_read() local 95 struct w1_f23_data *data = sl->family_data; in eeprom_read() 105 mutex_lock(&sl->master->bus_mutex); in eeprom_read() 112 if (w1_f23_refresh_block(sl, data, i)) { in eeprom_read() 122 if (w1_reset_select_slave(sl)) { in eeprom_read() 130 w1_write_block(sl->master, wrbuf, 3); in eeprom_read() [all …]
|
D | w1_ds2805.c | 61 static int w1_f0d_readblock(struct w1_slave *sl, int off, int count, char *buf) in w1_f0d_readblock() argument 72 if (w1_reset_select_slave(sl)) in w1_f0d_readblock() 75 w1_write_block(sl->master, wrbuf, sizeof(wrbuf)); in w1_f0d_readblock() 76 w1_read_block(sl->master, buf, count); in w1_f0d_readblock() 78 if (w1_reset_select_slave(sl)) in w1_f0d_readblock() 81 w1_write_block(sl->master, wrbuf, sizeof(wrbuf)); in w1_f0d_readblock() 82 w1_read_block(sl->master, cmp, count); in w1_f0d_readblock() 88 dev_err(&sl->dev, "proof reading failed %d times\n", in w1_f0d_readblock() 98 struct w1_slave *sl = kobj_to_w1_slave(kobj); in w1_f0d_read_bin() local 105 mutex_lock(&sl->master->mutex); in w1_f0d_read_bin() [all …]
|
D | w1_ds2413.c | 31 struct w1_slave *sl = kobj_to_w1_slave(kobj); in state_read() local 36 dev_dbg(&sl->dev, in state_read() 45 mutex_lock(&sl->master->bus_mutex); in state_read() 46 dev_dbg(&sl->dev, "mutex locked"); in state_read() 49 if (w1_reset_select_slave(sl)) in state_read() 53 w1_write_8(sl->master, W1_F3A_FUNC_PIO_ACCESS_READ); in state_read() 55 state = w1_read_8(sl->master); in state_read() 63 dev_warn(&sl->dev, "slave device did not respond to PIO_ACCESS_READ, " \ in state_read() 68 if (w1_reset_resume_command(sl->master)) in state_read() 71 dev_warn(&sl->dev, "PIO_ACCESS_READ error, retries left: %d\n", retries); in state_read() [all …]
|
D | w1_ds2430.c | 65 static int w1_f14_readblock(struct w1_slave *sl, int off, int count, char *buf) in w1_f14_readblock() argument 75 if (w1_reset_select_slave(sl)) in w1_f14_readblock() 78 w1_write_block(sl->master, wrbuf, 2); in w1_f14_readblock() 79 w1_read_block(sl->master, buf, count); in w1_f14_readblock() 81 if (w1_reset_select_slave(sl)) in w1_f14_readblock() 84 w1_write_block(sl->master, wrbuf, 2); in w1_f14_readblock() 85 w1_read_block(sl->master, cmp, count); in w1_f14_readblock() 91 dev_err(&sl->dev, "proof reading failed %d times\n", in w1_f14_readblock() 101 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_read() local 108 mutex_lock(&sl->master->bus_mutex); in eeprom_read() [all …]
|
D | w1_ds250x.c | 40 int (*read)(struct w1_slave *sl, int pageno); 46 static int w1_ds2502_read_page(struct w1_slave *sl, int pageno) in w1_ds2502_read_page() argument 48 struct w1_eprom_data *data = sl->family_data; in w1_ds2502_read_page() 57 mutex_lock(&sl->master->bus_mutex); in w1_ds2502_read_page() 59 if (w1_reset_select_slave(sl)) in w1_ds2502_read_page() 65 w1_write_block(sl->master, buf, 3); in w1_ds2502_read_page() 67 crc8 = w1_read_8(sl->master); in w1_ds2502_read_page() 71 w1_read_block(sl->master, &data->eprom[pgoff], W1_PAGE_SIZE); in w1_ds2502_read_page() 73 crc8 = w1_read_8(sl->master); in w1_ds2502_read_page() 80 mutex_unlock(&sl->master->bus_mutex); in w1_ds2502_read_page() [all …]
|
D | w1_ds2431.c | 64 static int w1_f2d_readblock(struct w1_slave *sl, int off, int count, char *buf) in w1_f2d_readblock() argument 75 if (w1_reset_select_slave(sl)) in w1_f2d_readblock() 78 w1_write_block(sl->master, wrbuf, 3); in w1_f2d_readblock() 79 w1_read_block(sl->master, buf, count); in w1_f2d_readblock() 81 if (w1_reset_select_slave(sl)) in w1_f2d_readblock() 84 w1_write_block(sl->master, wrbuf, 3); in w1_f2d_readblock() 85 w1_read_block(sl->master, cmp, count); in w1_f2d_readblock() 91 dev_err(&sl->dev, "proof reading failed %d times\n", in w1_f2d_readblock() 101 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_read() local 108 mutex_lock(&sl->master->bus_mutex); in eeprom_read() [all …]
|
D | w1_ds2780.c | 29 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_ds2780_do_io() local 36 if (w1_reset_select_slave(sl) == 0) { in w1_ds2780_do_io() 38 w1_write_8(sl->master, W1_DS2780_WRITE_DATA); in w1_ds2780_do_io() 39 w1_write_8(sl->master, addr); in w1_ds2780_do_io() 40 w1_write_block(sl->master, buf, count); in w1_ds2780_do_io() 42 w1_write_8(sl->master, W1_DS2780_READ_DATA); in w1_ds2780_do_io() 43 w1_write_8(sl->master, addr); in w1_ds2780_do_io() 44 count = w1_read_block(sl->master, buf, count); in w1_ds2780_do_io() 54 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_ds2780_io() local 60 mutex_lock(&sl->master->bus_mutex); in w1_ds2780_io() [all …]
|
D | w1_ds2781.c | 26 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_ds2781_do_io() local 33 if (w1_reset_select_slave(sl) == 0) { in w1_ds2781_do_io() 35 w1_write_8(sl->master, W1_DS2781_WRITE_DATA); in w1_ds2781_do_io() 36 w1_write_8(sl->master, addr); in w1_ds2781_do_io() 37 w1_write_block(sl->master, buf, count); in w1_ds2781_do_io() 39 w1_write_8(sl->master, W1_DS2781_READ_DATA); in w1_ds2781_do_io() 40 w1_write_8(sl->master, addr); in w1_ds2781_do_io() 41 count = w1_read_block(sl->master, buf, count); in w1_ds2781_do_io() 51 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_ds2781_io() local 57 mutex_lock(&sl->master->bus_mutex); in w1_ds2781_io() [all …]
|
D | w1_ds2406.c | 31 struct w1_slave *sl = kobj_to_w1_slave(kobj); in w1_f12_read_state() local 41 mutex_lock(&sl->master->bus_mutex); in w1_f12_read_state() 43 if (w1_reset_select_slave(sl)) { in w1_f12_read_state() 44 mutex_unlock(&sl->master->bus_mutex); in w1_f12_read_state() 48 w1_write_block(sl->master, w1_buf, 3); in w1_f12_read_state() 49 w1_read_block(sl->master, w1_buf+3, 3); in w1_f12_read_state() 57 mutex_unlock(&sl->master->bus_mutex); in w1_f12_read_state() 67 struct w1_slave *sl = kobj_to_w1_slave(kobj); in w1_f12_write_output() local 76 mutex_lock(&sl->master->bus_mutex); in w1_f12_write_output() 78 if (w1_reset_select_slave(sl)) { in w1_f12_write_output() [all …]
|
D | w1_ds2405.c | 26 static int w1_ds2405_select(struct w1_slave *sl, bool only_active) in w1_ds2405_select() argument 28 struct w1_master *dev = sl->master; in w1_ds2405_select() 30 u64 dev_addr = le64_to_cpu(*(u64 *)&sl->reg_num); in w1_ds2405_select() 60 static int w1_ds2405_read_pio(struct w1_slave *sl) in w1_ds2405_read_pio() argument 62 if (w1_ds2405_select(sl, true)) in w1_ds2405_read_pio() 65 if (w1_ds2405_select(sl, false)) in w1_ds2405_read_pio() 74 struct w1_slave *sl = dev_to_w1_slave(device); in state_show() local 75 struct w1_master *dev = sl->master; in state_show() 85 if (!w1_ds2405_select(sl, false)) { in state_show() 111 struct w1_slave *sl = dev_to_w1_slave(device); in output_show() local [all …]
|
/linux-6.6.21/drivers/base/regmap/ |
D | regmap-w1.c | 24 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_reg_a8_v8_read() local 30 mutex_lock(&sl->master->bus_mutex); in w1_reg_a8_v8_read() 31 if (!w1_reset_select_slave(sl)) { in w1_reg_a8_v8_read() 32 w1_write_8(sl->master, W1_CMD_READ_DATA); in w1_reg_a8_v8_read() 33 w1_write_8(sl->master, reg); in w1_reg_a8_v8_read() 34 *val = w1_read_8(sl->master); in w1_reg_a8_v8_read() 38 mutex_unlock(&sl->master->bus_mutex); in w1_reg_a8_v8_read() 46 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_reg_a8_v8_write() local 52 mutex_lock(&sl->master->bus_mutex); in w1_reg_a8_v8_write() 53 if (!w1_reset_select_slave(sl)) { in w1_reg_a8_v8_write() [all …]
|
/linux-6.6.21/drivers/net/ethernet/ti/ |
D | cpsw_sl.c | 189 u32 cpsw_sl_reg_read(struct cpsw_sl *sl, enum cpsw_sl_regs reg) in cpsw_sl_reg_read() argument 193 if (sl->regs[reg] == CPSW_SL_REG_NOTUSED) { in cpsw_sl_reg_read() 194 dev_err(sl->dev, "cpsw_sl: not sup r reg: %04X\n", in cpsw_sl_reg_read() 195 sl->regs[reg]); in cpsw_sl_reg_read() 199 val = readl(sl->sl_base + sl->regs[reg]); in cpsw_sl_reg_read() 200 dev_dbg(sl->dev, "cpsw_sl: reg: %04X r 0x%08X\n", sl->regs[reg], val); in cpsw_sl_reg_read() 204 void cpsw_sl_reg_write(struct cpsw_sl *sl, enum cpsw_sl_regs reg, u32 val) in cpsw_sl_reg_write() argument 206 if (sl->regs[reg] == CPSW_SL_REG_NOTUSED) { in cpsw_sl_reg_write() 207 dev_err(sl->dev, "cpsw_sl: not sup w reg: %04X\n", in cpsw_sl_reg_write() 208 sl->regs[reg]); in cpsw_sl_reg_write() [all …]
|
/linux-6.6.21/drivers/w1/ |
D | w1.c | 77 struct w1_slave *sl = dev_to_w1_slave(dev); in w1_slave_release() local 79 dev_dbg(dev, "%s: Releasing %s [%p]\n", __func__, sl->name, sl); in w1_slave_release() 81 w1_family_put(sl->family); in w1_slave_release() 82 sl->master->slave_count--; in w1_slave_release() 87 struct w1_slave *sl = dev_to_w1_slave(dev); in name_show() local 89 return sprintf(buf, "%s\n", sl->name); in name_show() 96 struct w1_slave *sl = dev_to_w1_slave(dev); in id_show() local 97 ssize_t count = sizeof(sl->reg_num); in id_show() 99 memcpy(buf, (u8 *)&sl->reg_num, count); in id_show() 117 struct w1_slave *sl = kobj_to_w1_slave(kobj); in rw_write() local [all …]
|
/linux-6.6.21/include/linux/ |
D | seqlock.h | 816 #define seqlock_init(sl) \ argument 818 spin_lock_init(&(sl)->lock); \ 819 seqcount_spinlock_init(&(sl)->seqcount, &(sl)->lock); \ 826 #define DEFINE_SEQLOCK(sl) \ argument 827 seqlock_t sl = __SEQLOCK_UNLOCKED(sl) 835 static inline unsigned read_seqbegin(const seqlock_t *sl) in read_seqbegin() argument 837 unsigned ret = read_seqcount_begin(&sl->seqcount); in read_seqbegin() 855 static inline unsigned read_seqretry(const seqlock_t *sl, unsigned start) in read_seqretry() argument 863 return read_seqcount_retry(&sl->seqcount, start); in read_seqretry() 885 static inline void write_seqlock(seqlock_t *sl) in write_seqlock() argument [all …]
|
/linux-6.6.21/drivers/media/dvb-core/ |
D | dvb_ca_en50221.c | 230 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_check_camstatus() local 237 return (atomic_read(&sl->camchange_count) != 0); in dvb_ca_en50221_check_camstatus() 245 int cam_present_old = (sl->slot_state != DVB_CA_SLOTSTATE_NONE); in dvb_ca_en50221_check_camstatus() 252 sl->camchange_type = DVB_CA_EN50221_CAMCHANGE_REMOVED; in dvb_ca_en50221_check_camstatus() 254 sl->camchange_type = DVB_CA_EN50221_CAMCHANGE_INSERTED; in dvb_ca_en50221_check_camstatus() 255 atomic_set(&sl->camchange_count, 1); in dvb_ca_en50221_check_camstatus() 257 if ((sl->slot_state == DVB_CA_SLOTSTATE_WAITREADY) && in dvb_ca_en50221_check_camstatus() 260 sl->slot_state = DVB_CA_SLOTSTATE_VALIDATE; in dvb_ca_en50221_check_camstatus() 328 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_link_init() local 336 sl->da_irq_supported = 0; in dvb_ca_en50221_link_init() [all …]
|
/linux-6.6.21/drivers/power/supply/ |
D | bq27xxx_battery_hdq.c | 28 static int w1_bq27000_read(struct w1_slave *sl, unsigned int reg) in w1_bq27000_read() argument 32 mutex_lock(&sl->master->bus_mutex); in w1_bq27000_read() 33 w1_write_8(sl->master, HDQ_CMD_READ | reg); in w1_bq27000_read() 34 val = w1_read_8(sl->master); in w1_bq27000_read() 35 mutex_unlock(&sl->master->bus_mutex); in w1_bq27000_read() 43 struct w1_slave *sl = dev_to_w1_slave(di->dev); in bq27xxx_battery_hdq_read() local 53 upper = w1_bq27000_read(sl, reg + 1); in bq27xxx_battery_hdq_read() 59 lower = w1_bq27000_read(sl, reg); in bq27xxx_battery_hdq_read() 63 upper = w1_bq27000_read(sl, reg + 1); in bq27xxx_battery_hdq_read() 72 return w1_bq27000_read(sl, reg); in bq27xxx_battery_hdq_read() [all …]
|
/linux-6.6.21/tools/testing/selftests/bpf/progs/ |
D | cb_refs.c | 30 unsigned long sl = 0; in underflow_prog() local 32 p = bpf_kfunc_call_test_acquire(&sl); in underflow_prog() 42 unsigned long sl = 0; in cb2() local 44 *(void **)ctx = bpf_kfunc_call_test_acquire(&sl); in cb2() 74 unsigned long sl = 0; in cb3() local 77 bpf_kfunc_call_test_acquire(&sl); in cb3() 89 unsigned long sl = 0; in nested_cb() local 92 p = bpf_kfunc_call_test_acquire(&sl); in nested_cb() 104 unsigned long sl = 0; in non_cb_transfer_ref() local 106 p = bpf_kfunc_call_test_acquire(&sl); in non_cb_transfer_ref() [all …]
|
/linux-6.6.21/lib/crypto/mpi/ |
D | longlong.h | 114 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument 118 "=&r" ((USItype)(sl)) \ 123 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ argument 127 "=&r" ((USItype)(sl)) \ 176 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument 180 "=&r" (sl) \ 185 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ argument 189 "=&r" (sl) \ 263 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument 267 "=&g" ((USItype)(sl)) \ [all …]
|