From: Song Qiang <songqiang1304521@gmail.com>
To: Frederick Heinecke <fheinecke@ksu.edu>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: Externally multiplexing interfaces on the same processor pins
Date: Wed, 5 Dec 2018 22:29:19 +0800 [thread overview]
Message-ID: <ca1c00e1-8104-b697-24dd-d43a47adcac1@gmail.com> (raw)
In-Reply-To: <BL0PR05MB4594E94CC5D74DC038E35EFBA90A0@BL0PR05MB4594.namprd05.prod.outlook.com>
On 8/29/18 2:46 AM, Frederick Heinecke wrote:
> Hello all,
>
> Does anybody here know how the kernel handles externally multiplexed peripherals and and what the proper way to setup the device tree for multiplexed peripherals? For example, if I have two interfaces (say USB and I2C) on the same pins, and I want both to be available and usable (not at the same time of course), does the kernel natively support this or is this something that needs to be written into the drivers for both interfaces? Could the kernel or a user-space process potentially attempt to access both at the same time?
>
> Here's a poorly drawn example of what I'm asking about: https://i.snag.gy/SJQnH1.jpg
>
> Thank you,
>
> Fred Heinecke
>
Hi Fred,
Recently I've been looking at a devices just act as you described. A FT232H
adapter. It has several interfaces including i2c, spi, jtag, etc but share some
pins. As far as I know these kind of devices should fall in mfd subsystem and as
for mfd subsystem, it handles devices with functions enabled together. Doing
what we want would need dynamic device register and unregister support. I;m just
planning to write a more support driver for FT232H and I handle this situation
with another sysfs entry 'current_mode', through this, I select which mode this
device should be working on. I haven't found any facility in kernel supports this.
Would you share what you device is? I think we can help you insight the
corresponding driver and check how did the manufacture do with it.
yours,
Song Qiang
parent reply other threads:[~2018-12-05 14:29 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <BL0PR05MB4594E94CC5D74DC038E35EFBA90A0@BL0PR05MB4594.namprd05.prod.outlook.com>]
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=ca1c00e1-8104-b697-24dd-d43a47adcac1@gmail.com \
--to=songqiang1304521@gmail.com \
--cc=fheinecke@ksu.edu \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).