From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laxman Dewangan Subject: Re: [PATCH V3 5/5] regulator: max77620: add regulator driver for max77620/max20024 Date: Tue, 19 Jan 2016 12:34:14 +0530 Message-ID: <569DDFEE.4080307@nvidia.com> References: <1452771166-13694-1-git-send-email-ldewangan@nvidia.com> <1452771166-13694-6-git-send-email-ldewangan@nvidia.com> <569DC9AD.7000504@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from hqemgate14.nvidia.com ([216.228.121.143]:11961 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718AbcASHOv (ORCPT ); Tue, 19 Jan 2016 02:14:51 -0500 In-Reply-To: <569DC9AD.7000504@samsung.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Krzysztof Kozlowski , robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, linus.walleij@linaro.org, gnurou@gmail.com, lee.jones@linaro.org, broonie@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com Cc: lgirdwood@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, rtc-linux@googlegroups.com, swarren@nvidia.com, treding@nvidia.com, Mallikarjun Kasoju Thanks for review. Here is my view on the some of the review comment. On Tuesday 19 January 2016 10:59 AM, Krzysztof Kozlowski wrote: > On 14.01.2016 20:32, Laxman Dewangan wrote: > + return ret; > +} > + > +static int max77620_init_pmic(struct max77620_regulator *pmic, int id) > +{ > This function seems to be used only from max77620_of_parse_cb(). I would > find easier to read if this was located before definition of > max77620_of_parse_cb(). Can you move it (or you had other idea of > placing algorithm)? I wanted to keep all local function on top which is used on this file and not the regulator ops. Then implement regulator ops and then probe. Let me see if I can do anything here. > >> + pmic->enable_power_mode[id]) { >> + ret = max77620_regulator_set_power_mode( >> + pmic, pmic->enable_power_mode[id], id); > The 'pmic' argument should be after opening parenthesis, not at new line. This is done for indenting alignment. I am using checkpatch --strict option and for this the next line should be on same column of first charcter after opening parenthesis. To avoid this error, if we want to re-align the indenting for next line then left the line empty after "(". + +static int __init max77620_regulator_init(void) +{ + return platform_driver_register(&max77620_regulator_driver); +} +subsys_initcall(max77620_regulator_init); + > Does it have to be subsys_initcall? Any special requirements for > ordering the drivers? Probe deferring is encouraged instead. > > This is to make sure th regulators are ready before other driver get probed. This is basic need of some of driver and hence subsys_initcall. I will move to module_init() as some of other PMIC driver (as3722) is in the module init and used in tegra platform so not seeing much issue on this. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757342AbcASHOz (ORCPT ); Tue, 19 Jan 2016 02:14:55 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:11961 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718AbcASHOv (ORCPT ); Tue, 19 Jan 2016 02:14:51 -0500 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Mon, 18 Jan 2016 23:16:22 -0800 Message-ID: <569DDFEE.4080307@nvidia.com> Date: Tue, 19 Jan 2016 12:34:14 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Krzysztof Kozlowski , , , , , , , , , , , CC: , , , , , , , Mallikarjun Kasoju Subject: Re: [PATCH V3 5/5] regulator: max77620: add regulator driver for max77620/max20024 References: <1452771166-13694-1-git-send-email-ldewangan@nvidia.com> <1452771166-13694-6-git-send-email-ldewangan@nvidia.com> <569DC9AD.7000504@samsung.com> In-Reply-To: <569DC9AD.7000504@samsung.com> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: DRUKMAIL101.nvidia.com (10.25.59.19) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for review. Here is my view on the some of the review comment. On Tuesday 19 January 2016 10:59 AM, Krzysztof Kozlowski wrote: > On 14.01.2016 20:32, Laxman Dewangan wrote: > + return ret; > +} > + > +static int max77620_init_pmic(struct max77620_regulator *pmic, int id) > +{ > This function seems to be used only from max77620_of_parse_cb(). I would > find easier to read if this was located before definition of > max77620_of_parse_cb(). Can you move it (or you had other idea of > placing algorithm)? I wanted to keep all local function on top which is used on this file and not the regulator ops. Then implement regulator ops and then probe. Let me see if I can do anything here. > >> + pmic->enable_power_mode[id]) { >> + ret = max77620_regulator_set_power_mode( >> + pmic, pmic->enable_power_mode[id], id); > The 'pmic' argument should be after opening parenthesis, not at new line. This is done for indenting alignment. I am using checkpatch --strict option and for this the next line should be on same column of first charcter after opening parenthesis. To avoid this error, if we want to re-align the indenting for next line then left the line empty after "(". + +static int __init max77620_regulator_init(void) +{ + return platform_driver_register(&max77620_regulator_driver); +} +subsys_initcall(max77620_regulator_init); + > Does it have to be subsys_initcall? Any special requirements for > ordering the drivers? Probe deferring is encouraged instead. > > This is to make sure th regulators are ready before other driver get probed. This is basic need of some of driver and hence subsys_initcall. I will move to module_init() as some of other PMIC driver (as3722) is in the module init and used in tegra platform so not seeing much issue on this. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hqemgate14.nvidia.com (hqemgate14.nvidia.com. [216.228.121.143]) by gmr-mx.google.com with ESMTPS id i25si2879965pfj.2.2016.01.18.23.14.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2016 23:14:51 -0800 (PST) Message-ID: <569DDFEE.4080307@nvidia.com> Date: Tue, 19 Jan 2016 12:34:14 +0530 From: Laxman Dewangan MIME-Version: 1.0 To: Krzysztof Kozlowski , , , , , , , , , , , CC: , , , , , , , Mallikarjun Kasoju Subject: [rtc-linux] Re: [PATCH V3 5/5] regulator: max77620: add regulator driver for max77620/max20024 References: <1452771166-13694-1-git-send-email-ldewangan@nvidia.com> <1452771166-13694-6-git-send-email-ldewangan@nvidia.com> <569DC9AD.7000504@samsung.com> In-Reply-To: <569DC9AD.7000504@samsung.com> Content-Type: text/plain; charset=UTF-8; format=flowed Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Thanks for review. Here is my view on the some of the review comment. On Tuesday 19 January 2016 10:59 AM, Krzysztof Kozlowski wrote: > On 14.01.2016 20:32, Laxman Dewangan wrote: > + return ret; > +} > + > +static int max77620_init_pmic(struct max77620_regulator *pmic, int id) > +{ > This function seems to be used only from max77620_of_parse_cb(). I would > find easier to read if this was located before definition of > max77620_of_parse_cb(). Can you move it (or you had other idea of > placing algorithm)? I wanted to keep all local function on top which is used on this file and not the regulator ops. Then implement regulator ops and then probe. Let me see if I can do anything here. > >> + pmic->enable_power_mode[id]) { >> + ret = max77620_regulator_set_power_mode( >> + pmic, pmic->enable_power_mode[id], id); > The 'pmic' argument should be after opening parenthesis, not at new line. This is done for indenting alignment. I am using checkpatch --strict option and for this the next line should be on same column of first charcter after opening parenthesis. To avoid this error, if we want to re-align the indenting for next line then left the line empty after "(". + +static int __init max77620_regulator_init(void) +{ + return platform_driver_register(&max77620_regulator_driver); +} +subsys_initcall(max77620_regulator_init); + > Does it have to be subsys_initcall? Any special requirements for > ordering the drivers? Probe deferring is encouraged instead. > > This is to make sure th regulators are ready before other driver get probed. This is basic need of some of driver and hence subsys_initcall. I will move to module_init() as some of other PMIC driver (as3722) is in the module init and used in tegra platform so not seeing much issue on this. -- -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.