From: Jean Delvare <jdelvare@suse.de>
To: Phil Reid <preid@electromag.com.au>
Cc: kbuild test robot <lkp@intel.com>,
kbuild-all@01.org, wsa@the-dreams.de, robh+dt@kernel.org,
mark.rutland@arm.com, sre@kernel.org, jglauber@cavium.com,
david.daney@cavium.com, peda@axentia.se,
benjamin.tissoires@redhat.com, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v8 3/9] i2c: core: call of_i2c_setup_smbus_alert in i2c_register_adapter
Date: Fri, 21 Jul 2017 16:33:10 +0200 [thread overview]
Message-ID: <20170721163310.1c003963@endymion> (raw)
In-Reply-To: <c6e4dce0-853f-a4d4-be64-ef4bb0f68162@electromag.com.au>
Hi Phil,
On Thu, 20 Jul 2017 12:44:52 +0800, Phil Reid wrote:
> Calling a function in i2c-smbus (module) from i2c-core (builtin) is then a problem.
>
> However there doesn't seem to be a way (that I can see) to have select statement force I2C_SMBUS=y if I2C=y
>
> Can I get a hint on what the correct course of action is.
Well, i2c-smbus is supposed to go on top of i2c-core. This means
i2c-smbus can make use of functions from i2c-core but not the other way
around.
So far, the split worked fine because i2c_setup_smbus_alert() was
always called from individual device drivers (typically built as
modules.) It was not supposed to be called from core code, but this is
what you are trying to do now (indirectly.)
I can think of 3 ways to sort it out:
1* (Part of) the code you added (and possibly dependencies thereof)
should be in i2c-core instead of i2c-smbus.
2* The call you added to i2c-core should in fact be somewhere else (for
example a dedicated module, which would depend on both i2c-core and
i2c-smbus).
3* The whole idea of splitting the i2c-smbus code to a separate module
no longer flies, and i2c-core should be built from i2c-core.c +
i2c-smbus.c (and CONFIG_I2C_SMBUS becomes a boolean.)
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2017-07-21 14:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 8:19 [PATCH v8 0/9] Add sbs-manager with smbalert support Phil Reid
2017-07-18 8:19 ` [PATCH v8 1/9] i2c: i2c-smbus: Use threaded irq for smbalert Phil Reid
[not found] ` <1500365984-61404-1-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-07-18 8:19 ` [PATCH v8 2/9] i2c: i2c-smbus: add of_i2c_setup_smbus_alert Phil Reid
2017-07-18 8:19 ` [PATCH v8 3/9] i2c: core: call of_i2c_setup_smbus_alert in i2c_register_adapter Phil Reid
2017-07-19 18:30 ` kbuild test robot
[not found] ` <201707200255.SHskJrcM%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-07-20 4:44 ` Phil Reid
2017-07-21 9:37 ` Benjamin Tissoires
2017-07-21 14:45 ` Jean Delvare
2017-07-22 11:49 ` Jean Delvare
2017-07-21 14:33 ` Jean Delvare [this message]
2017-07-24 8:27 ` Phil Reid
[not found] ` <1500365984-61404-4-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-07-19 20:55 ` kbuild test robot
2017-07-18 8:19 ` [PATCH v8 7/9] power: Adds support for Smart Battery System Manager Phil Reid
2017-07-18 8:19 ` [PATCH v8 4/9] i2c: mux: pca954x: Call request irq after adding mux segments Phil Reid
2017-07-18 8:19 ` [PATCH v8 5/9] i2c: mux: pca954x: Return error if irq_create_mapping fails Phil Reid
2017-07-18 20:41 ` Peter Rosin
2017-07-18 8:19 ` [PATCH v8 6/9] Documentation: Add sbs-manager device tree node documentation Phil Reid
2017-07-18 8:19 ` [PATCH v8 8/9] power: supply: sbs-manager: Add alert callback and battery change notification Phil Reid
2017-07-18 8:19 ` [PATCH v8 9/9] power: supply: sbs-battery: move gpio present detect to sbs_get_property Phil Reid
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=20170721163310.1c003963@endymion \
--to=jdelvare@suse.de \
--cc=benjamin.tissoires@redhat.com \
--cc=david.daney@cavium.com \
--cc=devicetree@vger.kernel.org \
--cc=jglauber@cavium.com \
--cc=kbuild-all@01.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lkp@intel.com \
--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).