Hi Trent, On 18-10-01 16:35, Trent Piepho wrote: > On Mon, 2018-10-01 at 09:19 +0200, Marco Felsch wrote: > > On 18-09-28 17:19, Dmitry Torokhov wrote: > > > > > > > > > > > This patch adds the support for a generic gpio-based brownout > > > > detection. Upon a brownout the host system gets informed and the driver > > > > sends a keycode signal to the userspace. Per default this signal is > > > > mapped to KEY_POWER, so the system will shoutdown. > > > > > > I do not believe this functionality should be exposed as an input > > > device, as it has nothing to do with human interaction with the > > > computing device. To me this is akin over-current on a USB port, or > > > carrier signal on network interfaces. > > > > I'm still uncertain putting the code into the input framework. I tought > > a lot about the correct place. For me it's like a button, which is > > 'pressed' by the hardware. Yes, it's a bit abstract.. > > For quite a few years, the hwmon subsystem has had devices that will > generate an interrupt on low voltage (or high voltage, or high > temperature ...) and drivers that export that interrupt to userspace. > > This device doesn't seem any different that a somewhat limited hwmon > device with just an "in0_alarm" attribute. Thanks for the feedback and the idea. I will migrate the driver to the hwmon subsystem. Regards, Marco