From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933373AbcFOUIA (ORCPT ); Wed, 15 Jun 2016 16:08:00 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54445 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753161AbcFOUHz (ORCPT ); Wed, 15 Jun 2016 16:07:55 -0400 Date: Wed, 15 Jun 2016 13:07:52 -0700 From: Kenneth Westfield To: Srinivas Kandagatla Cc: Mark Brown , alsa-devel@alsa-project.org, Rob Herring , Mark Rutland , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kwestfie@codeaurora.org, plai@codeaurora.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v3 2/2] ASoC: msm8916: Add msm8916-wcd codec driver Message-ID: <20160615200752.GA26173@kwestfie-linux.qualcomm.com> Mail-Followup-To: Srinivas Kandagatla , Mark Brown , alsa-devel@alsa-project.org, Rob Herring , Mark Rutland , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, plai@codeaurora.org, linux-arm-msm@vger.kernel.org References: <1465582725-30183-1-git-send-email-srinivas.kandagatla@linaro.org> <1465582725-30183-3-git-send-email-srinivas.kandagatla@linaro.org> <20160614155938.GS2282@sirena.org.uk> <57611CEB.4030401@linaro.org> <20160615093136.GW2282@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160615093136.GW2282@sirena.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 15, 2016 at 10:31:36AM +0100, Mark Brown wrote: > On Wed, Jun 15, 2016 at 10:16:27AM +0100, Srinivas Kandagatla wrote: > > On 14/06/16 16:59, Mark Brown wrote: > > > On Fri, Jun 10, 2016 at 07:18:45PM +0100, Srinivas Kandagatla wrote: > > In theory there are 3 devices, > > one is the pmic-spmi driver, which provides regmap access to analog part of > > codec registers. > > second is syscon driver which provides regmap access to digital parts of > > codec to codec driver. > > third is the codec driver which uses both the above. > > > Codec registers range is just split into two, range 0x0- 0x200 sits in pmic > > address space and range 0x201 - 0x4ff in the SOC address space, > > > Are there any other better ways to model this kinda driver? > > Why not just have separate devices for each of the register maps? Srinivas, Mark has a good point. Also, by having distinct devices and drivers; you should make use of ASoC's supporting wrappers for regmap accesses. -- Kenneth Westfield Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project