Lines Matching full:gw
37 struct gw_pld *gw = gpiochip_get_data(gc); in gw_pld_input8() local
39 gw->out |= BIT(offset); in gw_pld_input8()
40 return i2c_smbus_write_byte(gw->client, gw->out); in gw_pld_input8()
45 struct gw_pld *gw = gpiochip_get_data(gc); in gw_pld_get8() local
48 val = i2c_smbus_read_byte(gw->client); in gw_pld_get8()
55 struct gw_pld *gw = gpiochip_get_data(gc); in gw_pld_output8() local
58 gw->out |= BIT(offset); in gw_pld_output8()
60 gw->out &= ~BIT(offset); in gw_pld_output8()
62 return i2c_smbus_write_byte(gw->client, gw->out); in gw_pld_output8()
73 struct gw_pld *gw; in gw_pld_probe() local
76 gw = devm_kzalloc(dev, sizeof(*gw), GFP_KERNEL); in gw_pld_probe()
77 if (!gw) in gw_pld_probe()
80 gw->chip.base = -1; in gw_pld_probe()
81 gw->chip.can_sleep = true; in gw_pld_probe()
82 gw->chip.parent = dev; in gw_pld_probe()
83 gw->chip.owner = THIS_MODULE; in gw_pld_probe()
84 gw->chip.label = dev_name(dev); in gw_pld_probe()
85 gw->chip.ngpio = 8; in gw_pld_probe()
86 gw->chip.direction_input = gw_pld_input8; in gw_pld_probe()
87 gw->chip.get = gw_pld_get8; in gw_pld_probe()
88 gw->chip.direction_output = gw_pld_output8; in gw_pld_probe()
89 gw->chip.set = gw_pld_set8; in gw_pld_probe()
90 gw->client = client; in gw_pld_probe()
98 gw->out = 0xFF; in gw_pld_probe()
100 i2c_set_clientdata(client, gw); in gw_pld_probe()
102 ret = devm_gpiochip_add_data(dev, &gw->chip, gw); in gw_pld_probe()
112 { "gw-pld", },