All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Sonny Sasaka <sonnysasaka@chromium.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] build: Add option to disable battery profile
Date: Wed, 6 May 2020 13:24:27 +0200	[thread overview]
Message-ID: <4A9E7F0B-4AB8-4330-BB2B-1A0EAA4EFDE8@holtmann.org> (raw)
In-Reply-To: <20200501215352.23858-1-sonnysasaka@chromium.org>

Hi Sonny,

> Some clients may want to handle battery profile through the generic GATT
> interface rather than BlueZ's internal Battery interface.
> ---
> Makefile.plugins | 2 ++
> configure.ac     | 4 ++++
> 2 files changed, 6 insertions(+)
> 
> diff --git a/Makefile.plugins b/Makefile.plugins
> index 98eee9ec8..b9733d31c 100644
> --- a/Makefile.plugins
> +++ b/Makefile.plugins
> @@ -101,8 +101,10 @@ builtin_cppflags += $(ALSA_CFLAGS)
> builtin_ldadd += $(ALSA_LIBS)
> endif
> 
> +if BATTERY
> builtin_modules += battery
> builtin_sources += profiles/battery/battery.c
> +endif
> 
> if SIXAXIS
> plugin_LTLIBRARIES += plugins/sixaxis.la
> diff --git a/configure.ac b/configure.ac
> index 1433ace4a..d4fa862b5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -181,6 +181,10 @@ AC_ARG_ENABLE(hog, AC_HELP_STRING([--disable-hog],
> 		[disable HoG profile]), [enable_hog=${enableval}])
> AM_CONDITIONAL(HOG, test "${enable_hog}" != "no")
> 
> +AC_ARG_ENABLE(battery, AC_HELP_STRING([--disable-battery],
> +		[disable battery profile]), [enable_battery=${enableval}])
> +AM_CONDITIONAL(BATTERY, test "${enable_battery}" != "no")
> +
> AC_ARG_ENABLE(health, AC_HELP_STRING([--enable-health],
> 		[enable health profiles]), [enable_health=${enableval}])
> AM_CONDITIONAL(HEALTH, test "${enable_health}" = "yes")

I have a little bit concern splitting this since battery service and HoG are kinda connected. Wouldn’t it be better we have a cleaner interface. Maybe we should actually integrate cleanly with /dev/upower or similar.

Regards

Marcel


  reply	other threads:[~2020-05-06 11:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 21:53 [PATCH] build: Add option to disable battery profile Sonny Sasaka
2020-05-06 11:24 ` Marcel Holtmann [this message]
2020-05-06 14:01   ` Alain Michaud
2020-05-06 14:08   ` Bastien Nocera
2020-05-06 16:35     ` Luiz Augusto von Dentz
2020-05-06 16:44       ` Marcel Holtmann
2020-05-06 16:44       ` Luiz Augusto von Dentz
2020-05-06 17:18         ` Sonny Sasaka
2020-05-13  7:50         ` Marcel Holtmann

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=4A9E7F0B-4AB8-4330-BB2B-1A0EAA4EFDE8@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=sonnysasaka@chromium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.