Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp275655lqo; Wed, 15 May 2024 14:13:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXyqWSLmLkyt8YK6xOY/4fyIiYl9Fyv86OA0HVF6xUtLJWh+D/XCr0qx3YwgOlnZMNe3bzww+WF7UuYSwfj1LkWkVGC1gye02sfnAD7Xg== X-Google-Smtp-Source: AGHT+IH9+8/zOaT6Z1EXvb/3WhQd84oi6EF5iQXhxAiY8NNfzRmbCcvn1KhfmMzueKocM/rBrlar X-Received: by 2002:a05:6214:4519:b0:6a0:de15:7fcf with SMTP id 6a1803df08f44-6a168165ae6mr218326736d6.22.1715807638700; Wed, 15 May 2024 14:13:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715807638; cv=pass; d=google.com; s=arc-20160816; b=qrr3pNuh+KjnI7qcvhPJjaacVacAQiNLb4fIBQmNnr302mLrD/v9CaKd+WwtqCW9xj SLh2ZLtwHxNY3hRz8SfAMYXQaoUNs7lKMxL3UTDdr0jf4Qs9e8vDcDhIOnH2cQ7nssXD TxTnSOFVFcby5PfdUuM01Vc7wqjoCSNm/LFb5YZK6QuvPnM+Rg8VbWBn9WoSmB1DkdTn vLpJv/FOLbZaUNGBRn4v3y0lF/prOiFMwTyuSMs/bGsBtukfYAonBqKCE9gPI3Aq8Tpd J9Ixet+qot7PUQCa/tOxTXW2Po038WOHJdZcVwBAvw6FkYVbTiUmBbwAZaRx2Tm8Nc+T qoog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=renabCQBjnKbuD0E1htsmVXRz+sXl0GAkDLoNZkXQSo=; fh=iCtE7haRcJecvtrhlyZ3YN/9V41TvEw+EWgyXgb9MgM=; b=NJyUpqFETfFFrFJrEr1bI89U7+u4kSRgm/+/BgMo6vgNXPrwQnNVBzjhrLE81gI8Kk /HHC1Oc1PzW6Cqdc+NNy6p1qhIcLEnYxZVaA6nLFfhqHYL8fmhxOAbKiJ93EScCO622G oVWJlKvL46GIciDqJeFxsQocTY6Ek1oAt4iOKmCXkeAYJNKl+SLrfZeq9ZNi8sQwTyin ysP62vJ3VIVDtJgt1nc5tP7t2uu+06O7EIHHETMACvgYOHt4H6g6dHKahYNP9UjonPG3 xpCXTKLwdjS90IkVFKuO3n/eHyBrZzDtubvidXi/zQczKjmodzvoUDlY4x3tacDl/AeN nD0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BqU3h4uQ; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-180371-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180371-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f29c877si153599946d6.303.2024.05.15.14.13.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 14:13:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180371-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BqU3h4uQ; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-180371-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180371-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 61E481C221E2 for ; Wed, 15 May 2024 21:13:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B57615B54A; Wed, 15 May 2024 21:13:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="BqU3h4uQ" Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 481AA15B12D for ; Wed, 15 May 2024 21:13:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715807615; cv=none; b=KjB+7wbDRvCWXYwdkFYEkAKFOpWlTckGfLyqku8RTj2TRqgEgzYGuC0hTWkpfb1xOjn6JFqrOSRwZQDn/d/C35QIdsLdxu17bC0pgQdpetsEgU7JopLQ/YC8jHzC2QNeNL+TXWOkE4XqxpU9mzNJV6NP09iidXc4ywQiBVE4Aeo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715807615; c=relaxed/simple; bh=bvwKe2cUxIwA3wbANMobFmrdn8i2fePiVArTt8lKlnc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=tTLsxnjIoobzy9yreAfOmraxWDh5Zf35I/PE/PbnYCXa71Pl0OpAno5xO1FnUVmLPg+pu5G0nD6Iwdokxvx8iQqbJD9r/t4VOukAjn+zV6fvPf6/7lA9u592g5t9MazXwaZhlj+isXA3vL/4w2jR91qn4H2InIdzpgo7h3d1FaU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=BqU3h4uQ; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-792c34f891eso614111885a.1 for ; Wed, 15 May 2024 14:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715807612; x=1716412412; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=renabCQBjnKbuD0E1htsmVXRz+sXl0GAkDLoNZkXQSo=; b=BqU3h4uQUcMp7mU+/HUaLUJhTHSOrxKffjTTNZWmby/97JEgGd3KcYEUf9JqchswiI ZSe18XLH0AIO8hSvbETH5Z/a2u72c+MNbKdorHHVXW0x35A5SosGDHKbH/KD41o8ZUkK 4rEG/E/OYAZqQAgTXKBeKC72oGma0mqSyQp5I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715807612; x=1716412412; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=renabCQBjnKbuD0E1htsmVXRz+sXl0GAkDLoNZkXQSo=; b=QrqTsESm6MBtNbOikxHxniwTEP70M3hodnKafr0b2mKcsoqdGRi7A9IaThcoyYY8ZD J68sI7p+4o50VieMOifnSR7jqHvoopCY3LOpU9djmOaksZYKbL/0zE50QZFbvifHqqMF Yk9kzs56A9O9DwiIhpBJeOCL2/irzs3Lu5f5WoinW0i4WK5jtQrPV9Uz1YGgdOHyl+Ys Luxs37NEsoH0SB0jB0Lgq/iCXlycpgwSO+GjKQgb8Yu7gktwrkIr/1s/oFmlikct6cze mUtuVhiF4C1BR2lGBCpaykDKk1prfwXmkHv2isHKbdG26ZmsvXACnAdjfpPkAhXASmD2 GzYA== X-Forwarded-Encrypted: i=1; AJvYcCXFBGymK4MNaKbLRoKFdfIUfuZtbNm8bDnROnwvomqGWaHDRgLQnwfFwLWxhlb/coPqh0674LWm8lF4hjqZWN8u2vNPxz/vbVtppbwi X-Gm-Message-State: AOJu0YxFuG7ru6Fi80Yx+WJOMIKcfwDiI6tJedNU5NfWbFYk3s45veQK do/4AiTG3jl+d1vhufnKa3OdadzQlg/CPCDV4FrSSt3AsvpmAtDhZtiipk6uhq+rv0QJcRlRWZo = X-Received: by 2002:a05:620a:2a0e:b0:792:e8c4:414 with SMTP id af79cd13be357-792e8c4065fmr1121106285a.26.1715807612015; Wed, 15 May 2024 14:13:32 -0700 (PDT) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com. [209.85.160.176]) by smtp.gmail.com with ESMTPSA id af79cd13be357-792ed076f98sm219808385a.119.2024.05.15.14.13.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 May 2024 14:13:31 -0700 (PDT) Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-43df9ac3ebcso2215441cf.0 for ; Wed, 15 May 2024 14:13:31 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCX3YIpeTWf5gE5sQeUrNgofTW9bQta7lOgr6lP4/Hwq2jgwZaihm3+P5k52ZUpSQKmHg1ny2xyWDB9HFln7KRh9tp6yYO65LOEN3SX5 X-Received: by 2002:a05:622a:58c3:b0:43e:3ac1:c80 with SMTP id d75a77b69052e-43e3ac11131mr1505941cf.18.1715807608625; Wed, 15 May 2024 14:13:28 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240515014643.2715010-1-yangcong5@huaqin.corp-partner.google.com> <20240515014643.2715010-3-yangcong5@huaqin.corp-partner.google.com> In-Reply-To: <20240515014643.2715010-3-yangcong5@huaqin.corp-partner.google.com> From: Doug Anderson Date: Wed, 15 May 2024 14:13:13 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [v7 2/7] drm/panel: himax-hx83102: Break out as separate driver To: Cong Yang Cc: sam@ravnborg.org, neil.armstrong@linaro.org, daniel@ffwll.ch, linus.walleij@linaro.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, conor+dt@kernel.org, airlied@gmail.com, dmitry.baryshkov@linaro.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, xuxinxiong@huaqin.corp-partner.google.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Tue, May 14, 2024 at 6:47=E2=80=AFPM Cong Yang wrote: > > +static int hx83102_prepare(struct drm_panel *panel) > +{ > + struct hx83102 *ctx =3D panel_to_hx83102(panel); > + struct mipi_dsi_device *dsi =3D ctx->dsi; > + struct device *dev =3D &dsi->dev; > + int ret; > + > + gpiod_set_value(ctx->enable_gpio, 0); > + usleep_range(1000, 1500); > + > + ret =3D regulator_enable(ctx->pp1800); > + if (ret < 0) > + return ret; > + > + usleep_range(3000, 5000); > + > + ret =3D regulator_enable(ctx->avdd); > + if (ret < 0) > + goto poweroff1v8; > + ret =3D regulator_enable(ctx->avee); > + if (ret < 0) > + goto poweroffavdd; > + > + usleep_range(10000, 11000); > + > + mipi_dsi_dcs_nop(ctx->dsi); > + usleep_range(1000, 2000); > + > + gpiod_set_value(ctx->enable_gpio, 1); > + usleep_range(1000, 2000); > + gpiod_set_value(ctx->enable_gpio, 0); > + usleep_range(1000, 2000); > + gpiod_set_value(ctx->enable_gpio, 1); > + usleep_range(6000, 10000); > + > + ret =3D ctx->desc->init(ctx); > + if (ret < 0) > + goto poweroff; > + > + ret =3D mipi_dsi_dcs_exit_sleep_mode(dsi); > + if (ret) { > + dev_err(dev, "Failed to exit sleep mode: %d\n", ret); > + return ret; > + } The above "return ret" should be "goto poweroff". Please send a v8. -Doug