Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
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	[thread overview]
Message-ID: <20261206021522.5225-1-atharvatiwarilinuxdev@gmail.com> (raw)
In-Reply-To: <CAD++jLnvvFTbeoLuX4-Pjjn8=weLJK0y1O6bC9MXZP7uSUSCKw@mail.gmail.com>

> 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.

  reply	other threads:[~2026-12-06  2:15 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 13:12 [PATCH 00/14] Add macsmc support for Intel Macs, replacing applesmc Atharva Tiwari
2026-12-04 13:12 ` [PATCH 01/14] treewide: Add backend for macsmc Atharva Tiwari
2026-12-04 13:56   ` sashiko-bot
2026-12-04 14:07   ` Andy Shevchenko
2026-12-04 16:45   ` Sven Peter
2026-12-04 13:12 ` [PATCH 02/14] platform/x86: add backend for macsmc in intel macs Atharva Tiwari
2026-12-04 13:58   ` sashiko-bot
2026-12-04 14:19   ` Andy Shevchenko
2026-12-04 14:52     ` Aditya Garg
2026-12-04 17:23       ` Andy Shevchenko
2026-12-04 18:34         ` Aditya Garg
2026-12-04 19:57     ` Atharva Tiwari
2026-12-04 20:23       ` Andy Shevchenko
2026-12-04 13:12 ` [PATCH 03/14] watchdog: add driver for apple smc Atharva Tiwari
2026-12-04 13:48   ` sashiko-bot
2026-12-04 13:12 ` [PATCH 04/14] iio/light: add new driver for macsmc Atharva Tiwari
2026-12-04 13:47   ` sashiko-bot
2026-12-04 13:12 ` [PATCH 05/14] iio/accel: add driver for apple SMS Atharva Tiwari
2026-12-04 14:11   ` sashiko-bot
2026-12-05 23:55   ` Linus Walleij
2026-12-06  2:15     ` Atharva Tiwari [this message]
2026-12-04 13:12 ` [PATCH 06/14] leds: add support for macsmc kbl Atharva Tiwari
2026-12-04 14:07   ` sashiko-bot
2026-12-04 13:12 ` [PATCH 07/14] rtc: add support for x86 macs in macsmc-rtc Atharva Tiwari
2026-12-04 14:12   ` Andy Shevchenko
2026-12-04 14:48     ` Aditya Garg
2026-12-04 17:06       ` Andy Shevchenko
2026-12-04 17:10         ` Aditya Garg
2026-12-04 17:18           ` Andy Shevchenko
2026-12-04 17:26       ` Sven Peter
2026-12-04 14:16   ` sashiko-bot
2026-12-04 13:12 ` [PATCH 08/14] treewide: Add a flag to detect the Apple T2 chip Atharva Tiwari
2026-12-04 14:11   ` sashiko-bot
2026-12-04 13:12 ` [PATCH 09/14] treewide: disable other rtc's in t2 macs Atharva Tiwari
2026-12-04 14:27   ` sashiko-bot
2026-12-04 13:12 ` [PATCH 10/14] power/supply: add support for x86 macs in macsmc-power Atharva Tiwari
2026-12-04 14:39   ` sashiko-bot
2026-12-04 13:12 ` [PATCH 11/14] acpi: disable battery and adapter for x86 apple machines Atharva Tiwari
2026-12-04 14:08   ` Andy Shevchenko
2026-12-04 14:56     ` Aditya Garg
2026-12-04 17:14       ` Andy Shevchenko
2026-12-04 18:51         ` Aditya Garg
2026-12-04 20:02           ` Andy Shevchenko
2026-12-04 20:13             ` Andy Shevchenko
2026-12-04 14:25   ` sashiko-bot
2026-12-04 13:12 ` [PATCH 12/14] hwmon/macsmc: add more types Atharva Tiwari
2026-12-04 14:37   ` sashiko-bot
2026-12-04 18:44     ` Guenter Roeck
2026-12-04 13:12 ` [PATCH 13/14] hwmon: add support for x86 macs in macsmc-hwmon Atharva Tiwari
2026-12-04 14:48   ` sashiko-bot
2026-12-04 18:45     ` Guenter Roeck
2026-12-04 20:13       ` Jarkko Sakkinen
2026-12-04 13:12 ` [PATCH 14/14] mfd/macsmc: add ioctl to access smc keys Atharva Tiwari
2026-12-04 13:40   ` Sasha Finkelstein
2026-12-04 19:43     ` Atharva Tiwari
2026-12-04 14:48   ` sashiko-bot
2026-12-04 14:20 ` [PATCH 00/14] Add macsmc support for Intel Macs, replacing applesmc Andy Shevchenko

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=20261206021522.5225-1-atharvatiwarilinuxdev@gmail.com \
    --to=atharvatiwarilinuxdev@gmail.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=asahi@lists.linux.dev \
    --cc=bp@alien8.de \
    --cc=brgl@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=dlechner@baylibre.com \
    --cc=j@jannau.net \
    --cc=jic23@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mfd@lists.linux.dev \
    --cc=neal@gompa.dev \
    --cc=nuno.sa@analog.com \
    --cc=pv4k@odayny.com \
    --cc=rafael@kernel.org \
    --cc=sven@kernel.org \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox