linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "José Expósito" <jose.exposito89@gmail.com>
To: Mia Kanashi <chad@redpilled.dev>
Cc: jikos@kernel.org, benjamin.tissoires@redhat.com,
	spbnick@gmail.com, pobrn@protonmail.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andreas Grosse <andig.mail@t-online.de>
Subject: Re: [PATCH v2] HID: uclogic: Add support for XP-PEN Deco LW
Date: Sat, 29 Oct 2022 09:58:32 +0200	[thread overview]
Message-ID: <20221029075832.GA8790@elementary> (raw)
In-Reply-To: <ED1CBF63-A70C-44FF-9F0B-80090EB347EA@redpilled.dev>

Hi Mia,

Thanks for testing :D

On Sat, Oct 29, 2022 at 03:28:10AM +0300, Mia Kanashi wrote:
> Hello!
> 
> Before device sends a battery report, you can notice garbage values in a power supply capacity.
> 
> You can see this by running
> `watch -n0.1 cat /sys/class/power_supply/hid-28bd-935-battery/uevent`
> and then connecting the tablet.
> 
> You can set it to a value here, but i think this is a problem in the global hid driver?

That shouldn't be problematic, because the charging status should be
initially set to unknown and change to charging/discharging [1] once
the device sends the first report.

Your desktop environment shouldn't display the battery percentage
while the status is unknown, so the initial values are ignored.

Here is my output of my XP-Pen Deco SW before receiving the battery
percentage:

 POWER_SUPPLY_NAME=hid-28bd-933-battery
 POWER_SUPPLY_TYPE=Battery
 POWER_SUPPLY_PRESENT=1
 POWER_SUPPLY_ONLINE=1
 POWER_SUPPLY_MODEL_NAME=UGTABLET Deco Pro SW
 POWER_SUPPLY_SCOPE=Device

And after:

 POWER_SUPPLY_NAME=hid-28bd-933-battery
 POWER_SUPPLY_TYPE=Battery
 POWER_SUPPLY_PRESENT=1
 POWER_SUPPLY_ONLINE=1
 POWER_SUPPLY_CAPACITY=99
 POWER_SUPPLY_MODEL_NAME=UGTABLET Deco Pro SW
 POWER_SUPPLY_STATUS=Discharging
 POWER_SUPPLY_SCOPE=Device

Jose

[1] Actually it should be set to discharging until this gets merged:
    https://lore.kernel.org/linux-input/20221028181849.23157-1-jose.exposito89@gmail.com/T/

  reply	other threads:[~2022-10-29  7:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28  8:23 [PATCH v2] HID: uclogic: Add support for XP-PEN Deco LW José Expósito
2022-10-29  0:28 ` Mia Kanashi
2022-10-29  7:58   ` José Expósito [this message]
2022-10-29 12:13     ` Mia Kanashi
2022-10-29 13:55       ` Mia Kanashi
2022-10-29 14:55         ` José Expósito
2022-10-29 16:04           ` Mia Kanashi
2022-10-30 11:34           ` 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=20221029075832.GA8790@elementary \
    --to=jose.exposito89@gmail.com \
    --cc=andig.mail@t-online.de \
    --cc=benjamin.tissoires@redhat.com \
    --cc=chad@redpilled.dev \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pobrn@protonmail.com \
    --cc=spbnick@gmail.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).