Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp703089imm; Fri, 28 Sep 2018 05:34:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV63ARDoL9wWExeNh1NSzvcmgZP2h4oA2DBAFRZQw12zwiqsI2OjMuJ/f4WhH+5AEbPlKvnT0 X-Received: by 2002:a63:c20f:: with SMTP id b15-v6mr5804278pgd.13.1538138076633; Fri, 28 Sep 2018 05:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538138076; cv=none; d=google.com; s=arc-20160816; b=bVQEx3gxo4H306EkcOIW6eSH9LnV9P1RiVwm7M2eOlAEEtRYRHgyctzVmpk3On3fpK uacYSyp6XmdyCda1+udRfivLBb4vCpiPajjEC5xs3qzQJuTJxopZGdTzvI2tgcMYiIA1 L4Ee9y22O0iLjuxaZF1sLR0lnrfgLO1xsWCvrwUficZ81ru4gKcs17NEhtCb5LujJaZk mXb36NydbjfCyMzvI5SVdg/ZV5UmHxOw2NWAcQQ/Xac7R1B45vjwELPNmoaj6MkWIipQ vxIhLXTszVwg/I4RXgNWMKxUd6JNL3bgvg7Gzm6Q2xggt36J725p4veqtF2tSCDOkoq6 CPXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:dkim-signature; bh=8T3xt4YZ/jzuiFPj3emz8wyggwTifi8XRQyHhp33ssI=; b=lrOhOv8Z8kNjoz2ppDoqZdCS7ut8z+TxNO9nR5xqWDzQP9Q6wC1JpkpeJ0PPbQzOy1 IP4x/biysm0LwyBFa7hjGLeAGfVydh8Ts7Yipqg4og4SfxrU+5A7neMG9IXRX+uw3R2d 7VZ6FCqnoET1JfJV/zRqmjveJ8VwgYcDGghCihd3fM3k7B4DsUKR5D2BfYu2oSBnIEed 7AFU2FD+bCvaGc2ST/27XEekTYcWd1BBVudS+lW5aMb2iZqjVtiRiSpcTy5MwLpiA/pl cmLc/wROy3xThxFj74GOxoaYnE4RszmIyYwg30zAlTYaza+5U0KgeRvaKSLonsKYmfte +XaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="WWKD/Zss"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14-v6si4581248pgk.642.2018.09.28.05.34.19; Fri, 28 Sep 2018 05:34:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="WWKD/Zss"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728944AbeI1S5t (ORCPT + 99 others); Fri, 28 Sep 2018 14:57:49 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:41400 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbeI1S5t (ORCPT ); Fri, 28 Sep 2018 14:57:49 -0400 Received: by mail-qt1-f194.google.com with SMTP id m15-v6so6358880qtp.8; Fri, 28 Sep 2018 05:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=8T3xt4YZ/jzuiFPj3emz8wyggwTifi8XRQyHhp33ssI=; b=WWKD/ZssTpSbYt7NkGFaAanGgbIS8dst7Ha/wkFRSpTK4Qic0T4+O+P8DQv9IPO2Pb aDCrLLdRyh0hI37KHqVxH09ltYPXopagFoc892kO6hq4zajNIS0WP2DZ56DpoSJQgRwc 3XaD0kEbKXl/PuoRscShxUT1cbK3iTzhWEA+F6uhbBxBS2tAZhh1qz+MQfw1SgDej+iD G7ds8CEWcnPoQnUNUaEl7nH3KAdRMZPgBHEuVLJrN0Y3t8WYTcKaHSBlPHN8KD+Qk6x5 cfCHDL8NnVNMq8gh8TtphrvF4IMe7E2KY+q23czONP41PRQox/oQQQ6qQjTdstHz10I4 U4dQ== 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:reply-to :from:date:message-id:subject:to:cc; bh=8T3xt4YZ/jzuiFPj3emz8wyggwTifi8XRQyHhp33ssI=; b=Hlxc/i91pFP0c2gddRtG/RN1kbBr+Vs5vj2XHh+dZOPX7gwPFqYdp+5fDknTjExXgT 4ngvLAijZEtVT1ooWkE7cKQeC4HV+rLxuj9tIL3hSnLSrfW6nCzcn+lvpfjViMqspApD hK/2sQS/Hz+mPZX1pO9/q/iupghE1IwR8apFxpWfD6BTB2g0JJZXNI72d6OznEBQhT6f troerm92y+gAQZgooNEpn4VBK3hDNrmcFWesOBajZpBSJv7rzK9OwZn9I23NQKNkVsAx FoKqQ6W+Gg8Bho/APy5/PUqUMVGWzQmmEBYMV2PEPHMfQoiNAv2zBPp5PjMkdbiWjgbv DSyA== X-Gm-Message-State: ABuFfoiuLLY+GUPPQuH01FN9u7sZGaLr8a7Kk9G2mS8JBvghH8eY3FWh JVAuhzf38D92gtjOpyP6ytLgv4oFWhZxlw2idxg= X-Received: by 2002:ac8:60d0:: with SMTP id i16-v6mr6318104qtm.249.1538138053534; Fri, 28 Sep 2018 05:34:13 -0700 (PDT) MIME-Version: 1.0 References: <20180926074756.GD2664@lahna.fi.intel.com> In-Reply-To: Reply-To: rajatxjain@gmail.com From: Rajat Jain Date: Fri, 28 Sep 2018 05:34:01 -0700 Message-ID: Subject: Re: sdhci driver card-detect is broken because gpiolib can't fallback to _CRS? To: linus.walleij@linaro.org Cc: Rajat Jain , andy.shevchenko@gmail.com, Mika Westerberg , Andy Shevchenko , Dmitry Torokhov , linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, Linux Kernel Mailing List , adrian.hunter@intel.com, ulf.hansson@linaro.org, linux-mmc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 28, 2018 at 1:42 AM Linus Walleij wrote: > > On Thu, Sep 27, 2018 at 7:57 PM Rajat Jain wrote: > > > > Patches are welcome, I think. > > > > > > Btw, is there any existing hardware on the market with such BIOS? > > > > Yes, all the chrome books available in the market (at least the ones > > released in last 3 years) have same ACPI layout (provide _DSD for > > card-detect). They are all working fine today because they use an > > older kernel, but if we update them to the latest kernel, this part > > will be broken. > > This is not looking good at all. > > Andy should we revert the patch or do you have some other > quick fix in mind we could do? It seems reverting the patch > could be bad for the mctrl patches IIUC, but this regression > seems even more serious. Sorry, I may have made it sound like more serious than it is. Yes, what I said is true, but we (Google) does not plan to update those devices to the latest kernel. That regression will only be seen by any developers who try to do it on their own. Also, the commit I mentioned above was put in long time back, and I think it is more reasonable to put a fix in the sdhci driver instead. I tried using Andy's suggestion yesterday, but was faced with more questions that I did not have answers to (with my limited understanding): - It seems that 1 SDHCI device may support multiple slots. It was not clear to me if they could share card detect interrupts, or should have separate ones? Also, the driver may not really know? So should I add 1 or two pins using the devm_acpi_dev_add_driver_gpios(). - I was unsure what should I set the active_low to. Given these concerns, it seemed the easiest fix to me, if we can call mmc_gpiod_request_cd() twice, once with "cd" and then with NULL as a fallback. Thanks, Rajat Jain > > Yours, > Linus Walleij