Home
last modified time | relevance | path

Searched refs:sl (Results 1 – 25 of 212) sorted by relevance

123456789

/kernel/linux/linux-5.10/drivers/net/slip/
Dslip.c103 static void slip_unesc(struct slip *sl, unsigned char c);
106 static void slip_unesc6(struct slip *sl, unsigned char c);
129 static int sl_alloc_bufs(struct slip *sl, int mtu) in sl_alloc_bufs() argument
170 spin_lock_bh(&sl->lock); in sl_alloc_bufs()
171 if (sl->tty == NULL) { in sl_alloc_bufs()
172 spin_unlock_bh(&sl->lock); in sl_alloc_bufs()
176 sl->mtu = mtu; in sl_alloc_bufs()
177 sl->buffsize = len; in sl_alloc_bufs()
178 sl->rcount = 0; in sl_alloc_bufs()
179 sl->xleft = 0; in sl_alloc_bufs()
[all …]
/kernel/linux/linux-5.10/drivers/net/wan/
Dx25_asy.c48 static void x25_asy_unesc(struct x25_asy *sl, unsigned char c);
55 struct x25_asy *sl; in x25_asy_alloc() local
68 sl = netdev_priv(dev); in x25_asy_alloc()
70 if (!test_and_set_bit(SLF_INUSE, &sl->flags)) in x25_asy_alloc()
71 return sl; in x25_asy_alloc()
90 sl = netdev_priv(dev); in x25_asy_alloc()
96 set_bit(SLF_INUSE, &sl->flags); in x25_asy_alloc()
98 return sl; in x25_asy_alloc()
109 static void x25_asy_free(struct x25_asy *sl) in x25_asy_free() argument
112 kfree(sl->rbuff); in x25_asy_free()
[all …]
/kernel/linux/linux-5.10/drivers/net/can/
Dslcan.c143 static void slc_bump(struct slcan *sl) in slc_bump() argument
149 char *cmd = sl->rbuff; in slc_bump()
159 cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_LEN]; in slc_bump()
160 sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_LEN] = 0; in slc_bump()
170 cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_EFF_ID_LEN]; in slc_bump()
171 sl->rbuff[SLC_CMD_LEN + SLC_EFF_ID_LEN] = 0; in slc_bump()
179 if (kstrtou32(sl->rbuff + SLC_CMD_LEN, 16, &tmpid)) in slc_bump()
209 skb->dev = sl->dev; in slc_bump()
215 can_skb_prv(skb)->ifindex = sl->dev->ifindex; in slc_bump()
220 sl->dev->stats.rx_packets++; in slc_bump()
[all …]
/kernel/linux/linux-5.10/drivers/w1/slaves/
Dw1_therm.c101 #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 …]
Dw1_ds28e17.c85 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 …]
Dw1_ds2438.c52 static int w1_ds2438_get_page(struct w1_slave *sl, int pageno, u8 *buf) in w1_ds2438_get_page() argument
62 if (w1_reset_select_slave(sl)) in w1_ds2438_get_page()
66 w1_write_block(sl->master, w1_buf, 2); in w1_ds2438_get_page()
68 if (w1_reset_select_slave(sl)) in w1_ds2438_get_page()
72 w1_write_block(sl->master, w1_buf, 2); in w1_ds2438_get_page()
74 count = w1_read_block(sl->master, buf, DS2438_PAGE_SIZE + 1); in w1_ds2438_get_page()
86 static int w1_ds2438_get_temperature(struct w1_slave *sl, int16_t *temperature) in w1_ds2438_get_temperature() argument
94 mutex_lock(&sl->master->bus_mutex); in w1_ds2438_get_temperature()
97 if (w1_reset_select_slave(sl)) in w1_ds2438_get_temperature()
99 w1_write_8(sl->master, W1_DS2438_CONVERT_TEMP); in w1_ds2438_get_temperature()
[all …]
Dw1_ds2408.c38 static int _read_reg(struct w1_slave *sl, u8 address, unsigned char* buf) in _read_reg() argument
41 dev_dbg(&sl->dev, 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 …]
Dw1_ds28e04.c71 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 …]
Dw1_ds2433.c61 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()
104 mutex_lock(&sl->master->bus_mutex); in eeprom_read()
111 if (w1_f23_refresh_block(sl, data, i)) { in eeprom_read()
121 if (w1_reset_select_slave(sl)) { in eeprom_read()
129 w1_write_block(sl->master, wrbuf, 3); in eeprom_read()
[all …]
Dw1_ds2805.c61 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 …]
Dw1_ds2413.c31 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 …]
Dw1_ds2430.c65 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 …]
Dw1_ds250x.c40 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 …]
Dw1_ds2431.c64 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 …]
Dw1_ds2780.c29 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 …]
Dw1_ds2781.c26 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 …]
Dw1_ds2406.c31 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 …]
Dw1_ds2405.c26 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 …]
/kernel/linux/linux-5.10/drivers/base/regmap/
Dregmap-w1.c24 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 …]
/kernel/linux/linux-5.10/drivers/net/ethernet/ti/
Dcpsw_sl.c189 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 …]
/kernel/linux/linux-5.10/drivers/w1/
Dw1.c80 struct w1_slave *sl = dev_to_w1_slave(dev); in w1_slave_release() local
82 dev_dbg(dev, "%s: Releasing %s [%p]\n", __func__, sl->name, sl); in w1_slave_release()
84 w1_family_put(sl->family); in w1_slave_release()
85 sl->master->slave_count--; in w1_slave_release()
90 struct w1_slave *sl = dev_to_w1_slave(dev); in name_show() local
92 return sprintf(buf, "%s\n", sl->name); in name_show()
99 struct w1_slave *sl = dev_to_w1_slave(dev); in id_show() local
100 ssize_t count = sizeof(sl->reg_num); in id_show()
102 memcpy(buf, (u8 *)&sl->reg_num, count); in id_show()
120 struct w1_slave *sl = kobj_to_w1_slave(kobj); in rw_write() local
[all …]
/kernel/linux/linux-5.10/include/linux/
Dseqlock.h814 #define seqlock_init(sl) \ argument
816 spin_lock_init(&(sl)->lock); \
817 seqcount_spinlock_init(&(sl)->seqcount, &(sl)->lock); \
824 #define DEFINE_SEQLOCK(sl) \ argument
825 seqlock_t sl = __SEQLOCK_UNLOCKED(sl)
833 static inline unsigned read_seqbegin(const seqlock_t *sl) in read_seqbegin() argument
835 unsigned ret = read_seqcount_begin(&sl->seqcount); in read_seqbegin()
853 static inline unsigned read_seqretry(const seqlock_t *sl, unsigned start) in read_seqretry() argument
861 return read_seqcount_retry(&sl->seqcount, start); in read_seqretry()
883 static inline void write_seqlock(seqlock_t *sl) in write_seqlock() argument
[all …]
/kernel/linux/linux-5.10/drivers/media/dvb-core/
Ddvb_ca_en50221.c230 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 …]
/kernel/linux/linux-5.10/drivers/power/supply/
Dbq27xxx_battery_hdq.c28 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 …]
/kernel/linux/linux-5.10/lib/mpi/
Dlonglong.h114 #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 …]

123456789