Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp595984imm; Wed, 6 Jun 2018 02:52:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ4YRRk1AbPuKiVvYEPW0FIQyLYCbAj4uEHwxif/nK+NITjFSnUx5EyGdZl//KaWN5TeZlA X-Received: by 2002:a63:8f19:: with SMTP id n25-v6mr2043438pgd.344.1528278743775; Wed, 06 Jun 2018 02:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528278743; cv=none; d=google.com; s=arc-20160816; b=XE9XIKlHuJaDeYakelwkt0j3i3Ms9lCfE2fJ//SJxe5v4U1mBQf+8oiQQMVhzIWexz O5jOaeZ16cwidbbzGMehgtRMJHE+cWqO6cFop8Gd9y62F5EozLFIGxUKNd7M7tCcgOEr j/5HAWSOIWKsr6L3RpdnjKHo/zsx3DhrwPAxGx0QAzIQ18o4w4o5YglSy/yuU7XZDGJ4 m522g2zLUy9too5U8xfKvMD+LFSnEj3sYMogoP1API3pD3MosJBSikQt9b5fi0pH0V2V JJZt76syEt05DauluGM1fSLkgEXdRpum/24/cRy8sy4ezBLztmDfQEIlnczbo9tj4pf/ IFDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=uhlG+45Z1TXmKVadCN6iswmZC6VacIisiDrybzxgjEc=; b=H4OqByiwUrgB23WGq7pSHlfZBHtjhPUQa5SEAviEwbpYYTT1gwhMJcjsDCtvNNAlYo zWEpq7KCP1KAkfO2TLL2A7Lnolp4YKVKItEtop8hWUfH1QpeeByIbd5OaSTr08zUcTY9 gYuIekI/HIjW2yIZ4h40lk1kZz22Td+j4WyrEkcUeFhJmwy1DHuNUkfDr552vq/joyOb eiWRGeVzpN4hCveKs1AuUomNdSiFWUJ+f32lPe4x8HXOj1gtJdgW+UwLitVEKie0/uHf LfVVJvyHSfmqXc5tR2A4cNTlos3VVhbaPq4W3d02BjsCV9PB0UnoI9/dwQBUutqQXmAH VuaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BX3RavgC; 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 q13-v6si8533270pll.72.2018.06.06.02.52.09; Wed, 06 Jun 2018 02:52:23 -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=BX3RavgC; 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 S932576AbeFFJuw (ORCPT + 99 others); Wed, 6 Jun 2018 05:50:52 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35174 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932371AbeFFJut (ORCPT ); Wed, 6 Jun 2018 05:50:49 -0400 Received: by mail-wm0-f68.google.com with SMTP id j15-v6so10783374wme.0; Wed, 06 Jun 2018 02:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uhlG+45Z1TXmKVadCN6iswmZC6VacIisiDrybzxgjEc=; b=BX3RavgCaYK47N/XIJTKDJ4ULxO9AXghx3BRSo/onyROpPc3NoIQsDAJ+wwJRq+2tT PNlKHlr1zxljNiEWm3B3Mx/vTa6HdyQDAvWDWQNX5wUn1ASrXDcvhjvqW/SqlnImJ32H jp0XEvLeWKnip2dD6fDDgAOEaMR5AcBe3vHamXi+3HKB1cXBAlVaYyg0OtIveJL+65v5 P33kFnZ0ZUoZ50HLeDf3YzL3NftsYc8hDK30WXLQUFeCzA5r92IKD2Rp2CFEAUSFsCyP sOHVxubEwQEDYNPnjcNzIjJm+epbbgEOpRzZCIgjr/ZUqKIQkiABFC9Ui0GroVv9tTiC bpIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uhlG+45Z1TXmKVadCN6iswmZC6VacIisiDrybzxgjEc=; b=pMzWHYBw8cQHm7y1qpTQT7B3PC//Mtm5JFbDlws0yDiKIdpgmTDLfDD1TcyRAMp2Aq 9II3lu8BaE5nuuunqgtiH0RcIlqFOWPHMU9IckxirnOeyYW2TK5MLZf4Bo75XDjrgDMl l91Qt7PiLhq+UtLh+5SxtpPAg2v2+FvWbFxBG7edBo4Epnafyu9ZOGV87g1+UXAMXGBc cl0OmKZEuXqZPVP/wz5Nwm0XEOT6yTugnlH1LtCibdJaUrK5xbHP+GksBk97z7FKCvpW N14KtcVnRr5Qm+aycV/FMGNdZZwEhIyIKF4298SZxlQgH3w9nc67YJYCAoH3AmX1S7f1 GXYw== X-Gm-Message-State: APt69E2BFC+zTP5Q/jSbckQT9I103RthwNxdIwR74lRA1TWNaPOxHmIT P8JFjGOKtRAKpWq4w1Ghlcubgy/F X-Received: by 2002:a1c:e846:: with SMTP id f67-v6mr1218000wmh.63.1528278647685; Wed, 06 Jun 2018 02:50:47 -0700 (PDT) Received: from [192.168.1.4] (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id e13-v6sm38748261wrm.45.2018.06.06.02.50.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jun 2018 02:50:47 -0700 (PDT) Subject: Re: [PATCH v3 08/10] mfd: da9063: Register RTC only on DA9063L To: Lee Jones Cc: linux-kernel@vger.kernel.org, Marek Vasut , Geert Uytterhoeven , Mark Brown , Steve Twiss , Wolfram Sang , linux-renesas-soc@vger.kernel.org References: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> <20180602101155.26375-8-marek.vasut+renesas@gmail.com> <20180605075321.GM21163@dell> <20180606061623.GT21163@dell> From: Marek Vasut Message-ID: <69893894-899f-54cd-2610-96653ec246c0@gmail.com> Date: Wed, 6 Jun 2018 11:17:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180606061623.GT21163@dell> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/06/2018 08:16 AM, Lee Jones wrote: > On Tue, 05 Jun 2018, Marek Vasut wrote: [...] >>>> -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(). Sure, while if the macro is used, this problem is avoided altogether. > Due to the current obfuscation, I currently have no idea > what this device's name is. I'm sure ctags or git grep can easily help. > This technique is not allowed for new > drivers - unfortunately I didn't not review this driver in the first > instance. Why not ? This looks like a step back to me. > 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!) :) You'd end up with two entries which look different then the rest, which triggers my OCD. > [...] > >>>> +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. Or the da9063_irq_init() could use devm_regmap_add_irq_chip(). -- Best regards, Marek Vasut