From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Bastien Nocera <hadess@hadess.net>
Cc: linux-input@vger.kernel.org, peter.hutterer@who-t.net,
chris@cnpbagwell.com, killertofu@gmail.com
Subject: Re: [PATCH] Input: wacom - Export battery scope
Date: Tue, 15 Oct 2013 23:36:04 -0700 [thread overview]
Message-ID: <20131016063604.GC4282@core.coreip.homeip.net> (raw)
In-Reply-To: <1381693762.21482.2.camel@nuvo>
On Sun, Oct 13, 2013 at 09:49:22PM +0200, Bastien Nocera wrote:
>
> This will stop UPower from detecting the tablet as a power supply,
> and using its battery status to hibernate or switch off the machine.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=70321
>
> Signed-off-by: Bastien Nocera <hadess@hadess.net>
Applied, thank you.
> ---
> drivers/input/tablet/wacom_sys.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
> index 79b69ea..e53416a 100644
> --- a/drivers/input/tablet/wacom_sys.c
> +++ b/drivers/input/tablet/wacom_sys.c
> @@ -1031,6 +1031,7 @@ static void wacom_destroy_leds(struct wacom *wacom)
> }
>
> static enum power_supply_property wacom_battery_props[] = {
> + POWER_SUPPLY_PROP_SCOPE,
> POWER_SUPPLY_PROP_CAPACITY
> };
>
> @@ -1042,6 +1043,9 @@ static int wacom_battery_get_property(struct power_supply *psy,
> int ret = 0;
>
> switch (psp) {
> + case POWER_SUPPLY_PROP_SCOPE:
> + val->intval = POWER_SUPPLY_SCOPE_DEVICE;
> + break;
> case POWER_SUPPLY_PROP_CAPACITY:
> val->intval =
> wacom->wacom_wac.battery_capacity * 100 / 31;
> --
> 1.8.3.1
>
>
--
Dmitry
prev parent reply other threads:[~2013-10-16 6:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-13 19:49 [PATCH] Input: wacom - Export battery scope Bastien Nocera
2013-10-16 6:36 ` Dmitry Torokhov [this message]
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=20131016063604.GC4282@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=chris@cnpbagwell.com \
--cc=hadess@hadess.net \
--cc=killertofu@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=peter.hutterer@who-t.net \
/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).