Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp426187imm; Tue, 5 Jun 2018 23:18:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI1ysoivL8gNpCt70pQopirTS5/qPRomG/gtOHqlAOSaeID8zkYrcczoY+gbpH0MRFpBaa7 X-Received: by 2002:a17:902:be0b:: with SMTP id r11-v6mr1955602pls.182.1528265885749; Tue, 05 Jun 2018 23:18:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528265885; cv=none; d=google.com; s=arc-20160816; b=xnCDuwWfgkQ2/Hc6Vrh0X5L9hI6A8aknhCWGPyZ+2KfiP5zKxC2+EFTILVeoK2CNw9 B6jXlP8o0BTpyX3QsHV+oRUAMqx3xRDdLAEpieNNt+vY2lR9xdij2nsi50TiINF/jFbU /aPmoy4Qw1P4k+Wk7yAdAckDbF4oWmq6d6RP3ACIT4K5kyIcnfO0EniR55s/dxwBdzEF SkPHhIaGWu375+8RntxM9wddL77N+0MSXEdSZOqWcSvmBb6pflncydvktDvJcmj/csmu xXvRo3aIOTHiIhY7EOaouUV3ixlPlVyB7IptBvXgsFH6nG/XIbLga2ZuGnaurG1tBPV2 YqXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=qD0zVRzMaiYI8/giUXUyh+QMYaXxDMqNmVV4LMD7rPQ=; b=VI4bOSCiaeav9/YLO4H8fc9k1v8TKHZknQcyqk8MSjQxSBk6KgIG/ljL07DS5j+l8/ TfGOdhXuh7LpoT0LPufqz+pf2dEqRuftoyriWmm00VKYqw2Cs+8whhfgG0WSUKk5s0HV hjTJKYgugs9h3D49+ZmjS117Ghn+XOqlc5V8y/kvRD9X4r4afrw1ZOhlRUE+wRFekSeZ UA51ZNr1LH6vK7goAy27Fsdorkq14Js11OCEQ7fw7ZIo00bgybinwCePLeqz1Tc0EiFV uz/57CIZa9jtjkx5Fn5DMQqsRPLktsTBiwp/LkpsAuMrd6hvcJaARWa6FRQpF2EUQBMM L/Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BxQgY/MH; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19-v6si48348013plp.538.2018.06.05.23.17.50; Tue, 05 Jun 2018 23:18:05 -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=@linaro.org header.s=google header.b=BxQgY/MH; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752274AbeFFGQ3 (ORCPT + 99 others); Wed, 6 Jun 2018 02:16:29 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:39948 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751536AbeFFGQ1 (ORCPT ); Wed, 6 Jun 2018 02:16:27 -0400 Received: by mail-wr0-f193.google.com with SMTP id l41-v6so4862990wre.7 for ; Tue, 05 Jun 2018 23:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=qD0zVRzMaiYI8/giUXUyh+QMYaXxDMqNmVV4LMD7rPQ=; b=BxQgY/MH8zPYqys/pRwoaL9DdS0nEWx5Okx97mcCVan6BlD80XiLP1XEQEFNllDJ2I xgCwCaj/+r5VoUc+vdsVOxasXhFJdAvT3lWvApJPcOJhHMEPZB6mpNNvqAosuPKvYVCr PqypvdQmf05+6pBEtQNz5Ruq4jICrwGMH0m84= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=qD0zVRzMaiYI8/giUXUyh+QMYaXxDMqNmVV4LMD7rPQ=; b=BaAEoqwEnghU0TfiS8sQEByB2xIPFxi5MlalRlWTcxTe3ekZvzr608WgcBL42ds2MS TEfifvzqowi/Agdgw08dZillKEcND56V6QV1kaYRP5PjDTXXoiipYVUEqaLPLv9Su2Rg FaUENfS0UFx3vadH9sLxOnKrp8JxgcBIO36uJWqV5GXWe/L+/Bipd0CWthQU3aFt9L48 rbtQh03gGnfpc3RZV26E5bfQRq36mjWFmq8SfKMC0b5WgacSjrT31DdSiHoeoOB72NWQ Srkn7LaEdNC1dNy68jglI4xKjZLuBobC/JEWzBW0pJ6Nc8dYCbG4lDjla/pUyUYRMxB/ JAUw== X-Gm-Message-State: APt69E3x+tZZUYNPHBcGfR7CmhtfM5jXT3GYP/Oi4hPDAWmmkgRDcyVu BdXKK7jRIikU8JjVT47iLZaKdQ== X-Received: by 2002:adf:d204:: with SMTP id g4-v6mr1115531wri.229.1528265786128; Tue, 05 Jun 2018 23:16:26 -0700 (PDT) Received: from dell ([2.31.163.53]) by smtp.gmail.com with ESMTPSA id q17-v6sm15156250wrs.5.2018.06.05.23.16.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 23:16:25 -0700 (PDT) Date: Wed, 6 Jun 2018 07:16:23 +0100 From: Lee Jones To: Marek Vasut Cc: linux-kernel@vger.kernel.org, Marek Vasut , Geert Uytterhoeven , Mark Brown , Steve Twiss , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH v3 08/10] mfd: da9063: Register RTC only on DA9063L Message-ID: <20180606061623.GT21163@dell> References: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> <20180602101155.26375-8-marek.vasut+renesas@gmail.com> <20180605075321.GM21163@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 05 Jun 2018, Marek Vasut wrote: > On 06/05/2018 09:53 AM, Lee Jones wrote: > > On Sat, 02 Jun 2018, Marek Vasut wrote: > > > >> The DA9063L does not contain RTC block, unlike the full DA9063. > >> Split the RTC block into separate mfd cell and register it only > >> on DA9063. > >> > >> Signed-off-by: Marek Vasut > >> Cc: Geert Uytterhoeven > >> Cc: Lee Jones > >> Cc: Mark Brown > >> Cc: Steve Twiss > >> Cc: Wolfram Sang > >> Cc: linux-renesas-soc@vger.kernel.org > >> --- > >> V2: No change > >> V3: Rework of mfd: da9063: Disallow RTC on DA9063L > >> --- > >> drivers/mfd/da9063-core.c | 30 +++++++++++++++++++++++------- > >> 1 file changed, 23 insertions(+), 7 deletions(-) > >> > >> diff --git a/drivers/mfd/da9063-core.c b/drivers/mfd/da9063-core.c > >> index eebca3442cf3..b05910c797af 100644 > >> --- a/drivers/mfd/da9063-core.c > >> +++ b/drivers/mfd/da9063-core.c > >> @@ -76,7 +76,7 @@ static struct resource da9063_hwmon_resources[] = { > >> }; > >> > >> > >> -static const struct mfd_cell da9063_devs[] = { > >> +static const struct mfd_cell da9063_common_devs[] = { > >> { > >> .name = DA9063_DRVNAME_REGULATORS, > > > > Appreciate that these are historical, but these device name defines > > make me shudder. They only serve to act as an obfuscation layer when > > debugging at platform level. Please consider getting rid of them. > > The macro can be shared between the core and the drivers, so the names > never run out of sync. Platform driver name changes are vary rare. Even if they are changed, even light testing would uncover the fact that child drivers do not .probe(). Due to the current obfuscation, I currently have no idea what this device's name is. This technique is not allowed for new drivers - unfortunately I didn't not review this driver in the first instance. It doesn't bother me enough to go and change it myself and I'm not going to have a baby over patches not being submitted to fix it. > >> .num_resources = ARRAY_SIZE(da9063_regulators_resources), > >> @@ -100,15 +100,19 @@ static const struct mfd_cell da9063_devs[] = { > >> .resources = da9063_onkey_resources, > >> .of_compatible = "dlg,da9063-onkey", > >> }, > >> + { > >> + .name = DA9063_DRVNAME_VIBRATION, > >> + }, > > > > Place this on a single line please. > > This would only make the style inconsistent with the ie. LEDs entry. > > > { .name = DA9063_DRVNAME_VIBRATION }, If that is a one line entry spaced over multiple lines, then that should also be changed. Maybe I will go through and stylise this driver a bit after all (but as time is short at the moment, maybe not!) :) [...] > >> +err_mfd_cleanup: > >> + mfd_remove_devices(da9063->dev); > > > > Any reason why you can't use devm_*? > > Because we need to undo the MFD setup before the IRQ setup. Sounds like a good enough reason. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog