From: Kachalov Anton <mouse@mayc.ru>
To: Peter Rosin <peda@axentia.se>, Wolfram Sang <wsa@the-dreams.de>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: i2c: slave support framework improvements
Date: Tue, 16 Aug 2016 16:53:18 +0300 [thread overview]
Message-ID: <30371471355598@web10h.yandex.ru> (raw)
In-Reply-To: <35e3622b-cc82-6b8b-2a2e-c62300080d89@axentia.se>
Hello,
just want to remind my usage scenario where I have control board connected via i2c-mux switch to a number of Node. Control board and Nodes implements IPMB proto: each device acts as Slave (receive requests) and Master (send answers). Logically, there is one Master and many Slaves. Only Control board may switch i2c channel and talk to Nodes. CB's slave is constant (usually 0x20). To achieve this in our setup we instantiate a number of i2c-clients (dummy) and slaves with the same address. E.g. 0x11 for client write (Node) and 0x20 for slave read (ourselves, to receive answers from nodes).
Therefore, we should treat i2c-switch as one-way gate with multi-master.
Thanks.
16.08.2016, 16:33, "Peter Rosin" <peda@axentia.se>:
> On 2016-08-16 14:12, Wolfram Sang wrote:
>> Hi Peter,
>>
>>> If you really have a separate device on the bus with the same address
>>> that you want to add slave support for, then there really is a conflict,
>>> and the kernel knows it.
>>
>> We still have a disagreement about "the kernel knows it". The kernel
>> knows it only in one case, i.e. when you are able to describe all
>> devices on the bus.
>>
>> What about this compromise: We keep the current scheme, but print a
>> warning when the kernel notices a slave device has the same address
>> which is already claimed by a client driver. This will let most users
>> know about the conflict but it will not hurt the debugging-via-loopback
>> case, since people know what they are doing and will happily ignore it.
>>
>> If you can agree to that, I'll cook up a patch later this week.
>
> Hmm, maybe add a "slave loopback quirk" to adapters that allows this,
> and forbid it if the quirk isn't present?
>
> (or use whatever flag is appropriate, if quirks do not fit)
>
> And/or require some kind of loopback flag when adding a client driver
> that is supported via loopback to a slave driver.
>
> Note, I do not feel strongly about this at all, I'm mainly trying to
> understand what's going on. Now I do understand, and do not desperately
> seek changes. It just looked fishy, that's all...
>
> Cheers,
> Peter
next prev parent reply other threads:[~2016-08-16 13:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-23 6:51 i2c: slave support framework improvements Kachalov Anton
2016-07-23 19:51 ` Wolfram Sang
2016-07-25 7:02 ` Kachalov Anton
2016-07-25 7:21 ` Wolfram Sang
2016-07-25 7:47 ` Kachalov Anton
2016-07-25 8:28 ` Wolfram Sang
2016-07-25 9:11 ` Kachalov Anton
2016-07-25 9:41 ` Wolfram Sang
2016-07-25 10:00 ` Kachalov Anton
2016-07-26 9:50 ` Peter Rosin
2016-07-26 16:51 ` Kachalov Anton
2016-07-28 6:55 ` Peter Rosin
2016-07-28 8:25 ` Peter Rosin
2016-07-28 14:39 ` Kachalov Anton
2016-07-28 7:41 ` Wolfram Sang
2016-07-28 8:20 ` Peter Rosin
2016-07-28 8:39 ` Wolfram Sang
2016-07-28 8:54 ` Peter Rosin
2016-07-28 9:15 ` Wolfram Sang
2016-07-28 9:39 ` Peter Rosin
2016-08-01 10:46 ` Wolfram Sang
2016-08-15 8:58 ` Peter Rosin
2016-08-16 12:12 ` Wolfram Sang
2016-08-16 13:33 ` Peter Rosin
2016-08-16 13:53 ` Kachalov Anton [this message]
2016-07-28 14:44 ` Kachalov Anton
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=30371471355598@web10h.yandex.ru \
--to=mouse@mayc.ru \
--cc=linux-i2c@vger.kernel.org \
--cc=peda@axentia.se \
--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 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.