Lines Matching defs:smo8800
3 * dell-smo8800.c - Dell Latitude ACPI SMO88XX freefall sensor driver
11 #define DRIVER_NAME "smo8800"
33 struct smo8800_device *smo8800 = data;
35 atomic_inc(&smo8800->counter);
36 wake_up_interruptible(&smo8800->misc_wait);
42 struct smo8800_device *smo8800 = data;
44 dev_info(smo8800->dev, "detected free fall\n");
51 struct smo8800_device *smo8800 = container_of(file->private_data,
61 atomic_set(&smo8800->counter, 0);
62 retval = wait_event_interruptible(smo8800->misc_wait,
63 (data = atomic_xchg(&smo8800->counter, 0)));
80 struct smo8800_device *smo8800 = container_of(file->private_data,
83 if (test_and_set_bit(0, &smo8800->misc_opened))
86 atomic_set(&smo8800->counter, 0);
92 struct smo8800_device *smo8800 = container_of(file->private_data,
95 clear_bit(0, &smo8800->misc_opened); /* release the device */
109 struct smo8800_device *smo8800;
111 smo8800 = devm_kzalloc(&device->dev, sizeof(*smo8800), GFP_KERNEL);
112 if (!smo8800) {
117 smo8800->dev = &device->dev;
118 smo8800->miscdev.minor = MISC_DYNAMIC_MINOR;
119 smo8800->miscdev.name = "freefall";
120 smo8800->miscdev.fops = &smo8800_misc_fops;
122 init_waitqueue_head(&smo8800->misc_wait);
124 err = misc_register(&smo8800->miscdev);
130 platform_set_drvdata(device, smo8800);
135 smo8800->irq = err;
137 err = request_threaded_irq(smo8800->irq, smo8800_interrupt_quick,
140 DRIVER_NAME, smo8800);
144 smo8800->irq, err);
149 smo8800->irq);
153 misc_deregister(&smo8800->miscdev);
159 struct smo8800_device *smo8800 = platform_get_drvdata(device);
161 free_irq(smo8800->irq, smo8800);
162 misc_deregister(&smo8800->miscdev);