From patchwork Tue May 5 13:21:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 206961 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=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS 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 41A8AC4725A for ; Tue, 5 May 2020 13:21:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2014A2078D for ; Tue, 5 May 2020 13:21:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LjVL7TA4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729037AbgEENVt (ORCPT ); Tue, 5 May 2020 09:21:49 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:54051 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729023AbgEENVt (ORCPT ); Tue, 5 May 2020 09:21:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588684908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pCVuo/wWVMtEixMAsPUx+ERNNUL83pR0CaQxlVIb/Cs=; b=LjVL7TA4UtgNses7tJTb39Bl5zIRHD6jmE0x2MWxp52t7b4ZQuSTeGFzWlPj2ZYAmD8nik ucDfXy69Hb3/uWSvWgxb4GJYcJhWSLJ7FeWqqFQFk0igzRgmTprIGFIoBgv3m+jbDpr2Uh YN7GCFVUiQVsloaN8FAyYVwie6ef9lM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-150-irMXFVHKMEGlX47Pv6O8bg-1; Tue, 05 May 2020 09:21:46 -0400 X-MC-Unique: irMXFVHKMEGlX47Pv6O8bg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1C5348014C1; Tue, 5 May 2020 13:21:45 +0000 (UTC) Received: from x1.localdomain.com (ovpn-113-21.ams2.redhat.com [10.36.113.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3787B6060E; Tue, 5 May 2020 13:21:43 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Mika Westerberg , Andy Shevchenko , Linus Walleij Cc: Hans de Goede , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH 3/3] pinctrl: cherryview: Use the new acpi_evaluate_reg() helper Date: Tue, 5 May 2020 15:21:28 +0200 Message-Id: <20200505132128.19476-4-hdegoede@redhat.com> In-Reply-To: <20200505132128.19476-1-hdegoede@redhat.com> References: <20200505132128.19476-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Use the new acpi_evaluate_reg() helper in the pinctrl-cherryview code. Signed-off-by: Hans de Goede --- drivers/pinctrl/intel/pinctrl-cherryview.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c index 4817aec114d6..579bdfcfab8f 100644 --- a/drivers/pinctrl/intel/pinctrl-cherryview.c +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c @@ -1693,8 +1693,6 @@ static acpi_status chv_pinctrl_mmio_access_handler(u32 function, static int chv_pinctrl_probe(struct platform_device *pdev) { - struct acpi_object_list input; - union acpi_object params[2]; struct chv_pinctrl *pctrl; struct acpi_device *adev; acpi_status status; @@ -1765,13 +1763,8 @@ static int chv_pinctrl_probe(struct platform_device *pdev) * the GeneralPurposeIo OpRegion. Manually call _REG here so that * the DSDT-s GeneralPurposeIo availability checks will succeed. */ - params[0].type = ACPI_TYPE_INTEGER; - params[0].integer.value = ACPI_ADR_SPACE_GPIO; - params[1].type = ACPI_TYPE_INTEGER; - params[1].integer.value = 1; - input.count = 2; - input.pointer = params; - acpi_evaluate_object(adev->handle, "_REG", &input, NULL); + acpi_evaluate_reg(adev->handle, ACPI_ADR_SPACE_GPIO, + ACPI_REG_CONNECT); platform_set_drvdata(pdev, pctrl);