From: Neil Armstrong <neil.armstrong@linaro.org>
To: zelong dong <zelong.dong@amlogic.com>, Sean Young <sean@mess.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Jerome Brunet <jbrunet@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org,
Qianggui.Song@amlogic.com, Yonghui.Yu@amlogic.com,
kelvin.zhang@amlogic.com
Subject: Re: [PATCH v2 1/3] media: rc: meson-ir: sort Meson IR Controller register macros
Date: Tue, 30 May 2023 09:56:46 +0200 [thread overview]
Message-ID: <fa29f85b-c837-ef84-74bd-00c7365e2fbf@linaro.org> (raw)
In-Reply-To: <20230517115635.31565-2-zelong.dong@amlogic.com>
On 17/05/2023 13:56, zelong dong wrote:
> From: Zelong Dong <zelong.dong@amlogic.com>
>
> There are more registers to come in the next Meson IR Controller.
> For defining clearly, sort register macros and let address and bit
> macros as a set.
>
> Signed-off-by: Zelong Dong <zelong.dong@amlogic.com>
> ---
> drivers/media/rc/meson-ir.c | 35 +++++++++++++++++------------------
> 1 file changed, 17 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
> index 4b769111f78e..a32d034b33aa 100644
> --- a/drivers/media/rc/meson-ir.c
> +++ b/drivers/media/rc/meson-ir.c
> @@ -19,44 +19,43 @@
>
> #define DRIVER_NAME "meson-ir"
>
> -/* valid on all Meson platforms */
> #define IR_DEC_LDR_ACTIVE 0x00
> +
> #define IR_DEC_LDR_IDLE 0x04
> +
> #define IR_DEC_LDR_REPEAT 0x08
> +
You add those blank lines here, but remove them on next patch.
> #define IR_DEC_BIT_0 0x0c
> -#define IR_DEC_REG0 0x10
> -#define IR_DEC_FRAME 0x14
> -#define IR_DEC_STATUS 0x18
> -#define IR_DEC_REG1 0x1c
> -/* only available on Meson 8b and newer */
> -#define IR_DEC_REG2 0x20
>
> +#define IR_DEC_REG0 0x10
> #define REG0_RATE_MASK GENMASK(11, 0)
>
> -#define DECODE_MODE_NEC 0x0
> -#define DECODE_MODE_RAW 0x2
> +#define IR_DEC_FRAME 0x14
> +
> +#define IR_DEC_STATUS 0x18
> +#define STATUS_IR_DEC_IN BIT(8)
>
> -/* Meson 6b uses REG1 to configure the mode */
> +#define IR_DEC_REG1 0x1c
> +#define REG1_TIME_IV_MASK GENMASK(28, 16)
> +#define REG1_ENABLE BIT(15)
> #define REG1_MODE_MASK GENMASK(8, 7)
> #define REG1_MODE_SHIFT 7
> +#define REG1_IRQSEL_MASK GENMASK(3, 2)
> +#define REG1_RESET BIT(0)
>
> -/* Meson 8b / GXBB use REG2 to configure the mode */
> +/* The following regs are only available on Meson 8b and newer */
> +#define IR_DEC_REG2 0x20
> #define REG2_MODE_MASK GENMASK(3, 0)
> #define REG2_MODE_SHIFT 0
>
> -#define REG1_TIME_IV_MASK GENMASK(28, 16)
> +#define DECODE_MODE_NEC 0x0
> +#define DECODE_MODE_RAW 0x2
>
> -#define REG1_IRQSEL_MASK GENMASK(3, 2)
> #define REG1_IRQSEL_NEC_MODE 0
> #define REG1_IRQSEL_RISE_FALL 1
> #define REG1_IRQSEL_FALL 2
> #define REG1_IRQSEL_RISE 3
>
> -#define REG1_RESET BIT(0)
> -#define REG1_ENABLE BIT(15)
> -
> -#define STATUS_IR_DEC_IN BIT(8)
> -
> #define MESON_TRATE 10 /* us */
>
> struct meson_ir {
Without the blank lines:
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2023-05-30 7:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 11:56 [PATCH v2 0/3] media: rc: meson-ir: support MMIO regmaps to access registers zelong dong
2023-05-17 11:56 ` [PATCH v2 1/3] media: rc: meson-ir: sort Meson IR Controller register macros zelong dong
2023-05-30 7:56 ` Neil Armstrong [this message]
2023-05-17 11:56 ` [PATCH v2 2/3] media: rc: meson-ir: rename " zelong dong
2023-05-30 7:57 ` Neil Armstrong
2023-05-17 11:56 ` [PATCH v2 3/3] media: rc: meson-ir: support MMIO regmaps to access registers zelong dong
2023-05-29 20:45 ` Martin Blumenstingl
2023-05-30 7:54 ` [PATCH v2 0/3] " Neil Armstrong
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=fa29f85b-c837-ef84-74bd-00c7365e2fbf@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=Qianggui.Song@amlogic.com \
--cc=Yonghui.Yu@amlogic.com \
--cc=jbrunet@baylibre.com \
--cc=kelvin.zhang@amlogic.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mchehab@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sean@mess.org \
--cc=zelong.dong@amlogic.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
all inboxes | Powered by JetHome®