lkml.org 
[lkml]   [2020]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] Input: add driver for power button on Dell Wyse 3020
On Thu, May 07, 2020 at 07:46:44PM +0200, Pavel Machek wrote:
> 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.

Usually it is endianness first and foremost, but this hardware is not
going to be used anywhere else...

--
Dmitry

\
 
 \ /
  Last update: 2020-05-07 21:23    [W:3.064 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site