Re: [PATCH v3 1/1] input: add driver for Bosch Sensortec's BMA150accelerometer
From: Alan Cox
Date: Thu Jul 14 2011 - 18:37:48 EST
> + values represent the range given as +/- G.
> + Possible values are: 2, 4, 8.
> +
> + Reading: returns the current acceleration range.
> +
> + Writing: sets a new acceleration range.
Same comment as last time - these values are not discoverable so it
should set the nearest bigger range.
> +
> +
> +What: /sys/bus/i2c/devices/<busnum>-<devaddr>/bandwidth
> +Date: May 2011
> +Contact: Eric Andersson <eric.andersson@xxxxxxxxxxxxx>
> +Description: This is used to setup the digital filtering on ADC output data.
> + The values represent the bandwidth given in Hz.
> + Possible values are: 25, 50, 100, 190, 375, 750, 1500
> +
> + Reading: returns the current bandwidth.
> +
> + Writing: sets a new bandwidth.
Ditto
> + for (i = 0, ret = 0; i < ARRAY_SIZE(bw_val); i++)
> + ret += sprintf(buf + ret,
> + (bw_val[i].reg == bw) ? "[%d] " : "%d ",
> + bw_val[i].value);
sysfs nodes should really be single values
> +static const struct i2c_device_id bma150_id[] = {
> + { "bma150", 0 },
> + { "smb380", 0 },
bma023 ?
It also doesn't expose the thresholds or support interrupts which the
one I posted did.
So while its better it still seems incomplete - its certainly nowhere
near where it can replace the one I posted months ago and doesn't seem to
be making any headway.
Dmitry shall I repost the intel one - at this point I think it would be a
better starting point as it supports more features, interrupts and the
like although it's not perfect either.
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/