Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751946AbbE0AUV (ORCPT ); Tue, 26 May 2015 20:20:21 -0400 Received: from mail-bn1on0135.outbound.protection.outlook.com ([157.56.110.135]:26955 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751382AbbE0AUS (ORCPT ); Tue, 26 May 2015 20:20:18 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yorksun@freescale.com; Message-ID: <55650DBA.5000304@freescale.com> Date: Tue, 26 May 2015 17:20:10 -0700 From: York Sun User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Guenter Roeck CC: , , , , , Subject: Re: clock driver References: <5564C58B.9050400@freescale.com> <20150526223829.GA26454@roeck-us.net> In-Reply-To: <20150526223829.GA26454@roeck-us.net> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [192.88.168.49] X-ClientProxiedBy: SN1PR0701CA0037.namprd07.prod.outlook.com (25.162.96.47) To BLUPR03MB149.namprd03.prod.outlook.com (10.255.212.17) X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB149;2:h/aEaP9IbK6zEleyAbQWPdgKy4gCssx+xw9JV+dnQ99TVTAlIL/UrzRbcZMC1R9p;2:p2lFiYWQMDrjedEX9J5jZv2iWJ/LXgLZdAQbXwALvOOMgdyjhMYRwNBLVmvJCoMEzMCTd1ZQqJlHekjsnEzp7h/ohoRWUZgiGzxQbSt73ygbTbjOk+yuKWydiSY7NXRDDYhdi2EphTjJxGyHYL3J9w==;6:bom9W9N/pYoONG8TaWKj/3B4o4xv334sNniTZP0FL9ESrDjG/i4KgD9Bl/6kkyaerl9EDyocBBHYn1czNY5Xi+bBvf4IedgyqzNnkeSU1zSQkneOwAsTcWc/Sgw6m40FrvTYG31860UQsIflgRhDHEZQnN8AXig3uoy/X+JpKzivwSlYEopnvJjPyEKBe8wwbMAHEGE4rxbtd2TwwB8ix7bPxuloWxYO+j8wiNqd4RgKpYThnq1C1OTCP3ZP/MwK9kIU9ZRYdRHlkt2anCMY3EY2L1OJB0jedHb2FyEv5cotOV/8qWU+y2HiBV3HvKEyJpxZSpkgPzOsAD2P+jgi+qRPm4u8alxJV7O8yNW2OFF4SM8G/09Hf0cqtiM9B5IwCNjTS6et9C5ikNs7KowWuuSoIdWFohcyGBeZAJIh33npDPdcOtfDV2gV90Sh6FVlC/QB7JUohqrkStCC0GxyWIOrnB3UqUmPHeaNA/V73tF0oUcRJOQ39n5FP1O7ZXVBDUTG+5qW+0grKdLduUL7xpf+x3nNxhPOry/WTgiPVkRsXPvOVLJs06BvtGyUL8w1o6aRFtLNqjcOrTD2NudATHNCYV6K96P1N/BPSl07Di0= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB149; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:BLUPR03MB149;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB149; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB149;3:AJXw3Rel5qEWgn3ubT7lVkjw4gukeipFcYzHAR9/m55B90oAmBXS6FBLleA9cpzUMXfeDmZOUTAQr8oB8erbwemqwxJ4zgzlsy2nz4pbqeLQkEj5cjeFq6FU4qKcHPTvaB44D2jmgo7YBt7iKf+fdDM2Hoq0tcCjfRTqhRxAjBIhFInL9RZbSoCm90/g5nXXkMMep8Mc7SYHOv44EWXUD2w+LD9EpFUFSRLPwCYWdZfyG30am9b0ZeciXUlY9PwaifqdR5SQL7RJwRwGhZmNMT2hYN2tcNBrCY+zexYI7bn9T6G5rFk+4qNOP814vk8+ X-Forefront-PRVS: 05891FB07F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(6009001)(54094003)(51704005)(24454002)(199003)(377454003)(189002)(479174004)(189998001)(4001350100001)(4001540100001)(97736004)(81156007)(5001830100001)(40100003)(5001860100001)(59896002)(122386002)(47776003)(64706001)(65956001)(65806001)(50466002)(33656002)(66066001)(221733001)(87976001)(36756003)(46102003)(77156002)(86362001)(2950100001)(110136002)(5001960100002)(62966003)(92566002)(83506001)(105586002)(77096005)(68736005)(42186005)(101416001)(80316001)(23746002)(106356001)(64126003)(99136001)(76176999)(87266999)(65816999)(50986999)(54356999)(111123002);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR03MB149;H:[10.214.80.244];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BLUPR03MB149;9:9+Pn784GO2C4f8Dr7yib+4W2WzOz3Z5ES1QR9UZ?= =?Windows-1252?Q?133yQWTQ4YmjLoEoYaf1VkA5gnH2Vy08e6qkGqEhxJ5ewbsUkRQpcyIm?= =?Windows-1252?Q?B9kzwBhGyUf5iaUIj2sI2i3mqzae1eeYL8krZAVHrppMWtBWFaMdzdXO?= =?Windows-1252?Q?uS3oNisMaJTutcQim4UV3FbyDQcmNxQGfZqU+fWiQETGdVuyg6QTW28z?= =?Windows-1252?Q?b9Cz8fPxnDKpuU8hLyl4w1C68zUUwzPbLocnVHRRr83fuo6dlknnp6F0?= =?Windows-1252?Q?e4Yna/vuEcYYaL48u4acSh6yJdO6RQTVsxh3nxxWcA+kRK00PRgLIzWh?= =?Windows-1252?Q?2UCQm6QqBcPUcWfFZjSm/uRETtWvU04eW7WXpyON6HeVvStOhqU2bEfL?= =?Windows-1252?Q?FmriGkc0rHyRN8qLF9SGdmck+RyYUXHYC0fZRSqdkGXhuz0wuR/VtqmE?= =?Windows-1252?Q?4t+kg/Kwca0C8gSksXLMw33jGsoD7f0W/15g3g6nr/ryv/qKf7vvMfX4?= =?Windows-1252?Q?aTPc4LAqjQCvocIv34nE1C7sCQChyU742qGvi1/laSOOY0I6fBxzx6y8?= =?Windows-1252?Q?z++RaKanXqyHZQN9mPJnJ+LWKUTF7t+X4bR3/CErWPmwWxpyK61zzSwP?= =?Windows-1252?Q?VplNXTZJlXGCoHlKsVzbDcek2ixqCxJfkmDNruWwdzBd4AhknmKmb5ye?= =?Windows-1252?Q?OeTIYJW3LojpsccAIO/2+nXZfpmlyuM4nD2xzGI7FBOHGQSz9Z/PpHnU?= =?Windows-1252?Q?FXCMSbaloWl54ClQDbRdB4fg323BNz+unP0O3XGmMCp1KVsgD2A/36AS?= =?Windows-1252?Q?fJpi6JEEtwuQN+Jg4kr9xrR6Yn7N91gM627FOUdvMX/aGDPERrpWYBW4?= =?Windows-1252?Q?AV8goC0JEgS7QvGQnahSChkg3JO0/MR7QoZSsWCA5cKrbxqUFG+cxJO4?= =?Windows-1252?Q?6RqOltdRaqHGbnXopM9DvTtexqRSbDphFZsqYOGTF5N7darVZGZ0EiUT?= =?Windows-1252?Q?AZ/GNtgySoK7fAas7eBpqNLJN+E1hF+/nppkBTuvDVmT1GOE7j+tzg2l?= =?Windows-1252?Q?7ukY1e/guqk8nsRMbYtpVGaiRBXW6D/5EFFyjYvkjy7jVOz9uKduW366?= =?Windows-1252?Q?PYXKYMIeEQv90SF+pLEAxIuwlMf2Iq6NhM0EBLK+hZ5AMgGtIPvlqJ8P?= =?Windows-1252?Q?9ed2tlzeWesw8t5Nd4sQ0XhYxMV7tz9v2ozc7PSxQ1w/0WJeTgtI0Psv?= =?Windows-1252?Q?MUGlJUjSLqEQaMuZCEad6Abiq20MrJjCFo5vogO5nKiQTtBDdJL9YgW/?= =?Windows-1252?Q?GS6M31RBugNG24+zBlBsyYO67X0FHb3thtyntSchZqd06vQ9cjnP8Mp5?= =?Windows-1252?Q?6sj/nipv8VCuEhtF1UBfAI3a9HI+DC/+NydRivvDq+SYntWm67SCRDRE?= =?Windows-1252?Q?W1mAbADoDAlUDhA735UfmURK2PI9mZsb3Cu4Ipw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB149;3:b8C+1RXg5xUkgFiIToq8ACHiO8QCkMuP2lZCFE1uw0Llqd1CdRDxMxcNW828AjD9U6hd52Mqo8CnNzQZoaN9GHirTGdz3h2O9jph3rJlnhiEqHVA/X4eyx5T1IEgFCSNtYQ9G77JAc77lQgxMBybOw==;10:W3trlI+qfoaUm6s/8ojN+TmtQ74ufwCaXQMTBZ4PImrQwPJneDuDgbYmBAPZtKYjltPuA0+xn0JSGW5wW4I8Y5xsJJXLHJalflOxs4rY2GA=;6:X/6CdJoElNbivqLBh0Y7Zm81Y/OVwaSclRqI3rPa8D7GhkMM0Jh++A9b2jrps7I5 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2015 00:20:15.4273 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB149 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2035 Lines: 44 On 05/26/2015 03:38 PM, Guenter Roeck wrote: > On Tue, May 26, 2015 at 12:12:11PM -0700, York Sun wrote: >> Linux experts, >> >> I have rewritten a driver for Silicon Labs SI5338 programmable clock chip. The >> original driver was written by Andrey (CC'ed), but was floatingn outside of the >> kernel. The driver was written to use sysfs as the interface, not the common >> clock framework. I wonder if I have to rewrite the driver following common clock >> framework. One concern is to support a feature to accept ClockBuilder (TM) >> output on sysfs. I don't see sysfs support on common clock framework. Please >> correct me if I am wrong. >> >> If not using common clock framework is acceptable, I would like to send a RFC >> patch for review. >> > My original driver for si570 was rejected because it didn't support the clock > framework, so you might face an uphill battle. > > SI provides a document for SI5338 describing how to configure it without > using clockbuilder [1]. Can that be used to implement generic code which > doesn't need clockbuilder ? > The driver is capable to handle the user's input and enable the clocks. Removing the support of importing is a step back. At least it is a feature I am using. I believe Andrey also used this feature when the driver was first drafted. That being said, my application relies on setting multiple clock chips on a PCIe device. That means I cannot put the configuration into device tree. There may be a way to fill device tree, but I am not ready to explore yet. Without a sysfs interface, can I change the configuration for each clock? I also found COMMON_CLK is a bool, not tristate. It is only selected by others. Is there a reason for doing so? My current platform (P1022DS) doesn't have CONFIG_COMMON_CLK enabled. York -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/