From: Hans de Goede <hdegoede@redhat.com>
To: sathyanarayanan.kuppuswamy@linux.intel.com,
Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Peter Rosin <peda@axentia.se>,
"Krogerus, Heikki" <heikki.krogerus@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Sathyanarayanan Kuppuswamy Natarajan <sathyaosid@gmail.com>
Subject: Re: [PATCH v1 1/1] mux: mux-intel-usb: Add Intel USB Multiplexer driver
Date: Thu, 1 Jun 2017 16:54:35 +0200 [thread overview]
Message-ID: <372ee565-7add-c81e-46cd-5696e03bfe6e@redhat.com> (raw)
In-Reply-To: <402e68ce-0fcd-bfe5-0db5-b02526937495@linux.intel.com>
HI,
On 01-06-17 01:12, sathyanarayanan kuppuswamy wrote:
> Hi Hans,
>
>
> On 05/31/2017 05:21 AM, Hans de Goede wrote:
>> Hi,
>>
>> On 30-05-17 20:50, Andy Shevchenko wrote:
>>> On Tue, May 30, 2017 at 9:21 PM, sathyanarayanan kuppuswamy
>>> <sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
>>>>> On Tue, May 30, 2017 at 3:47 AM,
>>>>> <sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
>>>
>>>>>> + tristate "Intel USB Mux"
>>>>>
>>>>> It's indeed Intel's IP?
>>>>
>>>> Register map to control this MUX comes from Intel vendor defined XHCI
>>>> extended cap region of SOC.
>>>>>
>>>>> I would rather believe that it is some 3rd
>>>>> party known IP block with platform specific soldering.
>>>>
>>>> I don't think its platform specific support. I believe its a SOC specific
>>>> thing( mainly for CHT and APL SoCs).
>>>
>>> Okay, the best people to give a feedback here are Heikki and Hans.
>>
>> Interesting, I have been working on this myself too (and posted
>> a version of my driver for the mux block a while back), see:
>>
>> https://www.spinics.net/lists/linux-usb/msg151032.html
>> https://www.spinics.net/lists/linux-usb/msg151033.html
>> https://www.spinics.net/lists/linux-usb/msg151034.html
>>
>> I was actually planning on posting a new version of this set
>> soon. I still need to to modify the first patch to trigger
>> bu PCI-ids to avoid registering non existing mux platform
>> device on non CHT / APL Intel platforms.
>>
>> I've since changed the second patch into a platform driver,
>> see:
>>
>> https://github.com/jwrdegoede/linux-sunxi/commit/e51057609102c35dd35b4a5965139aff81fbefb8
>>
>> Note that this patch has 2 differences compared to
>> sathyanarayanan's patch:
>>
>> 1) It ties directly into the extcon framework and responds
>> to extcon events instead of using the mux framework,
> What about devices with no ID events ? At least the APL device that I am
> using does not have external IRQ for VBUS and ID.
>> actually this is the first time I hear about a mux framework
>> at all. Is there a git tree with the patches for this somewhere ?
>>
>> 2) It controls the ID and VBUS bits separately, this is
>> important because on some Cherry Trail devices the ID bit
>> is automatically set be ACPI code (through a gpio irq
>> event handler), but the ACPI code does not update the
>> VBUS bit causing the otg port on these devices to not
>> work in device mode.
> Even if you listen to ID and VBUS events separately, I think the end
> result is selecting either SW host or SW device mode right ?
No, the ID bit causes the mux to get thrown either way, the
VBUS bit causes the device controller to see a connect or
not.
> Then why not abstract MUX functionality outside the your driver and
> control the MUX from your driver appropriately ? or do we get
> any advantage is modifying just VBUS_VALID or SW_IDPIN bits
> separately ?
They MUST be controlled separately because on some systems
the SW_IDPIN bit is controller by ACPI AML code, where as
the VBUS_VALID needs to be set by the kernel.
We could model the VBUS_VALID bit as a separate mux_controller,
that would be a bit weird though ...
Regards,
Hans
prev parent reply other threads:[~2017-06-01 14:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 0:47 sathyanarayanan.kuppuswamy
2017-05-30 13:40 ` Peter Rosin
2017-05-30 17:47 ` sathyanarayanan kuppuswamy
2017-05-31 6:29 ` Peter Rosin
2017-05-31 23:33 ` sathyanarayanan kuppuswamy
2017-05-30 16:20 ` Andy Shevchenko
2017-05-30 18:21 ` sathyanarayanan kuppuswamy
2017-05-30 18:50 ` Andy Shevchenko
2017-05-31 12:21 ` Hans de Goede
2017-05-31 13:05 ` Peter Rosin
2017-05-31 14:18 ` Hans de Goede
2017-05-31 15:30 ` Peter Rosin
2017-05-31 18:27 ` Hans de Goede
2017-05-31 23:29 ` sathyanarayanan kuppuswamy
2017-05-31 23:21 ` sathyanarayanan kuppuswamy
2017-05-31 23:12 ` sathyanarayanan kuppuswamy
2017-06-01 14:54 ` Hans de Goede [this message]
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=372ee565-7add-c81e-46cd-5696e03bfe6e@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy.shevchenko@gmail.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=sathyaosid@gmail.com \
/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
Powered by JetHome