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=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 1296EC282DD for ; Mon, 10 Jun 2019 09:04:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAEDD2082E for ; Mon, 10 Jun 2019 09:04:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MiBmuh4H" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388744AbfFJJEH (ORCPT ); Mon, 10 Jun 2019 05:04:07 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:36049 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388713AbfFJJEH (ORCPT ); Mon, 10 Jun 2019 05:04:07 -0400 Received: by mail-it1-f196.google.com with SMTP id r135so12007183ith.1 for ; Mon, 10 Jun 2019 02:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fT90yBCfvgHH/USr4Fa6t7Hb/A6wLFnh4q0k27VLHoA=; b=MiBmuh4HcFCHNwSDfo1tTNQ7oVKa6r6w1uW/9apFsiPxN4cBNnJOAkrD9G9NcYbBz0 eDV76xl/95MZ78MKpWkJ5xVCZpS6Ia7dwF2Cz6M4m4Iu3mB5a20AXD/HjJC4pYaVzMO7 firn3hGYSYxkMc577jeK/u5pGhEs+AQOsyxGOiuVYB41BLhCRXEgB5slWh/gsZN+/lAA Bf3OAVrpWFjdZFLYduRzO+I2SE5pQK867tkKniEgqfkJEEW6xQHZFnM8ygi73IJI4EW9 J79NCgY1YVRqSBhBymYFPGfyzTrD2ooEB9Uw0nv22rHBC/gwyvYx98yO6JEcJ5gKeClL jKcg== 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=fT90yBCfvgHH/USr4Fa6t7Hb/A6wLFnh4q0k27VLHoA=; b=eV8Deiio94LllGWiZIO6+sHqkfgjU0nJwM6vsqQPYl8s84oo0kWL+4tb6tOoAVm0G1 S3jnlmrnUThCLVlbyZdATOGwDKyCF9NHK+norSEmMwUZEafOF4hSKVuLLKmeVAWjweK6 iPRzICkSqobywhC/jsOXyBy2fPiU7WGzWXMVpgvgrf4T+8pJbTApJqnqibHoeuCumbHA k+pVwNv0OkBmH4L61wv3ReXbTfzea2MqWeg7G4k84ut9biByr3ItSmAMzuBPOclNFcuw nnU4OrgU7NdLKmzUmL0pUYGBf/m46mWOcuisTk5O13NbCcht0jB9JSFMJNEGwUuds4Fz song== X-Gm-Message-State: APjAAAWF42cEKKpDLSr4g8JpdaOqbp+l874TzprJHy2+ZR8X58VDrxxI ZMKTPG/zYjkJD6AzGE1IfHeaUE1mpChEro7mOsZ8Lw== X-Google-Smtp-Source: APXvYqwkUy8NJlaVC3ZLeQiyK4NjB0jc9Voa3XoI7Z3nR5vGUM1XyHPJFdz9nE7zh9z+pHwwmOgMLp1ZWxUKgEuZmJs= X-Received: by 2002:a24:740f:: with SMTP id o15mr14362252itc.76.1560157446438; Mon, 10 Jun 2019 02:04:06 -0700 (PDT) MIME-Version: 1.0 References: <20190610084213.1052-1-lee.jones@linaro.org> <20190610084213.1052-4-lee.jones@linaro.org> <20190610085542.GL4797@dell> In-Reply-To: <20190610085542.GL4797@dell> From: Ard Biesheuvel Date: Mon, 10 Jun 2019 11:03:46 +0200 Message-ID: Subject: Re: [PATCH v3 4/8] pinctrl: qcom: sdm845: Provide ACPI support To: Lee Jones Cc: alokc@codeaurora.org, Andy Gross , David Brown , wsa+renesas@sang-engineering.com, Bjorn Andersson , Linus Walleij , balbi@kernel.org, Greg Kroah-Hartman , Jeffrey Hugo , linux-i2c , linux-arm-msm , "open list:GPIO SUBSYSTEM" , linux-usb , linux-arm-kernel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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. > 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, or we parse the PEP tables, which seem to cover some of this information (if Bjorn's analysis is correct)