From: Dmitry Torokhov <dtor@insightbb.com>
To: Jan Kratochvil <honza@jikos.cz>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
linux-input@atrey.karlin.mff.cuni.cz,
linux-usb-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH 1/3] xpad.c: Added flags into xpad_device structure and removed dpad_mapping.
Date: Wed, 2 May 2007 22:38:35 -0400 [thread overview]
Message-ID: <200705022238.36454.dtor@insightbb.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0705021644580.13550@twin.jikos.cz>
Hi Jan,
On Wednesday 02 May 2007 11:01, Jan Kratochvil wrote:
> This changes are expected to simplify further improves of this driver,
> We will need to add information if the driver is xbox360 device or not.
>
> Second option was to simply add u8 is_360, but what if we'll need to know
> if device is a wheel? Or if the device can have keyboard (or headset) attached.
>
...
> -#define MAP_DPAD_TO_BUTTONS 0
> -#define MAP_DPAD_TO_AXES 1
> -#define MAP_DPAD_UNKNOWN -1
> +#define XPAD_FLAGS_DPAD_TO_BUTTONS (1 << 0)
> +#define XPAD_FLAGS_DPAD_TO_AXES (1 << 1)
> +#define XPAD_FLAGS_DPAD_UNKNOWN (1 << 2)
>
Turning this into bitmaps suggests that all of these could be set which is
not the case. Since there are 3 spare bytes in xpad_device structure to
use for additional flags/bitmaps I'd leave dpad_mapping alone.
--
Dmitry
next prev parent reply other threads:[~2007-05-03 2:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-02 15:01 [PATCH 1/3] xpad.c: Added flags into xpad_device structure and removed dpad_mapping Jan Kratochvil
2007-05-03 2:38 ` Dmitry Torokhov [this message]
2007-05-03 12:40 ` Jan Kratochvil
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=200705022238.36454.dtor@insightbb.com \
--to=dtor@insightbb.com \
--cc=gregkh@suse.de \
--cc=honza@jikos.cz \
--cc=jkosina@suse.cz \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/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