Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4155866ybg; Mon, 21 Oct 2019 04:46:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhiHsMRXBow2EUVgj9fp+ZrAqsissGbVvrTw23gYd3k9w1FRWWpDIH+KLnL9Kzlv3ddIPA X-Received: by 2002:a17:906:184e:: with SMTP id w14mr21587272eje.10.1571658412481; Mon, 21 Oct 2019 04:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571658412; cv=none; d=google.com; s=arc-20160816; b=TdWviNZ5igH0nMjmAa2+hrn7qzCJ8dX+ZBb64s10hcXSnKvw0VjS78fYgDZ3XcP+RN o8QLDflAbd7ER/H3d0JH6aOjYqs21QlfYIZLIBx1tFtv47Ygd9ntlJgZMCiGUnSvyMtS FWAi8HbIRKdOrfS4NvNVTbCTcKlU4vFLP/oROcC5eonyWA+XgRz4gIICtIgjCZ/U7aUv xHc0Tags7EgYvKND/K4lrwMr2+HiLgD1St6GqcUgBd3ymkd951oHSSd4jK8vEa7Mw4l8 9eRBZNQy8mpsbeMx+/dSc8+NhD32WKQw+LSKxrbu9AgDyUcB1R5xXTE1hXZHr/3nOtES i2Ng== 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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=vHWzQvu0z2KvkfPPALro1kMvHn7B6s7k3fnsYvDKkkE=; b=0tB3gF6nxMOKLum4IEEc+356pgRF2WUeA43Uwx6LkD2FBvFiXn+GBqjAmsmaSwG3TE z2OqiU7XbqEu5lR7SKLC9Kg1bhM8rZOCqKXAy5r1jjM8Es/scL5qqlZfpSZrOdXgzAHN zMLRgpg8oICpq07zmiZzyOdSmaqXbyhxa+HYWvvzkJtUYIs0Q5TSPrKxdmrNlHxz8L0M k51m+Ws/uWlm4ZrTcsO+0zrLNRxHG/A94R4VxD72HMX81g/fD3KZWLrN09BJKhvdQK9v itrFg28OSEjgxBLLwC3vWt3xO6AJfHOmQN7G1ReZEsOaF3EaRntxtCvgP8hMv266AAJX jdSA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r9si8386380eju.10.2019.10.21.04.46.29; Mon, 21 Oct 2019 04:46:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728570AbfJULom (ORCPT + 99 others); Mon, 21 Oct 2019 07:44:42 -0400 Received: from shell.v3.sk ([90.176.6.54]:32918 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728510AbfJULok (ORCPT ); Mon, 21 Oct 2019 07:44:40 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id D288C508B6; Mon, 21 Oct 2019 13:44:34 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 0BsA60h9gCPB; Mon, 21 Oct 2019 13:44:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id D974C508B7; Mon, 21 Oct 2019 13:44:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LzrHZ0-7O3AT; Mon, 21 Oct 2019 13:44:25 +0200 (CEST) Received: from belphegor (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 83982508B6; Mon, 21 Oct 2019 13:44:25 +0200 (CEST) Message-ID: Subject: Re: [PATCH v2 0/9] Simplify MFD Core From: Lubomir Rintel To: Arnd Bergmann , Lee Jones Cc: Daniel Thompson , Mark Brown , Linus Walleij , Barry Song , stephan@gerhold.net, "linux-kernel@vger.kernel.org" , Linux ARM , Daniel Drake , James Cameron Date: Mon, 21 Oct 2019 13:44:24 +0200 In-Reply-To: References: <20191021105822.20271-1-lee.jones@linaro.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.1 (3.34.1-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-10-21 at 13:29 +0200, Arnd Bergmann wrote: > On Mon, Oct 21, 2019 at 12:58 PM Lee Jones wrote: > > MFD currently has one over-complicated user. CS5535 uses a mixture of > > cell cloning, reference counting and subsystem-level call-backs to > > achieve its goal of requesting an IO memory region only once across 3 > > consumers. The same can be achieved by handling the region centrally > > during the parent device's .probe() sequence. Releasing can be handed > > in a similar way during .remove(). > > > > While we're here, take the opportunity to provide some clean-ups and > > error checking to issues noticed along the way. > > > > This also paves the way for clean cell disabling via Device Tree being > > discussed at [0] > > > > [0] https://lkml.org/lkml/2019/10/18/612. > > As the CS5535 is primarily used on the OLPC XO1, it would be > good to have someone test the series on such a machine. > > I've added a few people to Cc that may be able to help test it, or > know someone who can. > > For the actual patches, see > https://lore.kernel.org/lkml/20191021105822.20271-1-lee.jones@linaro.org/T/#t Thanks for the pointer. I'd by happy to test this. Which tree do the patches apply to? Or, better, is there a tree with the patches applied that I could use? Thanks Lubo > > Arnd > > > Lee Jones (9): > > mfd: cs5535-mfd: Use PLATFORM_DEVID_* defines and tidy error message > > mfd: cs5535-mfd: Remove mfd_cell->id hack > > mfd: cs5535-mfd: Request shared IO regions centrally > > mfd: cs5535-mfd: Register clients using their own dedicated MFD cell > > entries > > mfd: mfd-core: Remove mfd_clone_cell() > > x86: olpc: Remove invocation of MFD's .enable()/.disable() call-backs > > mfd: mfd-core: Protect against NULL call-back function pointer > > mfd: mfd-core: Remove usage counting for .{en,dis}able() call-backs > > mfd: mfd-core: Move pdev->mfd_cell creation back into mfd_add_device() > > > > arch/x86/platform/olpc/olpc-xo1-pm.c | 6 -- > > drivers/mfd/cs5535-mfd.c | 124 +++++++++++++-------------- > > drivers/mfd/mfd-core.c | 113 ++++-------------------- > > include/linux/mfd/core.h | 20 ----- > > 4 files changed, 79 insertions(+), 184 deletions(-) > > > > -- > > 2.17.1 > > > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel