From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751983AbdJELJs (ORCPT ); Thu, 5 Oct 2017 07:09:48 -0400 Received: from mga14.intel.com ([192.55.52.115]:57954 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751548AbdJELJp (ORCPT ); Thu, 5 Oct 2017 07:09:45 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,481,1500966000"; d="scan'208";a="907024791" Subject: Re: [PATCH v3 07/14] xhci: Add Intel cherrytrail extended cap / otg phy mux handling To: Hans de Goede , MyungJoo Ham , Chanwoo Choi , Guenter Roeck , Heikki Krogerus , Darren Hart , Andy Shevchenko , Peter Rosin References: <20170922183803.10701-1-hdegoede@redhat.com> <20170922183803.10701-7-hdegoede@redhat.com> Cc: linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, devel@driverdev.osuosl.org, Kuppuswamy Sathyanarayanan , Sathyanarayanan Kuppuswamy Natarajan , Greg Kroah-Hartman , linux-usb@vger.kernel.org From: Mathias Nyman Message-ID: <59D613DC.5020906@intel.com> Date: Thu, 5 Oct 2017 14:13:32 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20170922183803.10701-7-hdegoede@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.09.2017 21:37, Hans de Goede wrote: > The Intel cherrytrail xhci controller has an extended cap mmio-range > which contains registers to control the muxing to the xhci (host mode) > or the dwc3 (device mode) and vbus-detection for the otg usb-phy. > > Having a mux driver included in the xhci code (or under drivers/usb/host) > is not desirable. So this commit adds a simple handler for this extended > capability, which creates a platform device with the caps mmio region as > resource, this allows us to write a separate platform mux driver for the > mux. > > Note this commit adds a call to the new xhci_ext_cap_init() function > to xhci_pci_probe(), it is added here because xhci_ext_cap_init() must > be called only once. If in the future we also want to handle ext-caps > on non pci XHCI HCDs from xhci_ext_cap_init() a call to it should also > be added to other bus probe paths. > > Signed-off-by: Hans de Goede > --- > Changes in v2: > -Check xHCI controller PCI device-id instead of only checking for the > Intel Extended capability ID, as the Extended capability ID is used on > other model Intel xHCI controllers too > > Changes in v3: > -Add a new generic xhci_ext_cap_init() function and handle the new > XHCI_INTEL_CHT_USB_MUX quirk there. > --- Acked-by: Mathias Nyman