[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200507174644.GF1216@bug>
Date: Thu, 7 May 2020 19:46:44 +0200
From: Pavel Machek <pavel@....cz>
To: Lubomir Rintel <lkundrak@...sk>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Rob Herring <robh+dt@...nel.org>, linux-input@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] Input: add driver for power button on Dell Wyse 3020
Hi!
> +struct ec_input_response {
> + u8 reserved;
> + u8 msg_counter:2;
> + u8 count:2;
> + u8 type:4;
> + u8 data[3];
> +} __packed;
Bitfields, and relying on them being in the right place for communication with hardware.
We don't usually do that, and there may be reasons why we don't. I'm pretty sure it
breaks on big endian... and Im not sure if there's something else.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Powered by blists - more mailing lists