• Home
  • Raw
  • Download

Lines Matching refs:adap

26 static void sendbyte(struct l3_pins *adap, unsigned int byte)  in sendbyte()  argument
31 adap->setclk(adap, 0); in sendbyte()
32 udelay(adap->data_hold); in sendbyte()
33 adap->setdat(adap, byte & 1); in sendbyte()
34 udelay(adap->data_setup); in sendbyte()
35 adap->setclk(adap, 1); in sendbyte()
36 udelay(adap->clock_high); in sendbyte()
46 static void sendbytes(struct l3_pins *adap, const u8 *buf, in sendbytes() argument
53 udelay(adap->mode_hold); in sendbytes()
54 adap->setmode(adap, 0); in sendbytes()
55 udelay(adap->mode); in sendbytes()
57 adap->setmode(adap, 1); in sendbytes()
58 udelay(adap->mode_setup); in sendbytes()
59 sendbyte(adap, buf[i]); in sendbytes()
63 int l3_write(struct l3_pins *adap, u8 addr, u8 *data, int len) in l3_write() argument
65 adap->setclk(adap, 1); in l3_write()
66 adap->setdat(adap, 1); in l3_write()
67 adap->setmode(adap, 1); in l3_write()
68 udelay(adap->mode); in l3_write()
70 adap->setmode(adap, 0); in l3_write()
71 udelay(adap->mode_setup); in l3_write()
72 sendbyte(adap, addr); in l3_write()
73 udelay(adap->mode_hold); in l3_write()
75 sendbytes(adap, data, len); in l3_write()
77 adap->setclk(adap, 1); in l3_write()
78 adap->setdat(adap, 1); in l3_write()
79 adap->setmode(adap, 0); in l3_write()
86 static void l3_set_clk(struct l3_pins *adap, int val) in l3_set_clk() argument
88 gpio_set_value(adap->gpio_clk, val); in l3_set_clk()
91 static void l3_set_data(struct l3_pins *adap, int val) in l3_set_data() argument
93 gpio_set_value(adap->gpio_data, val); in l3_set_data()
96 static void l3_set_mode(struct l3_pins *adap, int val) in l3_set_mode() argument
98 gpio_set_value(adap->gpio_mode, val); in l3_set_mode()
101 int l3_set_gpio_ops(struct device *dev, struct l3_pins *adap) in l3_set_gpio_ops() argument
105 if (!adap->use_gpios) in l3_set_gpio_ops()
108 ret = devm_gpio_request_one(dev, adap->gpio_data, in l3_set_gpio_ops()
112 adap->setdat = l3_set_data; in l3_set_gpio_ops()
114 ret = devm_gpio_request_one(dev, adap->gpio_clk, in l3_set_gpio_ops()
118 adap->setclk = l3_set_clk; in l3_set_gpio_ops()
120 ret = devm_gpio_request_one(dev, adap->gpio_mode, in l3_set_gpio_ops()
124 adap->setmode = l3_set_mode; in l3_set_gpio_ops()