Lines Matching full:sl
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()
75 static int bq27xxx_battery_hdq_add_slave(struct w1_slave *sl) in bq27xxx_battery_hdq_add_slave() argument
79 di = devm_kzalloc(&sl->dev, sizeof(*di), GFP_KERNEL); in bq27xxx_battery_hdq_add_slave()
83 dev_set_drvdata(&sl->dev, di); in bq27xxx_battery_hdq_add_slave()
85 di->dev = &sl->dev; in bq27xxx_battery_hdq_add_slave()
93 static void bq27xxx_battery_hdq_remove_slave(struct w1_slave *sl) in bq27xxx_battery_hdq_remove_slave() argument
95 struct bq27xxx_device_info *di = dev_get_drvdata(&sl->dev); in bq27xxx_battery_hdq_remove_slave()