Re: [Linuxwacom-devel] libwacom: [PATCH 3/3] lib: add IntegratedIn to device group

2012-11-23 Thread Olivier Fourdan

Hey Peter,

Peter Hutterer said the following on 11/23/2012 12:21 AM:

 [...]
 two things:
 I'd like to see a test that screams bloody murder when the flag is in fact
 unset. presumably if we add new devices we known whether they're built-in
 and the test should complain if we forget to add this.

No, it's what is meant here.

A database entry can miss the IntegratedIn filed, that's OK, many do 
actually.

By Not specifying IntegratedIn in the device database, you let 
libwacom decide by using the kernel flags (see previous patch).

If you specify IntegratedIn empty, then it means you actually force 
the value and ignore the kernel flags.

That's how it was before with BuiltIn actually, if BuiltIn is set 
it takes precedence over the kernel flags.


 the other thing: having UNSET as -1 for a bitmask is not a good choice, it
 requires any user to check for UNSET _and_ check for the mask set, since -1
 will always set all bits.

Oh I completely agree to this.

My first submitted patch was using WACOM_DEVICE_INTEGRATED_UNSET = (1 
 31) so that all lower (meaningful) bits where guaranteed to be 
zero, while we could still tell if the flags were set in the database 
definition or not (becuase we also use that to determine if we use the 
kernel flags if not set in the database definition, just like it was 
with BuiltIn).

The reason I changed that to -1 as a flag is because I've been told to 
in the previous review, see [1], [2] and [3].

So I'd rather not revert the change even though I agree. Unless we all 
reach some sort of a consensus (contradictory reviews somehow make it 
harder to adjust the patches).

 so either we bump all up by one so UNSET is 0 and NONE is 1, or we leave
 NONE at 0 and guarantee that we always define this and drop UNSET.

I don't think we want to drop unset (at least if we want to keep 
consistent with current behavior).

As to why 0 is not a good idea, well, that's because we want to tell 
if the flag is set in the database, see [2]

Cheers,
Olivier.

[1]  http://permalink.gmane.org/gmane.linux.drivers.wacom.devel/5302
[2]  http://permalink.gmane.org/gmane.linux.drivers.wacom.devel/5305
[3]  http://permalink.gmane.org/gmane.linux.drivers.wacom.devel/5315


--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] libwacom: [PATCH 2/3] data: add the IntegratedIn field to the tablet definitions

2012-11-23 Thread Olivier Fourdan

Peter Hutterer said the following on 11/23/2012 12:27 AM:

this should be a ';' right?


Yes.

To be consistent with my previous definition of unset (and to why we 
want to differentiate devices where the flag are explicitly set and 
those where it is not), I have now added IntegratedIn= (empty) for 
the tablet definitions which previously had BuiltIn=false so that we 
remain perfectly consistent with the previous BuiltIn definitions for 
the tablets which had that set.


Updated patch attached.

Cheers,
Olivier.
From bde7fffc9ee6c47be26186f9c9ae75a7b1ad062d Mon Sep 17 00:00:00 2001
From: Olivier Fourdan ofour...@redhat.com
Date: Mon, 8 Oct 2012 16:02:39 +0200
Subject: [PATCH 2/3] data: add the IntegratedIn field to the tablet definitions

If set, IntegratedIn specifies if the device is integrated
in the Display (screen tablet) and/or System (ISD, TabletPC).

This field supersedes the BuiltIn value.

Signed-off-by: Olivier Fourdan ofour...@redhat.com
---
 data/bamboo-2fg-4x5.tablet|2 +-
 data/bamboo-2fg-6x8.tablet|2 +-
 data/bamboo-2fg.tablet|2 +-
 data/bamboo-craft.tablet  |2 +-
 data/bamboo-one.tablet|2 +-
 data/bamboo-pen.tablet|2 +-
 data/cintiq-12wx.tablet   |2 +-
 data/cintiq-20wsx.tablet  |2 +-
 data/cintiq-21ux.tablet   |2 +-
 data/cintiq-21ux2.tablet  |2 +-
 data/cintiq-22hd.tablet   |2 +-
 data/cintiq-24hd-touch.tablet |2 +-
 data/cintiq-24hd.tablet   |2 +-
 data/dtf-720.tablet   |2 +-
 data/dti-520.tablet   |2 +-
 data/dtu-1631.tablet  |2 +-
 data/dtu-2231.tablet  |2 +-
 data/generic.tablet   |1 -
 data/graphire-wireless-8x6.tablet |2 +-
 data/intuos4-12x19.tablet |2 +-
 data/intuos4-4x6.tablet   |2 +-
 data/intuos4-6x9-wl.tablet|2 +-
 data/intuos4-6x9.tablet   |2 +-
 data/intuos4-8x13.tablet  |2 +-
 data/intuos5-m.tablet |2 +-
 data/intuos5-s.tablet |2 +-
 data/intuos5-touch-l.tablet   |2 +-
 data/intuos5-touch-m.tablet   |2 +-
 data/intuos5-touch-s.tablet   |2 +-
 data/isdv4-100.tablet |2 +-
 data/isdv4-101.tablet |2 +-
 data/isdv4-90.tablet  |2 +-
 data/isdv4-93.tablet  |2 +-
 data/isdv4-e3.tablet  |2 +-
 data/isdv4-e5.tablet  |2 +-
 data/isdv4-e6.tablet  |2 +-
 data/isdv4-ed.tablet  |2 +-
 data/isdv4-ef.tablet  |2 +-
 data/n-trig-pen.tablet|2 +-
 data/serial-wacf004.tablet|2 +-
 data/wacom.example|   15 ---
 41 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/data/bamboo-2fg-4x5.tablet b/data/bamboo-2fg-4x5.tablet
index fb0cb90..ab7afaf 100644
--- a/data/bamboo-2fg-4x5.tablet
+++ b/data/bamboo-2fg-4x5.tablet
@@ -14,13 +14,13 @@ DeviceMatch=usb:056a:00d1
 Class=Bamboo
 Width=6
 Height=4
+IntegratedIn=
 
 [Features]
 Stylus=true
 Reversible=true
 Touch=true
 Buttons=4
-BuiltIn=false
 
 [Buttons]
 Left=A;B;C;D
diff --git a/data/bamboo-2fg-6x8.tablet b/data/bamboo-2fg-6x8.tablet
index d7bf97c..08874e4 100644
--- a/data/bamboo-2fg-6x8.tablet
+++ b/data/bamboo-2fg-6x8.tablet
@@ -14,13 +14,13 @@ DeviceMatch=usb:056a:00d3
 Class=Bamboo
 Width=9
 Height=5
+IntegratedIn=
 
 [Features]
 Stylus=true
 Reversible=true
 Touch=true
 Buttons=4
-BuiltIn=false
 
 [Buttons]
 Left=A;B;C;D
diff --git a/data/bamboo-2fg.tablet b/data/bamboo-2fg.tablet
index 4e74ccd..103af68 100644
--- a/data/bamboo-2fg.tablet
+++ b/data/bamboo-2fg.tablet
@@ -13,13 +13,13 @@ DeviceMatch=usb:056a:00d0
 Class=Bamboo
 Width=5
 Height=3
+IntegratedIn=
 
 [Features]
 Stylus=false
 Reversible=true
 Touch=true
 Buttons=4
-BuiltIn=false
 
 [Buttons]
 Left=A;B;C;D
diff --git a/data/bamboo-craft.tablet b/data/bamboo-craft.tablet
index e68ca5d..e6e36ba 100644
--- a/data/bamboo-craft.tablet
+++ b/data/bamboo-craft.tablet
@@ -14,13 +14,13 @@ DeviceMatch=usb:056a:00d2
 Class=Bamboo
 Width=6
 Height=4
+IntegratedIn=
 
 [Features]
 Stylus=true
 Reversible=true
 Touch=true
 Buttons=4
-BuiltIn=false
 
 [Buttons]
 Left=A;B;C;D
diff --git a/data/bamboo-one.tablet b/data/bamboo-one.tablet
index feacf54..888f770 100644
--- a/data/bamboo-one.tablet
+++ b/data/bamboo-one.tablet
@@ -5,6 +5,7 @@ DeviceMatch=usb:056a:0069
 Class=Bamboo
 Width=5
 Height=4
+IntegratedIn=
 
 [Features]
 Reversible=true
@@ -13,4 +14,3 @@ Touch=false
 Ring=false
 NumStrips=0
 Buttons=0
-BuiltIn=false
diff --git a/data/bamboo-pen.tablet b/data/bamboo-pen.tablet
index a5b5aea..05f1689 100644
--- a/data/bamboo-pen.tablet
+++ b/data/bamboo-pen.tablet
@@ -13,10 +13,10 @@ DeviceMatch=usb:056a:00d4
 Class=Bamboo
 Width=6
 Height=4
+IntegratedIn=
 
 [Features]
 Stylus=true
 Reversible=true
 Touch=false
 Buttons=0