Hi Alan, A few doubts
+ +/** + * bma023_suspend - called on device suspend + * @client: i2c client of sensor
> + * @mesg: actual suspend type > + * > + * Put the device into sleep mode before we suspend the machine. > + */ > +static int bma023_suspend(struct i2c_client *client, pm_message_t mesg) > +{ > + bma023_set_power_mode(client, BMA023_SUSPEND); > + return 0; > +} > + > +/** > + * bma023_resume - called on device resume > + * @client: i2c client of sensor > + * > + * Put the device into powered mode on resume. > + */ > +static int bma023_resume(struct i2c_client *client) > +{ > + struct bma023_sensor *sensor = dev_get_drvdata(&client->dev); > + if (bma023_get_check_reg(client) != BMA023_INSPECT_VAL) > + bma023_initialize(sensor); The initialise is only in the resume and not in the runtime resume. > + bma023_set_power_mode(client, sensor->power_mode); where is sensor->power_mode getting updated. > + msleep(4); /* wait for accel chip resume */ The startup time from poweroff seems to be 3ms am I missing something. May consider a #define for the time. > + return 0; > +} > + > +#else > +#define bma023_suspend NULL > +#define bma023_resume NULL > +#endif <snip> >+ .probe = bma023_probe, >+ .remove = __devexit_p(bma023_remove), >+ .suspend = bma023_suspend, >+ .resume = bma023_resume, You may consider moving these also to the pm ops. However these can be taken up later feel free to ignore such comments. >+ .id_table = bma023_ids, -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html