Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1492853ybb; Thu, 2 Apr 2020 01:42:21 -0700 (PDT) X-Google-Smtp-Source: APiQypI0qsjo8em41UJ2XoZFq4fOkuPYnT8YU0DMGFf/sF+UkIS8YXchrqWvu+NRS5j+gOngpHyl X-Received: by 2002:aca:f541:: with SMTP id t62mr1443171oih.172.1585816941020; Thu, 02 Apr 2020 01:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585816941; cv=none; d=google.com; s=arc-20160816; b=LzemKvgVYGhqfEWHDHyaMkhciQdMqJqiYnQHY8bl/pz1plDwdyx/ION4gzPPJPC1HU zK8IKH9Gc/N7cR5kvdd3TKuCpJ3XwOASuFr2ywSqwQiaHFEobVdy+Zv1Fb0VVEhqZ6aO xZ1s6exrCKhPolnb0t1XQWqulpSOYqNuCIfd6UxxmwhqgIY9pPtQOVe/Ffflq6VHcB0B ZONmid0DCvWQ3IHqB3bPwMj6muwlhD5gqmbWEY8feh8/aRsYSmxZJai4lVwG4J+h/JxX +5pBf1GgBY/1YlY9k/q4wm2mB3QXG6nVHEuociAVj9OP7RmTBU/pZ8wWaZhxMrFYd8cx F69w== 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; bh=D75s0tKiFCoozrGdUCppfbqAkRjFN8me+wl5qpaFrKw=; b=fXFLLB7SdSG+QPELL70GaSlDdGR9W2ETWAUxBEOvJ8C71nZjWHOht+dGuFg2zq52Dk oCq5ktPcUI8cFo6YvhTvyIxctO5QUhVVcPe7GVnDVgIYC7H4NzL2gBV7anRu40KePaqc QIAsZX0vB6jixFphhYc9cn+wiZjH5t9PT7llAZ6nSMZLAp4dDPTRVp1Zkxx+UcpCg5yk 4teWc7WIpuXhoy7VQrKz+LuyNSP+Ah//yHBJFFxVeb0e+u5qhtLvEyz6kiDYjw0f3Dj0 wysWKDfJPNYbJ6EDcKUk62/z5ngeu6RrPaoLved+BQLErDUv0Mt7mqP/jMwEMOxb3L20 yiHA== 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 g206si1883559oib.17.2020.04.02.01.42.09; Thu, 02 Apr 2020 01:42:21 -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 S2387595AbgDBIlT (ORCPT + 99 others); Thu, 2 Apr 2020 04:41:19 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:36719 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726841AbgDBIlS (ORCPT ); Thu, 2 Apr 2020 04:41:18 -0400 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJvPZ-0007o3-Mw; Thu, 02 Apr 2020 10:41:17 +0200 Received: from mfe by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1jJvPZ-0000We-By; Thu, 02 Apr 2020 10:41:17 +0200 From: Marco Felsch To: broonie@kernel.org Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH] regmap: add reg_sequence helpers Date: Thu, 2 Apr 2020 10:41:11 +0200 Message-Id: <20200402084111.30123-1-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add helper to make it easier to define a reg_sequence array. Signed-off-by: Marco Felsch --- include/linux/regmap.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/regmap.h b/include/linux/regmap.h index f0a092a1a96d..050a5aba4056 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -71,6 +71,13 @@ struct reg_sequence { unsigned int delay_us; }; +#define REG_SEQ(_reg, _def, _delay_us) { \ + .reg = _reg, \ + .def = _def, \ + .delay_us = _delay_us, \ + } +#define REG_SEQ0(_reg, _def) REG_SEQ(_reg, _def, 0) + #define regmap_update_bits(map, reg, mask, val) \ regmap_update_bits_base(map, reg, mask, val, NULL, false, false) #define regmap_update_bits_async(map, reg, mask, val)\ -- 2.20.1