All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Donggeun Kim <dg77.kim@samsung.com>,
	linux-input@vger.kernel.org, kyungmin.park@samsung.com,
	Eric Piel <eric.piel@tremplin-utc.net>
Subject: Re: [PATCH] input: lis3dh: Add driver for lis3dh accelerometer
Date: Mon, 26 Sep 2011 09:56:42 +0100	[thread overview]
Message-ID: <4E803E4A.3080906@cam.ac.uk> (raw)
In-Reply-To: <4E803CB8.8070305@cam.ac.uk>

On 09/26/11 09:50, Jonathan Cameron wrote:
> On 09/24/11 07:09, Dmitry Torokhov wrote:
>> On Tue, Sep 20, 2011 at 11:26:00AM +0100, Jonathan Cameron wrote:
>>>> +
>>>> +enum lis3dh_interrupt_mode {
>>>> +	LIS3DH_OR_COMBINATION = 0x00,
>>>> +	LIS3DH_6D_MOVEMENT = 0x40,
>>>> +	LIS3DH_AND_COMBINATION = 0x80,
>>>> +	LIS3DH_6D_POSITION = 0xc0,
>>>> +};
>>> Enums seem silly when you don't have at least
>>> vaguely consecutive values.  Why not just use defines?
>>
>> Actually enums are not quite silly as compiler can warn you if you
>> handle all possible cases in a switch() statement.
>>
>> Thanks.
>>
> Fair point, if that is happening.  Right now none of this stack of enums
> seems to even be used and so I'm not sure which ones would make sense in
> a switch (or if they should be there at all).
Just registered what these are for.  They are for setting up magic values
in the platform data.  They aren't used in the driver at all, so in this
particular case enum's don't make any sense.


      reply	other threads:[~2011-09-26  8:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20  9:52 [PATCH] input: lis3dh: Add driver for lis3dh accelerometer Donggeun Kim
2011-09-20 10:26 ` Jonathan Cameron
2011-09-24  6:09   ` Dmitry Torokhov
2011-09-26  8:50     ` Jonathan Cameron
2011-09-26  8:56       ` Jonathan Cameron [this message]

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=4E803E4A.3080906@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=dg77.kim@samsung.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=eric.piel@tremplin-utc.net \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-input@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.