From: khalasa@piap.pl (Krzysztof Hałasa)
To: Joe Perches <joe@perches.com>
Cc: Frans Klaver <fransklaver@gmail.com>,
Andy Whitcroft <apw@canonical.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: Coding style details (checkpatch)
Date: Mon, 22 Jun 2015 07:33:42 +0200 [thread overview]
Message-ID: <m37fqws3wp.fsf@t19.piap.pl> (raw)
In-Reply-To: <1434725667.2689.121.camel@perches.com> (Joe Perches's message of "Fri, 19 Jun 2015 07:54:27 -0700")
Joe Perches <joe@perches.com> writes:
> How is the macro used?
> #define REG8_1(a0) ((const u16[8]){a0, a0 + 1, a0 + 2, a0 + 3})
#define REG8_1(a0) ((const u16[8]){a0, a0 + 1, a0 + 2, a0 + 3, a0 + 4, a0 + 5, a0 + 6, a0 + 7})
#define REG8_2(a0) ((const u16[8]){a0, a0 + 2, a0 + 4, a0 + 6, a0 + 8, a0 + 0xA, a0 + 0xC, a0 + 0xE})
#define REG8_8(a0) ((const u16[8]){a0, a0 + 8, a0 + 0x10, a0 + 0x18, a0 + 0x20, a0 + 0x28, a0 + 0x30, a0 + 0x38})
#define VDMA_CHANNEL_CONFIG REG8_1(0x10)
#define ADMA_P_ADDR REG8_2(0x18)
#define ADMA_B_ADDR REG8_2(0x19)
#define INTL_HBAR_CTRL REG8_1(0x30)
#define VIDEO_FIELD_CTRL REG8_1(0x39)
#define HSCALER_CTRL REG8_1(0x42)
#define VIDEO_SIZE REG8_1(0x4A)
#define VIDEO_SIZE_F2 REG8_1(0x52)
#define MD_CONF REG8_1(0x60)
#define MD_INIT REG8_1(0x68)
#define MD_MAP0 REG8_1(0x70)
#define VDMA_P_ADDR REG8_8(0x80) /* not used in DMA SG mode */
#define VDMA_WHP REG8_8(0x81)
#define VDMA_B_ADDR REG8_8(0x82)
#define VDMA_F2_P_ADDR REG8_8(0x84)
#define VDMA_F2_WHP REG8_8(0x85)
#define VDMA_F2_B_ADDR REG8_8(0x86)
then
reg_write(vc->dev, VDMA_CHANNEL_CONFIG[vc->ch], dma_cfg);
reg_write(dev, SAT_U[ch], ctrl->val);
reg_write(dev, SAT_V[ch], ctrl->val);
etc.
--
Krzysztof Halasa
Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2015-06-22 5:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 8:35 Coding style details Krzysztof Hałasa
2015-06-19 9:07 ` Frans Klaver
2015-06-19 10:31 ` Coding style details (checkpatch) Krzysztof Hałasa
2015-06-19 10:37 ` Frans Klaver
2015-06-19 10:52 ` Krzysztof Hałasa
2015-06-19 14:54 ` Joe Perches
2015-06-22 5:33 ` Krzysztof Hałasa [this message]
2015-06-22 6:12 ` Joe Perches
2015-06-22 6:38 ` Krzysztof Hałasa
2015-06-22 6:47 ` Joe Perches
2015-06-22 7:39 ` Krzysztof Hałasa
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=m37fqws3wp.fsf@t19.piap.pl \
--to=khalasa@piap.pl \
--cc=apw@canonical.com \
--cc=fransklaver@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.