Lines Matching refs:ddata

44 static void kb3930_off(struct kb3930 *ddata, int off_mode)  in kb3930_off()  argument
46 gpiod_direction_output(ddata->off_gpios->desc[EC_GPIO_OFF_MODE], in kb3930_off()
57 gpiod_direction_output(ddata->off_gpios->desc[EC_GPIO_WAVE], 0); in kb3930_off()
59 gpiod_direction_output(ddata->off_gpios->desc[EC_GPIO_WAVE], 1); in kb3930_off()
87 struct kb3930 *ddata = context; in kb3930_ec_ram_reg_write() local
89 return i2c_smbus_write_word_data(ddata->client, EC_RAM_OUT, in kb3930_ec_ram_reg_write()
96 struct kb3930 *ddata = context; in kb3930_ec_ram_reg_read() local
99 ret = i2c_smbus_write_word_data(ddata->client, EC_RAM_IN, reg); in kb3930_ec_ram_reg_read()
103 ret = i2c_smbus_read_word_data(ddata->client, EC_DATA_IN); in kb3930_ec_ram_reg_read()
126 struct kb3930 *ddata; in kb3930_probe() local
130 ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL); in kb3930_probe()
131 if (!ddata) in kb3930_probe()
134 kb3930_power_off = ddata; in kb3930_probe()
135 ddata->client = client; in kb3930_probe()
136 i2c_set_clientdata(client, ddata); in kb3930_probe()
138 ddata->ram_regmap = devm_regmap_init(dev, NULL, ddata, in kb3930_probe()
140 if (IS_ERR(ddata->ram_regmap)) in kb3930_probe()
141 return PTR_ERR(ddata->ram_regmap); in kb3930_probe()
143 ret = regmap_read(ddata->ram_regmap, EC_MODEL, &model); in kb3930_probe()
161 ddata->off_gpios = in kb3930_probe()
163 if (IS_ERR(ddata->off_gpios)) in kb3930_probe()
164 return PTR_ERR(ddata->off_gpios); in kb3930_probe()
165 if (ddata->off_gpios->ndescs < 2) { in kb3930_probe()
171 if (ddata->off_gpios) { in kb3930_probe()
182 struct kb3930 *ddata = i2c_get_clientdata(client); in kb3930_remove() local
184 if (ddata->off_gpios) { in kb3930_remove()