[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b4503f15-6927-9b09-7cb0-ce1c8a8c4f59@ti.com>
Date: Tue, 29 Nov 2016 09:54:26 -0600
From: Grygorii Strashko <grygorii.strashko@...com>
To: Richard Cochran <richardcochran@...il.com>
CC: "David S. Miller" <davem@...emloft.net>, <netdev@...r.kernel.org>,
Mugunthan V N <mugunthanvnm@...com>,
Sekhar Nori <nsekhar@...com>, <linux-kernel@...r.kernel.org>,
<linux-omap@...r.kernel.org>, Rob Herring <robh+dt@...nel.org>,
<devicetree@...r.kernel.org>,
Murali Karicheri <m-karicheri2@...com>,
Wingman Kwok <w-kwok2@...com>
Subject: Re: [PATCH v2 08/13] net: ethernet: ti: cpts: move dt props parsing
to cpts driver
On 11/29/2016 04:11 AM, Richard Cochran wrote:
> On Mon, Nov 28, 2016 at 05:03:32PM -0600, Grygorii Strashko wrote:
>> +static int cpts_of_parse(struct cpts *cpts, struct device_node *node)
>> +{
>> + int ret = -EINVAL;
>> + u32 prop;
>> +
>> + if (of_property_read_u32(node, "cpts_clock_mult", &prop))
>> + goto of_error;
>> + cpts->cc_mult = prop;
>
> Why not set cc.mult here at the same time?
The same reason as in prev patch - cpts->cc_mult is original/initial mult
value loaded from DT (or calculated), while cc.mult is dynamic value
which can be changed as part of freq adjustment.
>
>> +
>> + if (of_property_read_u32(node, "cpts_clock_shift", &prop))
>> + goto of_error;
>> + cpts->cc.shift = prop;
>> +
>> + return 0;
>> +
>> +of_error:
>> + dev_err(cpts->dev, "CPTS: Missing property in the DT.\n");
>> + return ret;
>> +}
>
--
regards,
-grygorii
Powered by blists - more mailing lists