Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751597AbbE0Aro (ORCPT ); Tue, 26 May 2015 20:47:44 -0400 Received: from mail-bn1on0131.outbound.protection.outlook.com ([157.56.110.131]:59548 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751188AbbE0Arl (ORCPT ); Tue, 26 May 2015 20:47:41 -0400 X-Greylist: delayed 19205 seconds by postgrey-1.27 at vger.kernel.org; Tue, 26 May 2015 20:47:40 EDT Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yorksun@freescale.com; Message-ID: <5565108D.2020502@freescale.com> Date: Tue, 26 May 2015 17:32:13 -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> <55650DBA.5000304@freescale.com> In-Reply-To: <55650DBA.5000304@freescale.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [192.88.168.49] X-ClientProxiedBy: SN1PR15CA0003.namprd15.prod.outlook.com (25.163.200.13) To BY2PR03MB160.namprd03.prod.outlook.com (10.242.36.22) X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB160;2:uzfnAeQRRbjzy+K/IweAY9a04sdMrVXA+YLreUMBB4rPiRkHbQX2M17+pLG/zva3;2:OA3SxZw3JxjdSv+HfMdmH49OGCZ8qCuscYy2meSGEecehc1BLF+vSCBGwoNIp93o11FNOj3iJ/y7CIh0THOb5UOcObPAqfbsRkCYx02bb8UwHA1BVvxMhWOdK45XxxgD/XKDfUdcNDp6S+b7jkHBdQ==;6:/1yQ4SQkk3yZYQVmrIG4lKVpXTlbrsZzHgHF/ynVPdPs709ceONSLzYIe2r/d27uMuR8RnlQVHlCFzjzq/srICrPphXqAu+9jyGi6wpXCGYjolLFIs7H7/Ry7sjaGNpw1oOO/DSS+FT9ZgbDzODfEL3TTKs3M0vRLQ8mP3AELjOoqX4CGDdIbfTHQPhnHnLnBcgk4KuyiqP8ZW53PGvi929XmiMR4L7h3Eq0Paddji9gJk3x5xAF3JOsTHkVYtI2VyUdhYKHOkIlGqGmpSf/KX08OFmsNJjxl2HCed4mhljG7hT6hFquy36eTC5eX0PpFUATKG5SXFO/JQRputrdWcJd69RKujvNzzzsyO6eqmpHk1gBIJo2O86tW4RXtlwvGQq4TDtLSlG3KfhuodBYjofCNbhUB+UU7nOJAnzV3/Amk4le5A3F1c/UuADWNqlDXcoXLoSQ/iwROram4XOYwkOa5JV1S3ot19N7jPxPf38teRYHLkTq75XOxI+Es0KFcKa0G5QGRFdAqi++3sRcsiAQLoRjMylCPErqRhsJWWWaqHPuTjisNXJXso92IN5742TKntXnSUVipGePUGa5NM1PfIQmQ49lLVjlnXheMKI= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB160; 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:BY2PR03MB160;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB160; X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB160;3:wPW2sdLWsmVUZNSGG4VAeR4g3yXRQUyi8YJDbZwMoATPxmV9tijn5587vWSZdOSFrokvaFznLDMoEbf8Wbake9awrOjNuefV4ZvbyowL35eSfeArXWnht1odTet+pe3bLjwoDj56UWzBHdj4uTHrXk/DoJatrRxhlXeOKoJNFzqTuOMbF4fuv0nUVbh/nw29YyALHsebCpgFkie4/7ZW1FeR9ib0t1DrxdlZJfMeOpbbZCZ/b5K3PMWyVoEGF+BMjpsudQWNo4Z2ZkFebaucmxbCDY7LMQmcTc0sEeztTm080ON5RH1z14s+dHOcS7A4 X-Forefront-PRVS: 05891FB07F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(6009001)(479174004)(54094003)(24454002)(199003)(51704005)(189002)(377454003)(106356001)(105586002)(46102003)(64126003)(4001540100001)(2950100001)(68736005)(54356999)(87266999)(76176999)(77096005)(81156007)(50986999)(59896002)(92566002)(5001830100001)(5001960100002)(101416001)(5001860100001)(97736004)(5001770100001)(99136001)(36756003)(42186005)(65816999)(65806001)(189998001)(4001350100001)(40100003)(87976001)(86362001)(122386002)(66066001)(80316001)(65956001)(83506001)(77156002)(62966003)(64706001)(33656002)(23746002)(221733001)(47776003)(50466002)(4580500001)(111123002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR03MB160;H:[10.214.80.244];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BY2PR03MB160;9:UgX92YueoAmT9VZkhJVjYp+GuQVCUP5XLtKPjfV?= =?Windows-1252?Q?8h8/OPbVGJeP3u1SqfvNJpTik6XIJWicvTOJV09U47b58iZ3n78bYevR?= =?Windows-1252?Q?C2JPZcCxn0qCLsBXLFUt5W1KsPrS9ouA4nT0kHDTqbk/VdhDn0vX/ZIr?= =?Windows-1252?Q?L/65jG75LyaLyBIA+mV87ObACuAvSSiPG8YITOin74HUUMRtK86YLrAk?= =?Windows-1252?Q?QJNSNOHZj8rD5JTPTw691JWGTmH4KkUa7yi/6d6TwxbYL/orj53idneP?= =?Windows-1252?Q?3nzwC7nRX4uRzRJw/BVGtQDoj0JO5OW52TvWI6p9nY24A+nK4PK8YPCA?= =?Windows-1252?Q?YKL0dIeUUX12DLxED6AX/io3AFZOFzyRfea6sXNUiuSb/R1+IFMrNO55?= =?Windows-1252?Q?xuebjI3brDEVPTkX0wT8Oe08bhS3afviK2FfVIPwxyFHx+IznQh+rjUv?= =?Windows-1252?Q?bFKVQPNttxllR86gDVhIZ6A/l/4QDpaHEDnzNTAbxxUcZ4wXoX6O2NXU?= =?Windows-1252?Q?uW2bPVtM4nH2wU0ueKTnLrSx13Zo+yKJezHZqb8t5s0+xdWZ6ojF7s+R?= =?Windows-1252?Q?NXalJ/AT1Lp6cVj8Skk/JXHtI6KWPxLOqo/grvZmpIw2QJkYSfPxMgSc?= =?Windows-1252?Q?gVo68++BPU2X3ZNDRIo4DQu9GQA76vxprA9KmxcaUkVHk8HqitdurG+B?= =?Windows-1252?Q?y/nw+l3L6GETSPcjqyBSwYepVCQ4jx7O66JgiNASzs+72yP64ZacDoEH?= =?Windows-1252?Q?MyxL2R/wNTG74qOoiRdhYr0CIWcMnmU0xOcs8Kwce6TnAeLILK540Nuh?= =?Windows-1252?Q?vfTQL4T91VEdZ9WtXey1Zrhy0kKpAtmlfCiOqB05zTiu7/xH6iuH9JZG?= =?Windows-1252?Q?JqlUbxsXC128cYkSJ8wBpz3+7pcAeV1hV9A/J6hasWWcPx0TCrHcDFzt?= =?Windows-1252?Q?26cb6MXqV5y5XfJCG4utsgCX3r7MW3FCSsUIMaVV/eXUmggbvLNQL9FN?= =?Windows-1252?Q?iVVdVp8N7nhjhCwvPPTMujHwI5OfRqBpyBmIo6WB7BxG5aOT7UJm44pu?= =?Windows-1252?Q?J0GEp+QEgsdvwRpwFA9Ja9HmKm1RtGMl2igrVOo4jTDXKF6a2VHVqbzW?= =?Windows-1252?Q?EtReFY1zyQ2Gl+oZC6quevZ2xXM0OLcDaeIaMXkaKuh0jlPnuM+IiYzx?= =?Windows-1252?Q?/VrYaqmYVp8+LB8BTzAOGsX/Q2lAZSwxVVTEpnba3Cd1bPLGypsE2nlB?= =?Windows-1252?Q?9NQ5aiuDnGNUK+DYfa0CCVd2ohPqp91pHFGcVdg4oEGyDTyeQX4EgrMw?= =?Windows-1252?Q?8B4rM7U7g+e2OGnL9NafpRm90mJbnppZzU/pbYo2tlp2cNh5wzqR2xvn?= =?Windows-1252?Q?gjMLK5cYk5ZHyQxoObA4lesUdIs+6LIH0Cxx+VgOxt3+qRNOQywr7msM?= =?Windows-1252?Q?v8qaD8DCqh/ZidQ1ioX3OCCrNzL4Am2PQtzaVe73bBp0N1vMpQNb+3GD?= =?Windows-1252?Q?fP6YQWqJD0bKeTPC2d5SGGxLM?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB160;3:D3XDQcFllHOtpbDgXQGhMx3LLQwqyDk641bi0OnQ8xmDXPiwX4KquZ564AkoPbXda068rzZDoCIwa2S+Ja26RUggGfbEXWNVBY84W97CmfEv8u5exCHrCH706UWQ/tsh09eOz/+SKb4X5HxnyuDVng==;10:TiuBSXszmVhchaEUCCCiU2gox0GWn+7TosxWR5vY40BHJ8o5UMEC6Hum8RKTkWXLy58lT0U09hbwwh+Bcvcbl62wbNEupyH1Jk23Alc4coA=;6:GObDWvASAaeYDNhnH0d81WnxhNzChhJVGEIH7KDOeUwq2soTFHccrGSc4uG8tfqF X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2015 00:32:18.8502 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB160 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2390 Lines: 55 Michael, Can you give me some guidance here? On 05/26/2015 05:20 PM, York Sun wrote: > > > 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. > If converting my driver to common clock framework, I need to find a way to configure the clocks without recompiling the kernel. I will have about 30 clock chips (with different frequency) on multiple PCIe cards. 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/