From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Guillaume La Roque <glaroque@baylibre.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
khilman@baylibre.com, devicetree@vger.kernel.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH 3/3] media: platform: meson-ao-cec-g12a: add wakeup support
Date: Thu, 12 Dec 2019 20:57:56 +0100 [thread overview]
Message-ID: <CAFBinCDjfzQX=ZG=cgTYo=icGNU-t4Kqnu0Bu5qRLsRk_s6S_Q@mail.gmail.com> (raw)
In-Reply-To: <20191212145925.32123-4-glaroque@baylibre.com>
Hi Guillaume,
(I don't know the specifics of this hardware but I have two general
comments below)
On Thu, Dec 12, 2019 at 4:00 PM Guillaume La Roque
<glaroque@baylibre.com> wrote:
> +#define CECB_FUNC_CFG_REG 0xA0
> +#define CECB_FUNC_CFG_MASK GENMASK(6, 0)
> +#define CECB_FUNC_CFG_CEC_ON 0x01
> +#define CECB_FUNC_CFG_OTP_ON 0x02
> +#define CECB_FUNC_CFG_AUTO_STANDBY 0x04
> +#define CECB_FUNC_CFG_AUTO_POWER_ON 0x08
> +#define CECB_FUNC_CFG_ALL 0x2f
> +#define CECB_FUNC_CFG_NONE 0x0
> +
> +#define CECB_LOG_ADDR_REG 0xA4
> +#define CECB_LOG_ADDR_MASK GENMASK(22, 16)
do these registers have some RTI_* prefix in the datasheet?
that would make it easier to spot that these registers belong to AO /
RTI (while all other registers belong to the CEC controller)
[...]
> + if (ao_cec->regmap_ao_sysctrl)
> + ret |= regmap_update_bits(ao_cec->regmap_ao_sysctrl,
> + CECB_LOG_ADDR_REG,
> + CECB_FUNC_CFG_MASK,
why do we need to mask CECB_FUNC_CFG_MASK (from register 0xa0) in the
CECB_LOG_ADDR_REG register (0xa4)?
> + logical_addr << CECB_LOG_ADDR_SHIFT);
FIELD_PREP(CECB_FUNC_CFG_MASK, logical_addr) would make it consistent
with the rest of the driver
then you can also drop the #define CECB_LOG_ADDR_SHIFT
Martin
next prev parent reply other threads:[~2019-12-12 19:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 14:59 [PATCH 0/3] Add support of CEC wakeup on Amlogic G12 and SM1 SoCs Guillaume La Roque
2019-12-12 14:59 ` [PATCH 1/3] media: dt-bindings: media: meson-ao-cec: Add support of ao-sysctrl syscon Guillaume La Roque
2019-12-12 14:59 ` [PATCH 2/3] arm64: dts: meson-g12g12: add syscon phandle in cec node Guillaume La Roque
2019-12-12 14:59 ` [PATCH 3/3] media: platform: meson-ao-cec-g12a: add wakeup support Guillaume La Roque
2019-12-12 19:57 ` Martin Blumenstingl [this message]
2019-12-12 21:30 ` guillaume La Roque
2019-12-12 19:38 ` [PATCH 0/3] Add support of CEC wakeup on Amlogic G12 and SM1 SoCs Kevin Hilman
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='CAFBinCDjfzQX=ZG=cgTYo=icGNU-t4Kqnu0Bu5qRLsRk_s6S_Q@mail.gmail.com' \
--to=martin.blumenstingl@googlemail.com \
--cc=devicetree@vger.kernel.org \
--cc=glaroque@baylibre.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=narmstrong@baylibre.com \
/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).