From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751513AbcBJMxF (ORCPT ); Wed, 10 Feb 2016 07:53:05 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:33611 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbcBJMxA (ORCPT ); Wed, 10 Feb 2016 07:53:00 -0500 Subject: Re: [PATCH v4] regulator: qcom-saw: Add support for SAW regulators To: Lina Iyer References: <1455023549-30836-1-git-send-email-georgi.djakov@linaro.org> <20160209222154.GB1646@linaro.org> Cc: broonie@kernel.org, lgirdwood@gmail.com, andy.gross@linaro.org, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org From: Georgi Djakov Message-ID: <56BB32A9.7090002@linaro.org> Date: Wed, 10 Feb 2016 14:52:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160209222154.GB1646@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lina, Thanks for reviewing. On 02/10/2016 12:21 AM, Lina Iyer wrote: > On Tue, Feb 09 2016 at 06:13 -0700, Georgi Djakov wrote: [..] >> +#define SPM_REG_STS_1 0x10 >> +#define SPM_REG_VCTL 0x14 >> +#define SPM_REG_PMIC_DATA_0 0x28 >> +#define SPM_REG_PMIC_DATA_1 0x2c >> +#define SPM_REG_RST 0x30 >> + > These register offsets are SoC specific. You may want to follow the model > of drivers/soc/qcom/spm.c in getting register offsets. > > While I see that you are only supporting APQ8064 with this patch, you > probably would want to think a bit far ahead. To support any other QCOM > SoC, you would need extensive changes. > The purpose of this patch it to add support for 8064. Supporting other SoCs requires just read/writing at different offsets. To handle this we can convert the above defines to a table containing the offsets for each SoC. I don't think these are extensive changes or do i miss something? [..] >> + >> +module_platform_driver(qcom_saw_regulator_driver); >> + > builtin_platform_driver() perhaps ? > It's tested as module too, so there is no reason to change to builtin. Thanks, Georgi