On 02/22/11 11:29, Alan Cox wrote: >>> +What: /sys/bus/i2c/devices/<busnum>-<devaddr>/range >>> +Date: February 2011 >>> +Contact: Alan Cox <alan@xxxxxxxxxxxxxxx> >>> +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 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html