From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BA2BC4708D for ; Wed, 7 Dec 2022 11:17:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229575AbiLGLRL (ORCPT ); Wed, 7 Dec 2022 06:17:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiLGLRK (ORCPT ); Wed, 7 Dec 2022 06:17:10 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A396DC1E; Wed, 7 Dec 2022 03:17:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670411829; x=1701947829; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=H0Vzsz2jhaO+JMBnaxA31lSJWlWykGUD2EfsJINbXAg=; b=FkFd6ZpL8AGXwxy1ubYQ3ZOo0oygDZRMO7q2X+wVysci5v1TbHbgoIvI nySPWg8M/u9SRyZz7dy8+5+KsXIIwrNrpxiufjEpsFDPW8lM9vzrZKmEX kPzJl4k+r4ygD9a0QNIuwdFWO0xVD1VyzlS+Pn1t/RAN7oWl9V0av5bNR BQQGAReTLJqfEu8w4VRAzNwoiq0NsjzRkGrMsWEPZHBf79+76bgJ8Wt11 Uh2aSRUfNQ+gzS1+u5BCQJXmqZc0OuMuEBNLToCIZxssjDcVSQL+RW6oP notaYUJExxWd6tKgQWugC5psvF9nTdfWbrGN4ettGnvcrV7dtGCnimDtc g==; X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="316881114" X-IronPort-AV: E=Sophos;i="5.96,225,1665471600"; d="scan'208";a="316881114" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2022 03:16:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="679102665" X-IronPort-AV: E=Sophos;i="5.96,225,1665471600"; d="scan'208";a="679102665" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga001.jf.intel.com with ESMTP; 07 Dec 2022 03:16:49 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1p2sPu-005jlA-26; Wed, 07 Dec 2022 13:16:46 +0200 Date: Wed, 7 Dec 2022 13:16:46 +0200 From: Andy Shevchenko To: Okan Sahin Cc: outreachy@lists.linux.dev, Lee Jones , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Jonathan Cameron , Lars-Peter Clausen , Marcelo Schmitt , ChiYuan Huang , Geert Uytterhoeven , Marcus Folkesson , Caleb Connolly , Anand Ashok Dumbre , Ramona Bolboaca , William Breathitt Gray , Manish Narani , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org Subject: Re: [PATCH 3/5] staging: drivers: regulator: Add MAX77541 Regulator Support Message-ID: References: <20221207090906.5896-1-okan.sahin@analog.com> <20221207090906.5896-4-okan.sahin@analog.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221207090906.5896-4-okan.sahin@analog.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Wed, Dec 07, 2022 at 12:08:42PM +0300, Okan Sahin wrote: > This patch adds regulator driver for both MAX77541 and MAX77540. Read Submitting Patches documentation on how to create better commit message. > The MAX77541 is a high-efficiency step-down converter > with two 3A switching phases for single-cell Li+ battery and 5VDC systems. > > The MAX77540 is a high-efficiency step-down converter > with two 3A switching phases. ... > +/* > + * Copyright (c) 2022 Analog Devices, Inc. > + * ADI Regulator driver for the MAX77540 and MAX77541 > + * Redundant blank line. > + */ ... > +static const unsigned int max77541_buck_volt_range_sel[] = { > + 0x00, 0x00, 0x40, 0x40, 0x80, 0x80 You can leave trailing comma. > +}; ... > +static const struct regulator_desc max77540_regulators_desc[] = { > + MAX77540_BUCK(1, max77541_buck_ops), > + MAX77540_BUCK(2, max77541_buck_ops) Ditto. > +}; > + > +static const struct regulator_desc max77541_regulators_desc[] = { > + MAX77541_BUCK(1, max77541_buck_ops), > + MAX77541_BUCK(2, max77541_buck_ops) Ditto. > +}; ... > +struct max77541_regulator_dev { > + struct device *dev; Isn't it the same as... > + struct max77541_dev *max77541; ...max77541->dev ? > +}; ... > +static int max77541_regulator_probe(struct platform_device *pdev) > +{ truct device *dev = &pdev->dev; will save you a bit of code below. > + struct max77541_dev *max77541 = dev_get_drvdata(pdev->dev.parent); ... > + return dev_err_probe(&pdev->dev, PTR_ERR(rdev), > + "Failed to register regulator\n"); Wrong indentation. ... > + return dev_err_probe(&pdev->dev, PTR_ERR(rdev), > + "Failed to register regulator\n"); Ditto. ... > + Redundant blank line. > +module_platform_driver(max77541_regulator_driver); -- With Best Regards, Andy Shevchenko