Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2684721rdb; Mon, 4 Dec 2023 04:59:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IHc+KOzdPvF/b5mX5eO7tS5MfDkaaJa/XfajiHgXW9NZ/qVcfdzlstWf74fF8qXEDKnnTq6 X-Received: by 2002:a17:903:1ca:b0:1d0:a084:b002 with SMTP id e10-20020a17090301ca00b001d0a084b002mr1165675plh.68.1701694775223; Mon, 04 Dec 2023 04:59:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701694775; cv=none; d=google.com; s=arc-20160816; b=bVfzwmnrIvY4YcOa70WxeEhA2O6R1nUa3yamfvKcH0OOpMZdLSyq2e30Qk2nt1htnF EoSA5Icn9R1O1AbB6TWThDpaW/2qEGX3CYCj38Ty5p5jWT3I6wzxShU3bwSKR0Nzxztf a02St4+CuMU2eUCRvWSp3tPbC4Q5APPj0xE57INCIy+XGi4ZU76ZfnyqsG826AEJZCiC ZIhYnnaZgmN6rK4MVMhnR6EPoxNRPT2duGYMYsHzFtnKesL/7ZeiEIMS4sMJ6WO8MNKG cwlHk7ID8S/az/5wArQNS3hKbPVAqGlvb0/N2GwHNK4NQHAJ/glGEv1/dMMjGiypO0R3 jpMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=c4ylCRuaNIlNGDB0v6UBL1uLzuFoLtwkYd10QKB+t/E=; fh=CEscgihT6EKgFpfb4FmGWulemzdK++CK+UdA7tSrtn0=; b=GIeDNskVa6QXJcgvQm61Y0TLSeLH6MP8rchvBBMRBlri6Wpzgao2Balid3pHsDeB6e kJGAt8XAb5tz8BR0Kc3RByGMq1tqrolxsEuhbQ1/3ij1n6yFKamRMrf/O1gBjiVwY0X0 h4Hpe8+v9fQhR1ACQxFESBLERvHctgHiWDC9QaP6NP6LPVVklbP7R/+KfkQf+ff/Xbkp 2PYRfV6cTh6pu+hlg3kWXk4TPVHjYEpUBM/7KJfu+Zs4GiQHAvYCUDvNSu9wq5Fu1kLA kLOtqLW7nj7O9igzk6JL9f2od3BqteYtO588jZJ+J3EqfVdOG4iIhExr9nQcoNBvbxWO iVqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mu5y1HaG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i12-20020a170902c94c00b001d0baf665b3si326874pla.358.2023.12.04.04.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 04:59:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mu5y1HaG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BAC3580A2669; Mon, 4 Dec 2023 04:59:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232797AbjLDM7Y (ORCPT + 99 others); Mon, 4 Dec 2023 07:59:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235338AbjLDM7V (ORCPT ); Mon, 4 Dec 2023 07:59:21 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D694106 for ; Mon, 4 Dec 2023 04:59:28 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC4C8C4339A for ; Mon, 4 Dec 2023 12:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701694767; bh=Xuo/9Xw0T3ZL/f6gtSBDt9WLA8ftkplvVnNqlwQno80=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mu5y1HaGiumAJYSkoMa8sm8sgNk/d2dwR0a1klxnPNWno5YuvRRDn6XX7pD4Xn4XG FL4qZrE3nTOZh3kbEmz6hbzbZ1b2/OKu0QVAlheCHq+cQmQdaUwVxeFYYNXnVoIsvN 3hKy4p376auFLD5o1vxzkJGAK/vN2IdB1/5OQuB0jPSMBe4GUFCq2tQh9sTZscGBG2 ne/9bCGEmbpbgrKgO80sX+lgRdF+tZGWJVtZ24bW2CjvYYiSamsSmLbyjj3QdJEoPK 6NTCmDYJxgEmiXMTVK3nttHYceuLNzrLCYA/m1EWmNbH+q6xn6d+/TsSwOu8xw6HEZ PzrqUoHyiPlZg== Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-5be30d543c4so1300836a12.2 for ; Mon, 04 Dec 2023 04:59:27 -0800 (PST) X-Gm-Message-State: AOJu0YzOOKl+9odMis/tDiatbSrJBq/pP4t4gKEoRQyqZFqzJBFdv/iy VSL6H8cULeqk9aoOR5ScPpCuvFEyNoZVxi0d5QkMew== X-Received: by 2002:a17:90a:196:b0:286:71c6:6b69 with SMTP id 22-20020a17090a019600b0028671c66b69mr1369762pjc.24.1701694767449; Mon, 04 Dec 2023 04:59:27 -0800 (PST) MIME-Version: 1.0 References: <20231115121338.22959-1-francesco@dolcini.it> <20231115121338.22959-2-francesco@dolcini.it> In-Reply-To: <20231115121338.22959-2-francesco@dolcini.it> From: Robert Foss Date: Mon, 4 Dec 2023 13:59:16 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 1/3] drm/bridge: lt8912b: Add suspend/resume support To: Francesco Dolcini Cc: Adrien Grassein , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Stefan Eichenberger , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Francesco Dolcini Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 04:59:34 -0800 (PST) On Wed, Nov 15, 2023 at 1:14=E2=80=AFPM Francesco Dolcini wrote: > > From: Stefan Eichenberger > > Add support for suspend and resume. The lt8912b will power off when > going into suspend and power on when resuming. > > Signed-off-by: Stefan Eichenberger > Signed-off-by: Francesco Dolcini > --- > drivers/gpu/drm/bridge/lontium-lt8912b.c | 28 ++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/b= ridge/lontium-lt8912b.c > index 03532efb893b..097ab04234b7 100644 > --- a/drivers/gpu/drm/bridge/lontium-lt8912b.c > +++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c > @@ -634,6 +634,33 @@ static const struct drm_bridge_funcs lt8912_bridge_f= uncs =3D { > .get_edid =3D lt8912_bridge_get_edid, > }; > > +static int lt8912_bridge_resume(struct device *dev) > +{ > + struct lt8912 *lt =3D dev_get_drvdata(dev); > + int ret; > + > + ret =3D lt8912_hard_power_on(lt); > + if (ret) > + return ret; > + > + ret =3D lt8912_soft_power_on(lt); > + if (ret) > + return ret; > + > + return lt8912_video_on(lt); > +} > + > +static int lt8912_bridge_suspend(struct device *dev) > +{ > + struct lt8912 *lt =3D dev_get_drvdata(dev); > + > + lt8912_hard_power_off(lt); > + > + return 0; > +} > + > +static DEFINE_SIMPLE_DEV_PM_OPS(lt8912_bridge_pm_ops, lt8912_bridge_susp= end, lt8912_bridge_resume); > + > static int lt8912_parse_dt(struct lt8912 *lt) > { > struct gpio_desc *gp_reset; > @@ -770,6 +797,7 @@ static struct i2c_driver lt8912_i2c_driver =3D { > .driver =3D { > .name =3D "lt8912", > .of_match_table =3D lt8912_dt_match, > + .pm =3D pm_sleep_ptr(<8912_bridge_pm_ops), > }, > .probe =3D lt8912_probe, > .remove =3D lt8912_remove, > -- > 2.25.1 > Reviewed-by: Robert Foss