All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] bma023: Support for Bosch BMA023, BMA150 and SMB380 accelerometers
Date: Tue, 22 Feb 2011 12:15:16 +0000	[thread overview]
Message-ID: <4D63A8D4.2070702@cam.ac.uk> (raw)
In-Reply-To: <20110222112958.7802eaea@lxorguk.ukuu.org.uk>

On 02/22/11 11:29, Alan Cox wrote:
>>> +What:		/sys/bus/i2c/devices/<busnum>-<devaddr>/range
>>> +Date:		February 2011
>>> +Contact:	Alan Cox <alan@linux.intel.com>
>>> +Description:	Configure the sensing range of the device
>>> +		0: +/- 2G
>>> +		1: +/- 4G
>>> +		2: +/- 8G
>> Why the magic numbers? It would be trivial to just use the actual values so
>> why not do so?
> 
> That seems sensible, especially if other variants then decided to do
> other frequencies
> 
>>> +		(See the equations in the data sheet)
>> If possible, please direct people to a particular equation. Or given these
> 
> There is a datasheet link for the BMA150 in the driver now.
Yup, that is a welcome addition.  Bosch Sensortech seem to
specialise in incomprehensible data sheets but it's better to
have them than not!
> 
> I don't think duplicating the notes actually helps because you really
> need the data sheet to do the job anyway and it avoids duplicating stuff
> that may then go stale.
Hmm.. I'll let that go as to be honest I'd much rather see these in some
SI units rather than requiring the formula's at all. That would require
a bit more complexity in the driver, but lead to a much more generalizable
interface.  As you've previously stated you aren't interested in general
interfaces until they are defined elsewhere, we can leave that question for
now.  Note the issue of pinning down the equivalent sysfs interfaces for the
lis3 driver has just been raised in a discussion on the lm-sensors list about
finally moving that driver out of hwmon.

However, note that Dmitry has previously blocked merges of drivers into input
precisely because these sysfs interfaces haven't been defined cleanly (in that
case the relevant bits were just dropped from the driver in favour of platform
data). He wants to see something general across all such sensors whatever
subsystem they are actually in.

We can reopen the general interface discussion if people are happy to contribute.
It kind of died out last time without any decisions being taken.  We went with pretty
much what I proposed then in IIO for the event side of things.  Some of what you
cover in this driver has never come up before and hence needs discussion.

Jonathan


  reply	other threads:[~2011-02-22 12:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 10:06 [PATCH] bma023: Support for Bosch BMA023, BMA150 and SMB380 accelerometers Alan Cox
2011-02-14 11:50 ` Shubhrajyoti
2011-02-14 12:27   ` Alan Cox
2011-02-15  5:07     ` Shubhrajyoti
2011-02-21 19:08 ` Jonathan Cameron
2011-02-22 11:29   ` Alan Cox
2011-02-22 12:15     ` Jonathan Cameron [this message]
2011-02-22 12:25       ` Alan Cox
2011-02-22 12:38         ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2011-02-15  6:09 Shubhrajyoti
2011-05-31 16:11 Alan Cox

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=4D63A8D4.2070702@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-input@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.