From patchwork Wed Sep 5 09:57:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10588679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A143213BB for ; Wed, 5 Sep 2018 09:58:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 739F3298AE for ; Wed, 5 Sep 2018 09:58:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 675CE298D8; Wed, 5 Sep 2018 09:58:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 683D5298AE for ; Wed, 5 Sep 2018 09:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=NlYqvjnUbJqblkB9h1uOL/ESMlB4l33Jo4odcS8aq7M=; b=mBA W5ctuVJEnYOU9NosvRdpFQSoOY34R5uG28uOBuxzXStWKW6WIvylaOxK0WSzU4v+0fPboAdxlrdd5 GCD2DbrIdU78YZ2m4m9e3Vrl782662HPceIhccMlp2LZ2Xb3YE6UDvH5et8YOpzZRHcn4iMq8bfr+ /Mpd12AxpFoM/DNWylF+TTcI4/HAFgr5fc8wSFT16IIrFpKnimNJs9PKfoljxZIkFLrAS1az6Pzh8 CqKTn/RJoygaaKTuJ+mdiEWDXsYPBd9UFRHvfa/ZCqNWMSypfMDCvtV6ToN4fS93jcp+TlD8azZ/m R5mZNKylkH8EnngrZnSOSmjlT3ox5Ig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxUZo-0003Wz-HR; Wed, 05 Sep 2018 09:58:20 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxUZk-0003Sn-3W for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2018 09:58:18 +0000 Received: by mail-wr1-x442.google.com with SMTP id v90-v6so7003371wrc.0 for ; Wed, 05 Sep 2018 02:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=1esYnT12DAU+a8ymd1+Yc6yh/+Mab4WiQa0qKqtIV+E=; b=qnjbugl7MMvhDYPxF/sEelqKaDMuic9dfK2P7ViI+r/OiUsOiXNKwI9rZbg1/tjsxL KB7EGR+5673Ci4tIjuWn2Ssr5BuATBmsFAv8pyZsiOGVhMiSoOxC9SmPiqQoH2DaAhic RAjeP0REzCufar081Hvo3oCWlOdo01IEVn2vwz/F/lpv/hOsNeTpIT6HXJAKxmZD9xIV wTqoqPXirfRxOR8XZ3L+G99ulIWHSuusdgcrqTWZcT06XfvqIdtocYVl/GPXtfL3IqUd I+t9dsh45rkSz7laEWBYIHW2vDJVV+oOt1GzZby/376yMRenhSfPp83gbd33myARh/TS ycpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1esYnT12DAU+a8ymd1+Yc6yh/+Mab4WiQa0qKqtIV+E=; b=WJFz/Yv9UzHpRbSjNQfJtWqi41+/R6KUjnI6SUCIklMlcdkfc2A9u5RrlwHSqFTf// 0OZvqxU1hahj3mUJhDaBYFbHPiA3A6IUHtAqJ0B+LPc+RXIjYkiRmCtLPkLcCyVNbh53 aJUIn0P2gj6Z+8I1NAfOTE7MmhvyNHIZosiHxY0CJvb5l77wh+e3hTUJt9/6+jZRjAbg PdjPuPG8jzbqk8VDNNqtHTxM95qp2DtVzgD92oFdc2NW7odiLm9AbwkWynkPp+Vzz4Ap i8d/wBJ4LrL7TgOEEnpbFK41wSxiTZqr4YT9gYZ3WywysroP+GBL3kkxotWpzMv7S7ke RzrQ== X-Gm-Message-State: APzg51AbWi3n2xkjXNKDv7g+yLTB28iJXmfWEBDMqzmMFpgZp25lY7Oi zGXbUD/I4bcyktVVr+KCmgXv7Q== X-Google-Smtp-Source: ANB0VdY7UKco99LyHRW27v7yYGThDDKfHNjeOSYUkhZKH2E38bIODrHKcE2jQ6P1sfR54fAwhS6aGA== X-Received: by 2002:a5d:434c:: with SMTP id u12-v6mr26052105wrr.189.1536141483834; Wed, 05 Sep 2018 02:58:03 -0700 (PDT) Received: from brgl-bgdev.baylibre.local (AStLambert-681-1-33-235.w90-86.abo.wanadoo.fr. [90.86.152.235]) by smtp.gmail.com with ESMTPSA id l12-v6sm2127815wrv.29.2018.09.05.02.58.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 02:58:03 -0700 (PDT) From: Bartosz Golaszewski To: Srinivas Kandagatla , Joachim Eastwood , "David S . Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Andrew Morton , Arnd Bergmann , Jonathan Corbet , Sekhar Nori , Kevin Hilman , David Lechner , Boris Brezillon , Andrew Lunn , Alban Bedel , Maxime Ripard Subject: [PATCH 00/13] nvmem: rework of the subsystem for non-DT users Date: Wed, 5 Sep 2018 11:57:25 +0200 Message-Id: <20180905095738.26406-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180905_025816_202769_2C9FC3B6 X-CRM114-Status: GOOD ( 13.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski This series contains nvmem framework changes prerequisite for further development of my previous series[1] that aims at removal of the platform data struct from at24 EEPROM driver. First we remove unused APIs and the global cell list. We then switch to using kref instead of manual user counting. Next we simplify the provider unregistration by removing the return value from nvmem_unregister(). Next three patches improve the framework by adding a notifier chain for future use and fixing the issue with nvmem device names. Finally we add support for cell definitions, cell lookups and make DT systems resolve the nvmem cells during provider's registration. Last patch just uses the SPDX license identifiers. Tested both DT and non-DT use cases. [1] https://lkml.org/lkml/2018/8/10/149 Bartosz Golaszewski (13): nvmem: remove unused APIs nvmem: remove the global cell list nvmem: use kref nvmem: lpc18xx_eeprom: use devm_nvmem_register() nvmem: change the signature of nvmem_unregister() nvmem: provide nvmem_dev_name() nvmem: remove the name field from struct nvmem_device nvmem: add a notifier chain nvmem: add support for cell info nvmem: resolve cells from DT at registration time nvmem: add support for cell lookups from machine code Documentation: nvmem: document cell tables and lookup entries nvmem: use SPDX license identifiers Documentation/nvmem/nvmem.txt | 30 ++ MAINTAINERS | 1 + drivers/nvmem/core.c | 650 ++++++++++++++++++--------------- drivers/nvmem/lpc18xx_eeprom.c | 6 +- include/linux/nvmem-consumer.h | 50 ++- include/linux/nvmem-machine.h | 56 +++ include/linux/nvmem-provider.h | 22 +- 7 files changed, 465 insertions(+), 350 deletions(-) create mode 100644 include/linux/nvmem-machine.h