this is mainly an RFC that we could use the hall sensor as an input source.
SW_LID doesn't immediately make sense to me. Is there an input key that could be useful?
how to test:
sudo eveumu-record, select the gpio-keys and wait for events. You create the event by placing a permanent magnet near the back side of the phone, the area betwee the buttons(? @eric.kuzmenko or @angus.ainslie or @sebastian.krzyszkowiak would know better where it is).
It's described as a wakeup source so this is an elegant way to wake up the phone from system-suspend too.
Where is a permanent magnet? If you by accident own an X230 thinkpad laptop, the one for the LID is on the bottom side between the speakers. Touch the laptop and phone there and it works :) Other laptops might have one too, just look for it using a piece of metal (screwdriver or sth).