From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21B2CCF3964 for ; Thu, 19 Sep 2024 18:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dIULysZF5TMjnjwraqB7R4rq843vxTAF9l4sGzR+ceA=; b=coamWY98UUez/2UnhrWaaccwzm Nqha1umsKQndCJ6utVRJkOsq9rO7nKXMvo6xW9ANHYeshvuXS8jxSg4/5mRndYpwomo2h5T6kvcp0 BJvcWgTPA+yHowqEUVn5ahlviAAZzuPWP8mts7MfnRvlhA8lYQmASUvJ9gwnZOl0U6c02OXrKvNNg kaV2/wJXGSZY8VXd4Nr9Ay1t8x3PJQfLqjL+sqRdzjmlVMrNu52qlXVsk07uVQEAQ1oCHfy3zJ3GY JzZ0oOEmeA+LNKdiLUPNG+VxNJ/pTxqzo3/N1O0QDo3Rf8UFzs+oVFh5lXDW04KdZbpF1+17/DWHt XjTnuTeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srM0I-0000000AqFb-3U60; Thu, 19 Sep 2024 18:35:46 +0000 Received: from mail.manjaro.org ([116.203.91.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srLzB-0000000Aq9P-3MGE for linux-arm-kernel@lists.infradead.org; Thu, 19 Sep 2024 18:34:40 +0000 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1726770873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dIULysZF5TMjnjwraqB7R4rq843vxTAF9l4sGzR+ceA=; b=nCHrOSvOtD0+oRTQuarYBV89rrMdq/kQH6Z+Ir4t5BctX2hYMj/tmNNDqQASN4SOeTbUdU xUPDRDX/Nzyr5wsZejOuZ2b20PlJcbIqobXgLrvAecwy1BxxW0OGhQOo5LktEjnYHpOp10 fIHL5Dei7FtU0QU1EpEsc43m92vW7CiYLNJByduEk0Tp4sZoY3ZlmG2UGfU+2cTmQY06Vw /4wYp5rxUozH0esTWQ4DGYG3TRwl61bQYmEgZX3SB5bpg9hQIAhYNP/33Dl8yG7A8TXhiE C9ugtx0FhGNVT5NxYD+22D3flLCIZTDQvq6VAjZhLVFNYXIBzomX08lksu5feQ== Date: Thu, 19 Sep 2024 20:34:32 +0200 From: Dragan Simic To: Andrey Skvortsov Cc: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?UTF-8?Q?Ond=C5=99ej_Jirman?= Subject: Re: [PATCH] arm64: dts: sun50i-a64-pinephone: Add mount matrix for accelerometer In-Reply-To: References: <20240916204521.2033218-1-andrej.skvortzov@gmail.com> <6e5d0e9978bff30559c17f30d1495b59@manjaro.org> <8df5fc79a3e899738aa944a290774c72@manjaro.org> Message-ID: X-Sender: dsimic@manjaro.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=dsimic@manjaro.org smtp.mailfrom=dsimic@manjaro.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240919_113438_509065_0869DB0C X-CRM114-Status: GOOD ( 20.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Andrey, On 2024-09-18 17:58, Andrey Skvortsov wrote: > On 24-09-18 16:41, Andrey Skvortsov wrote: >> On 24-09-18 13:27, Dragan Simic wrote: > >> > > In device tree mount-matrix documentation [3] there is >> > > >> > > users would likely expect a value of 9.81 m/s^2 upwards along the (z) >> > > axis, i.e. out of the screen when the device is held with its screen >> > > flat on the planets surface. >> > > >> >> how I read kernel documentation. > > Hm, I think I misunderstand this part in kernel > documentation and you were correct. > >> Picture 2. >> >> up >> >> +--------+ >> ! ! >> ++++++++++ >> ! >> ! >> v >> gravity, Z >> >> down >> >> Screen (drawn as ++++++++++) is looking downwards ("its screen flat on >> the planets surface"). Gravity and Z axis point into the same >> direction and it's expected to read positive value. > > Sorry, for the noise. Oh, no worries at all. It's always good to discuss and iron out any kinks, to eliminate any possible doubt. The entire concept of how the values on the z-axis are read is a bit confusing indeed. When the device is stationary on a level surface, with the screen pointing upwards, it's like the device is defying the Earth's gravity pull. Well, not actually the device, but the surface it's resting on, :) but you get the point. >> Actually, unless my analysis is proven wrong, perhaps it would >> be better if I'd submit this patch in its final form, because it >> has diverged a lot from the original patch. IIUC, Ondrej only >> imported the original patch from somewhere, without some kind of >> proper attribution. [4] > > please, submit your version of this patch. I'd be glad to review it (I > think, I've already did) Yes, you basically already did that. :) Thanks, I'll send my version of the patch in the next few hours, with proper attribution included for you and Ondrej, of course. >>> [1] https://rimgo.reallyaweso.me/vrBXQPq.png >>> [2] https://rimgo.reallyaweso.me/uTmT1pr.png >>> [3] >>> https://www.kernel.org/doc/Documentation/devicetree/bindings/iio/mount-matrix.txt > >> [4] >> https://xff.cz/kernels/6.9/patches/0221-arm64-dts-sun50i-a64-pinephone-Add-mount-matrix-for-.patch