From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796523335; b=opZe/pqsxORFsqZf1aX4ujD0s2xMH4QDR2/kbZK+osrpSe5LKJ9j4GPksMbrAqluaOWd r9A1QflRqiZAQZHlVxx84xiS99J2JomzKnIEebl8pCJpiS96eJKzP3wFhrxL+yoJO19Qv DQtm4AABbdiOocU2+HYkDJ3LyDbSLNd04W8omUWSWdVNRUODhmiDt1w5gej7YoxjBZ1Os VaK8IyA+u3mGsSGsQY6VC8D9W4XzCyZf9m2QhqpIwvTrzkpn1Ugmn2B+GjxfRh5WY+bgh pC9AJC+XW5oa0gngE/pRUN6ibhh0notJNN9L+FzvMHg4cdR36IaRxx5SF+Djw7/bmhg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796523335; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=+mnkn7zPmHBZDe3hkl+s4i1dPcccozTC3tsbZ0P95iE=; b=VW4eyF9wnWg/j2/3GI3ryGVz1aMXBSYHmI0YnCQsKrOYKQO7HF1KPqY82muo7Z+uxywM dz40uf0+1dOM/YcqFRmctXDV/8XejadtKJtBMlyNLWO8psijwnCfUAcOGXPfiPbgHKCaL YjfDihrI+/jSqTfbSgF39B0Ma5jUsf+xhyxVfABU4D3XxOZnLGm+WrLQbRnurzjiK3Cdm 5ED/hgr0TX67Hzbh6JsU5lqUiel2wFl7y/4mUEVHcAR/3cwH0MxONhc6J1THSZvSSLTKh Avxc83baH9Pp6WU6ACuqxdPgHAKF5iPPIHsZz3firNqKZCF7HcS5fMKG5nQaTjv4fiQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=l7BuU2TY; arc=none smtp.remote-ip=74.125.82.46 Received: from mail-dl1-f46.google.com (mail-dl1-f46.google.com [74.125.82.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1255E606A322 for ; Sun, 6 Dec 2026 02:15:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1255E606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=l7BuU2TY Received: by mail-dl1-f46.google.com with SMTP id a92af1059eb24-1b5d5f12565so1673401c88.1 for ; Sat, 05 Dec 2026 18:15:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796523334; x=1797128134; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=+mnkn7zPmHBZDe3hkl+s4i1dPcccozTC3tsbZ0P95iE=; b=l7BuU2TY8aC0xOjIS+s06rmOq5cmWSEaxri+WiQHr59634S+b1BIc5ADxLRNmQu9HZ GWByi6Y6laH7P0aRHOxcx0vJr0iBzxi5BktnMlVAA/jftEnWuKGjyKWJPNe9gOYHkzG7 CAik/OwBZN16HIWPo1KHszUOCf71SHKsVyd4IVq7+dgl7j+3zvbEdxLn3TuAVgbDAZ+p Hm+pfOfrtJ8UyP3YRC5d71nYNQYvVPb/qAXWv8v3XvtffWNWqTooUfe8bkYWJxfI5d7S aWBJqOxCgBbHIi5P6vKX3V3/y3sb08cGAAsmV71Xlsn8qVGPIpe7Nb0IgHAKTr+yBVf4 8QyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796523334; x=1797128134; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=+mnkn7zPmHBZDe3hkl+s4i1dPcccozTC3tsbZ0P95iE=; b=EkSuCUSmLOhMCwZb0Yc93Hsv/KBzEIwA8Wj5MmiVFM8Tr9qGfXZU5gNdyRDETc/j8G h1Pzf7w/KqG3wZmm6+Go08y5AS2BvTw8PQD9hb1sWMEGbLLdnsQn0GhMZz1++xVNg9jr W0qfRorYv71kF6mRIm6mAztBQ3X3OE/oAM0na67oCvnoKrHFQP5dqc+FQ8PoeQxzGdCk HSleXkRRpOY2I3smgB69rgzBAakoE1bxS6LUgTbN77DSZ+5SEjj9wfBMGJL0dMJBsYCv 9fb85H+fxOb4p7Pf2PwbJPH9+tRl7Akai5cmIbDc005HnUJu8vArt2wFsi8kDjfyAdjc 9TPw== X-Forwarded-Encrypted: i=1; AL+hErETGLxfGe9tDrklufa7mxKtkrXSvgNRwlvb82shVGcTA/vsmaNtwVQ04Pk8j1WJ72DytRZ5N/WMLPPW@vger.kernel.org X-Gm-Message-State: AB4q+uEWU2+PZ6JhTfN/qxZQG6273IItx6RAiMOCfXeZfP6rOOene74B Nl0IhG8wqgPCFo4b6IPlCCEGmUpPjBwO4M78yVBB7JKlXipmwL07wrg= X-Gm-Gg: AZFdTZdiqtbbmCTSWYl9MJE9AoMkFe2AcFldKkRjRwKoS4URqMWeIGS58gQ7MtkZeG7 T9tmVTEFpRIAp6vpKgCMMVy6vfi56jfanCesVcAOylotGf53NQBK/2+EH34b+PX84VCE33SniD3 LgG3T7pPP2fOQStQyeeezHybTnTDtFME8KsMjqEdvvSMgAhVFAsqKgvYYgSCkHw3IByWJLXvR3I F0NLLrmJc6bpZp502JLj1G97O4v6iPNV19CDl9j5ENDp0G7+SCnXUN0OsddHgNgmVhzucEAiwNR rUgwX7CkVLNo458qQl44YWxRu96r1R+e2Upfrsp9OaCz6vp/CTNKphWl2USkFBtut2IVl+aTwc+ B6pQhSyv6G0OHwMTkBcJfVDsZOdBKM3yfG/qb0R2ojf2bdYtuTEEk/iy1G2Cwzf+ytNb9wsHIAM oqtoFGE00JXwLW2gJ2BGt3Vwt+8N5JRA0dhJ0Xw/ybllXnRIRQOOVN/mShavPnXBGUjrI7EGMHn IRVVhoZ9CdFxlIbIM2N8HzVfYR+7OUrdC4+N5BK4EUGtrYCcROgKXvH2J2j5OFpaF0UJDsgbnDK g9obHPxcZsZF5Sax7ZNdNhPYNmEkniZlMAm4SWxojhtpuMwzXUZ8R8ZqVfgFPOU= X-Received: by 2002:a05:7300:ac82:b0:386:b621:d8ec with SMTP id 5a478bee46e88-3875218f90fmr8161032eec.19.1796523334091; Sat, 05 Dec 2026 18:15:34 -0800 (PST) Received: from at-Standard-PC-Q35-ICH9-2009 ([117.99.50.232]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-38751f0f658sm28483047eec.0.2026.12.05.18.15.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 18:15:33 -0800 (PST) From: Atharva Tiwari To: linusw@kernel.org Cc: andy@kernel.org, antoniu.miclaus@analog.com, asahi@lists.linux.dev, atharvatiwarilinuxdev@gmail.com, bp@alien8.de, brgl@kernel.org, dave.hansen@linux.intel.com, dlechner@baylibre.com, j@jannau.net, jic23@kernel.org, lenb@kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-iio@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, linux@roeck-us.net, mfd@lists.linux.dev, neal@gompa.dev, nuno.sa@analog.com, pv4k@odayny.com, rafael@kernel.org, sven@kernel.org, x86@kernel.org Subject: Re: [PATCH 05/14] iio/accel: add driver for apple SMS Date: Sat, 5 Dec 2026 21:15:22 -0500 Message-ID: <20261206021522.5225-1-atharvatiwarilinuxdev@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit > I see there is a precedent for free-fall and shock detection being reported > like this in the ADXL372 driver. > > Still I'm a bit confused: is it *crystal clear* to a userspace consumer what is > going on here? > > Have you (or anyone else...) considered just adding IIO_MOD_FREE_FALL > and IIO_MOD_SHOCK_IMPACT? Wouldn't that be easier to understand > that this dubious use of IIO_MOD_X_AND_Y_AND_Z and > IIO_MOD_X_OR_Y_OR_Z? > > (Really a Jonathan question but I wanna raise it, perhaps existing > drivers like ADXL372 would need to be changed because two wrongs > don't make one right.) > > The orientation thingy I don't fully understand, we usually deduce orientation > from gravity and a mount matrix translating it such that you can see what > way is "down". > > Yours, > Linus Walleij I did some variations of what you're suggesting in the previous version of the driver: https://lore.kernel.org/all/20261029085504.3547-6-atharvatiwarilinuxdev@gmail.com/ But Jonathan said that I should use IIO_MOD_X_AND_Y_AND_Z instead of custom interrupts, so I removed it. And as for your orientation question, I can't really tell you because I don't know either. The names were taken directly from the macOS driver, and when testing I wasn't able to get an orientation interrupt at all, so I can't really tell what it means.