Received: by 10.223.164.202 with SMTP id h10csp208004wrb; Mon, 13 Nov 2017 05:17:21 -0800 (PST) X-Google-Smtp-Source: AGs4zMYTy5WlZACPPj1VB9YDcL2+XuRN9BU79xVhKWDx5g9U8UbjDPHNNlfMCbwNSaNcw4JXUY+2 X-Received: by 10.84.200.39 with SMTP id s36mr8972774pld.9.1510579041307; Mon, 13 Nov 2017 05:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510579041; cv=none; d=google.com; s=arc-20160816; b=QJqQx0UeiifN/atY8aDLa1xG4qWRx6aaUzy4hNp5O9uHrwNK4KlOAONsy00/9e9Cwg PJnG7W0dSVfuac0n+Q/BTy7XYWOq0uHVrT3D5mZQJpwyLckwTUgKXAkwyhSLeL6yz/T0 k0Mljk2U0dkiAaydVJeETDF/9qeax1RnmGAXdZ7HawBui1WS8lFg7YW2lM69A4Oi0TqR yr5S22jWtA/7GTp34dzramSI1cRz3Ebzrv0X8WQzeMV3XsI2ntIZ2U3K84rnoDpxpBnx OsVHMicb2bjmPwbwLq70g9kQABYm6k+oyiclausOCL4ohCxRZScKpE+O2d0V03jFVr1f qMRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Y5AmbA4HB5IGPJ4mF31sJ4xAFjY3JcfHBMdCSSwmz7w=; b=O2KqvJTDhQdttK9yYWMjPji4VBPMTLaSVDcgokz8BAlE9mNvyNwdKV26J9wokbkhnU Tv2ZfKcIce5Eo+o/zx1QD3HWFTFaZib9QQ9vCrHfHb5+ezOmxw/bFJw09D4ERh+bVCH7 UwJphNScXDakDKG+CJRsDeGvlDK03o2w0pP2N6t+7ZZvM6CH8FPmX56pJHvFvEnUfG9Z rq79dd7VP2a0paBNt4f7e3DdcQIG4++V3a0L6rVArSrX6sOL7rJotHpvPKzn4lrE8NA0 Ojv3Eg8xfLvk/+5/oKqRdqRZgBmUi/9m9XE8PIII27Ci5zbNsJ4YJJs+uehjIcIpTkCe h5Pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5si13367085pgr.523.2017.11.13.05.17.08; Mon, 13 Nov 2017 05:17:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754908AbdKMNCn (ORCPT + 95 others); Mon, 13 Nov 2017 08:02:43 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51246 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754003AbdKMNCi (ORCPT ); Mon, 13 Nov 2017 08:02:38 -0500 Received: from localhost (LFbn-1-12253-150.w90-92.abo.wanadoo.fr [90.92.67.150]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3EC50AA6; Mon, 13 Nov 2017 13:02:37 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Airlie , Archit Taneja , Wolfram Sang , Lars-Peter Clausen , Laurent Pinchart , dri-devel@lists.freedesktop.org, John Stultz , Nhan Nguyen Subject: [PATCH 4.9 79/87] drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally Date: Mon, 13 Nov 2017 13:56:36 +0100 Message-Id: <20171113125622.356155497@linuxfoundation.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171113125615.304035578@linuxfoundation.org> References: <20171113125615.304035578@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: John Stultz commit 651e4769ba2a9f20c4b8a823ae2727bf7fa9c9f0 upstream. In chasing down issues with EDID probing, I found some duplicated but incomplete logic used to power the chip on and off. This patch refactors the adv7511_power_on/off functions, so they can be used for internal needs. Cc: David Airlie Cc: Archit Taneja Cc: Wolfram Sang Cc: Lars-Peter Clausen Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-5-git-send-email-john.stultz@linaro.org Signed-off-by: Nhan Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -325,7 +325,7 @@ static void adv7511_set_link_config(stru adv7511->rgb = config->input_colorspace == HDMI_COLORSPACE_RGB; } -static void adv7511_power_on(struct adv7511 *adv7511) +static void __adv7511_power_on(struct adv7511 *adv7511) { adv7511->current_edid_segment = -1; @@ -354,6 +354,11 @@ static void adv7511_power_on(struct adv7 regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER2, ADV7511_REG_POWER2_HPD_SRC_MASK, ADV7511_REG_POWER2_HPD_SRC_NONE); +} + +static void adv7511_power_on(struct adv7511 *adv7511) +{ + __adv7511_power_on(adv7511); /* * Most of the registers are reset during power down or when HPD is low. @@ -362,21 +367,23 @@ static void adv7511_power_on(struct adv7 if (adv7511->type == ADV7533) adv7533_dsi_power_on(adv7511); - adv7511->powered = true; } -static void adv7511_power_off(struct adv7511 *adv7511) +static void __adv7511_power_off(struct adv7511 *adv7511) { /* TODO: setup additional power down modes */ regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER, ADV7511_POWER_POWER_DOWN, ADV7511_POWER_POWER_DOWN); regcache_mark_dirty(adv7511->regmap); +} +static void adv7511_power_off(struct adv7511 *adv7511) +{ + __adv7511_power_off(adv7511); if (adv7511->type == ADV7533) adv7533_dsi_power_off(adv7511); - adv7511->powered = false; } From 1583946716262633918@xxx Mon Nov 13 10:35:01 +0000 2017 X-GM-THRID: 1583603767435731163 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread