Lines Matching defs:ip
37 struct gpio_event *ip = input_get_drvdata(dev);
39 for (i = 0, ii = ip->info->info; i < ip->info->info_count; i++, ii++) {
41 tmp_ret = (*ii)->event(ip->input_dev, *ii,
42 &ip->state[i], type, code, value);
50 static int gpio_event_call_all_func(struct gpio_event *ip, int func)
57 ii = ip->info->info;
58 for (i = 0; i < ip->info->info_count; i++, ii++) {
65 ret = (*ii)->func(ip->input_dev, *ii, &ip->state[i],
76 i = ip->info->info_count;
77 ii = ip->info->info + i;
81 (*ii)->func(ip->input_dev, *ii, &ip->state[i], func & ~1);
92 struct gpio_event *ip;
93 ip = container_of(h, struct gpio_event, early_suspend);
94 gpio_event_call_all_func(ip, GPIO_EVENT_FUNC_SUSPEND);
95 ip->info->power(ip->info, 0);
100 struct gpio_event *ip;
101 ip = container_of(h, struct gpio_event, early_suspend);
102 ip->info->power(ip->info, 1);
103 gpio_event_call_all_func(ip, GPIO_EVENT_FUNC_RESUME);
110 struct gpio_event *ip;
125 ip = kzalloc(sizeof(*ip) +
126 sizeof(ip->state[0]) * event_info->info_count, GFP_KERNEL);
127 if (ip == NULL) {
132 platform_set_drvdata(pdev, ip);
140 input_set_drvdata(input_dev, ip);
141 ip->input_dev = input_dev;
142 ip->info = event_info;
145 ip->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1;
146 ip->early_suspend.suspend = gpio_event_suspend;
147 ip->early_suspend.resume = gpio_event_resume;
148 register_early_suspend(&ip->early_suspend);
150 ip->info->power(ip->info, 1);
153 input_dev->name = ip->info->name;
156 err = gpio_event_call_all_func(ip, GPIO_EVENT_FUNC_INIT);
170 gpio_event_call_all_func(ip, GPIO_EVENT_FUNC_UNINIT);
174 unregister_early_suspend(&ip->early_suspend);
176 ip->info->power(ip->info, 0);
180 kfree(ip);
187 struct gpio_event *ip = platform_get_drvdata(pdev);
189 gpio_event_call_all_func(ip, GPIO_EVENT_FUNC_UNINIT);
190 if (ip->info->power) {
192 unregister_early_suspend(&ip->early_suspend);
194 ip->info->power(ip->info, 0);
196 input_unregister_device(ip->input_dev);
197 kfree(ip);