Dear Guennadi
Thank you for comment
> Ok, this is indeed a lot, still, we should do this properly. After a
> discussion with Hans on IRC the general conclusion was "noone outside of
> the device driver shall even know device registers." I think, we shall
> split this huge array in at least 3 groups:
>
> 1. default, that's also valid for other setups with this chip. as you
> describe this, this set might be empty...
>
> 2. settings, for which controls exist, or can be meaningfully added. For
> example, there are controls for gain, exposure, auto white balance,...
>
> 3. a configuration struct with meaningfully named _and_ documented fields.
> I.e., plese, do not name fields like "r17" or similar:-) This becomes even
> more important in the absence of a publicly available datasheet. Also, the
> struct field -- register relationship doesn't have to be one-to-one. I.e.,
> might well be that one field affects several registers, or several fields
> affect one register.
Hmm. maybe I could understand.
Following is a (very) rough composition.
Is "defaults" so important ?
Normal ov772x driver do default settings in init time.
And sorry. I'm very busy now.
So I will try to this problem in future.
---------- rough composition -------------
struct ov772x_AWB_gain {
unsigned char blue; /* blue channel gain */
unsigned char red; /* red channel gain */
unsigned char green; /* green channel gain */
};
struct ov772x_Average_level {
unsigned char ub; /* U/B Average lebel */
unsigned char ygb; /* Y/Gb Average lebel */
unsigned char vr; /* V/R Average lebel */
};
... a lot of more ...
struct ov772x_extra_settings {
/* 1 */
const struct regval_list defaults; /* maybe empty */
/* 2 */
const struct ov772x_AWB_gain awb; /* for control */
const struct ov772x_Average_level lebel; /* for control */
...
};
Best regards
--
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html