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