From patchwork Tue Feb 9 14:27:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 61534 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2076334lbl; Tue, 9 Feb 2016 06:29:30 -0800 (PST) X-Received: by 10.66.218.225 with SMTP id pj1mr49437906pac.40.1455028169835; Tue, 09 Feb 2016 06:29:29 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id aa6si40543364pad.148.2016.02.09.06.29.28; Tue, 09 Feb 2016 06:29:29 -0800 (PST) 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; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932159AbcBIO31 (ORCPT + 30 others); Tue, 9 Feb 2016 09:29:27 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:37909 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755956AbcBIO3K (ORCPT ); Tue, 9 Feb 2016 09:29:10 -0500 Received: by mail-wm0-f42.google.com with SMTP id p63so25509418wmp.1 for ; Tue, 09 Feb 2016 06:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=AUtQjsvWFnqY0dTA5HRIs8KGm6KM97j9hClGiRHYdTk=; b=Zh8G5V3sd42AFQ5u+yY/TLmtMbpRGqo4Wgxqd19GcY6rYLVf2beFRJxwKN8Lcuqy/Q A9NbJrHvOCdXhh3uIXYGVEW43bCmqTMNqKIlzebn6PrAONy0ybgB0V0dJXs7wTpaWR4P Ev9/eNPoIMJHy4uKKMT0kySmRdWAcOuWQoNAk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AUtQjsvWFnqY0dTA5HRIs8KGm6KM97j9hClGiRHYdTk=; b=XN3YVKvPA8exrH1IrQkeHzi66cfaRcCB3tqHcjLDaWMxK8LypkB6NUJha989K4ql46 3h9R+1Fk7lO96y48kqgBaYVEFprSdAYLb+YX/SPgXMU/ay6NCrzD1reyZ4SXy8HhQjsg +e+2NQNTzrFCTcyVaxQcPzi4SlIMUanzjt+cZHjmJEtxUVoCoAGOIxqTfpkhmd8pVsU8 dW3PHRWWoAXMaAgKLJaWWtt3+gqPAPfFmNK6KqEno8ZLmlNUDnlC6xTk3PfSErgRYHVn vdlgE5v0C4b3U0yiwmDT42K+uf2UBOshKXcYVV4z5HsNishd5o3ZJZAqZS5q/CO5vkpf bOcg== X-Gm-Message-State: AG10YOSeJlCmC8ALZtdy7Lu+nru9niE5vi/JF1b9KBC+SEhCo0rr+NfV/58Ql1Ad9EpyDWWw X-Received: by 10.194.118.164 with SMTP id kn4mr40260701wjb.130.1455028149660; Tue, 09 Feb 2016 06:29:09 -0800 (PST) Received: from localhost.localdomain (host81-129-170-149.range81-129.btcentralplus.com. [81.129.170.149]) by smtp.gmail.com with ESMTPSA id l2sm34987533wjf.15.2016.02.09.06.29.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Feb 2016 06:29:09 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: ldewangan@nvidia.com Subject: [PATCH] mfd: Provide MACRO to declare commonly defined MFD cell attributes Date: Tue, 9 Feb 2016 14:27:07 +0000 Message-Id: <1455028027-1527-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cc: Laxman Dewangan Signed-off-by: Lee Jones --- include/linux/mfd/core.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) -- 1.9.1 diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 27dac3f..dacdc49 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h @@ -16,6 +16,38 @@ #include +#define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match) \ + { \ + .name = (_name), \ + .num_resources = ARRAY_SIZE((_res)), \ + .resources = (_res), \ + .platform_data = (_pdata), \ + .pdata_size = ARRAY_SIZE((_pdata)), \ + .of_compatible = (_compat), \ + .acpi_match = (_match), \ + .id = _id, \ + } + +#define OF_MFD_CELL(_name, _res, _pdata, _id, _compat) \ + { \ + MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, NULL) \ + } + +#define ACPI_MFD_CELL(_name, _res, _pdata, _id, _match) \ + { \ + MFD_CELL_ALL(_name, _res, _pdata, _id, NULL, _match) \ + } + +#define MFD_CELL_BASIC(_name, _res, _pdata, _id) \ + { \ + MFD_CELL_ALL(_name, _res, _pdata, _id, NULL, NULL) \ + } + +#define MFD_CELL_NAME(_name) \ + { \ + MFD_CELL_ALL(_name, NULL, NULL, 0, NULL, NULL) \ + } + struct irq_domain; /* Matches ACPI PNP id, either _HID or _CID, or ACPI _ADR */