From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2305AC4321A for ; Tue, 11 Jun 2019 18:40:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC1162177E for ; Tue, 11 Jun 2019 18:39:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EL+W9XOZ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gtHTXVgS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC1162177E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eEGGupQ2gAOMhe913h0OK1IXeFVeufY49kvtLhlbuWw=; b=EL+W9XOZPm9ukD kElp/YjtH2ALVS89+SRyBOmZAsJaqBcm2PAGvTKs4kuBdgSYXPYzSnyUSMjIeZHGiLIwT9PiOtv0m m1eyoldpmH5AJDeeoHh54+47+yfAvoRSltQnaycm6+ElkrSuF9V2FNSqSvjAJTkqlcoW5rXkz+w7M gukdlDetdhRnjMHDxOWFTdHk/nPL1XE/VSraygTdD2e2eWVmdUo4EBN++A2Sc/XcyFomTCTMXsKP/ lig5kpCFRS15/KCLW4E3sQTXnPFtyEkGnHt9Eg6V+gSCB/brM5DWHgEhW4m8AzWVCCgJfqXYBUSwr avQXrr8I91XJKg/CAV2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1halgX-0002md-K8; Tue, 11 Jun 2019 18:39:53 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1halgU-0002m8-GL for linux-arm-kernel@lists.infradead.org; Tue, 11 Jun 2019 18:39:52 +0000 Received: by mail-pf1-x443.google.com with SMTP id d126so7987757pfd.2 for ; Tue, 11 Jun 2019 11:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zW6AynUQeh/d1MGikSw6rg9037amHgOpXgjZc/bYyo0=; b=gtHTXVgSsCW+WzGSqP5jD5k72gd1VwNjkRGZ6kyTYVbl9OaWD2braqloLb++ZYFoaW dbCaH+n3AgU4PKdA57lePWtbt4HHHDl1ElnATdqGqXSF9yVrYo76JPhNKS088vzV7GDN 1CJ9ag9coDwUukCnp8mQHRFG78or4KyQfmzxd4kqOkRAl4hT/CRoKK6A3i6xzLoNwdvE 62v61Cz/xHioGQvUIEttFjfCFwI47zsJvlj8yjxAo4u0cGbHPDcxEQxUy941mb/k5jTG 8Joplh3e5y46cHQeocodgZMMxMEeFdefwVPuwtV3pGGphvTDuMsWt0xAmXTH9035qn7M KyYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zW6AynUQeh/d1MGikSw6rg9037amHgOpXgjZc/bYyo0=; b=qjcgtNZbBNxX5lB8LKwqhM+wSARSy80z+iEof9hZx+bCse/k541yFaaN9OTukOfQbb uJe447gOcGuuNlZXj/7WgLuD0JwQT9Wv9VphK3tu+0f+G+ja+mwVuCi/4DPhg9+beE5E nPf3u4vWbRsV7kliRt2Rc9m4HFihiPu9Wkwmel0ewx2c+z1M/zBxZZcjkRsbMX9CLjJB wyugu/ONhKYIkDablMh0XSWSFpPrZpR+q470l0qHm8nmqlqdqP3NmUSQJRDs6gR90bfL kzgz1OqCA75PVznXKhqRkePbAqmjZ7E5scs1cgVbWz/Vf8BToXORB0s/AZaQkI1BGn7i 2Ipw== X-Gm-Message-State: APjAAAW7AAoOye26kypI8MMcA+J2VR7L1TSSEf/IO7bzW2eEEEsyBb1l L29BQGO1DP/JNoCOwJlAGzVzeA== X-Google-Smtp-Source: APXvYqy9pS4xgDWNZze0LOrbLEksodwMGCOdwtad24aELFBqknW6/q8wGUEyNWy9Ls67LZYFBEhhgw== X-Received: by 2002:a62:e511:: with SMTP id n17mr73761345pff.181.1560278388728; Tue, 11 Jun 2019 11:39:48 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id y22sm23485517pfo.39.2019.06.11.11.39.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 11 Jun 2019 11:39:48 -0700 (PDT) Date: Tue, 11 Jun 2019 11:39:45 -0700 From: Bjorn Andersson To: Lee Jones Subject: Re: [PATCH v3 4/8] pinctrl: qcom: sdm845: Provide ACPI support Message-ID: <20190611183945.GP4814@minitux> References: <20190610084213.1052-1-lee.jones@linaro.org> <20190610084213.1052-4-lee.jones@linaro.org> <20190610085542.GL4797@dell> <20190610092245.GN4797@dell> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190610092245.GN4797@dell> User-Agent: Mutt/1.12.0 (2019-05-25) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190611_113950_573683_0505C4B7 X-CRM114-Status: GOOD ( 28.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: balbi@kernel.org, linux-usb , wsa+renesas@sang-engineering.com, Greg Kroah-Hartman , Linus Walleij , Ard Biesheuvel , Linux Kernel Mailing List , David Brown , alokc@codeaurora.org, linux-i2c , "open list:GPIO SUBSYSTEM" , linux-arm-msm , Andy Gross , Jeffrey Hugo , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon 10 Jun 02:22 PDT 2019, Lee Jones wrote: > On Mon, 10 Jun 2019, Ard Biesheuvel wrote: > > > On Mon, 10 Jun 2019 at 10:55, Lee Jones wrote: > > > > > > On Mon, 10 Jun 2019, Ard Biesheuvel wrote: > > > > > > > On Mon, 10 Jun 2019 at 10:42, Lee Jones wrote: > > > > > > > > > > This patch provides basic support for booting with ACPI instead > > > > > of the currently supported Device Tree. When doing so there are a > > > > > couple of differences which we need to taken into consideration. > > > > > > > > > > Firstly, the SDM850 ACPI tables omit information pertaining to the > > > > > 4 reserved GPIOs on the platform. If Linux attempts to touch/ > > > > > initialise any of these lines, the firmware will restart the > > > > > platform. > > > > > > > > > > Secondly, when booting with ACPI, it is expected that the firmware > > > > > will set-up things like; Regulators, Clocks, Pin Functions, etc in > > > > > their ideal configuration. Thus, the possible Pin Functions > > > > > available to this platform are not advertised when providing the > > > > > higher GPIOD/Pinctrl APIs with pin information. > > > > > > > > > > Signed-off-by: Lee Jones > > > > > > > > For the ACPI probing boilerplate: > > > > Acked-by: Ard Biesheuvel > > > > > > > > *However*, I really don't like hardcoding reserved GPIOs like this. > > > > What guarantee do we have that each and every ACPI system > > > > incorporating the QCOM0217 device has the exact same list of reserved > > > > GPIOs? > > > > > > This is SDM845 specific, so the chances are reduced. > > > > You don't know that. > > All the evidence I have to hand tells me that this is the case. Even > on very closely related variants Qualcomm uses different H/W blocks > for GPIO. > I presume with this you mean that e.g. the 835 laptops doesn't sport a QCOM0217? > > > However, if another SDM845 variant does crop up, also lacking the > > > "gpios" property, we will have to find another differentiating factor > > > between them and conduct some matching. What else can you do with > > > platforms supporting non-complete/non-forthcoming ACPI tables? > > > > > > > Either we don't touch any pins at all if they are not referenced > > explicitly anywhere > > I guess this would require an API change, which is out of scope of > this patch-set. Happy to change this implementation later if the > subsystem allows for it though. > Last time we discussed this the _only_ offender was the loop issuing a get_direction() on all descs towards the end of gpiochip_add_data_with_key() > > or we parse the PEP tables, which seem to cover > > some of this information (if Bjorn's analysis is correct) > > Maybe someone can conduct some further work on this when we start to > enable or write a driver for the PEP (Windows-compatible System Power > Management Controller). The tables for the PEP look pretty complex, > so this task would be extremely difficult if not impossible without > Qualcomm's help. I wouldn't even know how to extrapolate this > information from the tables. > Yeah that looks quite different, so I'm not sure how to tie that into the current driver. But I'm fine with adding this for now, if PEP brings a different approach we can always rip this out later. Regards, Bjorn > > (if Bjorn's analysis is correct) > > Bjorn is about to provide his Reviewed-by for this implementation. > > -- > Lee Jones [?????????] > Linaro Services Technical Lead > Linaro.org ??? Open source software for ARM SoCs > Follow Linaro: Facebook | Twitter | Blog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel