On 25.05.2017 03:02, Guenter Roeck wrote: > On 05/09/2017 02:26 AM, Florian Echtler wrote: >> a brief question: I've recently found out how to enable Target Display Mode >> (i.e., use the iMac as a display for an external video source) when running >> Linux, namely by writing to some specific SMC keys. >> >> Right now, this involves an ugly hacked userspace tool that can't coexist >> with >> applesmc, so I'd like to do this "properly" and integrate support for these >> keys >> in applesmc as a sysfs node. >> > Just stumbled over this and realized I never answered. I don't really have > a strong opinion either way; the driver seems to be pretty much messed up > as-is > and might ask for a rework as mfd driver. Adding another attribute would not > make > that any worse. I'd expect Henrik to agree to any changes, though.
After a bit more research, I've found that we will probably need a separate ACPI
platform driver anyway. So my current approach would be to modify applesmc only
minimally to export the applesmc_{read,write,has}_key functions, and then call
those functions from the platform driver when the display hotplug event happens.
Would this be feasible? AFAICT the applesmc functions already perform proper
locking internally, so it shouldn't be an issue to call them from another
driver, correct?
Best, Florian
--
SENT FROM MY DEC VT50 TERMINAL
signature.asc
Description: OpenPGP digital signature
