From: Saravana Kannan <saravanak@google.com>
To: Orson Zhai <orsonzhai@gmail.com>
Cc: Baolin Wang <baolin.wang7@gmail.com>,
sre@kernel.org, Linux PM <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Lyra Zhang <zhang.lyra@gmail.com>,
Android Kernel Team <kernel-team@android.com>
Subject: Re: [PATCH] power: supply: Allow charger manager can be built as a module
Date: Thu, 27 Feb 2020 18:54:16 -0800 [thread overview]
Message-ID: <CAGETcx9695=uVkSmtym36t6jbFXcEGf2JPVqWBi+sLZNG4xzSg@mail.gmail.com> (raw)
In-Reply-To: <CA+H2tpFAZuPSH0EErLt0Lj=TKLVq3XwEox06tbGzFaquSpKa0w@mail.gmail.com>
On Thu, Feb 27, 2020 at 8:06 AM Orson Zhai <orsonzhai@gmail.com> wrote:
>
> Hi Sebastian and other guys here,
>
> On Tue, Feb 11, 2020 at 4:51 PM Baolin Wang <baolin.wang7@gmail.com> wrote:
> >
> > Allow charger manager can be built as a module like other charger
> > drivers.
> >
> What do you think about this patch?
> We want to set charger-manager as module in our project for new Android devices.
>
> -Orson
>
> > Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
> > ---
> > drivers/power/supply/Kconfig | 2 +-
> > include/linux/power/charger-manager.h | 7 +------
> > 2 files changed, 2 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
> > index 9a5591a..195bc04 100644
> > --- a/drivers/power/supply/Kconfig
> > +++ b/drivers/power/supply/Kconfig
> > @@ -480,7 +480,7 @@ config CHARGER_GPIO
> > called gpio-charger.
> >
> > config CHARGER_MANAGER
> > - bool "Battery charger manager for multiple chargers"
> > + tristate "Battery charger manager for multiple chargers"
> > depends on REGULATOR
> > select EXTCON
> > help
> > diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h
> > index ad19e68..40493b2 100644
> > --- a/include/linux/power/charger-manager.h
> > +++ b/include/linux/power/charger-manager.h
> > @@ -248,11 +248,6 @@ struct charger_manager {
> > u64 charging_end_time;
> > };
> >
> > -#ifdef CONFIG_CHARGER_MANAGER
> > extern void cm_notify_event(struct power_supply *psy,
> > - enum cm_event_types type, char *msg);
> > -#else
> > -static inline void cm_notify_event(struct power_supply *psy,
> > - enum cm_event_types type, char *msg) { }
> > -#endif
> > + enum cm_event_types type, char *msg);
> > #endif /* _CHARGER_MANAGER_H */
You are breaking the kernel if CONFIG_CHARGER_MANAGER is disabled. Why
not simple change the #ifdef to
#if IS_ENABLED(CONFIG_CHARGER_MANAGER)
?
-Saravana
next prev parent reply other threads:[~2020-02-28 2:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 8:50 [PATCH] power: supply: Allow charger manager can be built as a module Baolin Wang
2020-02-27 16:06 ` Orson Zhai
2020-02-28 2:54 ` Saravana Kannan [this message]
2020-02-28 5:37 ` Baolin Wang
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='CAGETcx9695=uVkSmtym36t6jbFXcEGf2JPVqWBi+sLZNG4xzSg@mail.gmail.com' \
--to=saravanak@google.com \
--cc=baolin.wang7@gmail.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=sre@kernel.org \
--cc=zhang.lyra@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).