From: "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>
To: "Sverdlin, Alexander" <alexander.sverdlin@siemens.com>
Cc: "a1ba.omarov@gmail.com" <a1ba.omarov@gmail.com>,
"heiko@sntech.de" <heiko@sntech.de>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"hjc@rock-chips.com" <hjc@rock-chips.com>,
"michael.riesch@wolfvision.net" <michael.riesch@wolfvision.net>,
"macromorgan@hotmail.com" <macromorgan@hotmail.com>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"frattaroli.nicolas@gmail.com" <frattaroli.nicolas@gmail.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"pgwipeout@gmail.com" <pgwipeout@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"frank-w@public-files.de" <frank-w@public-files.de>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"ezequiel@vanguardiasur.com.ar" <ezequiel@vanguardiasur.com.ar>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"airlied@gmail.com" <airlied@gmail.com>,
"linux-rockchip@lists.infradead.org"
<linux-rockchip@lists.infradead.org>
Subject: Re: [PATCH 1/3] drm/rockchip: lvds: add rk3568 support
Date: Fri, 20 Jan 2023 10:41:17 +0100 [thread overview]
Message-ID: <20230120094117.GM24755@pengutronix.de> (raw)
In-Reply-To: <9fe2678da0ae10e6996889971a3137799a68c4b9.camel@siemens.com>
On Fri, Jan 20, 2023 at 09:31:43AM +0000, Sverdlin, Alexander wrote:
> Hello Sascha,
>
> On Fri, 2023-01-20 at 10:16 +0100, Sascha Hauer wrote:
> > > + /* Enable LVDS mode */
> > > + return regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON2,
> > > + RK3568_LVDS0_MODE_EN(1),
> > > + RK3568_LVDS0_MODE_EN(1));
> >
> > Isn't this the same as:
> >
> > regmap_write(lvds->grf, RK3568_GRF_VO_CON2,
> > RK3568_LVDS0_MODE_EN(1));
> >
> > Unless I am missing something I find a plain regmap_write() easier to
> > read.
>
> the former is setting a bit in a RMW operation, the latter is a plain
> write, isn't it?
That's right from the view what the function itself does. Note the
registers that are accessed here are a bit special. They effectively
are 16bit wide, the upper 16bit contain a mask. Only the bits set in the
mask are actually modified in the lower bits. See the register bit
definitions:
#define HIWORD_UPDATE(v, h, l) ((GENMASK(h, l) << 16) | ((v) << (l)))
#define RK3568_LVDS0_SELECT(val) HIWORD_UPDATE(val, 5, 4)
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-01-20 10:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 18:48 [PATCH 0/3] drm/rockchip: lvds: add support for rk356x Alibek Omarov
2023-01-19 18:48 ` [PATCH 1/3] drm/rockchip: lvds: add rk3568 support Alibek Omarov
2023-01-20 9:16 ` Sascha Hauer
2023-01-20 9:31 ` Sverdlin, Alexander
2023-01-20 9:41 ` s.hauer [this message]
2023-01-19 18:48 ` [PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings Alibek Omarov
2023-01-19 18:48 ` [PATCH 3/3] dt-bindings: display: rockchip-lvds: add compatible string for RK3568 Alibek Omarov
2023-01-20 8:26 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230120094117.GM24755@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a1ba.omarov@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.sverdlin@siemens.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=frank-w@public-files.de \
--cc=frattaroli.nicolas@gmail.com \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=macromorgan@hotmail.com \
--cc=michael.riesch@wolfvision.net \
--cc=pgwipeout@gmail.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).