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=-8.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,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 2E563C28CC5 for ; Wed, 5 Jun 2019 06:16:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EEA8020866 for ; Wed, 5 Jun 2019 06:16:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="a2p19VFR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726663AbfFEGQi (ORCPT ); Wed, 5 Jun 2019 02:16:38 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44201 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726595AbfFEGQh (ORCPT ); Wed, 5 Jun 2019 02:16:37 -0400 Received: by mail-pg1-f194.google.com with SMTP id n2so11798110pgp.11 for ; Tue, 04 Jun 2019 23:16:37 -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=yPLGcJboWqTS41OXT0YPS9mFDLi+KIswrNZ4xj5RMzE=; b=a2p19VFRYfiN+slwv4mz43rBb2yISQyrLkTJcMwSA/WWx9l79OZvNlzb0McxQjlz1q V0H85qKfEr5ZtprV5QK9qBTKSV8I1gF9ndrBiqTp2IS+Bz1UAF4xjzJ5ovK8Dbv9obd/ E4MAUdbc473B8+RS4fi0cnV5jtQ/pttN9wdLEjbGLZPKISnutmqS1RoLvLUmatV7Sxj4 1YpTj26Z25oIhkuyqe73xgLobBxUTtBRWPzTU80HA6shTFVU+iFMdg7A/LeV1fBVQ54j iipbbvvwaXrxFxqY26USW52xFqh7PwiURi/plOK8dz92vePi2swKlawieFKqGfDli8E8 zFfA== 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=yPLGcJboWqTS41OXT0YPS9mFDLi+KIswrNZ4xj5RMzE=; b=gv6bVzGsmaEIPpjBBVxreDmOUzitgLLLZRyFLqwV2uqUzVcu0snM8K3rfODhwe53Cj +bfC5Za2F30mQhZG1eiBJaBye6Edm22pHJjUwhH64plnWFT7zkHBzYbP1U4skt5OFckp a56Lzm9M+/eX9szTwd6MZMbOUg0uoh3dSNu1f0RhSFsDNcWvtU7n/SQBpuk+cugIi16h DVDMcvI1xpcsAvum0KhWheFUJJ8RmVOldiCVwqjbOcL/fa2axvxyb0yuAIPFX4ySzbom of3lYPqZwPHxwiastv0SRAORe9ia310lFdxB9IEmcYczXDtt7hdCUNAzhK5wA42r0X4X 1zWw== X-Gm-Message-State: APjAAAXuM7KT8CFQaGkYtMHbZwvS3Ccv+QUTuYhAvO+AtqsmSpRhQljR OU2BLTtsJ+1o9HtlBm826drHwg== X-Google-Smtp-Source: APXvYqwEJhIs8QubYN0avnbvfixWjIzhGaRnp7YPaFTgZ2Z2O0BG2WDaO37plKfU2MMrMOlw9tyzHw== X-Received: by 2002:a62:ea0a:: with SMTP id t10mr43421341pfh.236.1559715396814; Tue, 04 Jun 2019 23:16:36 -0700 (PDT) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id z18sm8987858pgh.88.2019.06.04.23.16.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2019 23:16:36 -0700 (PDT) Date: Tue, 4 Jun 2019 23:17:21 -0700 From: Bjorn Andersson To: Lee Jones Cc: alokc@codeaurora.org, kramasub@codeaurora.org, andy.gross@linaro.org, david.brown@linaro.org, wsa+renesas@sang-engineering.com, linus.walleij@linaro.org, balbi@kernel.org, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jlhugo@gmail.com, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH 4/8] pinctrl: qcom: sdm845: Provide ACPI support Message-ID: <20190605061721.GK22737@tuxbook-pro> References: <20190604104455.8877-1-lee.jones@linaro.org> <20190604104455.8877-4-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190604104455.8877-4-lee.jones@linaro.org> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue 04 Jun 03:44 PDT 2019, 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 > --- > drivers/pinctrl/qcom/Kconfig | 2 +- > drivers/pinctrl/qcom/pinctrl-sdm845.c | 35 ++++++++++++++++++++++++++- > 2 files changed, 35 insertions(+), 2 deletions(-) > > diff --git a/drivers/pinctrl/qcom/Kconfig b/drivers/pinctrl/qcom/Kconfig > index 2e66ab72c10b..aafbe932424f 100644 > --- a/drivers/pinctrl/qcom/Kconfig > +++ b/drivers/pinctrl/qcom/Kconfig > @@ -168,7 +168,7 @@ config PINCTRL_SDM660 > > config PINCTRL_SDM845 > tristate "Qualcomm Technologies Inc SDM845 pin controller driver" > - depends on GPIOLIB && OF > + depends on GPIOLIB && (OF || ACPI) > select PINCTRL_MSM > help > This is the pinctrl, pinmux, pinconf and gpiolib driver for the > diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm845.c > index c97f20fca5fd..7188bee3cf3e 100644 > --- a/drivers/pinctrl/qcom/pinctrl-sdm845.c > +++ b/drivers/pinctrl/qcom/pinctrl-sdm845.c > @@ -3,6 +3,7 @@ > * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. > */ > > +#include > #include > #include > #include > @@ -1277,6 +1278,10 @@ static const struct msm_pingroup sdm845_groups[] = { > UFS_RESET(ufs_reset, 0x99f000), > }; > > +static const int sdm845_acpi_reserved_gpios[] = { > + 0, 1, 2, 3, 81, 82, 83, 84, -1 > +}; > + > static const struct msm_pinctrl_soc_data sdm845_pinctrl = { > .pins = sdm845_pins, > .npins = ARRAY_SIZE(sdm845_pins), > @@ -1284,14 +1289,41 @@ static const struct msm_pinctrl_soc_data sdm845_pinctrl = { > .nfunctions = ARRAY_SIZE(sdm845_functions), > .groups = sdm845_groups, > .ngroups = ARRAY_SIZE(sdm845_groups), > + .reserved_gpios = sdm845_acpi_reserved_gpios, The reason why put these in DT is because the list is board/firmware dependent. E.g. the firmware on db845c does not support the peripherals that sits on these 8 pins and as such these are not reserved. But given that the two structs looks identical now, did you perhaps not intend to add.reserved_gpios for the non-ACPI case? Regards, Bjorn > + .ngpios = 150, > +}; > + > +static const struct msm_pinctrl_soc_data sdm845_acpi_pinctrl = { > + .pins = sdm845_pins, > + .npins = ARRAY_SIZE(sdm845_pins), > + .groups = sdm845_groups, > + .ngroups = ARRAY_SIZE(sdm845_groups), > + .reserved_gpios = sdm845_acpi_reserved_gpios, > .ngpios = 150, > }; > > static int sdm845_pinctrl_probe(struct platform_device *pdev) > { > - return msm_pinctrl_probe(pdev, &sdm845_pinctrl); > + int ret; > + > + if (pdev->dev.of_node) { > + ret = msm_pinctrl_probe(pdev, &sdm845_pinctrl); > + } else if (ACPI_HANDLE(&pdev->dev)) { > + ret = msm_pinctrl_probe(pdev, &sdm845_acpi_pinctrl); > + } else { > + dev_err(&pdev->dev, "DT and ACPI disabled\n"); > + return -EINVAL; > + } > + > + return ret; > } > > +static const struct acpi_device_id sdm845_pinctrl_acpi_match[] = { > + { "QCOM0217"}, > + { }, > +}; > +MODULE_DEVICE_TABLE(acpi, sdm845_pinctrl_acpi_match); > + > static const struct of_device_id sdm845_pinctrl_of_match[] = { > { .compatible = "qcom,sdm845-pinctrl", }, > { }, > @@ -1302,6 +1334,7 @@ static struct platform_driver sdm845_pinctrl_driver = { > .name = "sdm845-pinctrl", > .pm = &msm_pinctrl_dev_pm_ops, > .of_match_table = sdm845_pinctrl_of_match, > + .acpi_match_table = ACPI_PTR(sdm845_pinctrl_acpi_match), > }, > .probe = sdm845_pinctrl_probe, > .remove = msm_pinctrl_remove, > -- > 2.17.1 > 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=-8.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,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 A76AFC28CC5 for ; Wed, 5 Jun 2019 06:16:46 +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 7DA1D20866 for ; Wed, 5 Jun 2019 06:16:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qb8JCMI1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="a2p19VFR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DA1D20866 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=b+1CqIU7pLxcFJU251v7FBiiRfeJsycGIlqGxNgtQrY=; b=qb8JCMI1vjWtUS yZf9drhkNBZCiOB4PP6b82/PHlabvyv3XkTMyGPu3fY1BPUhepb6geXiC6u1DzRqGHiFbRHymXqEo jq8o6Ne+972uZ7ZTkxRsiZYqSRgS+SFGou2MwRHnsNMQf/DzWPvhfe7/ZfuCP6jb1uzP732wHWyMj I6lRW1e4kPJxfjRqvawtem/UDCzcdUqdQiPjCeM+gtgRd4lr/p746DXeImnbj+DorVV50W0c+K4u9 LKLzTGI7IGJt5zyCp0QnMmkicuLMkAuZtD/BWfV0Xs5XcBmv4LsN0OhlNmPO8pddXM+HPTZFXrL4p OPUeIRh/6vAnAnqTHjyw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYPE1-0006r7-0R; Wed, 05 Jun 2019 06:16:41 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYPDx-0006qK-R2 for linux-arm-kernel@lists.infradead.org; Wed, 05 Jun 2019 06:16:39 +0000 Received: by mail-pg1-x542.google.com with SMTP id s27so6198556pgl.2 for ; Tue, 04 Jun 2019 23:16:37 -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=yPLGcJboWqTS41OXT0YPS9mFDLi+KIswrNZ4xj5RMzE=; b=a2p19VFRYfiN+slwv4mz43rBb2yISQyrLkTJcMwSA/WWx9l79OZvNlzb0McxQjlz1q V0H85qKfEr5ZtprV5QK9qBTKSV8I1gF9ndrBiqTp2IS+Bz1UAF4xjzJ5ovK8Dbv9obd/ E4MAUdbc473B8+RS4fi0cnV5jtQ/pttN9wdLEjbGLZPKISnutmqS1RoLvLUmatV7Sxj4 1YpTj26Z25oIhkuyqe73xgLobBxUTtBRWPzTU80HA6shTFVU+iFMdg7A/LeV1fBVQ54j iipbbvvwaXrxFxqY26USW52xFqh7PwiURi/plOK8dz92vePi2swKlawieFKqGfDli8E8 zFfA== 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=yPLGcJboWqTS41OXT0YPS9mFDLi+KIswrNZ4xj5RMzE=; b=kZIztfGaz+wxxz/xjTpjGvcdLK5Vi9oPMjTGj4asCLtsdyP28YfKec2ZcIsxbITrmN FAThan7dVOwseoTjgt96WkcuGBZDmi4+tELbyP6MBkj7s3jQ0PbHznmJd8ynWNUt9ODz mXuAdDNgouXqNNZktAjMDLY1tLOhDjqW7rmU8SygT+wnhXMLm5B1PR5gteDeMBDfuCBW rhi81lrfZUf9XuHzpnRVFEhFxrf0WT7PLB7vQB1HuYHOT6wCZg9tv18P4oM9n91TJChK KrPGI937LQ8HuonEoVEVht4Qfy20c7y5KRHvKKacOpjD4nT2/wt5JvQIpqJQfrKym5Yx B63Q== X-Gm-Message-State: APjAAAUGR7i/KozfxprD9vqmoBkYI/WrFPbG69MgBGUxw8JY9x9oyDd0 zzyDZE0305GtZymOHPkK5J++qg== X-Google-Smtp-Source: APXvYqwEJhIs8QubYN0avnbvfixWjIzhGaRnp7YPaFTgZ2Z2O0BG2WDaO37plKfU2MMrMOlw9tyzHw== X-Received: by 2002:a62:ea0a:: with SMTP id t10mr43421341pfh.236.1559715396814; Tue, 04 Jun 2019 23:16:36 -0700 (PDT) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id z18sm8987858pgh.88.2019.06.04.23.16.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2019 23:16:36 -0700 (PDT) Date: Tue, 4 Jun 2019 23:17:21 -0700 From: Bjorn Andersson To: Lee Jones Subject: Re: [PATCH 4/8] pinctrl: qcom: sdm845: Provide ACPI support Message-ID: <20190605061721.GK22737@tuxbook-pro> References: <20190604104455.8877-1-lee.jones@linaro.org> <20190604104455.8877-4-lee.jones@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190604104455.8877-4-lee.jones@linaro.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_231637_895667_FFCB4ADE X-CRM114-Status: GOOD ( 23.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: balbi@kernel.org, wsa+renesas@sang-engineering.com, gregkh@linuxfoundation.org, linus.walleij@linaro.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, david.brown@linaro.org, alokc@codeaurora.org, kramasub@codeaurora.org, linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-msm@vger.kernel.org, andy.gross@linaro.org, jlhugo@gmail.com, linux-arm-kernel@lists.infradead.org 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 Tue 04 Jun 03:44 PDT 2019, 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 > --- > drivers/pinctrl/qcom/Kconfig | 2 +- > drivers/pinctrl/qcom/pinctrl-sdm845.c | 35 ++++++++++++++++++++++++++- > 2 files changed, 35 insertions(+), 2 deletions(-) > > diff --git a/drivers/pinctrl/qcom/Kconfig b/drivers/pinctrl/qcom/Kconfig > index 2e66ab72c10b..aafbe932424f 100644 > --- a/drivers/pinctrl/qcom/Kconfig > +++ b/drivers/pinctrl/qcom/Kconfig > @@ -168,7 +168,7 @@ config PINCTRL_SDM660 > > config PINCTRL_SDM845 > tristate "Qualcomm Technologies Inc SDM845 pin controller driver" > - depends on GPIOLIB && OF > + depends on GPIOLIB && (OF || ACPI) > select PINCTRL_MSM > help > This is the pinctrl, pinmux, pinconf and gpiolib driver for the > diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm845.c > index c97f20fca5fd..7188bee3cf3e 100644 > --- a/drivers/pinctrl/qcom/pinctrl-sdm845.c > +++ b/drivers/pinctrl/qcom/pinctrl-sdm845.c > @@ -3,6 +3,7 @@ > * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. > */ > > +#include > #include > #include > #include > @@ -1277,6 +1278,10 @@ static const struct msm_pingroup sdm845_groups[] = { > UFS_RESET(ufs_reset, 0x99f000), > }; > > +static const int sdm845_acpi_reserved_gpios[] = { > + 0, 1, 2, 3, 81, 82, 83, 84, -1 > +}; > + > static const struct msm_pinctrl_soc_data sdm845_pinctrl = { > .pins = sdm845_pins, > .npins = ARRAY_SIZE(sdm845_pins), > @@ -1284,14 +1289,41 @@ static const struct msm_pinctrl_soc_data sdm845_pinctrl = { > .nfunctions = ARRAY_SIZE(sdm845_functions), > .groups = sdm845_groups, > .ngroups = ARRAY_SIZE(sdm845_groups), > + .reserved_gpios = sdm845_acpi_reserved_gpios, The reason why put these in DT is because the list is board/firmware dependent. E.g. the firmware on db845c does not support the peripherals that sits on these 8 pins and as such these are not reserved. But given that the two structs looks identical now, did you perhaps not intend to add.reserved_gpios for the non-ACPI case? Regards, Bjorn > + .ngpios = 150, > +}; > + > +static const struct msm_pinctrl_soc_data sdm845_acpi_pinctrl = { > + .pins = sdm845_pins, > + .npins = ARRAY_SIZE(sdm845_pins), > + .groups = sdm845_groups, > + .ngroups = ARRAY_SIZE(sdm845_groups), > + .reserved_gpios = sdm845_acpi_reserved_gpios, > .ngpios = 150, > }; > > static int sdm845_pinctrl_probe(struct platform_device *pdev) > { > - return msm_pinctrl_probe(pdev, &sdm845_pinctrl); > + int ret; > + > + if (pdev->dev.of_node) { > + ret = msm_pinctrl_probe(pdev, &sdm845_pinctrl); > + } else if (ACPI_HANDLE(&pdev->dev)) { > + ret = msm_pinctrl_probe(pdev, &sdm845_acpi_pinctrl); > + } else { > + dev_err(&pdev->dev, "DT and ACPI disabled\n"); > + return -EINVAL; > + } > + > + return ret; > } > > +static const struct acpi_device_id sdm845_pinctrl_acpi_match[] = { > + { "QCOM0217"}, > + { }, > +}; > +MODULE_DEVICE_TABLE(acpi, sdm845_pinctrl_acpi_match); > + > static const struct of_device_id sdm845_pinctrl_of_match[] = { > { .compatible = "qcom,sdm845-pinctrl", }, > { }, > @@ -1302,6 +1334,7 @@ static struct platform_driver sdm845_pinctrl_driver = { > .name = "sdm845-pinctrl", > .pm = &msm_pinctrl_dev_pm_ops, > .of_match_table = sdm845_pinctrl_of_match, > + .acpi_match_table = ACPI_PTR(sdm845_pinctrl_acpi_match), > }, > .probe = sdm845_pinctrl_probe, > .remove = msm_pinctrl_remove, > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel