Re: [PATCH v4 1/1] input: add driver for Bosch Sensortec's BMA150accelerometer

From: Alan Cox
Date: Thu Jul 21 2011 - 05:54:13 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/