Messages in this thread | | | Date | Tue, 21 Oct 2008 10:38:22 +0200 | From | Pavel Machek <> | Subject | Re: [PATCH] LIS3LV02Dx Accelerometer driver (take 4) |
| |
Hi!
> Here is a submission for 2.6.28 of a driver for the ST LIS3LV02Dx > accelerometer, a device found in various laptops (HP in particular) and > embedded devices. It's the fourth iteration of what used to be called > MDPS. I've now made the driver very simple, hoping to make it > unobjectionable for acceptance :-)
Andrew, can you merge this one? It is simple enough, got some testing, and can't really break anything...
Eric:
> +static int lis3lv02d_add(struct acpi_device *device) > +{ > + u8 val; > + > + if (!device) > + return -EINVAL; > + > + adev.device = device; > + strcpy(acpi_device_name(device), DRIVER_NAME); > + strcpy(acpi_device_class(device), ACPI_MDPS_CLASS); > + acpi_driver_data(device) = &adev;
This one needs to be device->acpi_driver_data = , check -next.
> +/* For the HP MDPS aka 3D Driveguard */ > +static struct acpi_driver lis3lv02d_driver = { > + .name = DRIVER_NAME, > + .class = ACPI_MDPS_CLASS, > + .ids = lis3lv02d_device_ids, > + .ops = { > + .add = lis3lv02d_add, > + .remove = lis3lv02d_remove, > +#ifdef CONFIG_PM > + .suspend = lis3lv02d_suspend, > + .resume = lis3lv02d_resume > +#endif > + } > +};
This one is more nicely done by #defining _suspend/_resume to NULL, IIRC. Pavel
-- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
| |