All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shubhrajyoti <shubhrajyoti@ti.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-input@vger.kernel.org
Subject: Re: [PATCH] bma023: Support for Bosch BMA023, BMA150 and SMB380 accelerometers
Date: Tue, 15 Feb 2011 11:39:45 +0530	[thread overview]
Message-ID: <4D5A18A9.8090104@ti.com> (raw)

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,




             reply	other threads:[~2011-02-15  6:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15  6:09 Shubhrajyoti [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-05-31 16:11 [PATCH] bma023: Support for Bosch BMA023, BMA150 and SMB380 accelerometers Alan Cox
2011-02-14 10:06 Alan Cox
2011-02-14 11:50 ` Shubhrajyoti
2011-02-14 12:27   ` Alan Cox
2011-02-15  5:07     ` Shubhrajyoti
2011-02-21 19:08 ` Jonathan Cameron
2011-02-22 11:29   ` Alan Cox
2011-02-22 12:15     ` Jonathan Cameron
2011-02-22 12:25       ` Alan Cox
2011-02-22 12:38         ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D5A18A9.8090104@ti.com \
    --to=shubhrajyoti@ti.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.