Re: [Linuxwacom-devel] [PATCH] HID: wacom: Fix invalid power_supply_powers calls

2012-02-05 Thread Przemo Firszt
Dnia 2012-02-05, nie o godzinie 13:46 -0600, Chris Bagwell pisze:
> Looks good.  Do you know if this has made it into a released kernel or
> only in an RC?

> If the former, you'll probably want to Cc: the stable email address in
> addition to linux-input; but I forget what that address is right now.
> But I think this is only in RC's.
> 
RC only, so there is no need to update the stable. I added your
signed-by.
-- 
regards,
Przemo


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH] HID: wacom: Fix invalid power_supply_powers calls

2012-02-05 Thread Chris Bagwell
Looks good.  Do you know if this has made it into a released kernel or
only in an RC?

If the former, you'll probably want to Cc: the stable email address in
addition to linux-input; but I forget what that address is right now.
But I think this is only in RC's.

Chris

On Sun, Feb 5, 2012 at 1:23 PM, Przemo Firszt  wrote:
> power_supply_powers calls added in 35b4c01e29bdd9632dabf9784ed3486333f00427
> have to be called after power device is created. This patch also fixes the
> second call - it has to be "ac" instead of "battery"
>
> Signed-off-by: Przemo Firszt 
> ---
>  drivers/hid/hid-wacom.c |    7 ---
>  1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
> index b47e58b..acab74c 100644
> --- a/drivers/hid/hid-wacom.c
> +++ b/drivers/hid/hid-wacom.c
> @@ -531,7 +531,6 @@ static int wacom_probe(struct hid_device *hdev,
>        wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY;
>        wdata->battery.use_for_apm = 0;
>
> -       power_supply_powers(&wdata->battery, &hdev->dev);
>
>        ret = power_supply_register(&hdev->dev, &wdata->battery);
>        if (ret) {
> @@ -540,6 +539,8 @@ static int wacom_probe(struct hid_device *hdev,
>                goto err_battery;
>        }
>
> +       power_supply_powers(&wdata->battery, &hdev->dev);
> +
>        wdata->ac.properties = wacom_ac_props;
>        wdata->ac.num_properties = ARRAY_SIZE(wacom_ac_props);
>        wdata->ac.get_property = wacom_ac_get_property;
> @@ -547,14 +548,14 @@ static int wacom_probe(struct hid_device *hdev,
>        wdata->ac.type = POWER_SUPPLY_TYPE_MAINS;
>        wdata->ac.use_for_apm = 0;
>
> -       power_supply_powers(&wdata->battery, &hdev->dev);
> -
>        ret = power_supply_register(&hdev->dev, &wdata->ac);
>        if (ret) {
>                hid_warn(hdev,
>                         "can't create ac battery attribute, err: %d\n", ret);
>                goto err_ac;
>        }
> +
> +       power_supply_powers(&wdata->ac, &hdev->dev);
>  #endif
>        return 0;
>
> --
> 1.7.6.4
>

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH] HID: wacom: Exclude battery reporting for Intuos4 WL

2012-02-05 Thread Chris Bagwell
On Sun, Feb 5, 2012 at 1:15 PM, Przemo Firszt  wrote:
> Dnia 2012-02-04, sob o godzinie 10:52 -0600, Chris Bagwell pisze:
>> I've been monitoring battery topics lately (no pun intended :-) )
>> because I'm adding adding similar logic to wacom_wac for wireless.  I
>> know that the function power_supply_powers() that is in stack trace is
>> brand new (not in official kernel) and associates a power supply to a
>> specific device (nice so GUI's don't think our wacom's are powering
>> our machines).
>>
>> So I would suspect that feature first.  Can you try deleting the two
>> calls to that function and see if crash goes away?
> Hi Chris,
> Yes, it does :-)
>>
>> I peeked in jikos's hid tree and the function looks like it registers
>> a sysfs directory called "powers".  I suspect its meant to be under
>> the "wacom_battery" directory and thus the call needs to be moved
>> *after* registering the battery device.
>>
>> This looks needed even for graphire's to work.
>
> Works!
> Looks like there were 2 issues: a wrong (battery->ac) call & calls in
> wrong place.
>
> Patch is on the way. Let me know if I can I add your signed-by to the
> patch.
>
> Thanks!

Glad to hear its working.  Yes, you can add my sign off if you like.

Chris

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] [PATCH] HID: wacom: Fix invalid power_supply_powers calls

2012-02-05 Thread Przemo Firszt
power_supply_powers calls added in 35b4c01e29bdd9632dabf9784ed3486333f00427
have to be called after power device is created. This patch also fixes the
second call - it has to be "ac" instead of "battery"

Signed-off-by: Przemo Firszt 
---
 drivers/hid/hid-wacom.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index b47e58b..acab74c 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -531,7 +531,6 @@ static int wacom_probe(struct hid_device *hdev,
wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY;
wdata->battery.use_for_apm = 0;
 
-   power_supply_powers(&wdata->battery, &hdev->dev);
 
ret = power_supply_register(&hdev->dev, &wdata->battery);
if (ret) {
@@ -540,6 +539,8 @@ static int wacom_probe(struct hid_device *hdev,
goto err_battery;
}
 
+   power_supply_powers(&wdata->battery, &hdev->dev);
+
wdata->ac.properties = wacom_ac_props;
wdata->ac.num_properties = ARRAY_SIZE(wacom_ac_props);
wdata->ac.get_property = wacom_ac_get_property;
@@ -547,14 +548,14 @@ static int wacom_probe(struct hid_device *hdev,
wdata->ac.type = POWER_SUPPLY_TYPE_MAINS;
wdata->ac.use_for_apm = 0;
 
-   power_supply_powers(&wdata->battery, &hdev->dev);
-
ret = power_supply_register(&hdev->dev, &wdata->ac);
if (ret) {
hid_warn(hdev,
 "can't create ac battery attribute, err: %d\n", ret);
goto err_ac;
}
+
+   power_supply_powers(&wdata->ac, &hdev->dev);
 #endif
return 0;
 
-- 
1.7.6.4


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH] HID: wacom: Exclude battery reporting for Intuos4 WL

2012-02-05 Thread Przemo Firszt
Dnia 2012-02-04, sob o godzinie 10:52 -0600, Chris Bagwell pisze:
> I've been monitoring battery topics lately (no pun intended :-) )
> because I'm adding adding similar logic to wacom_wac for wireless.  I
> know that the function power_supply_powers() that is in stack trace is
> brand new (not in official kernel) and associates a power supply to a
> specific device (nice so GUI's don't think our wacom's are powering
> our machines).
> 
> So I would suspect that feature first.  Can you try deleting the two
> calls to that function and see if crash goes away?
Hi Chris,
Yes, it does :-) 
> 
> I peeked in jikos's hid tree and the function looks like it registers
> a sysfs directory called "powers".  I suspect its meant to be under
> the "wacom_battery" directory and thus the call needs to be moved
> *after* registering the battery device.
> 
> This looks needed even for graphire's to work.

Works!
Looks like there were 2 issues: a wrong (battery->ac) call & calls in
wrong place.

Patch is on the way. Let me know if I can I add your signed-by to the
patch.

Thanks!
-- 
Regards,
Przemo Firszt


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] libwacom

2012-02-05 Thread Favux ...
I've long suspected that if the stylus will work with the digitizer on
a consumer tablet then all the stylus hardware will work too.  So if
your BambooPT was a Pen model without an eraser a Bamboo Pen & Touch
model stylus with an eraser would have a working eraser even on the
Pen.  And the same with the tablet PCs.  However I can recall only a
few folks reporting this; apparently getting a new stylus isn't very
common.  So it is good you confirm it Jason.

Given that is true then we don't want to restrict stylus or other
capabilities for consumer tablets in libwacom.  So the upshot is
whether the different capabilities of the stylus need to be take into
account in the applet.  For example something that has been constantly
seen since the xorg.conf days is folks having a section for the cursor
even though their tablet doesn't come with a mouse/puck.  However just
like the stylus I suspect if the base model supports a puck then their
tablet would even though it was packaged without one.  Apparently a
lot think the cursor refers to the pointer arrow rather than another
input tool.  If the applet is presenting them with options to
configure a non-existent cursor, stylus side switch or eraser people
will be trying to configure them.  And then asking why that doesn't
work.  A lot of people with their first Wacom tablet don't realize
what a Wacom eraser looks like and don't know if they have one or not
or that it only works in eraser enabled programs.

It would be a good thing if the Wacom tablet applet's interface
somehow helped clear up confusion over the input tools.  Through tool
tips?  May be asking too much, but at least something to keep in the
back of the mind.

Favux

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH] HID: wacom: Exclude battery reporting for Intuos4 WL

2012-02-05 Thread Chris Bagwell
On Sun, Feb 5, 2012 at 8:08 AM, Przemo Firszt  wrote:
> Dnia 2012-02-04, sob o godzinie 10:52 -0600, Chris Bagwell pisze:
> Chris,
> irst of all - thanks for your comments!
>> I've been monitoring battery topics lately (no pun intended :-) )
>> because I'm adding adding similar logic to wacom_wac for wireless.  I
>> know that the function power_supply_powers() that is in stack trace is
>> brand new (not in official kernel) and associates a power supply to a
>> specific device (nice so GUI's don't think our wacom's are powering
>> our machines).
>
> It is in the mainline now [1]
>
>> So I would suspect that feature first.  Can you try deleting the two
>> calls to that function and see if crash goes away?
>
> I'm trying to figure out if theat's correct that Jeremy added twice the
> same call: power_supply_powers(&wdata->battery, &hdev->dev); instead of:
>        power_supply_powers(&wdata->battery, &hdev->dev);
>  and
>        power_supply_powers(&wdata->ac, &hdev->dev);
> It might be the reason - compiling now...

Yeah, that could be issue as well.  If I recall correctly, registering
the same sysfs file name or directory twice will cause crashes like
this.

Since that topic came up, I thought I'd bring up a related item.  I
notice that hid-wacom is installing "wacom_battery" and "wacom_ac".
hid-wiimote is only other example input I could find with battery and
its registering "wiimote_battery".

Since bluetooth is designs to support concurrent devices, I would
think this could lead to crashes in the off case that user has
multiple tablets.  Although 2 Wacom's may not be typical, I would
think 2 wiimotes would be.

We might should be putting a # on ends of those names like most other areas do.

Chris

>
>> I peeked in jikos's hid tree and the function looks like it registers
>> a sysfs directory called "powers".  I suspect its meant to be under
>> the "wacom_battery" directory and thus the call needs to be moved
>> *after* registering the battery device.
>
> I'll test that as well.
>
>> This looks needed even for graphire's to work.
>
> Anyone with Graphire to test it?
>
> [1] http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%
> 2Flinux.git&a=search&h=HEAD&st=grep&s=power_supply_powers
>

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH] HID: wacom: Exclude battery reporting for Intuos4 WL

2012-02-05 Thread Przemo Firszt
Dnia 2012-02-04, sob o godzinie 10:52 -0600, Chris Bagwell pisze:
Chris, 
irst of all - thanks for your comments!
> I've been monitoring battery topics lately (no pun intended :-) )
> because I'm adding adding similar logic to wacom_wac for wireless.  I
> know that the function power_supply_powers() that is in stack trace is
> brand new (not in official kernel) and associates a power supply to a
> specific device (nice so GUI's don't think our wacom's are powering
> our machines).

It is in the mainline now [1]

> So I would suspect that feature first.  Can you try deleting the two
> calls to that function and see if crash goes away?

I'm trying to figure out if theat's correct that Jeremy added twice the
same call: power_supply_powers(&wdata->battery, &hdev->dev); instead of:
power_supply_powers(&wdata->battery, &hdev->dev);
 and
power_supply_powers(&wdata->ac, &hdev->dev);
It might be the reason - compiling now...

> I peeked in jikos's hid tree and the function looks like it registers
> a sysfs directory called "powers".  I suspect its meant to be under
> the "wacom_battery" directory and thus the call needs to be moved
> *after* registering the battery device.

I'll test that as well.

> This looks needed even for graphire's to work.

Anyone with Graphire to test it?

[1] http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%
2Flinux.git&a=search&h=HEAD&st=grep&s=power_supply_powers

-- 
Przemo Firszt 


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel