From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from saturn.retrosnub.co.uk ([178.18.118.26]:36200 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757208AbcCUTgd (ORCPT ); Mon, 21 Mar 2016 15:36:33 -0400 Subject: Re: [PATCH v3 2/3] iio:magnetometer:ak8975: mounting matrix support To: Rob Herring , Gregor Boirie References: Cc: "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , Geert Uytterhoeven , Irina Tirdea , Cristina Moraru , Daniel Baluta , Julia Lawall From: Jonathan Cameron Message-ID: <56F044FD.6010206@kernel.org> Date: Mon, 21 Mar 2016 19:01:17 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org Backed out patches 2 and 3 for now whilst discussion continues. On 21/03/16 14:58, Rob Herring wrote: > On Thu, Mar 17, 2016 at 11:43 AM, Gregor Boirie > wrote: >> Expose a rotation matrix to indicate userspace the chip placement with >> respect to the overall hardware system. This is needed to adjust >> coordinates sampled from a magnetometer chip when its position deviates >> from the main hardware system. >> >> Final coordinates computation is delegated to userspace since: >> * computation may involve floating point arithmetics ; >> * it allows an application to combine adjustments with arbitrary >> transformations. >> >> This 3 dimentional space rotation matrix is expressed as 3x3 array of >> strings to support floating point numbers. It may be retrieved from a >> "in_magn_matrix" sysfs attribute file. It is declared into ak8975 DTS >> entry as a "matrix" property. > > Why is the sysfs interface specific to ak8975? > > Furthermore, why is it specific to magnetometer? Couldn't > accelerometers need the same thing? There's a thread discussing a > similar matrix on android-x86[1]. > > >> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt >> index 34a3206..f936f86 100644 >> --- a/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt >> +++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt >> @@ -9,6 +9,7 @@ Optional properties: >> >> - gpios : should be device tree identifier of the magnetometer DRDY pin >> - vdd-supply: an optional regulator that needs to be on to provide VDD >> + - matrix: an optional 3x3 mounting rotation matrix > > Perhaps "rotation-matrx" would be a better name in case there's ever > any other matrix needed. > > Rob > > [1] https://groups.google.com/forum/#!msg/android-x86/LaKhV8cT69o/G1rrVU0_JAAJ > -- > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >