From patchwork Fri Jun 29 11:32:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10498725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AEB1960532 for ; Sun, 1 Jul 2018 14:52:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DF34288A9 for ; Sun, 1 Jul 2018 14:52:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 926C12894E; Sun, 1 Jul 2018 14:52:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 64101288A9 for ; Sun, 1 Jul 2018 14:52:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 11E2B6E27B; Sun, 1 Jul 2018 14:51:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 490196F05E; Fri, 29 Jun 2018 11:33:07 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id p12-v6so8512205wrn.11; Fri, 29 Jun 2018 04:33:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ASp32DZEQ5jaNH0pxtDXO2l33N6QxehL2+UrfAg2WqU=; b=LnWgNw/ugU58ooEucgfQMykZItv23PIU5xOG5nIpD2vDVv81nedZbF+vs5H78apUfn nNjjOOPTLit0Ybeii3BicEsHDLbwOeL0DXUj6UFRrow3y26+G+3RTY39ZyHmBIn7O/37 Dm4pjo6esibTYZUzOd9Db4FH8fcT+o2xpjWHjzdmvOePjrIGwF0aDQD9sFDRhiu5h8l6 cmoqwcU0RYAgTdB3Xex+z/SmD8yjeaSRjKoeplXi+/Cs91iu0bUsncTtDq3ItVfteJe1 y0Oa3Nvv2iWIy9++TQfaEiSBMaIoYSurv9Jhyr25Tuk+XIp6GHuxJj2urSE+ebXG3NOE 6W+w== X-Gm-Message-State: APt69E1BW6u6D1xV2YgLntzLW471uCHqAkR4G7I2k1UIqxcken7iIFV9 paY8hDBiN4f71UgqrfR8fPCRrrGB X-Google-Smtp-Source: AAOMgpctKbqyW6j/mT1uT8X/Lw4tZv6KkdeVnQzvtZKa7xyh1v+aEBL76Lty/ppBW5Ml564SL+kkpg== X-Received: by 2002:adf:d142:: with SMTP id b2-v6mr6580226wri.17.1530271985985; Fri, 29 Jun 2018 04:33:05 -0700 (PDT) Received: from shalem.localdomain.com (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id u204-v6sm1570874wmd.7.2018.06.29.04.33.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 04:33:05 -0700 (PDT) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Daniel Vetter Subject: [PATCH] drm/i915/intel_dsi: Add acpi_gpio_mapping for the panel-enable GPIO Date: Fri, 29 Jun 2018 13:32:58 +0200 Message-Id: <20180629113258.16188-1-hdegoede@redhat.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Sun, 01 Jul 2018 14:51:34 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , intel-gfx , dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add acpi_gpio_mapping for the panel-enable GPIO, this fixes the following error: "Failed to own gpio for panel control" on BYT/CHT devices where pwm_blc == PPS_BLC_PMIC. Note this patch is untested as I don't have hardware to test this, but it should fix things. Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index 3b7acb5a70b3..b2b75ed3cbf9 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include "i915_drv.h" @@ -1713,6 +1714,13 @@ static void intel_dsi_add_properties(struct intel_connector *connector) } } +static const struct acpi_gpio_params panel_gpio = { 0, 0, false }; + +static const struct acpi_gpio_mapping panel_gpios[] = { + { "panel", &panel_gpio, 1 }, + { }, +}; + void intel_dsi_init(struct drm_i915_private *dev_priv) { struct drm_device *dev = &dev_priv->drm; @@ -1811,6 +1819,7 @@ void intel_dsi_init(struct drm_i915_private *dev_priv) */ if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) && (dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC)) { + devm_acpi_dev_add_driver_gpios(dev->dev, panel_gpios); intel_dsi->gpio_panel = gpiod_get(dev->dev, "panel", GPIOD_OUT_HIGH);