linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: Jason Gerecke <killertofu@gmail.com>, Jiri Kosina <jikos@kernel.org>
Cc: Linux Input <linux-input@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Ping Cheng <ping.cheng@wacom.com>,
	Jason Gerecke <jason.gerecke@wacom.com>
Subject: Re: [PATCH] HID: wacom: Correct power_supply type
Date: Wed, 20 Apr 2022 10:52:36 +0200	[thread overview]
Message-ID: <7a50fc20503e43c8172c42c621e01a111bc8104f.camel@hadess.net> (raw)
In-Reply-To: <CANRwn3SVcqFtv0BTTtqpM7M4WRN4sMKVo7_-9t5M8itt-rEttQ@mail.gmail.com>

On Wed, 2022-04-13 at 07:59 -0700, Jason Gerecke wrote:
> Following up on my previous comment. I've been able to test this
> patch
> with both flavors of wireless interface. Both Bluetooth (Intuos Pro)
> and dongle-based (Intuos5) appear to have mostly-correct behavior
> while charging and discharging, even when the battery level gradually
> drops to zero. The misbehaviors I see appear to be limited to upower
> mis-categorizing the devices as an e.g. keyboard or generic battery
> rather than as a tablet. This leads to some slightly confusing UI
> issues (e.g. GNOME and KDE referring to the device incorrectly), but
> nothing too annoying. If upower is taught to recognize tablets under
> more circumstances those issues should disappear.
> 
> Ping tells me you may have an Intuos4 Wireless, Bastien? Any
> additional testing you can do with that device would be appreciated,
> though even without it I'm personally comfortable enough to provide
> an
> ack:
> 
> Acked-by: Jason Gerecke <jason.gerecke@wacom.com>

Only devices I have is the original Wacom Graphire Bluetooth, and a
wired Intuos4 (PTK-640) which I think changed names not long after.

This might be enough:
https://gitlab.freedesktop.org/upower/upower/-/merge_requests/127

Please file an issue with the info discussed in the previous mail if it
isn't.

Cheers

> 
> Jason
> ---
> Now instead of four in the eights place /
> you’ve got three, ‘Cause you added one  /
> (That is to say, eight) to the two,     /
> But you can’t take seven from three,    /
> So you look at the sixty-fours....
> 
> On Tue, Apr 12, 2022 at 1:53 AM Jiri Kosina <jikos@kernel.org> wrote:
> > 
> > On Thu, 7 Apr 2022, Bastien Nocera wrote:
> > 
> > > POWER_SUPPLY_TYPE_USB seems to only ever be used by USB ports
> > > that are
> > > used to charge the machine itself (so a "system" scope), like the
> > > single USB port on a phone, rather than devices.
> > > 
> > > The wacom_sys driver is the only driver that sets its device
> > > battery as
> > > being a USB type, which doesn't seem correct based on its usage,
> > > so
> > > switch it to be a battery type like all the other USB-connected
> > > devices.
> > > 
> > > Signed-off-by: Bastien Nocera <hadess@hadess.net>
> > > ---
> > >  drivers/hid/wacom_sys.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> > > index 066c567dbaa2..620fe74f5676 100644
> > > --- a/drivers/hid/wacom_sys.c
> > > +++ b/drivers/hid/wacom_sys.c
> > > @@ -1777,7 +1777,7 @@ static int
> > > __wacom_initialize_battery(struct wacom *wacom,
> > >       bat_desc->get_property = wacom_battery_get_property;
> > >       sprintf(battery->bat_name, "wacom_battery_%ld", n);
> > >       bat_desc->name = battery->bat_name;
> > > -     bat_desc->type = POWER_SUPPLY_TYPE_USB;
> > > +     bat_desc->type = POWER_SUPPLY_TYPE_BATTERY;
> > >       bat_desc->use_for_apm = 0;
> > > 
> > >       ps_bat = devm_power_supply_register(dev, bat_desc,
> > > &psy_cfg);
> > 
> > Thanks Bastien, makes sense. CCing Jason and Ping (the Wacom driver
> > maintainers) to get their Ack.
> > 
> > --
> > Jiri Kosina
> > SUSE Labs
> > 


  reply	other threads:[~2022-04-20  8:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 11:54 [PATCH] HID: wacom: Correct power_supply type Bastien Nocera
2022-04-11 15:08 ` Jiri Kosina
2022-04-13 14:59   ` Jason Gerecke
2022-04-20  8:52     ` Bastien Nocera [this message]
2022-04-21 17:13       ` Jason Gerecke
2022-04-21  8:00     ` Jiri Kosina
2022-04-20  8:38   ` Bastien Nocera
2022-04-21  8:00     ` Jiri Kosina
2022-04-11 18:51 ` Jason Gerecke
2022-04-20  8:45   ` Bastien Nocera

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=7a50fc20503e43c8172c42c621e01a111bc8104f.camel@hadess.net \
    --to=hadess@hadess.net \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jason.gerecke@wacom.com \
    --cc=jikos@kernel.org \
    --cc=killertofu@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ping.cheng@wacom.com \
    /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;
as well as URLs for NNTP newsgroup(s).