Re: [RFC 3/3] saa7115: Implement i2c_board_info.platform data

From: Mauro Carvalho Chehab
Date: Wed May 29 2013 - 20:43:30 EST


Em Wed, 29 May 2013 22:41:18 +0200
Jon Arne JÃrgensen <jonarne@xxxxxxxxxx> escreveu:

> Implement i2c_board_info.platform_data handling in the driver so we can
> make device specific changes to the chips we support.
>

...

> +struct saa7115_platform_data {
> + /* Horizontal time constant */
> + u8 saa7113_r08_htc;
> +
> + u8 saa7113_r10_vrln;
> + u8 saa7113_r10_ofts;
> +
> + u8 saa7113_r12_rts0;
> + u8 saa7113_r12_rts1;
> +
> + u8 saa7113_r13_adlsb;
> +};

While this works, it makes harder to analyze what's changed there,
as the above nomenclature is too obfuscated.

The better would be if you could, instead, name the bits (or bytes)
that will require different data, like (I just got some random
bits from reg08, on saa7113 datasheet - I didn't actually checked
what bits are you using):

unsigned pll_closed: 1;
unsigned fast_mode: 1;
unsigned fast_locking: 1;


--

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/