Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4359967pxu; Mon, 21 Dec 2020 10:24:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFS8AVHe4PSFG7fRDg08AU/bGvXAkBsNfb5ECfLTUwaSe4H39mgKb4n1WQ9V0sybhzIpVZ X-Received: by 2002:a17:907:94c6:: with SMTP id dn6mr16566952ejc.13.1608575045149; Mon, 21 Dec 2020 10:24:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608575045; cv=none; d=google.com; s=arc-20160816; b=f/0ILl4Pf0A10nC7+I5lF8WJVqFn3aY1ij4C5NTvyuFEOJbrUPpjluEHEcm3MJ+tUM 5oCMhGDQZtSWgUIV6Ou9xVVX6ZGZev9O4Ipylj9CjukbNrrOZSQQfnSLsF4+ncCNs5z+ S0r3b5b3nGlBbhKJQsomkrlsJysajdJo9k7ZbWh3QwSRZ4cIEgsJ1vZDPY+llvRzgQYb D8rRFd4pYN22cD0oWTAnRjy72htvAqIBntdChsqG4W/pV7un0YVDwHDhsg1wxD8nDlXr g7/+Iur6IIqfFRCCC+yL8FFnlUj5ph1XLsBYIyNYa3c3eS8ZB5dDMkdQMTooc7QXMjb5 Lsqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sWyYMYoogTI0qEcPT7ewbmd4Di2kxWT27aivbJmhx28=; b=jdcsaB3Tcfh2l5sTrV/oZa3aL1ic07/BIZNv1toQ6OAffVz3WBc6SzhqP6TMNTsO9R kMPLZCzlZuLj96ML0MzT9uP0tIST3yM6kYubo2cWF5Eid+7tvb/pO366mt2HxDsvVOc5 EwYbIH9xZWTCr6MwI05we2hBBMUR+R2ApSY3ljuMwoCflgTgzdsOCRk3XRkTwTt6BMn0 6egOBc5Rkp3siC0MVTcVDnWtwnYVjeENYY0kjez6Ehhua3aZxBp+Gqeno6Opsxww3od/ i2kDYFZ6Sj3MuK+PtKnC3F9mDxcl1cDvbQ8mQ9bDhWxYhFqDKuO1CwQTo+bZtGbjQ0oo Ww1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=c8IRniwy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gt24si9765700ejb.248.2020.12.21.10.23.42; Mon, 21 Dec 2020 10:24:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=c8IRniwy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726130AbgLUSWB (ORCPT + 99 others); Mon, 21 Dec 2020 13:22:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbgLUSWB (ORCPT ); Mon, 21 Dec 2020 13:22:01 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9833C0613D6; Mon, 21 Dec 2020 10:21:20 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id s26so25880887lfc.8; Mon, 21 Dec 2020 10:21:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sWyYMYoogTI0qEcPT7ewbmd4Di2kxWT27aivbJmhx28=; b=c8IRniwyiglKPVZFlpYSUzsKnpyYHZUumx0BgM9yzOuWuh/xrwae2gFez/R6GkI4T2 Gk2dN+mCH5LKqsnlmg53XF6BKZTCYvssMmXchhIb2I1pWNWhuMMU32wxNZkI56NRLR8n rN185Qyp+QL7SFnNV1zfBvGedZq5jjF0pbxRYx+TCd5bGdr3H9guwM1EdVS7GeiZhDwL vUj2GwTwqAj242pHOCeS3LoVckq0l8MnXm73bPMIWTWsAqlUQTyl9QuQnG0pDMBMX/Op I0m+SX7i/ABxCA1L2er3Kr1vKQvKnFqqiV0tt5ufh/7onCwGkoDn6IMt74Yoc0EFhH54 UiFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sWyYMYoogTI0qEcPT7ewbmd4Di2kxWT27aivbJmhx28=; b=jQ5J9NzILOP2ruarW/u2dJ5duPvTvmKxugyuwH9Xz1I5BM+cKDX7hNTQDxHh38fSyB 2la7paFUWki2/nDt8J1ln05Uv6lByeFfnyVORDukI3onWAUU0mGb6zAjKYGGpJK+M8IT A44+WkOMMWGcuPFNepuYjvU8HDp8gmg7SKVPiUucOJYq14AUCVE+zdOy8TtlnHfrMbb1 J2nHkBigxJripd1lI2xo9cKpHe6WkHfOMJC8Vuva9iskBJFgRmKNUOV8n8GKPnRDnVG2 S1V6rB2RRiA9NWWW22OHntCsu3KEMEmeINyExKQwQ3Fmd4V+wo4qwcZ2w4eNS4yMHfp1 RoJw== X-Gm-Message-State: AOAM533jgeMPe+brDq2E6YBcJKSOf60RpOJRzZsE5xSalTb1pZRptOC0 DmrAXIpOt+CzirK1GS7IUvM6Oi7Ev3mQwbeimWkqJoqbEaI= X-Received: by 2002:a17:906:6c8b:: with SMTP id s11mr15761117ejr.187.1608564530691; Mon, 21 Dec 2020 07:28:50 -0800 (PST) MIME-Version: 1.0 References: <20201004162908.3216898-1-martin.blumenstingl@googlemail.com> <20201004162908.3216898-4-martin.blumenstingl@googlemail.com> In-Reply-To: From: Martin Blumenstingl Date: Mon, 21 Dec 2020 16:28:39 +0100 Message-ID: Subject: Re: [RFC PATCH 3/3] gpio: ej1x8: Add GPIO driver for Etron Tech Inc. EJ168/EJ188/EJ198 To: Linus Walleij Cc: linux-usb , linux-pci , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:GPIO SUBSYSTEM" , Rob Herring , Bartosz Golaszewski , "linux-kernel@vger.kernel.org" , Bjorn Helgaas Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On Wed, Oct 7, 2020 at 9:44 PM Martin Blumenstingl wrote: [...] > > As noted on the earlier patches I think this should be folded into the > > existing XHCI USB driver in drivers/usb/host/xhci-pci.c or, if that > > gets messy, as a separate bolt-on, something like > > xhci-pci-gpio.[c|h] in the drivers/usb/host/* directory. > > You can use a Kconfig symbol for the GPIO portions or not. > OK, I will do that if there are no objections from other developers > I am intending to place the relevant code in xhci-pci-etron.c, similar > to what we already have with xhci-pci-renesas.c I tried this and unfortunately there's a catch. the nice thing about having a separate GPIO driver means that the xhci-pci driver doesn't need to know about it. I implemented xhci-pci-etron.c and gave it a Kconfig option. xhci-pci is then calling into xhci-pci-etron (through some etron_xhci_pci_probe function). unfortunately this means that xhci-pci now depends on xhci-pci-etron. for xhci-pci-renesas this is fine (I think) because that part of the code is needed to get the xHCI controller going but for xhci-pci-etron this is a different story: the GPIO controller is entirely optional and only used on few devices my goal is (at some point in the future) to have the GPIO driver in OpenWrt. I am not sure if they would accept a patch where xhci-pci would then pull in the dependencies for that Etron controller, even though most boards don't need it. Please let me know if you have any idea on how to solve this. Best regards, Martin