Hi,
Like the previous driver, thank you for the code review, I have some
questions before making V2.
Le 07/10/2018 à 18:36, Jonathan Cameron a écrit :
+enum {
+ SINGLE_8BITS = 0,
+ SINGLE_10BITS,
+ SINGLE_12BITS,
+};
+
+enum {
+ POWER_RUNNING = 0,
+ POWER_1KOHM_TO_GND,
+ POWER_100KOHM_TO_GND,
+ POWER_TRI_STATE,
+};
+
+struct ti_dac_spec {
+ u8 num_channels;
+ u8 resolution;
+};
+
+static const struct ti_dac_spec ti_dac_spec[] = {
+ [SINGLE_8BITS] = { .num_channels = 1, .resolution = 8 },
I think I'd prefer to see the enum as part names. It is easy
to see the number of channels and resolution here anyway.
I still don't understand the "part names" thing here.
+}
+
+static const char * const ti_dac_powerdown_modes[] = {
+ "running",
What is running in a power down mode?
For me it was the list of power status of the device. And using
"running" allow us to set to running state with the right command.
But I probably misunderstand its purpose. Why we have to put only power
down in that structure?
Thank you.
Regards,
Charles-Antoine Couret