Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp946841imm; Tue, 5 Jun 2018 07:00:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKnuaGwUs17/+ZFeV5xdyTWXxtvnYA6tulP57E2NUpiTyuOATH40PUVBqLg/4Ifji2ONh0z X-Received: by 2002:a65:4aca:: with SMTP id c10-v6mr12475024pgu.244.1528207204708; Tue, 05 Jun 2018 07:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528207204; cv=none; d=google.com; s=arc-20160816; b=RPy1GVjPKGwmnsWo7M6bHCnN8zDHvfaMqqvYhv/02xNWeD90wJrZR621buKgCcODXW VJMJX5Wea6pX/aivy/OhXmyVmmDCudHCLqbES2E/kshLN3VAcP0C3895apU9Ed0bbXCV vRuHl8O48dWfB+0NiHog2t3Jr4vCOBQg9Fw96/+8SvZIE6mz+ZxJnhp2WdgC7ptw/4Uq vv/FNSA3dKBSEgRJDloeZ2fypoyxmBkD5K5ChQWdYv3QraLm32SvfH3KvOX8PTrOh71v BXh4Q1Fm+yW3D28tt/QQS0NMe1PwazrpYRE98v3ffineOn6/1bkCyEiBNpp8ahSSA27B CYvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=SL/NP0nWp7LkItwShX9QsRzPzs+mQ3tQjH/ZwCJfr0Y=; b=N4aSDNgPAPuYCVpZJdotc+ADTEHxql978gDMFHvbcc1X/Xlf9nzXbOWCdQ6XibBkDU 02M/oHOVqfRXMG4ILYtI2iL7oPX6Vp1mbbg/0AKYo0LmcExD+OD3ljh/7xudRUpV3sfO gJNLc05hXVtntonrzkiW3fW1tlcTo+g16+9AzfCPRzCqfaaARGPqlNkMcPzXelxh78UR 8HAuAf5UntmzMc2NrqoTMLwAZr/IimvF05jFDwetWN603aPI/6YqorFfIh0g0SpaWCI5 VdrobYhc/DjH1j5Rqj5hk8S3Lxb0KQSSxXmVf7jPzWgzTK6pFBOAIZAPd7CyA4JPNhh0 +27w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uzq7DRBf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5-v6si9765274pgr.491.2018.06.05.06.59.49; Tue, 05 Jun 2018 07:00:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uzq7DRBf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbeFEN6q (ORCPT + 99 others); Tue, 5 Jun 2018 09:58:46 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:39195 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751539AbeFEN6o (ORCPT ); Tue, 5 Jun 2018 09:58:44 -0400 Received: by mail-qt0-f196.google.com with SMTP id p23-v6so2462570qtn.6; Tue, 05 Jun 2018 06:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SL/NP0nWp7LkItwShX9QsRzPzs+mQ3tQjH/ZwCJfr0Y=; b=uzq7DRBfNEl2LeRGOV/LTwnEwu1GY6K36YDtoAv4eVSh/Hmv0FKqF9eFcJIA0niV5E AOuklZxD4DyYjI+oleZshVfNArCDBAel6Ni8RShRV+i/Q9BmOfPrVZQXb7OpoxJEVZrw k+kd1iA4yEUMgPoMV3u2lsE8eUJ6QPSUf3HMJTiCUJpVekd5LDddQZJYPyQFscSXUZr/ d56pQIAoCqzmsYD+qoIC5M39tDu1Owg1y4NXfK0LMId7WGznCh0OcAQGKHhcQBR02/8p C4vnDAmQx3r0HSp7zXqPWBDFIxlKPMcYKizdelS5JRMO7yqXY8HUphqBMSQMdK37Jf2r PSaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SL/NP0nWp7LkItwShX9QsRzPzs+mQ3tQjH/ZwCJfr0Y=; b=azeOPI/C0HKLneAnTg9nWb866SCUYwci3b574yG2a8FWGFJD+NsJnUVt9DJ1Sqkp9s jtCimKJUPGXUOCg5YuUH8hYTgJ/+Gxy8t0O/d4hXKBXCsabVyt0dM0DGl5euo5NdNwzt aSqUa8XfnmpeMfgh6TIntdu8B+HHEuRNHYeVwQn7HRGWZziK7EtMRo08NNiTG0Pu2UHW g6vPcCA0gkLhrCuhQ0QvHll9wVnDgJSQLNtqxlqho3mqm82dPIDHe3+D2f1YOfey36Mz madh7iR4Wh7i7vblBOUtVNIcwCbw8k5t+kRf/JOW3n6OI2Dy/EhedxbjrMPbHdsXLfXz //Vg== X-Gm-Message-State: APt69E2u29s69+TOil0/W7fusfEBgCtNuR4Lmnl5ykVnedjgYhddPMV1 kZAG5AJJwVPTdNxXsglQDG0UBpIsIVWC+19IkL3pZC4H X-Received: by 2002:aed:3ce8:: with SMTP id e37-v6mr24876959qtf.295.1528207123595; Tue, 05 Jun 2018 06:58:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:98f9:0:0:0:0:0 with HTTP; Tue, 5 Jun 2018 06:58:43 -0700 (PDT) In-Reply-To: <68b0cf2c7ab5578eef2f71a33315bc8ab9a68a39.1527587295.git.matti.vaittinen@fi.rohmeurope.com> References: <68b0cf2c7ab5578eef2f71a33315bc8ab9a68a39.1527587295.git.matti.vaittinen@fi.rohmeurope.com> From: Andy Shevchenko Date: Tue, 5 Jun 2018 16:58:43 +0300 Message-ID: Subject: Re: [PATCH v3 6/6] regulator: bd71837: BD71837 PMIC regulator driver To: Matti Vaittinen Cc: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Lee Jones , Liam Girdwood , Mark Brown , mazziesaccount@gmail.com, linux-clk@vger.kernel.org, devicetree , Linux Kernel Mailing List , mikko.mutanen@fi.rohmeurope.com, heikki.haikola@fi.rohmeurope.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 29, 2018 at 1:02 PM, Matti Vaittinen wrote: > Support for controlling the 8 bucks and 7 LDOs the PMIC contains. > +#include > +#include > +#include One of these is redundant. > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include Can you keep the list ordered? > + dev_dbg(&(pmic->pdev->dev), "Buck[%d] Set Ramp = %d\n", id + 1, > + ramp_delay); Redundant parens. > +static int bd71837_regulator_set_regmap(struct regulator_dev *rdev, int set) > +{ > + int ret = -EINVAL; Redundant assignment. > + if (!set) > + ret = regulator_disable_regmap(rdev); > + else > + ret = regulator_enable_regmap(rdev); > + return ret; > +} > +static int bd71837_probe(struct platform_device *pdev) > +{ > + pmic = devm_kzalloc(&pdev->dev, sizeof(struct bd71837_pmic), > + GFP_KERNEL); sizeof(*pmic) and one line as result? > + if (!pmic) > + return -ENOMEM; > + if (!pmic->mfd) { > + dev_err(&pdev->dev, "No MFD driver data\n"); > + err = -EINVAL; > + goto err; Plain return? > + } > + dev_dbg(&pmic->pdev->dev, "%s: Unlocked lock register 0x%x\n", > + __func__, BD71837_REG_REGLOCK); __func__ part is redundant. > + for (i = 0; i < ARRAY_SIZE(pmic_regulator_inits); i++) { > + Redundant blank line. > + rdev = devm_regulator_register(&pdev->dev, desc, &config); > + if (IS_ERR(rdev)) { > + dev_err(pmic->mfd->dev, > + "failed to register %s regulator\n", > + desc->name); > + err = PTR_ERR(rdev); > + goto err; Plain return ... > +err: > + return err; Redundant. > +} > +static struct platform_driver bd71837_regulator = { > + .driver = { > + .name = "bd71837-pmic", > + .owner = THIS_MODULE, This done by macro you are using below. Thus, redundant. > + }, > + .probe = bd71837_probe, > +}; > + > +module_platform_driver(bd71837_regulator); -- With Best Regards, Andy Shevchenko