Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp476124imm; Wed, 26 Sep 2018 01:44:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV63PLm8pJpETRId1oALwfPDZn67bisWyak2MrnOfLYI1rV7Y19tvwvLVXOKqKC4KGH/FufcJ X-Received: by 2002:a63:7a50:: with SMTP id j16-v6mr4745431pgn.112.1537951481230; Wed, 26 Sep 2018 01:44:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537951481; cv=none; d=google.com; s=arc-20160816; b=hBJrslV/8TPGPPX0BUV2lZfKcBgGGbIEsduSaJvrd3md8kibnQSfgrycewnZm2aAuB S3isAzd+AoG7xeb+TFS2jZbtEjh9Rw1VK4g2/wBwPM7qI7JrzycbfhjFyTnD+nyu87+o dr5Fo91ecaL5ZiI0ieTHRt6B+0fs8GWFzgRzzT1qeHHbdLq9hFC/j76DTcGPEaks8yzq pYRMVHivYv8y3JS6MkEulVTAGEa1UUX9ms/Q0wmBhykj6m7RFUBNwvL455oiPp5fMmIl b6R9Wuawp7QP8vAEGyrLRg8pfjx2yDtO/64wxI3s71fqps0zd66Ygx49Oy7NHlZSZfXQ Zrbg== 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 :in-reply-to:references:mime-version:dkim-signature; bh=T0GNsE1a/twTLBsaKEik3GVfYLJgbc3pBenDaNstH6Y=; b=nn1YeZ3sJdXCOYpaj68hoF3tTZgFJTuUckR/D0kCMuRxrIyjQRtcXwqP/0lNbQ59vt vf4xtn7W/oau4vao04Xm9Je9J/q11VbW52440G/Vqxr2SAoi4DlgkUe/tKZPU4u86iCT 2hZkcuqXtulsToccok62a3oS2Uki6kvrvTbnMkXPCNIe+qRtjNcLkAGOg4gFjYR79xoK Xcd5vCUcgpPF5wW7BW2cleRQy/yAYsxKXj5qWfNlq6uGJ+mpDnw38/bLzzX4nXBdPNzT 96jjOXC2BG6G+B6+HS7SNBTiOJ3B7rwoMh663z6pdMIx+wTR7qnnN77Tm+wiBLk0sNMf To7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d+aikRdM; 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 l26-v6si4484338pfj.188.2018.09.26.01.44.26; Wed, 26 Sep 2018 01:44:41 -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=d+aikRdM; 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 S1727273AbeIZOy2 (ORCPT + 99 others); Wed, 26 Sep 2018 10:54:28 -0400 Received: from mail-qt1-f173.google.com ([209.85.160.173]:45253 "EHLO mail-qt1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726648AbeIZOy2 (ORCPT ); Wed, 26 Sep 2018 10:54:28 -0400 Received: by mail-qt1-f173.google.com with SMTP id l2-v6so16363436qtr.12; Wed, 26 Sep 2018 01:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=T0GNsE1a/twTLBsaKEik3GVfYLJgbc3pBenDaNstH6Y=; b=d+aikRdMYADiZlqZfqoHxLuIKE2qWahhg73sZXr0dffmQv3XjfM2ZpqeyLIJXLUyjm RobedK8n6GThjCt5oV3++JCZe32MYYCfry1tIkRp53mT1OsfSGjjTwQYcfQtKH+vlfOP wHoloNhSJRszMbpdFpDUu44IsUdHMxy2t29uEO5Ur91ACvJkpxtYJxVDUUEVRyjvum8B bbMLy5/YGOczPDzoCfiLX0N10Sf7wCAA/jbKcBayOXQdI7XnfKSLtiP4nAVOngVIq3aa dH1F6HBAusWZlexzW5SRm5K+4Oujpqx+5p5St4/uAPRQm/cjjqY7ez3Xi8Ijcmi/bjYv 2hww== 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=T0GNsE1a/twTLBsaKEik3GVfYLJgbc3pBenDaNstH6Y=; b=dBh4D+DHXdedAO7SnvQMBMoehNcwxTiPPN6XGPJvkdU0wq76dbw83F09aXIycgA1dq 8vsiv5yTwjbCx2dMhrK6/WeCRYIrudrVxI266cpH8IDCd/vykli747A2vGDX3mws2r6h zLL/UBgD0GyXDKZj4m48goC0+67aCwN4JE37OSc6Q1YZxhxB7eMZlFcF/y4dhLI35yKs 8TB8xuHHHbSo+V6CXwRTH2nJypStcZRcVLHu49PyjSkTiXrEwU2rX98WkrqQ2w2HLWM1 SfEphO7Sv65LJwdxu2erFAESVa+r/yxCKpd0w01QCBMhqU8F6IlBnakjJLq5uhygJbOz Xnww== X-Gm-Message-State: ABuFfoj53bn/6C3vjUFYlrxHXQicPxLYtToi6SiS+MfivHEh9YJ1aJQz srPo2nWzlURxOgcp29btL2PX1VrVP75KIYra9Ro= X-Received: by 2002:ac8:16c5:: with SMTP id y5-v6mr3732370qtk.187.1537951357705; Wed, 26 Sep 2018 01:42:37 -0700 (PDT) MIME-Version: 1.0 References: <20180926074756.GD2664@lahna.fi.intel.com> In-Reply-To: <20180926074756.GD2664@lahna.fi.intel.com> From: Andy Shevchenko Date: Wed, 26 Sep 2018 11:42:21 +0300 Message-ID: Subject: Re: sdhci driver card-detect is broken because gpiolib can't fallback to _CRS? To: Mika Westerberg Cc: Rajat Jain , Andy Shevchenko , Linus Walleij , Dmitry Torokhov , "open list:GPIO SUBSYSTEM" , ACPI Devel Maling List , Linux Kernel Mailing List , Adrian Hunter , Ulf Hansson , linux-mmc , Rajat Jain 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 Wed, Sep 26, 2018 at 10:49 AM Mika Westerberg wrote: > > Hi, > > On Tue, Sep 25, 2018 at 01:54:57PM -0700, Rajat Jain wrote: > > * Use con_id=NULL if it is dealing with a legacy BIOS (i.e. no _DSD > > properties in the ACPI). > > * Use con_id= if it is dealing with a modern BIOS (i.e. > > which provides _DSD for the property) > > Or you can use con_id= everywhere and supply > acpi_dev_add_driver_gpios() where needed to cover cases where BIOS does > not provide _DSD. See also Documentation/acpi/gpio-properties.txt for > more information. Thanks, Mika. That is exactly the way how I suggested to fix and actually fixed a lot of drivers already. Run `git grep -n -w devm_acpi_dev_add_driver_gpios` to find examples. > In case of SDHCI I think the correct way is to stick using _CRS lookup > only because there typically is just one GpioInt() and I have not seen a > single BIOS yet where they implement _DSD for this besides yours. If > there is not way to change the BIOS implementation then I guess we just > need to amend the driver to call acpi_dev_add_driver_gpios(). True. -- With Best Regards, Andy Shevchenko