Only detail thing I see is this trivial one:
+static int bma150_open(struct bma150_data *bma150)
+{
+ int ret = bma150_set_mode(bma150->client, BMA150_MODE_NORMAL);
+ msleep(2);
+ return ret;
Does the msleep here need to be inside the mutex lock for the IRQ
case ?
Otherwise it looks good except that the lack of runtime pm means it'll
stop the rest of the bus heirarchy from suspending and breaks
suspend/resume on runtime_pm based systems. I think we still need runtime
pm taking the pm reference on the input open dropping it on the close and
that's about it ? That will be sufficient to let the i2c bus controller
also runtime suspend/resume.
Not so sure about the sysfs drop - but I think its probably the right
thing for upstream and any long term 'we need a fancy driver' would be
via IIO which would sort all the interface problems.
Alan