Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1819076imm; Fri, 7 Sep 2018 06:41:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbRymKwfxAoQxkfz7EJYkbsUfQ7S14oo1fvxy0W+H6iwwZVmB+8ucjH8qe2FEbD3N4oXUvg X-Received: by 2002:a65:46cd:: with SMTP id n13-v6mr6997192pgr.22.1536327718135; Fri, 07 Sep 2018 06:41:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536327718; cv=none; d=google.com; s=arc-20160816; b=ulHd8waAG2YbrLuKfR3AddjhvOO1LO1hnm+TYn61NhmMXYiVDCGc/A41Km3MT6vVX+ sp929tYYBIJTyycMGiwdL9DOXAsADCD6yU5SviifqOLT3JOaaY2YtlJ0dTF3WV0o5YOp l+zbyxVlMIc2dppwx1oL4OIk6ON1Mcy7DLu9nZk5hKqggBy70QvQ9s8Cpkk7xqU3o+eW kTaHSCC6R/JDIAProkxjeSESCqp4kMaiBe6qZfrWNA5zOTM2OCv9q4oF3X60wAqflQkl P40tM5cyl/RMFfWiGe9LeRKwSBs212UXY281amqDCtZ7UJhX0CWXHBUkQWD0ftsNJqH/ cg1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=NIjhAzMS9ZUuLCp0EBL3tEJKEyuNDcoVnz4Jw1POrk4=; b=mGlepM6WzzjFxj0uAtAAaK4imVlQyd9j28xuLMr4tdRW+VBJiuwBM5FQkILiSoFlNh bLcG+rFJuGFaMYYMuL3n4q5cgMIVWy6MRzF1hmCvAD/GnK5a/uA8ulsiprfyYhlyfFfm 0A0TLkNDwSOfnIS2Ap0f0kF20wHl5lrSscotKMJ0iyVMKTJ9kcTJ4s9eeRSXmjsah8kw BmQpZ+pVG2TCqv8wid+hwrW5nomcXfJe5t3ZWUzkHtFlw4B3g4tcG/TAug4wFV5D9Voh tgQE0IkBqSrsEHKtYYxCk1hH8+gOSq2h0A/8eneDIYMXrTVEovkIybpKCwfgA8U7fszG WmWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=u9dos1iG; 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 p15-v6si8288371pgh.281.2018.09.07.06.41.26; Fri, 07 Sep 2018 06:41:58 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=u9dos1iG; 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 S1728355AbeIGOse (ORCPT + 99 others); Fri, 7 Sep 2018 10:48:34 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:34741 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbeIGOse (ORCPT ); Fri, 7 Sep 2018 10:48:34 -0400 Received: by mail-wm0-f42.google.com with SMTP id j25-v6so18756747wmc.1 for ; Fri, 07 Sep 2018 03:08:19 -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=NIjhAzMS9ZUuLCp0EBL3tEJKEyuNDcoVnz4Jw1POrk4=; b=u9dos1iG4oQODsxjzZPK7pq/jAwux0Eyhw4CUt7lxU7NItdN1eUWupFewUk8/UMJ74 kkivBSLQjpQk4LELW4QVNT0xdsNC0gEHVwTcxPlkR3e1UTu61XjK49RsjI3Sbr/GerIL RZodkaflPI7kGeVGoGRc/ma8tDk7Wz8PghrswOp3FNAb/Zxa3rmKzrywBdnrXt5I5LZ5 4NT5LZkoclONxOFM1bLaHqkW8DbvBeqOgFJyZXqWloU0APpyi2Esi66B9KavAmkWcA3s aHtnQ/v94eNKbOa+KlehHzJm861VRalJIXRunhCGzAK1BEc/zmPvbJsjy+8aAkcnZuyO bNsQ== 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=NIjhAzMS9ZUuLCp0EBL3tEJKEyuNDcoVnz4Jw1POrk4=; b=RSk35O2Ys54Hr7pdix/7McTCeT3OLvMCOWC41grXP2kknMwheCh19q0tQcrAIuyrxo WpPGUNopnKHnOFyAiLAXu6gcjZFz4hJrzvmyWrswcyx3IKrVpxSPcOG6KRHsIkUaj/3b gknupg7Kgjs+dIpzGeayL5VC4GgLj660hAcz4Y1ZlFqOPoyD//qfTEVci8Yg9Nd8Cfcj amy+7o4Idz9+gfVa9H8XHcJjD/mrpDP9VceBi7onCUWLoyG5bbwLP9z8eVmflRczqjT4 xayfMxVVxdkApxARoPNLUUicLxO1Aoj/RwWYv/vbIS2ELB87tLyN4nMlWGOYc7WuQa8P irdg== X-Gm-Message-State: APzg51CEDjJ74eKMN45D6Nmd++l13OfpgQ1N1raSPKuOYXFYB7eihPOc sWouVB1tjhVe50whyGkug6xtQA== X-Received: by 2002:a1c:2ed4:: with SMTP id u203-v6mr4639771wmu.19.1536314898633; Fri, 07 Sep 2018 03:08:18 -0700 (PDT) Received: from brgl-bgdev.baylibre.local (AStLambert-681-1-83-232.w90-86.abo.wanadoo.fr. [90.86.25.232]) by smtp.gmail.com with ESMTPSA id 72-v6sm6631619wrb.48.2018.09.07.03.08.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 03:08:17 -0700 (PDT) From: Bartosz Golaszewski To: Srinivas Kandagatla , "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 , Chen-Yu Tsai Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v2 00/16] nvmem: rework of the subsystem for non-DT users Date: Fri, 7 Sep 2018 12:07:34 +0200 Message-Id: <20180907100750.14564-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 patches just use the SPDX license identifiers and make the naming convention for some arguments more consistent. Tested both DT and non-DT use cases. [1] https://lkml.org/lkml/2018/8/10/149 v1 -> v2: - extended the lookup structure with a proper con_id independent from the cell name defined in the cell definition table - added a patch that makes the naming convention for the cell name argument in the nvmem_cell_get() family of functions consistent - there were two users of nvmem_unregister() that still checked the return value, now switched to devm_nvmem_register() - fixed build failures reported by kbuild test robot Bartosz Golaszewski (16): nvmem: remove unused APIs nvmem: remove the global cell list nvmem: use kref nvmem: lpc18xx_eeprom: use devm_nvmem_register() nvmem: sunxi_sid: use devm_nvmem_register() nvmem: mxs-ocotp: 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 nvmem: make the naming of arguments in nvmem_cell_get() consistent Documentation/nvmem/nvmem.txt | 31 ++ MAINTAINERS | 1 + drivers/nvmem/core.c | 676 ++++++++++++++++++--------------- drivers/nvmem/lpc18xx_eeprom.c | 6 +- drivers/nvmem/mxs-ocotp.c | 4 +- drivers/nvmem/sunxi_sid.c | 20 +- include/linux/nvmem-consumer.h | 62 ++- include/linux/nvmem-machine.h | 57 +++ include/linux/nvmem-provider.h | 27 +- 9 files changed, 493 insertions(+), 391 deletions(-) create mode 100644 include/linux/nvmem-machine.h -- 2.18.0