From patchwork Wed Oct 21 15:52:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 7458011 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F1387BF90C for ; Wed, 21 Oct 2015 15:54:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA02D208E4 for ; Wed, 21 Oct 2015 15:54:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCE2A208DF for ; Wed, 21 Oct 2015 15:54:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752365AbbJUPxH (ORCPT ); Wed, 21 Oct 2015 11:53:07 -0400 Received: from mail-bn1bon0056.outbound.protection.outlook.com ([157.56.111.56]:10624 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753535AbbJUPxE (ORCPT ); Wed, 21 Oct 2015 11:53:04 -0400 Received: from CY1PR12CA0012.namprd12.prod.outlook.com (10.160.137.22) by BLUPR12MB0707.namprd12.prod.outlook.com (10.163.218.145) with Microsoft SMTP Server (TLS) id 15.1.300.14; Wed, 21 Oct 2015 15:53:01 +0000 Received: from BY2NAM03FT015.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::207) by CY1PR12CA0012.outlook.office365.com (2a01:111:e400:4c1f::22) with Microsoft SMTP Server (TLS) id 15.1.306.13 via Frontend Transport; Wed, 21 Oct 2015 15:53:01 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp02.amd.com (165.204.84.222) by BY2NAM03FT015.mail.protection.outlook.com (10.152.84.212) with Microsoft SMTP Server id 15.1.306.8 via Frontend Transport; Wed, 21 Oct 2015 15:52:59 +0000 X-WSS-ID: 0NWKUS7-08-09Z-02 X-M-MSG: Received: from satlvexedge02.amd.com (satlvexedge02.amd.com [10.177.96.29]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp02.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2A576BD8903; Wed, 21 Oct 2015 11:52:54 -0400 (EDT) Received: from SATLEXDAG04.amd.com (10.181.40.9) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 21 Oct 2015 10:53:06 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by satlexdag04.amd.com (10.181.40.9) with Microsoft SMTP Server id 14.3.266.1; Wed, 21 Oct 2015 11:52:56 -0400 From: Suravee Suthikulpanit To: , , , , CC: , , , , , , , , Suravee Suthikulpanit Subject: [PATCH V4 2/8] device property: Introducing enum dev_dma_attr Date: Wed, 21 Oct 2015 08:52:05 -0700 Message-ID: <1445442731-28819-3-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1445442731-28819-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1445442731-28819-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.222; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(199003)(189002)(5003600100002)(5003940100001)(97736004)(105586002)(76176999)(2950100001)(11100500001)(101416001)(92566002)(36756003)(48376002)(50466002)(5001770100001)(189998001)(5007970100001)(87936001)(77096005)(2201001)(64706001)(229853001)(46102003)(50226001)(106466001)(19580395003)(86362001)(47776003)(50986999)(5008740100001)(53416004)(19580405001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR12MB0707; H:atltwp02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0707; 2:l3GXTPUxAiv9XZL3L3rwaLfopYkLdPqBA+dlnB5MxWC9ywpE7PvNfx4Fl4DOWp9UDdPy/jScZs831YUecYQeKW5OTfS0H760fyB463xOLsi5J7jkFm213YpLYGuySJiBE4RdC8U4gqsCS0ov0FCvSMAHVLEI+hVkW4rOmb/FZMQ=; 3:r2ScdO64FE0DcHkSQBDG/aHEhq/HIC1g4aB35a3d7HWyAtpR2zGrio1sM5Gtn8SMgBRqd0jDtj6MrwN0XaA8v8Zdawt/vYH8BxvS0H1bCWealN6nWZ+E3BRuCu/zBrIsqhgJad1K3FNHyUeEWn9EesgeIwQTbWUVzCT64VYr3f37+IeAh/dblPAZiMLuPYdz24SbgLTyuTI/MIDEb9+f+U/cScJ6Lz47m+5XuuadrrTPNqa6/LsTBMmpSaohlFxe; 25:jKVhWm8xJZpZFdLNf/7aRsy1rQqDXMfN5NuuzTdRGz432bXsrM7vRPJMexin0smW4e4RyuBFnDTZ2wZNbqSxcKO++FHHQ0nUHT3YsT5sUQxE58BDAjquKvRBadzdbnIsQc5/wYtCCcMSuM5qm8uQxtGRhYHuwFi1fDvvAHrmW/r5M2I06dmsN13m+gElzqyRCVZIEgaucVNldIfPgX6jpVM6bW3v5q9Dw774blkVof7jTiJJKmT+fa3TssQKprAC7AReCm8ijMZCGlQThlGmaA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR12MB0707; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0707; 20:E/7c5GAMxVugkxmZsastAAlXEuD+f+tExZjtPcJUbltqvmrJwTXpWEq7ifJK/nYr7XKvInMRkukYmnkvS2wF9Ci9p5mKjf/ssJiYW3rFT8WDQ2qJxQV2Tk4MDcMZPE4utrZjUbp4iHQUJDQpkegBKryT5IhLgj7ux4DU25KRlyyS39rjoG/YJSSIVCUQydG5t5RuQetD+Zk/w1927JaI/djADjOJgrDEOEyb7nG9wtiVPzUkdJFGP4qa6p7YPyJ6UzKzZ882Q18EhtiIJVzpUFwqFlCtiJAp+bPtmQ2spq78VGC5XPNPOyAqyOeg8esT2FlKTE83+ZQegsfaHmhRmkk+BclzrIhvKYstGkW7XUkAiMndLozlFnWs/QQNtowobcm9yc74iUS5lIzpoHCVnorare2LE0/HcJDw2ZAlt+uPjk4ERD1iD/2BTugWmWQyLSmtcCCBreIUZi/kRvwyS1jyZ2o9Mf+r//Vgur7AGfGOAEa1VmbBvzPBm7S9dSEh; 4:c1chhPbOBBfcc42tDSlEBGmNzyj69DKnGhkvAS7S4OCw1tlZWbEsHA1NPm50l1Hw7eTHZP7T3X09ZnWhwrdtdKMNHyH9ZyAeP+HNVJIY/zwo2jjqYdUcK/AwAgSyXQjrnM+mO+CphDYBmiaUQkRatXUFIWKMLLbuMzGauuc/q5H4jvMUisTbDjZ4x4bxZbQrPNQONIswp2FyB9U2BbW+PS6hwLfjvQcb77nHJeFsd25zSu1LmCMA3oVT9sxcaKh39Bf5sxtmhtCsTxwD9A8pLhSl9zSISILKJXYwNQIDK8ZAKT8HLX9bGdlM5rIKNF2v6Ajmk5tsccSbsbctyn6LrGJWgATsVe0PEpvuW7u8/b/LRVI7r0vkFB5GsuO2QeGy X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(102115026); SRVR:BLUPR12MB0707; BCL:0; PCL:0; RULEID:; SRVR:BLUPR12MB0707; X-Forefront-PRVS: 073631BD3D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR12MB0707; 23:fy57Hfp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i3+e?= =?us-ascii?Q?El98FOOvUNkEc/LqnomZU3dSPMGA4KgsgDWmtgUzoqAniH5I4pQI0NVAgG2q?= =?us-ascii?Q?HxS1UQXOe0dvSrIMA5F6pkVbtlZa3zwXzSnKmg8r55IWpaMKG2UpLGlZeI2w?= =?us-ascii?Q?/k=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0707; 5:kpUTLjT8DsjRvZuFPZjjg/mwbZwcLcY4ylR/3HJlDiOmM+PTSSumaVBTkoLscRVdxtQf0Za6CoU/ARxEmKxfJViqNBAGOtcsN4Ff+/S+dVnYsJ3zU3ae5N+BnMIZz8RjqMTTrlCOMi8JnPDk0BSi8A==; 24:cugJ4ZNpppadcxDHp+fUdXvZwoOakC4HTlwWUUSqTKTXX5BuDUqZwbZvCTM7gWvLCTjTeKmDDDjkeNEWHPlV0BMHLjuPzxWe3rsA/I9aIrM=; 20:j07b3+Jeu77mo+0P4Jj/olQiSvK4+FQSpA5W0LMN9RDf2PAGskYZEGlR5zUVXJpCKiHV70KKBGOk60NVbhNP/rDiQpU6OFAfv9/knLquoHqj1KTNThIxMuy5SNSW8QZatTBO8JDiyR0X28Vs+dblbU4yvwTf9gE+qgaGk0Ovdyj8yeIMoi01Ps2R1X4FC1yTwMcB0KAAjFAHTAT4Tyz4AzRO5Unvf60CZdix8ZW/2FIhussoFSKnkn1Pvn56M1wg SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2015 15:52:59.7624 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.222]; Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0707 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A device could have one of the following DMA attributes: * DMA not supported * DMA non-coherent * DMA coherent So, this patch introduces enum dev_dma_attribute. This will be used by new APIs introduced in later patches. Signed-off-by: Suravee Suthikulpanit CC: Rafael J. Wysocki CC: Bjorn Helgaas --- include/linux/property.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/property.h b/include/linux/property.h index a59c6ee..522c1bf 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -27,6 +27,12 @@ enum dev_prop_type { DEV_PROP_MAX, }; +enum dev_dma_attr { + DEV_DMA_NOT_SUPPORTED, + DEV_DMA_NON_COHERENT, + DEV_DMA_COHERENT, +}; + bool device_property_present(struct device *dev, const char *propname); int device_property_read_u8_array(struct device *dev, const char *propname, u8 *val, size_t nval);