Re: [Linuxwacom-devel] [PATCH 0/2] add "Integrated" feature for ISD

2012-10-09 Thread Ping Cheng
On Tue, Oct 9, 2012 at 11:32 AM, Olivier Fourdan  wrote:
> Ping Cheng said the following on 10/09/2012 07:21 PM:
>>
>>
>> "builtin" == "tablet is integrated with the display" ==
>> INPUT_PROP_DIRECT (defined in the kernel)
>
> That's the other thread I started, indeed ("BuiltIn flag set automatically,
> but based on what?")

I replied before I read through the message. You have a valid point.

> Why is that different? 0x02 would be INPUT_PROP_BUTTONPAD according to
> linux/input.h
>
> Why would that need to match the kernel definitions? Would DIRECT be more
> explicit than e.g. INTEGRATED_WITH_DISPLAY?
>
> And what would be the kernel equivalent of ISD in terms of kernel then?

As Jason pointed out, kernel  INPUT_PROP_* is not enough to resolve
our integrated/DISPLAY/SYSTEM issue. We need to update the code for
it. And extra information is needed.

> What I found for kernel is:
>
>   http://permalink.gmane.org/gmane.linux.kernel.input/21661
>   http://comments.gmane.org/gmane.linux.kernel.input/23241
>
> But there's nothing about ISD (which is what the proposed patches are about
> actually), so I am not sure I understand the need to follow the kernel
> naming convention for libwacom.
>
> Corollary question, if ISD and screen tablet can be deduced from the device
> properties in kernel, why do we need to have those in the database?

Obviously there was a reason to have it in the database. We just
forgot the reason ;).

Ping

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add "Integrated" feature for ISD

2012-10-09 Thread Jason Gerecke
On Tue, Oct 9, 2012 at 11:32 AM, Olivier Fourdan  wrote:
>
> Hi Ping,
>
> Ping Cheng said the following on 10/09/2012 07:21 PM:
>> On Mon, Oct 8, 2012 at 9:24 AM, Bastien Nocera  wrote:
>>> On Mon, 2012-10-08 at 18:12 +0200, Olivier Fourdan wrote:
>>> [...] Looks to me like "builtin" is "tablet is integrated with the
>>> display" and "ISD" is "tablet is integrated with the computer".
>> I agree with Bastien.
>>
>> "builtin" == "tablet is integrated with the display" ==
>> INPUT_PROP_DIRECT (defined in the kernel)
>
> That's the other thread I started, indeed ("BuiltIn flag set
> automatically, but based on what?")
>
> INPUT_PROP_DIRECT is defined as 0x01 in linux/input.h and the libwacom code 
> checks for 0x02:
>
> linux/input.h:
>
>#define INPUT_PROP_DIRECT   0x01/* direct input devices */
>
> in get_device_info() in libwacom/libwacom.c:
>
>   sysfs_path = g_build_filename ("/sys/class/input", devname, 
> "device/properties", NULL);
>   if (g_file_get_contents (sysfs_path,&contents, NULL, NULL)) {
>   int flag;
>   /* 0x01: POINTER flag
>* 0x02: DIRECT flag */
>   flag = atoi(contents);
>   *builtin = (flag&  0x02) == 0x02 ? IS_BUILTIN_TRUE : 
> IS_BUILTIN_FALSE;
>   g_free (contents);
>   }
>
>
> Why is that different? 0x02 would be INPUT_PROP_BUTTONPAD according to
> linux/input.h
>
>>> I'm sure we could deprecate the _is_builtin() function, and use a
>>> bitmask for this support instead?
>>>
>>> LIBWACOM_DEVICE_INTEGRATED_WITH_NONE = 0,
>>> LIBWACOM_DEVICE_INTEGRATED_WITH_DISPLAY = 1<<  0,
>>> LIBWACOM_DEVICE_INTEGRATED_WITH_COMPUTER = 1<<  2
>> I don't care which term/function name we use as long as they are
>> consistent with what defined in the kernel/driver.
>
> Why would that need to match the kernel definitions? Would DIRECT be
> more explicit than e.g. INTEGRATED_WITH_DISPLAY?
>
> And what would be the kernel equivalent of ISD in terms of kernel then?
>
>> Plus, they are documented.
>
> What I found for kernel is:
>
>http://permalink.gmane.org/gmane.linux.kernel.input/21661
>http://comments.gmane.org/gmane.linux.kernel.input/23241
>
The kernel's definitions aren't what we want anyway. DIRECT
essentially means "treat my coordinates as absolute" and POINTER means
"there is no physical object above the screen which can act as a
pointer". As Jeff points out in the first link, it'd be nicer if they
actually meant "I am built into a screen" and "you should display an
on-screen pointer" since that's what most drivers and utilities care
about.

> But there's nothing about ISD (which is what the proposed patches are
> about actually), so I am not sure I understand the need to follow the
> kernel naming convention for libwacom.
>
There's no way to get ISD status from the kernel, AFAIK. You can try
to do things heuristically, but you probably won't have much luck. A
serial connection almost certainly means ISD, unless you're using the
third-party serial Intuos kernel driver. A USB connection almost
certianly means non-ISD, unless you're using one of a very few tablet
PCs with a USB digitizer.

> Corollary question, if ISD and screen tablet can be deduced from the
> device properties in kernel, why do we need to have those in the database?
>
The screen tablet property was added to the database before the logic
to read it from the kernel was in place. Its mostly vestigial now (and
should be correctly detected if left unspecified) but I wouldn't nuke
support for it just in case.

Jason

---
When you're rife with devastation / There's a simple explanation:
You're a toymaker's creation / Trapped inside a crystal ball.
And whichever way he tilts it / Know that we must be resilient
We won't let them break our spirits / As we sing our silly song.

> Cheers,
> Olivier.
>

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add "Integrated" feature for ISD

2012-10-09 Thread Olivier Fourdan

Hi Ping,

Ping Cheng said the following on 10/09/2012 07:21 PM:
> On Mon, Oct 8, 2012 at 9:24 AM, Bastien Nocera  wrote:
>> On Mon, 2012-10-08 at 18:12 +0200, Olivier Fourdan wrote:
>> [...] Looks to me like "builtin" is "tablet is integrated with the 
>> display" and "ISD" is "tablet is integrated with the computer". 
> I agree with Bastien.
>
> "builtin" == "tablet is integrated with the display" ==
> INPUT_PROP_DIRECT (defined in the kernel)

That's the other thread I started, indeed ("BuiltIn flag set 
automatically, but based on what?")

INPUT_PROP_DIRECT is defined as 0x01 in linux/input.h and the libwacom code 
checks for 0x02:

linux/input.h:

   #define INPUT_PROP_DIRECT   0x01/* direct input devices */

in get_device_info() in libwacom/libwacom.c:

  sysfs_path = g_build_filename ("/sys/class/input", devname, 
"device/properties", NULL);
  if (g_file_get_contents (sysfs_path,&contents, NULL, NULL)) {
  int flag;
  /* 0x01: POINTER flag
   * 0x02: DIRECT flag */
  flag = atoi(contents);
  *builtin = (flag&  0x02) == 0x02 ? IS_BUILTIN_TRUE : IS_BUILTIN_FALSE;
  g_free (contents);
  }


Why is that different? 0x02 would be INPUT_PROP_BUTTONPAD according to 
linux/input.h

>> I'm sure we could deprecate the _is_builtin() function, and use a
>> bitmask for this support instead?
>>
>> LIBWACOM_DEVICE_INTEGRATED_WITH_NONE = 0,
>> LIBWACOM_DEVICE_INTEGRATED_WITH_DISPLAY = 1<<  0,
>> LIBWACOM_DEVICE_INTEGRATED_WITH_COMPUTER = 1<<  2
> I don't care which term/function name we use as long as they are
> consistent with what defined in the kernel/driver.

Why would that need to match the kernel definitions? Would DIRECT be 
more explicit than e.g. INTEGRATED_WITH_DISPLAY?

And what would be the kernel equivalent of ISD in terms of kernel then?

> Plus, they are documented.

What I found for kernel is:

   http://permalink.gmane.org/gmane.linux.kernel.input/21661
   http://comments.gmane.org/gmane.linux.kernel.input/23241

But there's nothing about ISD (which is what the proposed patches are 
about actually), so I am not sure I understand the need to follow the 
kernel naming convention for libwacom.

Corollary question, if ISD and screen tablet can be deduced from the 
device properties in kernel, why do we need to have those in the database?

Cheers,
Olivier.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add "Integrated" feature for ISD

2012-10-09 Thread Ping Cheng
On Mon, Oct 8, 2012 at 9:24 AM, Bastien Nocera  wrote:
> On Mon, 2012-10-08 at 18:12 +0200, Olivier Fourdan wrote:
>> Hi Bastien,
>>
>> Bastien Nocera said the following on 10/08/2012 06:06 PM:
>> > On Mon, 2012-10-08 at 17:39 +0200, Olivier Fourdan wrote:
>> >> As discussed on linuxwacom-devel mailing list, add a new "Integrated"
>> >> feature
>> >> for integrated system devices to identify eg. Tablet PC.
>> >>
>> >> Olivier Fourdan (2):
>> >> lib: add "Integrated" feature
>> >> data: add the Integrated field to ISD definitions
>> > Can't we find a better name than this? It means nothing unless you've
>> > been working on Wacom tablets for a long while...
>>
>> "TabletPC" was suggested, or "ISD" (but I find the later even more
>> cryptic).
>>
>> I did not choose "TabletPC" because I wasn't sure if all integrated
>> device would be TabletPC.
>>
>> But if TabletPC is preferable, I have no problem changing the names to
>> that.
>
> Looks to me like "builtin" is "tablet is integrated with the display"
> and "ISD" is "tablet is integrated with the computer".

I agree with Bastien.

"builtin" == "tablet is integrated with the display" ==
INPUT_PROP_DIRECT (defined in the kernel)

> I'm sure we could deprecate the _is_builtin() function, and use a
> bitmask for this support instead?
>
> LIBWACOM_DEVICE_INTEGRATED_WITH_NONE = 0,
> LIBWACOM_DEVICE_INTEGRATED_WITH_DISPLAY = 1 << 0,
> LIBWACOM_DEVICE_INTEGRATED_WITH_COMPUTER = 1 << 2

I don't care which term/function name we use as long as they are
consistent with what defined in the kernel/driver. Plus, they are
documented.

;-).

Ping

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add "Integrated" feature for ISD

2012-10-09 Thread Peter Hutterer
On Mon, Oct 08, 2012 at 06:12:41PM +0200, Olivier Fourdan wrote:
> Hi Bastien,
> 
> Bastien Nocera said the following on 10/08/2012 06:06 PM:
> > On Mon, 2012-10-08 at 17:39 +0200, Olivier Fourdan wrote:
> >> As discussed on linuxwacom-devel mailing list, add a new "Integrated"
> >> feature
> >> for integrated system devices to identify eg. Tablet PC.
> >>
> >> Olivier Fourdan (2):
> >> lib: add "Integrated" feature
> >> data: add the Integrated field to ISD definitions
> > Can't we find a better name than this? It means nothing unless you've
> > been working on Wacom tablets for a long while...
> 
> "TabletPC" was suggested, or "ISD" (but I find the later even more 
> cryptic).

"ISD" has the advantage that people don't know what it is, forcing them to
look it up (and hopefully it is documented in the function :)
I'm worried that TabletPC will get overloaded with other meanings in the
future.

Cheers,
   Peter

> I did not choose "TabletPC" because I wasn't sure if all integrated 
> device would be TabletPC.
> 
> But if TabletPC is preferable, I have no problem changing the names to 
> that.
> 
> Cheers,
> Olivier.
> 
> --
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> ___
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
> 

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add "Integrated" feature for ISD

2012-10-08 Thread Favux ...
IntegratedLCD?  Short for digitizer sandwiched with LCD.  Better than
DisplayMounted I think.  Sandwiched, Fused, Combined are also not
descriptive enough.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add "Integrated" feature for ISD

2012-10-08 Thread Bastien Nocera
On Mon, 2012-10-08 at 18:12 +0200, Olivier Fourdan wrote:
> Hi Bastien,
> 
> Bastien Nocera said the following on 10/08/2012 06:06 PM:
> > On Mon, 2012-10-08 at 17:39 +0200, Olivier Fourdan wrote:
> >> As discussed on linuxwacom-devel mailing list, add a new "Integrated"
> >> feature
> >> for integrated system devices to identify eg. Tablet PC.
> >>
> >> Olivier Fourdan (2):
> >> lib: add "Integrated" feature
> >> data: add the Integrated field to ISD definitions
> > Can't we find a better name than this? It means nothing unless you've
> > been working on Wacom tablets for a long while...
> 
> "TabletPC" was suggested, or "ISD" (but I find the later even more 
> cryptic).
> 
> I did not choose "TabletPC" because I wasn't sure if all integrated 
> device would be TabletPC.
> 
> But if TabletPC is preferable, I have no problem changing the names to 
> that.

Looks to me like "builtin" is "tablet is integrated with the display"
and "ISD" is "tablet is integrated with the computer".

I'm sure we could deprecate the _is_builtin() function, and use a
bitmask for this support instead?

LIBWACOM_DEVICE_INTEGRATED_WITH_NONE = 0,
LIBWACOM_DEVICE_INTEGRATED_WITH_DISPLAY = 1 << 0,
LIBWACOM_DEVICE_INTEGRATED_WITH_COMPUTER = 1 << 2


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add "Integrated" feature for ISD

2012-10-08 Thread Olivier Fourdan
Hi Bastien,

Bastien Nocera said the following on 10/08/2012 06:06 PM:
> On Mon, 2012-10-08 at 17:39 +0200, Olivier Fourdan wrote:
>> As discussed on linuxwacom-devel mailing list, add a new "Integrated"
>> feature
>> for integrated system devices to identify eg. Tablet PC.
>>
>> Olivier Fourdan (2):
>> lib: add "Integrated" feature
>> data: add the Integrated field to ISD definitions
> Can't we find a better name than this? It means nothing unless you've
> been working on Wacom tablets for a long while...

"TabletPC" was suggested, or "ISD" (but I find the later even more 
cryptic).

I did not choose "TabletPC" because I wasn't sure if all integrated 
device would be TabletPC.

But if TabletPC is preferable, I have no problem changing the names to 
that.

Cheers,
Olivier.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add "Integrated" feature for ISD

2012-10-08 Thread Bastien Nocera
On Mon, 2012-10-08 at 17:39 +0200, Olivier Fourdan wrote:
> As discussed on linuxwacom-devel mailing list, add a new "Integrated" 
> feature
> for integrated system devices to identify eg. Tablet PC.
> 
> Olivier Fourdan (2):
>lib: add "Integrated" feature
>data: add the Integrated field to ISD definitions

Can't we find a better name than this? It means nothing unless you've
been working on Wacom tablets for a long while...


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] [PATCH 0/2] add "Integrated" feature for ISD

2012-10-08 Thread Olivier Fourdan
As discussed on linuxwacom-devel mailing list, add a new "Integrated" 
feature
for integrated system devices to identify eg. Tablet PC.

Olivier Fourdan (2):
   lib: add "Integrated" feature
   data: add the Integrated field to ISD definitions

  data/isdv4-90.tablet |1 +
  data/isdv4-93.tablet |1 +
  data/isdv4-e3.tablet |1 +
  data/isdv4-e6.tablet |1 +
  data/isdv4-ed.tablet |1 +
  data/isdv4-ef.tablet |1 +
  data/n-trig-pen.tablet   |1 +
  data/serial-wacf004.tablet   |1 +
  data/wacom.example   |4 
  libwacom/libwacom-database.c |3 +++
  libwacom/libwacom.c  |6 ++
  libwacom/libwacom.h  |   11 +--
  libwacom/libwacomint.h   |3 ++-
  13 files changed, 32 insertions(+), 3 deletions(-)


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel