mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Eric Andersson <eric.andersson@unixphere.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, zhengguang.guo@bosch-sensortec.com,
	stefan.nilsson@unixphere.com,
	Albert Zhang <xu.zhang@bosch-sensortec.com>
Subject: Re: [PATCH v3 1/1] input: add driver for Bosch Sensortec's BMA150 accelerometer
Date: Thu, 14 Jul 2011 23:40:30 +0100	[thread overview]
Message-ID: <20110714234030.30d6b455@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1310680572-27410-2-git-send-email-eric.andersson@unixphere.com>

> +		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@unixphere.com>
> +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

  reply	other threads:[~2011-07-14 22:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14 21:56 [PATCH v3 0/1] " Eric Andersson
2011-07-14 21:56 ` [PATCH v3 1/1] " Eric Andersson
2011-07-14 22:40   ` Alan Cox [this message]
2011-07-15  8:23     ` Eric Andersson
2011-07-15  8:41       ` Jonathan Cameron
2011-07-15 11:00         ` Eric Andersson

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=20110714234030.30d6b455@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=dmitry.torokhov@gmail.com \
    --cc=eric.andersson@unixphere.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan.nilsson@unixphere.com \
    --cc=xu.zhang@bosch-sensortec.com \
    --cc=zhengguang.guo@bosch-sensortec.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®