Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560AbdL1Qtv (ORCPT ); Thu, 28 Dec 2017 11:49:51 -0500 Received: from mail-vk0-f48.google.com ([209.85.213.48]:45626 "EHLO mail-vk0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750765AbdL1Qtt (ORCPT ); Thu, 28 Dec 2017 11:49:49 -0500 X-Google-Smtp-Source: ACJfBovP7VbQnkyJUB09WaoyaNtTh6wCeRwpf2mOuDZ9cqevZy8Y11sO7ZoK3FF8kIdeoOWo0Ntsiw== Date: Thu, 28 Dec 2017 08:49:44 -0800 From: Richard Cochran To: Sagar Arun Kamble Cc: Takashi Iwai , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Vinod Koul , Thomas Gleixner Subject: Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use timecounter_initialize interface Message-ID: <20171228164944.crphv46zegvwautk@localhost> References: <1513323522-15021-1-git-send-email-sagar.a.kamble@intel.com> <1513323522-15021-16-git-send-email-sagar.a.kamble@intel.com> <20171215165125.avkz25eek56i5md4@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 907 Lines: 21 On Tue, Dec 26, 2017 at 01:07:35PM +0530, Sagar Arun Kamble wrote: > > Or can we provide simpler versions for covering some defaults? At > > least reducing the number of arguments would make things easier. > Thought about specifying 1. cyclecounter read func 2. frequency 3. width of > counter as parameters here > which can get rid of mult, shift params. But this is not easy as most of the > drivers do not specify > cyclecounter frequency and instead hard-code the mult/shift factors. You are talking about using clocks_calc_mult_shift() here, right? (See the usage example in drivers/net/ethernet/ti/cpts.c). This is a good idea, and it is worth getting the driver authors' input to figure out the correct parameters. I bet we can use that almost everywhere. If there are any drivers that cannot be converted, then we can leave some sort of low level legacy initialization method. Thanks, Richard