From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Ryan Mallon <ryan-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
Cc: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>,
Uli Luckas <u.luckas-vFjI0mZ6VZs@public.gmane.org>,
Russell King - ARM Linux
<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH, RFC] Earlier I2C initialization
Date: Wed, 11 Jun 2008 14:18:52 +0200 [thread overview]
Message-ID: <20080611141852.3ccd89ea@hyperion.delvare> (raw)
In-Reply-To: <485031D5.3020606-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
On Thu, 12 Jun 2008 08:13:09 +1200, Ryan Mallon wrote:
> Jean Delvare wrote:
> > Which problem are you trying to solve? Is there any actual drawback to
> > abusing subsys_initcall() for the handful of i2c bus drivers which may
> > need to come up early?
>
> On many embedded devices there is a need for i2c to be early since it is
> often used for core functionality. It seems at the moment, that the
> answer to this is to juggle a few of the drivers which people need to
> get this to work. There are the drivers in drivers/i2c which use
> subsys_initcall. It does work, but it feels a bit untidy. Some of the i2c
> IO expander drivers are now in drivers/gpio since that comes up early.
> This can lead to confusion (see drivers/gpio/pca953x.c and
> drivers/i2c/chips/pca9539.c).
The GPIO drivers under drivers/i2c/chips are deprecated and tagged for
removal. We only need a user-space interface for the new GPIO drivers
(I think we do by now) and a way to instantiate these new GPIO devices
from user-space (not done yet) before the deprecated drivers can be
removed. The only remaining users for these deprecated drivers are
electronics enthusiasts controlling GPIO chips over the PC parallel
port. In the context of embedded platforms, there's no room for
confusion here.
> As David suggested, if i2c is needed early
> in enough cases, why not just move it early in the link order? My patch
> was just an alternative approach which mimics the current behaviour, but
> makes it possible to get any i2c driver early. Why not just mark all of
> the drivers/busses that get used on embedded devices as subsys_initcall,
> just in case somebody needs them early?
Because this is an abuse of subsys_initcall? I guess that was
acceptable when only a couple drivers were doing that, but making it
official sounds bad.
> (...)
> I just ran a sed script over the drivers/i2c directory. The intent was to
> mark the entire subsystem to come up early if CONFIG_I2C_EARLY is set,
> and use i2c_module_init every where since it makes it more consistent, and
> doesn't cost anything on setups where CONFIG_I2C_EARLY isn't defined.
It costs readability and build time.
> The idea was basically that a board could clearly say: I want i2c early,
> and have any busses and devices drivers it has configured as builtins
> automatically be present early on.
I get the idea, but I don't buy the implementation.
--
Jean Delvare
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
next prev parent reply other threads:[~2008-06-11 12:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200806091541.43899.u.luckas@road.de>
[not found] ` <20080609135739.GE30971@flint.arm.linux.org.uk>
[not found] ` <484D947D.1090900@bluewatersys.com>
[not found] ` <484D947D.1090900-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
2008-06-09 20:59 ` Earlier I2C initialization David Brownell
[not found] ` <200806091359.12791.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-06-09 21:27 ` [PATCH, RFC] " Ryan Mallon
2008-06-10 6:57 ` Jean Delvare
2008-06-10 20:55 ` David Brownell
[not found] ` <200806101355.07792.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-06-11 8:11 ` Jean Delvare
2008-06-11 9:00 ` Russell King - ARM Linux
[not found] ` <20080611090016.GA5338-f404yB8NqCZvn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2008-06-11 9:14 ` Jean Delvare
[not found] ` <48503432.6010105@bluewatersys.com>
[not found] ` <48503432.6010105-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
2008-06-11 12:05 ` Jean Delvare
2008-06-11 18:31 ` David Brownell
2008-06-12 18:44 ` Jean Delvare
2008-06-12 19:57 ` David Brownell
2008-06-24 17:06 ` Jean Delvare
[not found] ` <20080611101130.1a667abe-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-06-11 20:23 ` Ryan Mallon
2008-06-10 21:33 ` Ryan Mallon
2008-06-10 9:46 ` Uli Luckas
2008-06-11 3:12 ` Ryan Mallon
2008-06-11 7:40 ` Jean Delvare
[not found] ` <485031D5.3020606@bluewatersys.com>
[not found] ` <485031D5.3020606-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
2008-06-11 12:18 ` Jean Delvare [this message]
2008-06-11 20:27 ` David Brownell
2008-06-11 20:54 ` Jean Delvare
2008-06-11 21:24 ` Ryan Mallon
[not found] ` <485042A6.3030705-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
2008-06-24 16:39 ` Jean Delvare
2008-06-26 21:12 ` Ryan Mallon
2008-06-27 10:41 ` Jean Delvare
2008-06-29 20:34 ` Ryan Mallon
2008-06-11 21:31 ` Maciej W. Rozycki
2008-06-12 20:21 ` David Brownell
[not found] ` <20080611094039.287ac136-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-06-11 20:13 ` Ryan Mallon
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=20080611141852.3ccd89ea@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=ryan-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org \
--cc=u.luckas-vFjI0mZ6VZs@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox