From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Phil Reid <preid@electromag.com.au>
Cc: Wolfram Sang <wsa@the-dreams.de>,
robh+dt@kernel.org, mark.rutland@arm.com, sre@kernel.org,
jdelvare@suse.com, jglauber@cavium.com, david.daney@cavium.com,
peda@axentia.se, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v7 04/10] i2c: i2c-smbus: add of_i2c_setup_smbus_alert
Date: Wed, 28 Jun 2017 14:42:37 +0200 [thread overview]
Message-ID: <20170628124237.GE26073@mail.corp.redhat.com> (raw)
In-Reply-To: <96160849-c1c7-afdd-8f9f-c9269f66efb2@electromag.com.au>
On Jun 28 2017 or thereabouts, Phil Reid wrote:
> > > > diff --git a/include/linux/i2c-smbus.h b/include/linux/i2c-smbus.h
> > > > index 19efbd1..b5261c1 100644
> > > > --- a/include/linux/i2c-smbus.h
> > > > +++ b/include/linux/i2c-smbus.h
> > > > @@ -49,4 +49,13 @@ struct i2c_client *i2c_setup_smbus_alert(struct i2c_adapter *adapter,
> > > > struct i2c_smbus_alert_setup *setup);
> > > > int i2c_handle_smbus_alert(struct i2c_client *ara);
> > > > +#if IS_ENABLED(CONFIG_I2C_SMBUS)
> >
> > Can't we have:
> > #if IS_ENABLED(CONFIG_I2C_SMBUS) && IS_ENABLED(*whatever OF config symbol is*)
> >
> > Because otherwise, even if the code works from what I understand, we
> > will pull in i2c-smbus from i2c-core all the time.
>
> Sorry I'm lost here.
> CONFIG_I2C_SMBUS looks to the be symbol that enables i2c-smbus in the makefile.
> I thought this would be enough to keep it out of the core.
>
Assuming CONFIG_I2C_SMBUS is set, my concerns are regarding the fact
that i2c-smbus.ko will now be pulled in by i2c-core.ko no matter what.
There is nothing wrong per se in the code, just that now i2c-core
depends on i2c_smbus given that you call i2c_setup_smbus_alert() in
i2c-core. So that makes the whole point of having a separate module
for i2c-smbus moot.
If of_i2c_setup_smbus_alert() is masked by IS_ENABLED(OF), then the call
for i2c_setup_smbus_alert() will only be done with OF enabled, meaning
that i2c-smbus.ko will only be pulled in by i2c-core when OF is in use.
But maybe that is too much of thinking from my part :)
Cheers,
Benjamin
next prev parent reply other threads:[~2017-06-28 12:42 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-15 13:59 [PATCH v7 00/10] Add sbs-manager with smbalert support Phil Reid
2017-06-15 13:59 ` [PATCH v7 01/10] power: supply: sbs-battery: remove incorrect le16_to_cpu calls Phil Reid
[not found] ` <1497535178-12001-2-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-06-15 14:49 ` Sebastian Reichel
2017-06-15 13:59 ` [PATCH v7 02/10] power: supply: bq24735: " Phil Reid
[not found] ` <1497535178-12001-3-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-06-15 14:50 ` Sebastian Reichel
2017-06-15 13:59 ` [PATCH v7 03/10] i2c: i2c-smbus: Use threaded irq for smbalert Phil Reid
2017-06-19 15:27 ` Wolfram Sang
2017-06-20 2:30 ` Phil Reid
2017-06-23 12:11 ` Benjamin Tissoires
2017-06-15 13:59 ` [PATCH v7 04/10] i2c: i2c-smbus: add of_i2c_setup_smbus_alert Phil Reid
[not found] ` <1497535178-12001-5-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-06-19 15:27 ` Wolfram Sang
2017-06-23 12:15 ` Benjamin Tissoires
2017-06-28 6:48 ` Phil Reid
2017-06-28 12:42 ` Benjamin Tissoires [this message]
2017-06-15 13:59 ` [PATCH v7 05/10] i2c: core: call of_i2c_setup_smbus_alert in i2c_register_adapter Phil Reid
2017-06-19 15:28 ` Wolfram Sang
2017-06-23 12:19 ` Benjamin Tissoires
2017-06-28 6:44 ` Phil Reid
2017-06-28 12:45 ` Benjamin Tissoires
2017-07-11 7:52 ` Phil Reid
2017-07-21 9:24 ` Benjamin Tissoires
[not found] ` <20170721092431.GA11387-/m+UfqrgI5QNLKR9yMNcA1aTQe2KTcn/@public.gmane.org>
2017-07-24 7:38 ` Phil Reid
2017-06-15 13:59 ` [PATCH v7 06/10] i2c: mux: pca954x: Call request irq after adding mux segments Phil Reid
2017-06-15 13:59 ` [PATCH v7 07/10] Documentation: Add sbs-manager device tree node documentation Phil Reid
2017-07-03 13:57 ` Sebastian Reichel
2017-06-15 13:59 ` [PATCH v7 08/10] power: Adds support for Smart Battery System Manager Phil Reid
[not found] ` <1497535178-12001-9-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-07-03 15:17 ` Sebastian Reichel
2017-06-15 13:59 ` [PATCH v7 09/10] power: supply: sbs-manager: Add alert callback and battery change notification Phil Reid
2017-06-15 13:59 ` [PATCH v7 10/10] power: supply: sbs-battery: move gpio present detect to sbs_get_property Phil Reid
2017-07-03 15:21 ` Sebastian Reichel
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=20170628124237.GE26073@mail.corp.redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=david.daney@cavium.com \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=jglauber@cavium.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=peda@axentia.se \
--cc=preid@electromag.com.au \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.org \
--cc=wsa@the-dreams.de \
/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).