Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2270003imm; Mon, 16 Jul 2018 05:21:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcVv5WAwbbDM9IiMLOSsVXvG5wf8ZKDH0d/zWFDEVQFbol+DA4Gd4UPY3oiRtgJQrtmyGGV X-Received: by 2002:a65:6211:: with SMTP id d17-v6mr15663070pgv.450.1531743671569; Mon, 16 Jul 2018 05:21:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531743671; cv=none; d=google.com; s=arc-20160816; b=sT/xQUks39OAPilJ6hZ34Hu45Ru5gK4eMjDrElqDt0JMcjOtdtNUaWoIWA62ATlFh+ aNlJu+AYysNGGbNjI4Svj5ZrUqH3uizx+whN/47m7V7czGjojFy65s4/ktfcRe4rVfkU OvMZ+u8UnOj4SpQjsPcKLBsSY2ktsDI+YBv4+QbpXNhwgLiNDDKb/6PZz4XAfc5KaJvU xNnuUgzOR75BZJXuUA8GOuHrX+9HYaky4r8AFTJUshnPuAtmEef+HqrgTK7jyHl8XYAN qpM4AGjaDx8XGzhGR/3Rc3E4aRangT1p18Cunw4wS2qf4pIcashECDu3jylsUwagg3xI mg4w== 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=T/12huL75C8/ffmcGlYd7MBgq8LuvYKvjxW8yRl8lDU=; b=iFvsGmIZQaqKW+CaQMS0arNvm8pv9HvVBSm6RUXINrjvGVlWt5zLfRZotvWlfB3vwu EN76D3DRBiS8vYc8mOjsINhSYDlYD2BRAGmB5z8asmzvpUZLPuMsfcVJTICCwKJN4UHn gT018bkrQAVul/JaJYCOLFD3gt0Ak3iS5S79uGIYPr3rfL6V9hJuFI2J9WcgvcVM+0JD GCggetM/MElT5/WKTHdIK72NbwEkVmpnoFW/8gbw0PA6OdEAzAAY2AFo3b6Ryfi7ViOM RWtpgP9JSzrtkQ3GrBVVKLdOwZB2xnqvIXzyjkJ8W2PVeAgO02tqooGmP7iwqPZJpM1r nyBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YibVELlP; 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 b8-v6si31364752plb.125.2018.07.16.05.20.56; Mon, 16 Jul 2018 05:21:11 -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=YibVELlP; 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 S1730763AbeGPMr2 (ORCPT + 99 others); Mon, 16 Jul 2018 08:47:28 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37723 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729865AbeGPMr1 (ORCPT ); Mon, 16 Jul 2018 08:47:27 -0400 Received: by mail-wr1-f68.google.com with SMTP id q10-v6so31679548wrd.4 for ; Mon, 16 Jul 2018 05:20:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=T/12huL75C8/ffmcGlYd7MBgq8LuvYKvjxW8yRl8lDU=; b=YibVELlP+gZJtA8oLj15xrdlylrmNYiuV/Qc+Rx0RpR49HbXTJJ444hqdnnYRKLdT7 AggL40VBAGJSlYW47BkFko1nNCpBPMBbGbQOZz8T1eiPcDse21knGSeAtOOqQZ29c1O7 QsJ4SKLQ3oTXRcDE3tV/FHi1AHSFIkw0yz66E= 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=T/12huL75C8/ffmcGlYd7MBgq8LuvYKvjxW8yRl8lDU=; b=XvPcFBdH/P0aDAXDyPBYkof2/IeItCGz67q7lFovFS2r7pnizyXdMY9Y5+7J/xOScz IbBA7C4PnFebP6gpNLVabFmZ6px1Ym1IhJ1a66slY1E0U9VLAiaKCtzz2QWcGifDkxfr 4nmZUthyTrAXfNJYwxNMRLhji1WP0o/9h2LlsBJslxHupXuqSaRtD7tM0BhLmJ54vkII dfEOJIVsQHAaO+XgszCg940sZDbStEUtSssenL/reDZtk+ISyDVpNugcrnjEMFVG+thZ l6b9/aVRsS8m0FvI7UHNfb9EiCQt/eC6Y3QzxQiZloPqSXdBvDMVS7qVqsDMvV5DSK5R 7rXA== X-Gm-Message-State: AOUpUlHJDMrljTigtF5pS11VS3hHq/egAgFhUlVWn5sNi3ZlfWVsxdcd rfc3BD8LQMy0A/1fJzK8/oVX7A== X-Received: by 2002:adf:f585:: with SMTP id f5-v6mr8083830wro.59.1531743615494; Mon, 16 Jul 2018 05:20:15 -0700 (PDT) Received: from [192.168.0.18] (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.googlemail.com with ESMTPSA id 79-v6sm10833372wmf.5.2018.07.16.05.20.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jul 2018 05:20:14 -0700 (PDT) Subject: Re: [PATCH v4 01/18] nvmem: add support for cell lookups To: Bartosz Golaszewski , Sekhar Nori , Kevin Hilman , Russell King , Grygorii Strashko , "David S . Miller" , Lukas Wunner , Rob Herring , Florian Fainelli , Dan Carpenter , Ivan Khoronzhuk , David Lechner , Greg Kroah-Hartman , Andrew Lunn , Jonathan Corbet Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski References: <20180629094039.7543-1-brgl@bgdev.pl> <20180629094039.7543-2-brgl@bgdev.pl> From: Srinivas Kandagatla Message-ID: Date: Mon, 16 Jul 2018 13:20:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20180629094039.7543-2-brgl@bgdev.pl> Content-Type: text/plain; charset=utf-8; format=flowed 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 29/06/18 10:40, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > We can currently only register nvmem cells from device tree or by > manually calling nvmem_add_cells(). The latter options however forces > users to make sure that the nvmem provider with which the cells are > associated is registered before the call. > > This patch proposes a new solution inspired by other frameworks that > offer resource lookups (GPIO, PWM etc.). It adds functions that allow > machine code to register nvmem lookup which are later lazily used to > add corresponding nvmem cells and remove them if no longer needed. > > Signed-off-by: Bartosz Golaszewski Acked-by: Srinivas Kandagatla