From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: si570: Add a driver for SI570 oscillators
Date: Sat, 14 Sep 2013 10:01:03 +0200 [thread overview]
Message-ID: <523417BF.7030505@gmail.com> (raw)
In-Reply-To: <c6755ff6-104d-40fe-a753-0e165cff1e10@AM1EHSMHS004.ehs.local>
On 09/13/2013 07:26 PM, S?ren Brinkmann wrote:
> 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@roeck-us.net>
>>> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
>>> ---
[...]
>>> 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 @@
[...]
>>> + 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.
> I think I copied this approach from the other clk-si... driver. I'll
> do some research on your suggestion and change it. Could you point me to
> an example for your proposal?
Soeren,
I sent a patch for the match removal in clk-si5351 [1].
Mike must have missed it, I will resend soon.
You can take that as "an example for the proposal" above.
Sebastian
[1] https://lkml.org/lkml/2013/9/3/484
WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Hesselbarth <sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Sören Brinkmann"
<soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Cc: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mike Turquette
<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Hyun Kwon <hyunk-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] clk: si570: Add a driver for SI570 oscillators
Date: Sat, 14 Sep 2013 10:01:03 +0200 [thread overview]
Message-ID: <523417BF.7030505@gmail.com> (raw)
In-Reply-To: <c6755ff6-104d-40fe-a753-0e165cff1e10-dAX9Bq04yCSXHCJdrdq+zrjjLBE8jN/0@public.gmane.org>
On 09/13/2013 07:26 PM, Sören Brinkmann wrote:
> 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-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
>>> Signed-off-by: Soren Brinkmann <soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
>>> ---
[...]
>>> 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 @@
[...]
>>> + 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.
> I think I copied this approach from the other clk-si... driver. I'll
> do some research on your suggestion and change it. Could you point me to
> an example for your proposal?
Soeren,
I sent a patch for the match removal in clk-si5351 [1].
Mike must have missed it, I will resend soon.
You can take that as "an example for the proposal" above.
Sebastian
[1] https://lkml.org/lkml/2013/9/3/484
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org,
Mike Turquette <mturquette@linaro.org>,
Hyun Kwon <hyunk@xilinx.com>, Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Stephen Warren <swarren@wwwdotorg.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>,
Rob Landley <rob@landley.net>,
Grant Likely <grant.likely@linaro.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] clk: si570: Add a driver for SI570 oscillators
Date: Sat, 14 Sep 2013 10:01:03 +0200 [thread overview]
Message-ID: <523417BF.7030505@gmail.com> (raw)
In-Reply-To: <c6755ff6-104d-40fe-a753-0e165cff1e10@AM1EHSMHS004.ehs.local>
On 09/13/2013 07:26 PM, Sören Brinkmann wrote:
> 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@roeck-us.net>
>>> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
>>> ---
[...]
>>> 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 @@
[...]
>>> + 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.
> I think I copied this approach from the other clk-si... driver. I'll
> do some research on your suggestion and change it. Could you point me to
> an example for your proposal?
Soeren,
I sent a patch for the match removal in clk-si5351 [1].
Mike must have missed it, I will resend soon.
You can take that as "an example for the proposal" above.
Sebastian
[1] https://lkml.org/lkml/2013/9/3/484
next prev parent reply other threads:[~2013-09-14 8:01 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 0:55 [PATCH] SI570 clock driver Soren Brinkmann
2013-09-13 0:55 ` Soren Brinkmann
2013-09-13 0:55 ` [PATCH] clk: si570: Add a driver for SI570 oscillators Soren Brinkmann
2013-09-13 0:55 ` Soren Brinkmann
2013-09-13 0:55 ` Soren Brinkmann
2013-09-13 17:00 ` Guenter Roeck
2013-09-13 17:00 ` Guenter Roeck
2013-09-13 17:26 ` Sören Brinkmann
2013-09-13 17:26 ` Sören Brinkmann
2013-09-13 17:26 ` Sören Brinkmann
2013-09-13 19:48 ` Guenter Roeck
2013-09-13 19:48 ` Guenter Roeck
2013-09-13 21:05 ` Sören Brinkmann
2013-09-13 21:05 ` Sören Brinkmann
2013-09-13 21:05 ` Sören Brinkmann
2013-09-13 21:14 ` Guenter Roeck
2013-09-13 21:14 ` Guenter Roeck
2013-09-14 8:01 ` Sebastian Hesselbarth [this message]
2013-09-14 8:01 ` Sebastian Hesselbarth
2013-09-14 8:01 ` Sebastian Hesselbarth
2013-09-16 16:34 ` Stephen Warren
2013-09-16 16:34 ` Stephen Warren
2013-09-16 16:49 ` Guenter Roeck
2013-09-16 16:49 ` Guenter Roeck
2013-09-16 16:59 ` Stephen Warren
2013-09-16 16:59 ` Stephen Warren
2013-09-16 16:59 ` Stephen Warren
2013-09-16 17:35 ` Guenter Roeck
2013-09-16 17:35 ` Guenter Roeck
2013-09-16 17:35 ` Guenter Roeck
2013-09-16 18:37 ` Stephen Warren
2013-09-16 18:37 ` Stephen Warren
2013-09-16 18:37 ` Stephen Warren
2013-09-16 19:14 ` Guenter Roeck
2013-09-16 19:14 ` Guenter Roeck
2013-09-17 7:59 ` Sebastian Hesselbarth
2013-09-17 7:59 ` Sebastian Hesselbarth
2013-09-17 13:08 ` Guenter Roeck
2013-09-17 13:08 ` Guenter Roeck
2013-09-17 16:14 ` Stephen Warren
2013-09-17 16:14 ` Stephen Warren
2013-09-18 20:41 ` Sören Brinkmann
2013-09-18 20:41 ` Sören Brinkmann
2013-09-18 20:41 ` Sören Brinkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=523417BF.7030505@gmail.com \
--to=sebastian.hesselbarth@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.