Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2852258ybp; Sat, 5 Oct 2019 22:42:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyM8lRVQ7EUX2D/6MgSZ699rAYLZvtlwfxJbBJZZOLg2vHZGtabhYp2gDJM9n7NC3EBmICu X-Received: by 2002:a17:906:ccd6:: with SMTP id ot22mr19133375ejb.1.1570340546599; Sat, 05 Oct 2019 22:42:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570340546; cv=none; d=google.com; s=arc-20160816; b=vk1IRU1mju7Nlt1JUasvDSyFL5LcXyNJ/HcyBKBdCu1nzS8KBv4zkXzY8e3Uc0pi+1 jfH40QTrH8xCDCmtTh1CnY2qA/b9p2NucQTIcLKmyXclAIy+7hg83ZbtJeiv2J1AkL62 BuG2hTb51QgA9NQgCnKdnAnbqVAAgdN+sWxUhCFvP2jj8GEDU/f/2yYzsmRQWbXp1Shw fuwJhlejIKbJ+QFvIUOpVUyCOrmKy92RFduoz0gOPl2CM34oFP0ulPc0rjrvFh/LX2yj 1vkwlnVldrEJ1MZEF3ML6gLizmhlvfgWRp40PrMlWW2/7rg5D4yWyv1muLmYn9/bxUel /f0Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=LcPb8R4mzeyCFbyB8HVo6zxzR/OzyD4BCF8RxB8PTUc=; b=VZSMdZ3A+fjqS7PSe3Ib0WpSNuWdJL3XuB1n7QMAyT/e9LW+QTsruKYJzvNCRMDp71 yq2HTnHLwgiv1BFhAI2Hd6iGriElpfPoQBGlqVRGJDJUl2lyjOWDFJPAmTHK+T9urora ktZLOsnktX3civQdjfkACsuUcN/H8OpYxXKP379YO1l2IGfH17rxH2ifboRCO/3aMGvt UD6HwNvn1A7PPMlaCNA7Ma1rqQha4ea0HEnutiFB7tp7ppMgRplxbMBFn0Tadb6os8Vf j0DZQxS9ir4+OqXtQfbdWE1jml3zTjpHAvL86MR4ictN7kzVdFgj5lD6esl/5v6m9LvX sUXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=recCisAm; 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 qu18si5279788ejb.80.2019.10.05.22.42.03; Sat, 05 Oct 2019 22:42:26 -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=recCisAm; 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 S1726186AbfJFFjj (ORCPT + 99 others); Sun, 6 Oct 2019 01:39:39 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:36193 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbfJFFjj (ORCPT ); Sun, 6 Oct 2019 01:39:39 -0400 Received: by mail-pl1-f194.google.com with SMTP id j11so5183051plk.3 for ; Sat, 05 Oct 2019 22:39:37 -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:mime-version :content-transfer-encoding; bh=LcPb8R4mzeyCFbyB8HVo6zxzR/OzyD4BCF8RxB8PTUc=; b=recCisAmlG4FwXEq2FKmxxK6z2K26czEItMlGJF6hmLLePSFQ7RhgBmQgEWrkqZWv6 qqb9L4JNSBAboWNaFd4KCr67stX8SztnXJYQnVSh0sN8xg22DlklEnu7gvHCwjtKNbrw MatFpo5c94b7nTUEof/QrsVWo7LZlJTwVRCpwr0YMlScHRqC5G5R8QWuMdS8eImIEsFu lh0ez8MBBa1aoSRCSgUubk9BAm+cSFS3IfWgNFDK4qGF6Zz5e/a1xC6Vb3gSCJm0Qh1L JAZ0/hqjuUIzWRvPo6IR2GuBGe2TLmkqjMeoBq2g0oySBiZDgqGyHXXPhRqcuJC/+DgY z9kQ== 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:mime-version :content-transfer-encoding; bh=LcPb8R4mzeyCFbyB8HVo6zxzR/OzyD4BCF8RxB8PTUc=; b=H+xib95b1QLs9nZB+hOkEfcLPy9U8JOXyogjPo1v7qLkC63+yWd5OVsSlvQgaDi17K XWODZKNShjSmfk54ciXXmgZfrHqJL3cB3D3KdMUKAg/dqTd7RHBLmlLOe4MkSNS2iiLJ vnyAhna7U8xtF1e4KwokItOw5AIOhaVI/IZGtRzL+QiXB+L8g+J26tFecSiGUMrJt9tZ IT2Ay+mz2Em3GGVLYMh2lAkFd2Z2esW/9aI/yzLdI0Ex7RNB0E4lepreAA1TiOn/H1l5 Em6XzgDPTPMHRBz5hAf60LASzE1sC6t5i9SK2dFKPXx11FYrKFtAFCBGi79Z2y17t5jh flew== X-Gm-Message-State: APjAAAVz6iyV3/jaLd30QOEoLQVXSDwBIk+1O/IpsojFxkxIPd1n9VtN HiZXX+nx/rL34APg8lXdplBh3A== X-Received: by 2002:a17:902:7b82:: with SMTP id w2mr22918229pll.118.1570340376785; Sat, 05 Oct 2019 22:39:36 -0700 (PDT) Received: from debian-brgl.local (50-255-47-209-static.hfc.comcastbusiness.net. [50.255.47.209]) by smtp.gmail.com with ESMTPSA id q30sm10019320pja.18.2019.10.05.22.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2019 22:39:36 -0700 (PDT) From: Bartosz Golaszewski To: Jonathan Corbet , Greg Kroah-Hartman , "Rafael J . Wysocki" , Arnd Bergmann , Linus Walleij Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 0/8] drivers: add new variants of devm_platform_ioremap_resource() Date: Sun, 6 Oct 2019 07:39:08 +0200 Message-Id: <20191006053916.8849-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski The new devm_platform_ioremap_resource() helper has now been widely adopted and used in many drivers. Users of the write-combined ioremap() variants could benefit from the same code shrinkage. This series provides a write-combined version of devm_platform_ioremap_resource() and uses it in a relevant driver with the assumption that - just like was the case previously - a coccinelle script will be developed to ease the transition for others. There are also users of platform_get_resource_byname() who call devm_ioremap_resource() next, so provide another variant that they can use together with two examples. v1 -> v2: - dropped everything related to nocache ioremap as this is going away v2 -> v3: - don't call platform_get_resource() as an argument of devm_ioremap_resource(), it actually decreases readability - add devm_platform_ioremap_resource_byname() as another variant Bartosz Golaszewski (8): Documentation: devres: add missing entry for devm_platform_ioremap_resource() lib: devres: prepare devm_ioremap_resource() for more variants lib: devres: provide devm_ioremap_resource_wc() drivers: platform: provide devm_platform_ioremap_resource_wc() misc: sram: use devm_platform_ioremap_resource_wc() drivers: provide devm_platform_ioremap_resource_byname() gpio: mvebu: use devm_platform_ioremap_resource_byname() gpio: tegra186: use devm_platform_ioremap_resource_byname() .../driver-api/driver-model/devres.rst | 4 ++ drivers/base/platform.c | 39 +++++++++++- drivers/gpio/gpio-mvebu.c | 19 +++--- drivers/gpio/gpio-tegra186.c | 4 +- drivers/misc/sram.c | 28 +++------ include/linux/device.h | 2 + include/linux/platform_device.h | 6 ++ lib/devres.c | 62 +++++++++++++------ 8 files changed, 108 insertions(+), 56 deletions(-) -- 2.23.0