From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 E0D86C31E46 for ; Wed, 12 Jun 2019 21:21:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9C86215EA for ; Wed, 12 Jun 2019 21:21:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bAw4+58b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9C86215EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3jnpgctCeu8GQUpByMwN6YtWERcRfwY9+tj9eVWyXsU=; b=bAw4+58bt319GM bL5h2Oy5BYyvV8cnA0d5asTiomkwnQX/2ehAgdeYPjv7t+1cKC7WBoAk2wrOTNXHW1nPqvZLebdy7 zAqVPm3at0Q56uQw5TXmZ31zKGQZr0TxgcUeqDlTZj3Lq+Y2FkpAnCOE4O559yh+6jm7YyRfRyvJB Dcqt3mappVPeecj2hQsEs0qqXEQm3sn0mq0GaYUf76TwZj+z8+VyOt1Y4ntLANrHpIoz9SH3/3Juz mrC0YKfakH9v+oC2WACjpg7ZnSxamlSp5WIxAYlaY/mNGXVNa58mVSb1j5fXOklmLAXS6K6HmbK8H ZzLvewaeGs34ldhWvSsA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbAg2-0007sQ-0W; Wed, 12 Jun 2019 21:21:02 +0000 Received: from asavdk3.altibox.net ([109.247.116.14]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbAfy-0007rn-JD; Wed, 12 Jun 2019 21:20:59 +0000 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 0A53D20021; Wed, 12 Jun 2019 23:20:56 +0200 (CEST) Date: Wed, 12 Jun 2019 23:20:54 +0200 From: Sam Ravnborg To: Derek Basehore Subject: Re: [PATCH 1/5] drm/panel: Add helper for reading DT rotation Message-ID: <20190612212054.GB13155@ravnborg.org> References: <20190611040350.90064-1-dbasehore@chromium.org> <20190611040350.90064-2-dbasehore@chromium.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190611040350.90064-2-dbasehore@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=dqr19Wo4 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=cm27Pg_UAAAA:8 a=PWvNCjwUpEQzod5d7NgA:9 a=CjuIK1q_8ugA:10 a=xmb-EsYY8bH0VWELuYED:22 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190612_142058_813158_EEE43B54 X-CRM114-Status: GOOD ( 18.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Philipp Zabel , David Airlie , intel-gfx@lists.freedesktop.org, Joonas Lahtinen , Maarten Lankhorst , linux-kernel@vger.kernel.org, Jani Nikula , Maxime Ripard , Rob Herring , Thierry Reding , dri-devel@lists.freedesktop.org, Daniel Vetter , Rodrigo Vivi , CK Hu , linux-mediatek@lists.infradead.org, Sean Paul , linux-arm-kernel@lists.infradead.org, Matthias Brugger Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Derek. On Mon, Jun 10, 2019 at 09:03:46PM -0700, Derek Basehore wrote: > This adds a helper function for reading the rotation (panel > orientation) from the device tree. > > Signed-off-by: Derek Basehore > --- > drivers/gpu/drm/drm_panel.c | 41 +++++++++++++++++++++++++++++++++++++ > include/drm/drm_panel.h | 7 +++++++ > 2 files changed, 48 insertions(+) > > diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c > index dbd5b873e8f2..3b689ce4a51a 100644 > --- a/drivers/gpu/drm/drm_panel.c > +++ b/drivers/gpu/drm/drm_panel.c > @@ -172,6 +172,47 @@ struct drm_panel *of_drm_find_panel(const struct device_node *np) > return ERR_PTR(-EPROBE_DEFER); > } > EXPORT_SYMBOL(of_drm_find_panel); > + > +/** > + * of_drm_get_panel_orientation - look up the rotation of the panel using a > + * device tree node > + * @np: device tree node of the panel > + * @orientation: orientation enum to be filled in > + * > + * Looks up the rotation of a panel in the device tree. The rotation in the > + * device tree is counter clockwise. > + * > + * Return: 0 when a valid rotation value (0, 90, 180, or 270) is read or the > + * rotation property doesn't exist. -EERROR otherwise. > + */ > +int of_drm_get_panel_orientation(const struct device_node *np, int *orientation) > +{ > + int rotation, ret; > + > + ret = of_property_read_u32(np, "rotation", &rotation); I just noticed that everywhere this code talks about orientation, but the property that it reads are rotation. To my best understanding these are not the same. Sam _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel