On Fri, Sep 13, 2013 at 10:00:05AM -0700, Guenter Roeck wrote:[...]On Thu, Sep 12, 2013 at 05:55:37PM -0700, Soren Brinkmann wrote:Add a driver for SILabs 570, 571, 598, 599 programmable oscillators.
The devices generate low-jitter clock signals and are reprogrammable via
an I2C interface.
Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xxxxxxxxxx>
---
[...]diff --git a/drivers/clk/clk-si570.c b/drivers/clk/clk-si570.c
new file mode 100644
index 0000000..960d689
--- /dev/null
+++ b/drivers/clk/clk-si570.c
@@ -0,0 +1,546 @@
I think I copied this approach from the other clk-si... driver. I'll+ match = of_match_node(clk_si570_of_match, client->dev.of_node);
+ if (!match)
+ return -EINVAL;
Seems unusual. Is this really needed ? It precludes the driver from being used
in a non-devicetree environment, for example. I would guess that there is a match
if client->dev.of_node is set. Otherwise, this code would be needed in every
driver supporting devicetree, and I don't recall seeing that.
+ ddata = match->data;You should be able to get this information (ie the pointer to si570_device_data)
+
from id->driver_data. That would be more consistent with other i2c devices.
do some research on your suggestion and change it. Could you point me to
an example for your proposal?