Thread (6 messages) flat view 6 messages, 2 authors, 2011-07-26

Re: [PATCH v5 1/1] input: add driver for Bosch Sensortec's BMA150 accelerometer

From: Eric Andersson <hidden>
Date: 2011-07-22 09:45:37
Also in: lkml

Hi Dmitry,

Thanks for reviewing!
quoted
+static int bma150_open(struct bma150_data *bma150)
+{
+#ifdef CONFIG_PM_RUNTIME
+	return pm_runtime_get_sync(&bma150->client->dev);
+#else
+	return bma150_set_mode(bma150->client, BMA150_MODE_NORMAL);
Hmm, this is kind of weird. I'd expect you want to try waking up the
parent in both cases (if no runtime pm then call to pm_runtime_get_sync
is basically a noop) and then wake up your device.
I am not sure what you mean? Are you suggesting something like:
	bma150_set_mode(bma150->client, BMA150_MODE_NORMAL);
	return pm_runtime_get_sync(&bma150->client->dev);

That would cause multiple bma150_set_mode() calls since
pm_runtime_get_sync() will trigger one if needed.

As for the rest of your comments I agree and will make sure to update
them for next version.

--
Best regards,
 Eric

 http://www.unixphere.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help