From: Andrew Morton <akpm@linux-foundation.org>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2] video: backlight: add ili922x lcd driver
Date: Wed, 13 Mar 2013 23:15:02 +0000 [thread overview]
Message-ID: <20130313161502.d089ea17cb695415ec9b01d8@linux-foundation.org> (raw)
In-Reply-To: <1363178617-21940-1-git-send-email-agust@denx.de>
On Wed, 13 Mar 2013 13:43:37 +0100 Anatolij Gustschin <agust@denx.de> wrote:
> From: Stefano Babic <sbabic@denx.de>
>
> Add LCD driver for Ilitek ILI9221/ILI9222 controller.
> The driver uses SPI interface for controller access
> and configuration and RGB interface for graphics data
> transfer.
>
> ...
>
> +#define START_BYTE(id, rs, rw) \
> + (0x70 | (((id) & 0x01) << 2) | (((rs) & 0x01) << 1) | ((rw) & 0x01))
> +#define CHECK_FREQ_REG(s, x) \
> + do { \
> + if (s->max_speed_hz > ILITEK_MAX_FREQ_REG) \
> + ((struct spi_transfer *)x)->speed_hz = \
> + ILITEK_MAX_FREQ_REG; \
> + } while (0)
> +#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
> +#define set_tx_byte(b) (tx_invert ? ~(b) : b)
All of the above could have been implemented as regular old C
functions, and would be better if they were!
It otherwise all looks nice.
prev parent reply other threads:[~2013-03-13 23:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 12:43 [PATCH v2] video: backlight: add ili922x lcd driver Anatolij Gustschin
2013-03-13 23:15 ` Andrew Morton [this message]
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=20130313161502.d089ea17cb695415ec9b01d8@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-fbdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox