public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Lubomir Rintel <lkundrak@v3.sk>, Rob Herring <robh+dt@kernel.org>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Input: add driver for power button on Dell Wyse 3020
Date: Thu, 7 May 2020 12:23:34 -0700	[thread overview]
Message-ID: <20200507192334.GJ89269@dtor-ws> (raw)
In-Reply-To: <20200507174644.GF1216@bug>

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

  reply	other threads:[~2020-05-07 19:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03 20:12 [PATCH 0/2] Add driver for power button on Dell Wyse 3020 Lubomir Rintel
2020-05-03 20:12 ` [PATCH 1/2] dt-bindings: input: Add Dell Wyse 3020 Power Button binding Lubomir Rintel
2020-05-06  0:08   ` Dmitry Torokhov
2020-05-03 20:12 ` [PATCH 2/2] Input: add driver for power button on Dell Wyse 3020 Lubomir Rintel
2020-05-07 17:46   ` Pavel Machek
2020-05-07 19:23     ` Dmitry Torokhov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-03-18 11:45 Lubomir Rintel
2020-03-18 11:45 ` [PATCH 2/2] " Lubomir Rintel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200507192334.GJ89269@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox