On Wed, 13 Mar 2013 13:43:37 +0100 Anatolij Gustschin <agust@xxxxxxx> wrote: > From: Stefano Babic <sbabic@xxxxxxx> > > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html