From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/3] Bring in new I2C framework
Date: Tue, 30 Oct 2012 06:44:02 +0100 [thread overview]
Message-ID: <508F6922.10508@denx.de> (raw)
In-Reply-To: <CAPnjgZ2z8zjzSxbLnop+7qxAWeefJZP5SossMnLgqOD7Vf5jXg@mail.gmail.com>
Hello Simon,
On 29.10.2012 14:48, Simon Glass wrote:
> Hi Heiko,
>
> On Mon, Oct 29, 2012 at 2:44 AM, Heiko Schocher<hs@denx.de> wrote:
>> Hello Simon,
>>
>>
>> On 26.10.2012 18:08, Simon Glass wrote:
>>>
>>> On Thu, Oct 25, 2012 at 10:48 PM, Heiko Schocher<hs@denx.de> wrote:
>>>>
>>>> Hello Simon,
>>>>
>>>>
>>>> On 25.10.2012 23:37, Simon Glass wrote:
>>>>>
>>>>>
>>>>> On Mon, Oct 22, 2012 at 10:40 AM, Heiko Schocher<hs@denx.de> wrote:
>>
>> [...]
>>
>>>>> 2. The init is a bit odd, in that we can call init() repeatedly.
>>>>> Perhaps that function should be renamed to reset, and the init should
>>>>> be used for calling just once at the start?
>>>>
>>>>
>>>>
>>>> What do you mean here exactly? I couldn?t parse this ...
>>>
>>>
>>> Well there is start-of-day setup, which I think should be called init.
>>> This is done once on boot for each i2c adapter.
>>
>>
>> Hmm... I am not sure if this is only done on boot, because we should
>> "close" or "deinit" an adapter if not used any more in U-Boot as the
>> U-Boot principle says:
>>
>> http://www.denx.de/wiki/view/U-Boot/DesignPrinciples#2_Keep_it_Fast
>>
>> So I want to add in future some "deinit" to every adapter, and
>> call it from i2c_set_bus() when switching to another i2c adapter ...
>
> Well deinit() should be probably be done before finishing U-Boot, not
> after every transaction, since you don't know that the current
> transaction will be the last.
Not after every transaction, only when switching to another adapter,
or before booting linux ...
> When using FDT, you need to look up the available i2c ports in the
> driver, and this should be done once at the start. If the i2c core can
> call a suitable init function then this is easier, rather than us
> having to keep track of whether the init is done or not.
Dummy question, why is this needed when using FDT?
>>> And then there is the i2c_init() which seems to be called whenever we
>>> feel like it - e.g. to change speed. I suggest that we use init() to
>>> mean start-of-day init and reset(), or similar, to mean any post-init.
>>> I am not suggest that for this series, just as a future effort.
>>
>>
>> Yes, that should be changed. We do not need an init() in the i2c
>> API, as i2c_set_bus_num() do this for us (and later also the deinit())
>>
>> We just need a set/get_speed() and a deblock()/reset() ?
>>
>> Maybe a step in the API cleanup?
>
> Yes, a future step I think. I feel that i2c is one of the darker
> corners of U-Boot and so am keen to get this tidied up.
Patches are welcome! Let us bring in the new framework, clean up
the i2c API / maybe DM integration, then we are on a good way I
think ...
[...]
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2012-10-30 5:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 17:40 [U-Boot] [PATCH 0/3] Bring in new I2C framework Heiko Schocher
2012-10-22 17:40 ` [U-Boot] [PATCH 1/3] i2c: add i2c_core and prepare for new multibus support Heiko Schocher
2012-10-22 17:40 ` [U-Boot] [PATCH 2/3] i2c: common changes for multibus/multiadapter support Heiko Schocher
2012-10-22 22:16 ` Henrik Nordström
2012-10-23 3:25 ` Heiko Schocher
2012-10-22 17:40 ` [U-Boot] [PATCH 3/3] i2c, soft-i2c: switch to new " Heiko Schocher
2012-10-25 21:37 ` [U-Boot] [PATCH 0/3] Bring in new I2C framework Simon Glass
2012-10-26 5:48 ` Heiko Schocher
2012-10-26 16:07 ` Stephen Warren
2012-10-29 9:47 ` Heiko Schocher
2012-10-29 15:34 ` Stephen Warren
2012-10-29 15:56 ` Simon Glass
2012-10-30 5:57 ` Heiko Schocher
2012-10-30 16:50 ` Stephen Warren
2012-10-30 17:22 ` Simon Glass
2012-10-31 5:02 ` Heiko Schocher
2012-10-31 5:20 ` Tom Rini
2012-10-26 16:08 ` Simon Glass
2012-10-29 9:44 ` Heiko Schocher
2012-10-29 13:48 ` Simon Glass
2012-10-30 5:44 ` Heiko Schocher [this message]
2012-10-26 18:44 ` Tom Rini
2012-10-29 9:53 ` Heiko Schocher
2012-10-30 22:38 ` Tom Rini
-- strict thread matches above, loose matches on Subject: below --
2012-01-17 7:12 Simon Glass
2012-01-17 8:30 ` Heiko Schocher
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=508F6922.10508@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.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 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.