From patchwork Sun Mar 10 13:58:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 10846303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85D3913B5 for ; Sun, 10 Mar 2019 13:59:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D46528E2A for ; Sun, 10 Mar 2019 13:59:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DF6828FD3; Sun, 10 Mar 2019 13:59:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A8E2E28E6B for ; Sun, 10 Mar 2019 13:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s5m9ebf1vKOzkJJpuXB94L+EHcoCvhnjUS0NmbyUFCE=; b=MWwK1j8An9gyt7 /n9CUNslbkf/hiz6rqloxhtUDnkgM+fz/MNxj2U3YmdFRl/3fxAXUrC0D/hD2pgzyzvhNTEhfWrsv +ugnf1C7MywnyksXGnXoc0P931pGuS+oalmBiKZUh/EEZjUGFc6wkR1gMhzlStAdUmzifiCq386dX d+DIm4LsBAHtGniD7+ixnHmHxaEzybo3z26Nyq4Zwk8gcOOWpWaTVKJOGBVDkbpS0Yszx9MboNr8G z2Yr24lme5Q9cmJU9UZLq+CrxHTYlpLiB93dFxdn/SO1IzTO+TO9ZiJxhcf0uW/5f/RcqjhUapjyl GDVyQK3SpFMU1ls28XpQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yzC-0002sl-7V; Sun, 10 Mar 2019 13:59:30 +0000 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193] helo=mx0a-0014ca01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yz7-0002qQ-D9 for linux-i3c@lists.infradead.org; Sun, 10 Mar 2019 13:59:28 +0000 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2ADsEGa025126; Sun, 10 Mar 2019 06:59:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=q+lAww5Wu2cvgrhOMhIAFeVf4KtpMpEM5aR9jBF8frE=; b=tRJX3YWs/hL4CwLcZSQPR7lhGb363UdJ3JngO2apMOptanwvlb7JagRM9SEoFZts/3Gp xZfiLciBLc9MZEECzPMcgMJrEzelRQMKsI1g2MhiFUH5sWQetALniZiIbbQiw1i1Zhuv MLve/7A4lgpmR1MCQdmPQFLSd3bxJyq7C7Om0XZUvuz9UzkK2Ooy60vW/Jm8YNA7PUfJ xWtZost5/oPlN5l0fhxAOK9c+TW+1OpC6+SSTm9pkJFF9++Mq4tqMWSAx5IMab7CmLQU VgO0TXA1+HsQmYKmyavjENxCgQSYiYs6YCslslqgeqA1qW4LuGOm+tfbjCYMQFgMQibu 2A== Authentication-Results: cadence.com; spf=pass smtp.mailfrom=pgaj@cadence.com Received: from nam05-co1-obe.outbound.protection.outlook.com (mail-co1nam05lp2054.outbound.protection.outlook.com [104.47.48.54]) by mx0b-0014ca01.pphosted.com with ESMTP id 2r49y1cqy2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 10 Mar 2019 06:59:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q+lAww5Wu2cvgrhOMhIAFeVf4KtpMpEM5aR9jBF8frE=; b=j75r2JVjVIEJhpHaUJHFetkHkSfG2Ua4puxHqNj+TsCLVcmLHBI0QsAdWeOaR7wIzdl058k6WOfiRNDhorIixTNQfL7sW2uiz+mKlJ5fmwreVdzNiqXeY6BRk9v1RBBL0r46sh1fmdyrbdMDrKzauWi/Ryd56890ol+jg22dOpE= Received: from SN4PR0701CA0006.namprd07.prod.outlook.com (10.161.192.144) by MN2PR07MB5920.namprd07.prod.outlook.com (20.179.81.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Sun, 10 Mar 2019 13:59:13 +0000 Received: from BY2NAM05FT011.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::209) by SN4PR0701CA0006.outlook.office365.com (2603:10b6:803:28::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1686.18 via Frontend Transport; Sun, 10 Mar 2019 13:59:13 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 158.140.1.28 as permitted sender) Received: from sjmaillnx1.cadence.com (158.140.1.28) by BY2NAM05FT011.mail.protection.outlook.com (10.152.100.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.11 via Frontend Transport; Sun, 10 Mar 2019 13:59:13 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADx9X0013509 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Sun, 10 Mar 2019 06:59:11 -0700 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 10 Mar 2019 14:59:08 +0100 Received: from lvlogina.cadence.com (10.165.176.102) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sun, 10 Mar 2019 14:59:08 +0100 Received: from lvlogina.cadence.com (localhost.localdomain [127.0.0.1]) by lvlogina.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADx7C8022495; Sun, 10 Mar 2019 13:59:07 GMT Received: (from pgaj@localhost) by lvlogina.cadence.com (8.14.4/8.14.4/Submit) id x2ADx7xp022493; Sun, 10 Mar 2019 13:59:07 GMT From: Przemyslaw Gaj To: Subject: [PATCH v4 1/6] i3c: add addr and lvr to i2c_dev_desc structure Date: Sun, 10 Mar 2019 13:58:38 +0000 Message-ID: <20190310135843.21154-2-pgaj@cadence.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20190310135843.21154-1-pgaj@cadence.com> References: <20190310135843.21154-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(136003)(396003)(39860400002)(376002)(2980300002)(36092001)(189003)(199004)(50466002)(42186006)(8676002)(107886003)(51416003)(26005)(86362001)(305945005)(6916009)(54906003)(16586007)(356004)(316002)(106466001)(246002)(105596002)(186003)(2351001)(4326008)(76176011)(47776003)(8936002)(50226002)(126002)(476003)(486006)(2616005)(426003)(5024004)(7636002)(87636003)(6666004)(446003)(48376002)(11346002)(478600001)(26826003)(336012)(2906002)(5660300002)(1076003)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR07MB5920; H:sjmaillnx1.cadence.com; FPR:; SPF:SoftFail; LANG:en; PTR:corp.cadence.com; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0f7aced5-9d6b-4606-f660-08d6a56093a4 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060); SRVR:MN2PR07MB5920; X-MS-TrafficTypeDiagnostic: MN2PR07MB5920: X-Microsoft-Exchange-Diagnostics: 1; MN2PR07MB5920; 20:Wj52bhIOLvuO4ZQfIvGIf7UZLzlzc1yBifRca8+7p3Htoru3t3f9ShM43z7CbWvbsQCGVMD/P0WmEoT6anGTahNIXZyoeMUbJaBl41pVq71nUqa/MdoyCEim8ekONPzsuMP6rJTSjER6+lD5zSg7y5WvwN0fIY2dnjlagQ6iB/KugslVhVAuXbEXaEeDOZyN25q0vAntZQgyhJZ5Au+aTVV6s1yy5LXSPH2IfisPenxqmeHVhYH/4CK0rAM0Vys+5B6VAzarRZmU1YUU6cM7njva9jP3xBmqlzuZvUgtqMlVvyRQxxmebpVFoozAfBcQku2VF4R6PHkfooIznxQlL59cS3S2jF4k7i6Fcm103gRvjv3yxhVsIv9RpSY3LX73wBDARXKtmseaBAlqanzYbSaL4lQaPwxfGSJJgifJb3rtrYnnJdtDadC1CWbN/1ipI3nM4fhylf6yXBRWu7w7GV6aOQIL5+yui/iBL9xOgEuySlXckXRolc/k5QOkgrL3 X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0972DEC1D9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MN2PR07MB5920; 23:a0eiC+NC4tfbBjIVL5SOVuBSLoYpYEGkAN9BuwA6J?= EAwIylcFoNfO+w69zmHW+18ZKi7DAR18tvMJx1JOyMhjCgV692AhuETQQQweNMHW+Ig+qoC+UNZdW/n5XcQzv6LrG2U9kvXS5UwPOiO/+Gzw+Wloh34jFMRIbW8oay1wVxf15E3DPM0aXuaKrVxDQqYgq+IZNZHXteOOIBof6AFLCW8MZ4GjTe6tSFfz3zFAYyjeBbk65YbLi3qc8PIIEUwgi2pqOCdcwYp04ekkl/0g1CJNgrEgKb1kPq6HUq1uHpt6tDKiuVBE+QFK16fatpXqxybks5OtlPQKjmyQnuF4Qfbh+YujHs4QOZ4RbFclxmGR6zx/GP8CTU3FiRdvArytQa2YgCdB3Nd7r84CVI3srJaAgG4BdMm0flPYxlkAVxlkCo1pljFWdzMx1c7Qj2BZecX6G53PEfPhNRnrXZNQKHm2B0V4SlTGoFtEkpCM5zkmnz6qMlDxiyZO6q5o6qY4MHf2ZXX0U07d2OBofNGLBGwpego5apG/oyjgq/xzbUa9Xsy7C0/G23MzC/t3gmst7n4tmKAPptB+rYl4xGLNCekBOh9hZw8PHVkeswB2GqW+QlvkkNddP6Q+BplnbpWYRr/7qypNWQgnD2l1EvyfMGpJTHJme9CvnclD8+IPcPt+gXR1EFSs2ISFXWccn2advxwjxwAgpu4QvJrzuHgvMTHh4fp6KNj8XOVCEE3U6bP1yWP8CEjWYpFM+GRaAtMAZzBssKAZW5Ae5Mx+1XYzWUafLKlNYvhMzp2dhVTT3QnRzuK0q4JPLnhC0wAnli4htfgIr50YpTE9/YyGonzsK5J8kczitMb1YCFJkk997830UPuZ9SHL9AgilHFfzaIr2AliXC5H9C/IwiccxRQWr2Kn3KROUQyjWgUwcMyi+nBxWgpFsB18LPcsEA/JROLswHYWBHCM5NAIAh2giBOtfuNwXXBFOmyYk2XtJfSwJ0XPJ1Fr/CHUK74BO8S+lZ8fAc1hSvdn7xRnDG5Fxs3gBMlcOXIpaQLyZrN8NdOtj3TnKMyAOcZgDPeFUVO9/hD2L0frlxCv3gubANDMBXbilf07sTNLiirZzmLUV/FUJA= X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: wq9tSCKz+UZA2RvBiC8++fHBuTxQZo46AKH75fSVksgnaVBUQ39tbc9W2lwdvItD2dduGTbUw0phXrfqd20Lo+7dUpnX2CDXGHjBrFsw2n4q2zIjewU1loPc4w4jnxcbL+p3FfP116zrT4d1doj6KDKwi5t6t5UsfEN12uwBLrxdOdU7bRkvJU+VwoFKFay1b4UvodHm68ufSGso0WsaRvSESlGEcvQ6xWNEUmIx0byOQ+cHQox4IqamSyBTeLUJUZbWVTEzFXeEpTGqHOSzscdJ5G4s+Wp9MDvpp43Kajsqbr/EJCFIZu2jqrGWSrvWLZMuegfQMeOH49ugR+B+uQvGpX1gIAGSUh9XwiZmi48UNXaRLHdYS0sZK1PMOuq6g0WD84N42YAK8YIAcpruL9b4jcaOO0ewvAsjUEQETlw= X-Microsoft-Exchange-Diagnostics: 1; MN2PR07MB5920; 20:RpbrmGRAPOjF6NaCuo93I+uunDoFzJVQDRU6Lrer3rH94qz+M1t/Y9erCi/5mbdy819llsL61RuJf0qxq41Nyzjg4WQZBYmHOsvGwfPUbWcU1RSG1ZDrx8/qHd0mmbZ3KBHoRlH0YQy4MpI64dupfwb0cz6F8TF5WJeenQ+DSMY+2FBlvnV6/VJuvxBl80pBMaJehg7+8sk3RLPpcgZHGiGfvpUcSJEmH5GCKV+WJLfyaOJZtMKL8VS4EfYUOw7j X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2019 13:59:13.1388 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0f7aced5-9d6b-4606-f660-08d6a56093a4 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.28]; Helo=[sjmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR07MB5920 X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:_spf.salesforce.com include:mktomail.com include:spf-0014ca01.pphosted.com include:spf.protection.outlook.com include:auth.msgapp.com include:spf.mandrillapp.com ~all X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-10_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=915 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903100109 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190310_065925_698890_A64DB026 X-CRM114-Status: GOOD ( 10.49 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, agolec@cadence.com, Przemyslaw Gaj , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP I need to store address and lvr value for I2C devices without static definition in DT. This allows secondary master to transmit DEFSLVS command properly. Signed-off-by: Przemyslaw Gaj --- include/linux/i3c/master.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h index eca8337..3c27d9f 100644 --- a/include/linux/i3c/master.h +++ b/include/linux/i3c/master.h @@ -71,6 +71,9 @@ struct i2c_dev_boardinfo { * @common: common part of the I2C device descriptor * @boardinfo: pointer to the boardinfo attached to this I2C device * @dev: I2C device object registered to the I2C framework + * @addr: I2C device address + * @lvr: LVR (Legacy Virtual Register) needed by the I3C core to know about + * the I2C device limitations * * Each I2C device connected on the bus will have an i2c_dev_desc. * This object is created by the core and later attached to the controller @@ -84,6 +87,8 @@ struct i2c_dev_desc { struct i3c_i2c_dev_desc common; const struct i2c_dev_boardinfo *boardinfo; struct i2c_client *dev; + u16 addr; + u8 lvr; }; /** From patchwork Sun Mar 10 13:58:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 10846301 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 646D8922 for ; Sun, 10 Mar 2019 13:59:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D6EE28F2F for ; Sun, 10 Mar 2019 13:59:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 411B828E2A; Sun, 10 Mar 2019 13:59:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9224F28E2A for ; Sun, 10 Mar 2019 13:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=caQL9ynuAbsuuvfUVmwXvvOem3hTlFH0f5H1bgSp4eM=; b=UYQntx+C6BcQEW z3iiGBzkTnbQFT8ssU0EEFvr4klTV/jNOrOToExscQRKHfLPm9XGdwRT+wa6veil5ia3BcD1n8UBe h7Rt/Y5D4yo9yAISZeZdTkHIrw3fBAxVcaJCndTHLjOFYR8djFlI/uitUOJQZUtnfayOEJGGCZiQv sBrku45wp/7nzSpFpLbeTlXuOcAtiCPuQvXRWBK5Skfvk91fJ+tST1RQXJYUksX5yKGMUfuquoBMB pCOR4zWWzTRqoAlcPTAcygmbLjgUEdbUNYoP/oAF/RnZ4pReJk5vQ/xQ5ITkv3t73fatw9xxHTBbs qVbcTF5bi5ld0eHxuDCw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yzC-0002sg-38; Sun, 10 Mar 2019 13:59:30 +0000 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193] helo=mx0a-0014ca01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yz7-0002qV-Je for linux-i3c@lists.infradead.org; Sun, 10 Mar 2019 13:59:28 +0000 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2ADspKP025223; Sun, 10 Mar 2019 06:59:21 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=A8ZIWgE3iB9WhRtsrCjWogOXAYSEPV1LsWhWPHTFcIo=; b=JHE/YDQ5PpR6BHIxYVYRj89/10Wnc1jJ3qPF13iKF+a0r1WPOMJyo5dH3sM4uj0888GT wzahX1oom1iBWecFOfXbkbrJdgV3dxzlGNFqWavTk2DtreM6a1na8KTvtbikKEwgNn8K 3cgxb3kD4vhRZWmxEVPqQG3OHP5ZHvp7G492nCaML8IVoeGDPapoumC+0C6IyjuiNhNg kwB3jBvHYSV7KaZTt5j3b6HTR4wAbmkRB+Z0yTVs+SEELWE/F61vCYKHbqM9UJ4EH/6T YBzdJx511uCglXSaSFR4pQotpfqBn0/qYkjQYRp//+rOT9CN56Yfo3Iks/R/ynkeozME bw== Authentication-Results: cadence.com; spf=pass smtp.mailfrom=pgaj@cadence.com Received: from nam04-sn1-obe.outbound.protection.outlook.com (mail-sn1nam04lp2053.outbound.protection.outlook.com [104.47.44.53]) by mx0b-0014ca01.pphosted.com with ESMTP id 2r49y1cqyf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 10 Mar 2019 06:59:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A8ZIWgE3iB9WhRtsrCjWogOXAYSEPV1LsWhWPHTFcIo=; b=Cwh5ZjGVJKF/+/vYC8e+fOTLy/N0A9ioK9cSKkkKtN9ur1/rZlc1AYeHgNGlqDqP+CQ6rstmIcpL6RZJpbGQlf8mXPmo0Phfvto1bvT7i+O8jzrHPxYi6R+5JSOUr5TZB/j2GaQCL7OY+yub/LFws8FwBvKB1IN02X5HLT0Imxc= Received: from BYAPR07CA0061.namprd07.prod.outlook.com (2603:10b6:a03:60::38) by SN6PR07MB4719.namprd07.prod.outlook.com (2603:10b6:805:3b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.21; Sun, 10 Mar 2019 13:59:19 +0000 Received: from DM3NAM05FT039.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::208) by BYAPR07CA0061.outlook.office365.com (2603:10b6:a03:60::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1686.16 via Frontend Transport; Sun, 10 Mar 2019 13:59:18 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 158.140.1.28 as permitted sender) Received: from sjmaillnx2.cadence.com (158.140.1.28) by DM3NAM05FT039.mail.protection.outlook.com (10.152.98.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.11 via Frontend Transport; Sun, 10 Mar 2019 13:59:18 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx2.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADxEpk032144 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Sun, 10 Mar 2019 06:59:16 -0700 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 10 Mar 2019 14:59:10 +0100 Received: from lvlogina.cadence.com (10.165.176.102) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sun, 10 Mar 2019 14:59:10 +0100 Received: from lvlogina.cadence.com (localhost.localdomain [127.0.0.1]) by lvlogina.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADx9P4022549; Sun, 10 Mar 2019 13:59:09 GMT Received: (from pgaj@localhost) by lvlogina.cadence.com (8.14.4/8.14.4/Submit) id x2ADx9sD022545; Sun, 10 Mar 2019 13:59:09 GMT From: Przemyslaw Gaj To: Subject: [PATCH v4 2/6] i3c: export bus maintenance lock and unlock functions Date: Sun, 10 Mar 2019 13:58:39 +0000 Message-ID: <20190310135843.21154-3-pgaj@cadence.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20190310135843.21154-1-pgaj@cadence.com> References: <20190310135843.21154-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(39860400002)(136003)(2980300002)(189003)(199004)(36092001)(2906002)(246002)(106466001)(6916009)(105596002)(316002)(86362001)(16586007)(42186006)(54906003)(305945005)(107886003)(8936002)(7636002)(336012)(51416003)(76176011)(5660300002)(126002)(26005)(486006)(1076003)(2351001)(186003)(2616005)(87636003)(426003)(11346002)(476003)(14444005)(47776003)(4326008)(50226002)(6666004)(356004)(446003)(26826003)(478600001)(50466002)(48376002)(8676002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4719; H:sjmaillnx2.cadence.com; FPR:; SPF:SoftFail; LANG:en; PTR:corp.cadence.com; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 681264c0-8462-4973-72d2-08d6a56096b5 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060); SRVR:SN6PR07MB4719; X-MS-TrafficTypeDiagnostic: SN6PR07MB4719: X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4719; 20:weqsnM1kLD3PD9GzhpqKrpyXxo31QAEx/jOENFmj9KUkKsHnS2xRO8w+guFc0+nrxS5YC4ZA64w0kOhp1+4CCSm+nLLQwoWQIBufj3t+i43C09tFAg/13nJ651McyZCFh6FgDU3VgSiypy6TtkLK21p9ejV/In+dgV/TBGOvYFYVnrUbChF9DrinuZKm2GHzF9Yx5E6TQoUk81eJwMjQX96UZdpKho3krtYQyEmz3BZW+sKSf+/mG/1MVOTKtaIxl9V5+fmUbHpQCdL9XL4fHyilUwGa+xQGEB+tKfrt+wbgmGPz0TM/5KqGVukOLWPgdZrTMtbdRRbIY1ndi5dsw2tZ2VbmcfU2KtiQw6Nz4x3aQIDmhQ1e0X9T7FKfFf7FokRSXXIB7LSVHhmgUZXx53IJO4ZiqPwYIsw+g/EvjyB4v8fvFMRSzSEL7StLVJPxhqXBAYdAKd7yRfKY/fEtRbrebDiNCf4Ofyglk+yYW2uCipoifCuVIOYK2l2wpSxu X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0972DEC1D9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR07MB4719; 23:u6P1Tj6gJEaE0TmsKjeZtqDIcx3VAxeyj0pFJ4Rn1?= MXLvmIzdZIqtaldVuwJw6Gojv5FzZ71Urtmapl07AeExaJyQgZ9mql2WDTzG8hkeMu6IUZrN41x6Ob3x8sszB6BMflViLGJ3u6KhvWlr+CItG8QROKuRkHrV7gdMyXgtQhY6WVbsj2g21Ko7ATjs4+NgeaRUqIpdPlu2T5dtJrtENgUR2U3pXMM0EV6lrJ4r1zYUyd3vXM7GITlEinYr5NS30n7hqimY+Rfr7DK1gefwB2CDTuOw+nZWZWqGp/xdg+0XIyb3OpNhoAI4Oo6PdoJM1LVcTlVz1jAycw1uvq8IeDArbh3C3wyL7tfXOSdYikeOi1Sf2AqEEnsrhR5YZv8u+wsUJZRxz7BsnQJLJT9PHMQ6jdO5mq1jSM1mfts8T7nqlDPKudWrL/cs0Io9+qhu4wMGHiOF3BaKwloFV/3nrzInGzb3p7gsxqsOVcNxVQxagLT38Vb0/YbS+tqxXFbAHK00Byn5T/ktwuxa7ck6/mMx48uDLzCSzy/JKb/QWer4xx6/C9gVM/eNleTnKywh6EwIfzRFSO+6rjAHN4c5UGbrlaFp2NPHvgsdS6M4lv2lX2WqA4UTOc1hkNuFAk2rNrw6B1SsnY70zji5x6b47ExD/g1xDj2kRm5MB+dM+OLuCMuHug2nD2O1gPCWFuZGeXj6TqtWSuH1lTOeKq5rxO9IkIfQnzHsn3G5pGF3v96IQRZYZYQWSuOEK9T0ifrMq253cQtoHaJRpRqwHyLw7DOjUkflT8XXgGqoQhj1rvPMOOBEdcC8OnZySvNB97ZwhTjGVN+XWnidon8011GXzobHz8eBKOwks3MtjoBxaOWMrAd1Hc4BuvjU/37hENLXbL+srWNXQFnMQ0FkeySVi1G/PuN/LJj9Zpcot2ixLK4QK8kJlVL+eFE9OK8fKltU3CySBHjUJw+ezA8UJn3hxRikWbiOtnfltgFEJkXozdNxEogLhiTkrtMINFDaUgcjX7F4nvesNFJgc7rdZ8bp3DofJQrOiwggMODbzOqVM9cCUh+1459tVrIdbyG6qCBo1hAyAiIMDbTEp9ybahEhs4AmwQOjU9igqjRBqMcUR8= X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: 3qvb3umG9DYVkAS1FrAPn2YM0nuyODZUPvCCOy+1+58skprhhLQhn89QB8xrW1jtADl8nVK2C2utjch/uDu817zeeLSfQqCSVb6V+k+e+8NYP8vFyxXHw6t4rft+aPKGSEggo0Mw+AmvMf0j6YQKqKHfOcWIXrP/NKmvSXbwVoL928wKCnnlkabue9TsBh0UeTVYkm7JusTcD9LXcugGQDzLqzm4UB/lrgKnABQNQjep3d5+Yljswa0nKHeXOqVVz2pnOiAifRl0ua0n+BonQSxEcVvHdpusPKY4Mau3CUC26sy3p1dtwsOX9DUll7/HmEySJxxb6gNo+kNB0DbQrsm66e65bfjr1/YM/AjcxdRIqEn5hX5uQWSIMDEqRlmoi+8y6seWmyf7nSD88N1QS/6tBwHjlTjS8cXcwXPHlbA= X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4719; 20:Iu3jnSo3lrSkOWhWPn5GHvs+QneyIi9HLd31Cyn/d9+9F26RsNkwyjodS5YNmalAtDeWL5GjevJOX2nkAh3mAjWR0uuTZdJdndm70G8f5Qt4nyDMz/XIezBFEMJEAqgwj25N83jMUdHC1cTzdjJ1d+YA5N5Uo4Rb2qGFg3lNjn7DVAakJM7xcwgjCprUSk/3a8bOyjeAsmMz9v1vGPsNYe47+Rtq4lyzWezoDdhfCpWxiR+QKQ0hxpkJFFlM/7kM X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2019 13:59:18.0508 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 681264c0-8462-4973-72d2-08d6a56096b5 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.28]; Helo=[sjmaillnx2.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4719 X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:_spf.salesforce.com include:mktomail.com include:spf-0014ca01.pphosted.com include:spf.protection.outlook.com include:auth.msgapp.com include:spf.mandrillapp.com ~all X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-10_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903100109 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190310_065925_964598_AEB04101 X-CRM114-Status: GOOD ( 11.27 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, agolec@cadence.com, Przemyslaw Gaj , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Secondary master driver has to gather device information using GETPID/GETBCR and GETDCR. Mostly GETPID, DEFSLVS command does not provide device PID. Because devices are registered from master controller driver, it has to lock the bus for maintenance. Signed-off-by: Przemyslaw Gaj --- drivers/i3c/master.c | 6 ++++-- include/linux/i3c/master.h | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 5b3adb3..aea4309 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -38,10 +38,11 @@ static DEFINE_MUTEX(i3c_core_lock); * logic to rely on I3C device information that could be changed behind their * back. */ -static void i3c_bus_maintenance_lock(struct i3c_bus *bus) +void i3c_bus_maintenance_lock(struct i3c_bus *bus) { down_write(&bus->lock); } +EXPORT_SYMBOL_GPL(i3c_bus_maintenance_lock); /** * i3c_bus_maintenance_unlock - Release the bus lock after a maintenance @@ -52,10 +53,11 @@ static void i3c_bus_maintenance_lock(struct i3c_bus *bus) * i3c_bus_maintenance_lock() for more details on what these maintenance * operations are. */ -static void i3c_bus_maintenance_unlock(struct i3c_bus *bus) +void i3c_bus_maintenance_unlock(struct i3c_bus *bus) { up_write(&bus->lock); } +EXPORT_SYMBOL_GPL(i3c_bus_maintenance_unlock); /** * i3c_bus_normaluse_lock - Lock the bus for a normal operation diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h index 3c27d9f..42bb215 100644 --- a/include/linux/i3c/master.h +++ b/include/linux/i3c/master.h @@ -647,4 +647,7 @@ void i3c_master_queue_ibi(struct i3c_dev_desc *dev, struct i3c_ibi_slot *slot); struct i3c_ibi_slot *i3c_master_get_free_ibi_slot(struct i3c_dev_desc *dev); +void i3c_bus_maintenance_lock(struct i3c_bus *bus); +void i3c_bus_maintenance_unlock(struct i3c_bus *bus); + #endif /* I3C_MASTER_H */ From patchwork Sun Mar 10 13:58:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 10846309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82380922 for ; Sun, 10 Mar 2019 13:59:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6884428E39 for ; Sun, 10 Mar 2019 13:59:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BF6528E6B; Sun, 10 Mar 2019 13:59:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D252128F3B for ; Sun, 10 Mar 2019 13:59:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZRF2+cWYodznSK5DYISC/SqBM9K35+lrz/6lwd7ria4=; b=uAp1rWVO1lgBvM Tt90z7vSaq7GK8uzAe701F1IMvT4wskkt+RlYvP/DrMRckukpXtuEjoB1GjLBP4qMc4ywGruM58Ik 3EmvYu332QmtxH/9Oz5P0NdqSaJycdYbVvhgY+A853yRIW8/ddh71O9oSO6PKaHHQ+x4QOeMwazT+ ul+wLZNRT/nADF2oR74ngoShj7RfHc8H4T6DcoBGGVWxSOj7totCnYM7NpyY/Vm8ROh6k9uI/IxzR Xz5Z0xKmjvUY8iyFj2YZDjafxqAGEt05kLCSxyXXiFnTKu2giju/MVFyi7qJHEHRM7qEgWh1l57ZL q69I/YBUpFtxFARXSSxQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yzG-0002tl-GE; Sun, 10 Mar 2019 13:59:34 +0000 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193] helo=mx0a-0014ca01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yz8-0002qZ-2R for linux-i3c@lists.infradead.org; Sun, 10 Mar 2019 13:59:31 +0000 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2ADsjwt025201; Sun, 10 Mar 2019 06:59:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=KZ3wyp5UjD+yomnybNIpqTpFQ00M1Gvatduec60PRGs=; b=PD8F9M73GahKCXd9hwNzMzTPnpqx+dczBkA2ziClmI2+oEx5wiKZ2q7uGE05dCHVap23 ffLw5XUc7pbUPtMhWvgiHUYDKOYuQon/i0RqeJo28Smb4KkSACTy9lK2rRwvV/aoiIJ+ vbdoTIPUINUMq1ABg/rE/b+VNfcBhQN5Vry4JzaIMbvpRxicWkGH9pMWiMZ+5LoyxZ0U vZsdiD+NqrPsX2xyFudBEXyDUbpiEfqDYDm8YzePcTyOP1JOUEvDlFF+Zv14zLkGJMBx 8TK8DRoD+DjKXzEaafcn3pevR5wnyTMCjkOpwHYySgOuJkKAtVypVMGU+Aad3GBmiczb Pg== Authentication-Results: cadence.com; spf=pass smtp.mailfrom=pgaj@cadence.com Received: from nam05-by2-obe.outbound.protection.outlook.com (mail-by2nam05lp2050.outbound.protection.outlook.com [104.47.50.50]) by mx0b-0014ca01.pphosted.com with ESMTP id 2r49y1cqyn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 10 Mar 2019 06:59:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KZ3wyp5UjD+yomnybNIpqTpFQ00M1Gvatduec60PRGs=; b=X5GtbwmatPpR5Y+4fNGSWq1c9Zkx1W7i3GjxtJTIoR96ryxkUUh2gSTAf6K9ExtfdsCAEcvQq0ZTLslxm7VRETtMF4y5ku5JNCgbOnEJz3m0WL/sjOW7c+lXPTA66NphaY8OMIm2o2sNp96RXhes6EpBxxE8P+GShKNV0JujV6w= Received: from DM5PR07CA0080.namprd07.prod.outlook.com (2603:10b6:4:ad::45) by BN7PR07MB4706.namprd07.prod.outlook.com (2603:10b6:406:f1::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.19; Sun, 10 Mar 2019 13:59:19 +0000 Received: from BY2NAM05FT032.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::206) by DM5PR07CA0080.outlook.office365.com (2603:10b6:4:ad::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1686.20 via Frontend Transport; Sun, 10 Mar 2019 13:59:19 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 158.140.1.28 as permitted sender) Received: from sjmaillnx2.cadence.com (158.140.1.28) by BY2NAM05FT032.mail.protection.outlook.com (10.152.100.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.11 via Frontend Transport; Sun, 10 Mar 2019 13:59:18 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx2.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADxEpm032144 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Sun, 10 Mar 2019 06:59:18 -0700 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 10 Mar 2019 14:59:14 +0100 Received: from lvlogina.cadence.com (10.165.176.102) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sun, 10 Mar 2019 14:59:11 +0100 Received: from lvlogina.cadence.com (localhost.localdomain [127.0.0.1]) by lvlogina.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADxBnd022579; Sun, 10 Mar 2019 13:59:11 GMT Received: (from pgaj@localhost) by lvlogina.cadence.com (8.14.4/8.14.4/Submit) id x2ADxB2G022578; Sun, 10 Mar 2019 13:59:11 GMT From: Przemyslaw Gaj To: Subject: [PATCH v4 3/6] i3c: Add support for mastership request to I3C subsystem Date: Sun, 10 Mar 2019 13:58:40 +0000 Message-ID: <20190310135843.21154-4-pgaj@cadence.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20190310135843.21154-1-pgaj@cadence.com> References: <20190310135843.21154-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(39860400002)(136003)(2980300002)(36092001)(189003)(199004)(8676002)(426003)(336012)(2906002)(30864003)(5660300002)(76176011)(51416003)(186003)(26005)(36756003)(54906003)(16586007)(42186006)(316002)(1076003)(478600001)(87636003)(26826003)(356004)(6666004)(246002)(105596002)(48376002)(47776003)(50466002)(7636002)(107886003)(305945005)(8936002)(446003)(86362001)(4326008)(2351001)(486006)(11346002)(14444005)(5024004)(6916009)(2616005)(476003)(106466001)(126002)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN7PR07MB4706; H:sjmaillnx2.cadence.com; FPR:; SPF:SoftFail; LANG:en; PTR:corp.cadence.com; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fc8069f8-ff53-417a-d4df-08d6a5609706 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060); SRVR:BN7PR07MB4706; X-MS-TrafficTypeDiagnostic: BN7PR07MB4706: X-Microsoft-Exchange-Diagnostics: 1; BN7PR07MB4706; 20:gvsxg7ZeFeNT3NRy4t5u2e4DVelYAUXOIjWWKdr1KsgTPSSC5jwWLHQzfCdJsyefmOPN2FRpZ6oiE64So1+lfkvREt5mqIdHaSW/UcSNkJGAg88WFcriDO/n11QGpUya2Lgn89whN8pKmOyLLRe88s+zLYDx6kiH3Zwhv5gAdrhdQMQKc+S+VF8Pcl1ghEJ6/FXOAwU38572wfigbmStsld11XLZV1Tzx9RiId2TVDZPfoFdRdFz0QjPB1M+VV0fAPrPKf3rK4uXIq1dfQUAEKQSIqu+aoyAtzUvterPQmEHbratFIOMCkwn9zjK21suUee7k5Nux1JXmlVIbQTjs91pBSXCSbU5EcE12pPzs+QXd9TXBgUUTDeCqhI6zT0bLFRdSkBSW8iLK0OtZh/Hp0kndklYgjndjhMgQlNom1S3tZdZfIaIZP8CdqECYZbRoWtK5dEzIR8viheS+y3HTuqm2vFcS/ET9QHe5LkKw/xHl6XJSNHPmgDM+9BlcBGk X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0972DEC1D9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN7PR07MB4706; 23:npY71nhYC8CJLqgUFPbFl2inlbggtUDV5QMXVbpq8?= VIfnYPSnAMBbpabpcj87JZr9Dbh7wt617atxOqzQ5HqUj2ksqezQzAxvT2RhrPDKKtFJT6xyXbxeIRQZkbVaoBQvrHj64l8Z0nE2YctvOGckgOEoMMZokJee4MOiTP+34D/s7CbVCu7hrY5Htjb8/5JxyNCq+GwuAohY63+SY5shdelHhBpsE9P5V2HbPT4CMb631GapovSbNz/87MMf21lL8hPghB0qkwAUa5lWKPT+08ySdxRVfUFiD8q005aoWy31BBVM87MeKWG9BCogC7zgF2jyj7Gpk/JqapEy+5c4FVrUbd6Q0EPMUnbp+RruBJ6wihR/EhztPgqmVVargumiAOH0p87HHi8Y0BoQlVoGXJPmVd/dybfDV3fXOSTshJxbx5smeuUCn5X47854XaRYrLpzS1exb07E4yfFcqao4FvRSvpgJ8RlDLvhAqECPkPk3/4c9JiASYCVCfhAuLhkjpzjSrxKobQe6n6lWGrNXqSsGZ3/4lYnDpxTUfyHbHcJL12ZQoIRssZEcXaGOIOAL5ffnmQpKn6fFw4LTsIuUfrVgduJPbbBljuSCQEoH5gWMuAvNKNcP0kPOQiHa5NV9EkfdAB9Rd9joaKTjbH6+GHWjmtVgemQJEKgxil7CEVqr09lWbHJNtvrou5y6PctnOp1CYuIOfHiyHRXErNvQv5dKGmT06KRggmdDXxbw5SlLK5GXrGAcpXd8Naiuahq+GrRJwmMhr1NEst+Zf+HLTUTOmXlFXfX2LLORVaX1VOajZrsRZPALR4q1flnMdXBENypaEUW2OD64N3ZhkuQBWaNky1vOmJG//vZtGQqjXKe60olxK/zjJNWa07l2PpMB61IL2980ln41Rd0y3puBYuotiKVIf8HC8l+hS7BPYZrdVpYDmz+1Q3tOrNHA3EXmf4gHKhaBO3yAbuvyRjWzCkd13PPgMz7T7VAPAFM693Fom5L9AsYWodUAna4/vozXZTWpFXtYbtI401Gol7lWur7ppTblESQNN4PE+GPLiHNnz02IIwgYXmVmwzhAArs2cRq3+CzdFNuA51umcdT9FS20uJYcaPyLQTvGhB3Y7sYANnX4Mt0A0WlUfQo3eX7Qc4hg7fgC8ZneePzX7uzQ== X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: bAYaE1f1UYbtorPQVN9uB3dMoHvrgtbVDBIU3FrQ4HxHn7lmw1VxiBdHGHxdtcNYU6DqcAOiePHDxfbAPqA4ew4FbjZUyE+C5mPKXsgMAP929EB/o2CpLYKR9dGPBGIDrCsmB+Y7fwPXc7jmoDSndPFMusjqrQife7s63pRbrHKIWJUIKNHCQzeIoMTDkuRJGdUx8CF+zfMQtabRkCVU6XXgiHeNyxaOBvpRX9qC2T8v7u3pj9PKaoYjhAm2BBwLZPom11RECaqfEI+bldxKlAc0nXW80mvbV11fFNFSvXMsZ5J13ASbe0o1KmyV6jspbvIeA+qFAu6nFvkaydGND5Nbkoj+fThcMx6fxJtD5xWm8iyXlj07tG0MnvuqvzO3NFmyodLSEdasTdF2otHRsRWglcEfNXmljDkybmspyAw= X-Microsoft-Exchange-Diagnostics: 1; BN7PR07MB4706; 20:pWW+T7wsn0j1i5UOgTzHyiP16+RfhmWbIoPP03XX/9V0Cs/MjrinYJTdO3oHSACQwAdlVduF/3BvmzlPqGvyhd3jAxCunu3IYqLkLwxugKupFwYaRqFxuOo9QgabVFDuPfnufIOxMP4hBot+xq1OYa3iDmHBUwrmUo7xRGgL7xKj3eS5oLLh3TQKsuCLLahv5rbkNKqeco/nR9th0RB1KpY3Uuw9b6OnQnKBDfWfnjbIqM1ongbu3IV8wXOysZSS X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2019 13:59:18.8094 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc8069f8-ff53-417a-d4df-08d6a5609706 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.28]; Helo=[sjmaillnx2.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR07MB4706 X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:_spf.salesforce.com include:mktomail.com include:spf-0014ca01.pphosted.com include:spf.protection.outlook.com include:auth.msgapp.com include:spf.mandrillapp.com ~all X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-10_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903100109 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190310_065926_242152_9EFA5B28 X-CRM114-Status: GOOD ( 17.15 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, agolec@cadence.com, Przemyslaw Gaj , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds support for mastership request to I3C subsystem. Mastership event is enabled globally. Mastership is requested automatically when device driver tries to transfer data using master controller in slave mode. There is still some limitation: - I2C devices are registered on secondary master side if boardinfo entry matching the info transmitted through the DEFSLVS frame. Signed-off-by: Przemyslaw Gaj --- Main changes between v3 and v4: - Add i3c_master_acquire_bus_ownership to acquire the bus - Refactored the code Main changes between v2 and v3: - Add i3c_bus_downgrade_maintenance_lock() for downgrading the bus lock from maintenance to normal use - Add additional fields to i2c_dev_desc for DEFSLVS purpose (addr, lvr) - Add i3c_master_register_new_i2c_devs() function to register I2C devices - Reworked I2C devices registration on secondary master side Changes in v2: - Add mastership disable event hook - Changed name of mastership enable event hook - Add function to test if master owns the bus - Add function to test if master owns the bus - Removed op_mode - Changed parameter of i3c_master_get_accmst_locked, no need to pass full i3c_device_info - Changed name of mastership enable event hook - Add function to test if master owns the bus - Removed op_mode - Changed parameter of i3c_master_get_accmst_locked, no need to pass full i3c_device_info - Removed redundant DEFSLVS command before GETACCMST - Add i3c_master_bus_takeover function. There is a need to lock the bus before adding devices and no matter of the controller devices have to be added after mastership takeover. - Add device registration during initialization on secondary master side. Devices received by DEFSLVS (if occured). If not, device initialization is deffered untill next mastership request. --- drivers/i3c/device.c | 26 +++ drivers/i3c/internals.h | 4 + drivers/i3c/master.c | 417 +++++++++++++++++++++++++++++++++++++-------- include/linux/i3c/master.h | 17 ++ 4 files changed, 391 insertions(+), 73 deletions(-) diff --git a/drivers/i3c/device.c b/drivers/i3c/device.c index 69cc040..b60f637 100644 --- a/drivers/i3c/device.c +++ b/drivers/i3c/device.c @@ -43,7 +43,13 @@ int i3c_device_do_priv_xfers(struct i3c_device *dev, } i3c_bus_normaluse_lock(dev->bus); + ret = i3c_master_acquire_bus_ownership(dev->desc->common.master); + if (ret) + goto err_unlock_bus; + ret = i3c_dev_do_priv_xfers_locked(dev->desc, xfers, nxfers); + +err_unlock_bus: i3c_bus_normaluse_unlock(dev->bus); return ret; @@ -114,11 +120,17 @@ int i3c_device_enable_ibi(struct i3c_device *dev) int ret = -ENOENT; i3c_bus_normaluse_lock(dev->bus); + ret = i3c_master_acquire_bus_ownership(dev->desc->common.master); + if (ret) + goto err_unlock_bus; + if (dev->desc) { mutex_lock(&dev->desc->ibi_lock); ret = i3c_dev_enable_ibi_locked(dev->desc); mutex_unlock(&dev->desc->ibi_lock); } + +err_unlock_bus: i3c_bus_normaluse_unlock(dev->bus); return ret; @@ -145,11 +157,17 @@ int i3c_device_request_ibi(struct i3c_device *dev, return -EINVAL; i3c_bus_normaluse_lock(dev->bus); + ret = i3c_master_acquire_bus_ownership(dev->desc->common.master); + if (ret) + goto err_unlock_bus; + if (dev->desc) { mutex_lock(&dev->desc->ibi_lock); ret = i3c_dev_request_ibi_locked(dev->desc, req); mutex_unlock(&dev->desc->ibi_lock); } + +err_unlock_bus: i3c_bus_normaluse_unlock(dev->bus); return ret; @@ -166,12 +184,20 @@ EXPORT_SYMBOL_GPL(i3c_device_request_ibi); */ void i3c_device_free_ibi(struct i3c_device *dev) { + int ret; + i3c_bus_normaluse_lock(dev->bus); + ret = i3c_master_acquire_bus_ownership(dev->desc->common.master); + if (ret) + goto err_unlock_bus; + if (dev->desc) { mutex_lock(&dev->desc->ibi_lock); i3c_dev_free_ibi_locked(dev->desc); mutex_unlock(&dev->desc->ibi_lock); } + +err_unlock_bus: i3c_bus_normaluse_unlock(dev->bus); } EXPORT_SYMBOL_GPL(i3c_device_free_ibi); diff --git a/drivers/i3c/internals.h b/drivers/i3c/internals.h index 86b7b44..929ca6b 100644 --- a/drivers/i3c/internals.h +++ b/drivers/i3c/internals.h @@ -14,6 +14,10 @@ extern struct bus_type i3c_bus_type; void i3c_bus_normaluse_lock(struct i3c_bus *bus); void i3c_bus_normaluse_unlock(struct i3c_bus *bus); +void i3c_bus_downgrade_maintenance_lock(struct i3c_bus *bus); +int i3c_master_acquire_bus_ownership(struct i3c_master_controller *master); +int i3c_master_request_mastership_locked(struct i3c_master_controller *master); + int i3c_dev_do_priv_xfers_locked(struct i3c_dev_desc *dev, struct i3c_priv_xfer *xfers, diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index aea4309..7a84158 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -93,6 +93,20 @@ void i3c_bus_normaluse_unlock(struct i3c_bus *bus) up_read(&bus->lock); } +/** + * i3c_bus_downgrade_maintenance_lock - Downgrade the bus lock to normal + * operation + * @bus: I3C bus to downgrade the lock on + * + * Should be called when a maintenance operation is done and normal + * operation is planned. See i3c_bus_maintenance_lock() and + * i3c_bus_normaluse_lock() for more details. + */ +void i3c_bus_downgrade_maintenance_lock(struct i3c_bus *bus) +{ + downgrade_write(&bus->lock); +} + static struct i3c_master_controller *dev_to_i3cmaster(struct device *dev) { return container_of(dev, struct i3c_master_controller, dev); @@ -341,6 +355,22 @@ static int i3c_device_probe(struct device *dev) return driver->probe(i3cdev); } +static void i3c_master_enable_mr_events(struct i3c_master_controller *master) +{ + if (!master->ops->enable_mr_events) + return; + + master->ops->enable_mr_events(master); +} + +static void i3c_master_disable_mr_events(struct i3c_master_controller *master) +{ + if (!master->ops->disable_mr_events) + return; + + master->ops->disable_mr_events(master); +} + static int i3c_device_remove(struct device *dev) { struct i3c_device *i3cdev = dev_to_i3cdev(dev); @@ -462,6 +492,36 @@ static int i3c_bus_init(struct i3c_bus *i3cbus) return 0; } +int i3c_master_request_mastership_locked(struct i3c_master_controller *master) +{ + if (WARN_ON(master->init_done && + !rwsem_is_locked(&master->bus.lock))) + return -EINVAL; + + if (!master->ops->request_mastership) + return -ENOTSUPP; + + return master->ops->request_mastership(master); +} + +int i3c_master_acquire_bus_ownership(struct i3c_master_controller *master) +{ + int ret; + + if (master->bus.cur_master != master->this) { + i3c_bus_normaluse_unlock(&master->bus); + i3c_bus_maintenance_lock(&master->bus); + + ret = i3c_master_request_mastership_locked(master); + if (ret) { + i3c_bus_maintenance_unlock(&master->bus); + return ret; + } + i3c_bus_downgrade_maintenance_lock(&master->bus); + } + return 0; +} + static const char * const i3c_bus_mode_strings[] = { [I3C_BUS_MODE_PURE] = "pure", [I3C_BUS_MODE_MIXED_FAST] = "mixed-fast", @@ -620,6 +680,25 @@ i3c_master_alloc_i2c_dev(struct i3c_master_controller *master, dev->common.master = master; dev->boardinfo = boardinfo; + dev->addr = boardinfo->base.addr; + dev->lvr = boardinfo->lvr; + + return dev; +} + +static struct i2c_dev_desc * +i3c_master_alloc_i2c_dev_no_boardinfo(struct i3c_master_controller *master, + u16 addr, u8 lvr) +{ + struct i2c_dev_desc *dev; + + dev = kzalloc(sizeof(*dev), GFP_KERNEL); + if (!dev) + return ERR_PTR(-ENOMEM); + + dev->common.master = master; + dev->addr = addr; + dev->lvr = lvr; return dev; } @@ -693,6 +772,9 @@ i3c_master_find_i2c_dev_by_addr(const struct i3c_master_controller *master, struct i2c_dev_desc *dev; i3c_bus_for_each_i2cdev(&master->bus, dev) { + if (!dev->boardinfo) + continue; + if (dev->boardinfo->base.addr == addr) return dev; } @@ -939,8 +1021,8 @@ int i3c_master_defslvs_locked(struct i3c_master_controller *master) desc = defslvs->slaves; i3c_bus_for_each_i2cdev(bus, i2cdev) { - desc->lvr = i2cdev->boardinfo->lvr; - desc->static_addr = i2cdev->boardinfo->base.addr << 1; + desc->lvr = i2cdev->lvr; + desc->static_addr = i2cdev->addr << 1; desc++; } @@ -1492,6 +1574,83 @@ i3c_master_register_new_i3c_devs(struct i3c_master_controller *master) } } +static struct i2c_dev_boardinfo * +i3c_master_find_i2c_boardinfo(const struct i3c_master_controller *master, + u16 addr, u8 lvr) +{ + struct i2c_dev_boardinfo *i2cboardinfo; + + list_for_each_entry(i2cboardinfo, &master->boardinfo.i2c, node) { + if (i2cboardinfo->base.addr == addr && + i2cboardinfo->lvr == lvr) + return i2cboardinfo; + } + + return NULL; +} + +static void +i3c_master_register_new_i2c_devs(struct i3c_master_controller *master) +{ + struct i2c_adapter *adap = i3c_master_to_i2c_adapter(master); + struct i2c_dev_desc *i2cdev; + + if (!master->init_done) + return; + + i3c_bus_for_each_i2cdev(&master->bus, i2cdev) { + if (i2cdev->dev) + continue; + + if (!i2cdev->boardinfo) + continue; + + i2cdev->dev = i2c_new_device(adap, &i2cdev->boardinfo->base); + } +} + +/** + * i3c_master_get_accmst_locked() - send a GETACCMST CCC command + * @master: master used to send frames on the bus + * @info: I3C device information + * + * Send a GETACCMST CCC command. + * + * This should be called if the curent master acknowledges bus takeover. + * + * This function must be called with the bus lock held in write mode. + * + * Return: 0 in case of success, a positive I3C error code if the error is + * one of the official Mx error codes, and a negative error code otherwise. + */ +int i3c_master_get_accmst_locked(struct i3c_master_controller *master, + u8 addr) +{ + struct i3c_ccc_getaccmst *accmst; + struct i3c_ccc_cmd_dest dest; + struct i3c_ccc_cmd cmd; + int ret; + + accmst = i3c_ccc_cmd_dest_init(&dest, addr, sizeof(*accmst)); + if (!accmst) + return -ENOMEM; + + i3c_ccc_cmd_init(&cmd, true, I3C_CCC_GETACCMST, &dest, 1); + + ret = i3c_master_send_ccc_cmd_locked(master, &cmd); + if (ret) + goto out; + + if (dest.payload.len != sizeof(*accmst)) + ret = -EIO; + +out: + i3c_ccc_cmd_dest_cleanup(&dest); + + return ret; +} +EXPORT_SYMBOL_GPL(i3c_master_get_accmst_locked); + /** * i3c_master_do_daa() - do a DAA (Dynamic Address Assignment) * @master: master doing the DAA @@ -1559,10 +1718,6 @@ int i3c_master_set_info(struct i3c_master_controller *master, if (!i3c_bus_dev_addr_is_avail(&master->bus, info->dyn_addr)) return -EINVAL; - if (I3C_BCR_DEVICE_ROLE(info->bcr) == I3C_BCR_I3C_MASTER && - master->secondary) - return -EINVAL; - if (master->this) return -EINVAL; @@ -1607,43 +1762,13 @@ static void i3c_master_detach_free_devs(struct i3c_master_controller *master) common.node) { i3c_master_detach_i2c_dev(i2cdev); i3c_bus_set_addr_slot_status(&master->bus, - i2cdev->boardinfo->base.addr, - I3C_ADDR_SLOT_FREE); + i2cdev->addr, + I3C_ADDR_SLOT_FREE); i3c_master_free_i2c_dev(i2cdev); } } -/** - * i3c_master_bus_init() - initialize an I3C bus - * @master: main master initializing the bus - * - * This function is following all initialisation steps described in the I3C - * specification: - * - * 1. Attach I2C and statically defined I3C devs to the master so that the - * master can fill its internal device table appropriately - * - * 2. Call &i3c_master_controller_ops->bus_init() method to initialize - * the master controller. That's usually where the bus mode is selected - * (pure bus or mixed fast/slow bus) - * - * 3. Instruct all devices on the bus to drop their dynamic address. This is - * particularly important when the bus was previously configured by someone - * else (for example the bootloader) - * - * 4. Disable all slave events. - * - * 5. Pre-assign dynamic addresses requested by the FW with SETDASA for I3C - * devices that have a static address - * - * 6. Do a DAA (Dynamic Address Assignment) to assign dynamic addresses to all - * remaining I3C devices - * - * Once this is done, all I3C and I2C devices should be usable. - * - * Return: a 0 in case of success, an negative error code otherwise. - */ -static int i3c_master_bus_init(struct i3c_master_controller *master) +static int i3c_master_attach_static_devs(struct i3c_master_controller *master) { enum i3c_addr_slot_status status; struct i2c_dev_boardinfo *i2cboardinfo; @@ -1652,32 +1777,24 @@ static int i3c_master_bus_init(struct i3c_master_controller *master) struct i2c_dev_desc *i2cdev; int ret; - /* - * First attach all devices with static definitions provided by the - * FW. - */ list_for_each_entry(i2cboardinfo, &master->boardinfo.i2c, node) { status = i3c_bus_get_addr_slot_status(&master->bus, i2cboardinfo->base.addr); - if (status != I3C_ADDR_SLOT_FREE) { - ret = -EBUSY; - goto err_detach_devs; - } + if (status != I3C_ADDR_SLOT_FREE) + return -EBUSY; i3c_bus_set_addr_slot_status(&master->bus, i2cboardinfo->base.addr, I3C_ADDR_SLOT_I2C_DEV); i2cdev = i3c_master_alloc_i2c_dev(master, i2cboardinfo); - if (IS_ERR(i2cdev)) { - ret = PTR_ERR(i2cdev); - goto err_detach_devs; - } + if (IS_ERR(i2cdev)) + return PTR_ERR(i2cdev); ret = i3c_master_attach_i2c_dev(master, i2cdev); if (ret) { i3c_master_free_i2c_dev(i2cdev); - goto err_detach_devs; + return ret; } } list_for_each_entry(i3cboardinfo, &master->boardinfo.i3c, node) { @@ -1687,28 +1804,71 @@ static int i3c_master_bus_init(struct i3c_master_controller *master) if (i3cboardinfo->init_dyn_addr) { status = i3c_bus_get_addr_slot_status(&master->bus, - i3cboardinfo->init_dyn_addr); - if (status != I3C_ADDR_SLOT_FREE) { - ret = -EBUSY; - goto err_detach_devs; - } + i3cboardinfo->init_dyn_addr); + if (status != I3C_ADDR_SLOT_FREE) + return -EBUSY; } i3cdev = i3c_master_alloc_i3c_dev(master, &info); - if (IS_ERR(i3cdev)) { - ret = PTR_ERR(i3cdev); - goto err_detach_devs; - } + if (IS_ERR(i3cdev)) + return PTR_ERR(i3cdev); i3cdev->boardinfo = i3cboardinfo; ret = i3c_master_attach_i3c_dev(master, i3cdev); if (ret) { i3c_master_free_i3c_dev(i3cdev); - goto err_detach_devs; + return ret; } } + return 0; +} + +/** + * i3c_master_bus_init() - initialize an I3C bus + * @master: main master initializing the bus + * + * This function is following all initialisation steps described in the I3C + * specification: + * + * 1. Attach I2C and statically defined I3C devs to the master so that the + * master can fill its internal device table appropriately + * + * 2. Call &i3c_master_controller_ops->bus_init() method to initialize + * the master controller. That's usually where the bus mode is selected + * (pure bus or mixed fast/slow bus) + * + * 3. Instruct all devices on the bus to drop their dynamic address. This is + * particularly important when the bus was previously configured by someone + * else (for example the bootloader) + * + * 4. Disable all slave events. + * + * 5. Pre-assign dynamic addresses requested by the FW with SETDASA for I3C + * devices that have a static address + * + * 6. Do a DAA (Dynamic Address Assignment) to assign dynamic addresses to all + * remaining I3C devices + * + * Once this is done, all I3C and I2C devices should be usable. + * + * Return: a 0 in case of success, an negative error code otherwise. + */ +static int i3c_master_bus_init(struct i3c_master_controller *master) +{ + struct i3c_dev_desc *i3cdev; + int ret; + + /* + * First attach all devices with static definitions provided by the + * FW. + */ + if (!master->secondary) { + ret = i3c_master_attach_static_devs(master); + if (ret) + goto err_detach_devs; + } /* * Now execute the controller specific ->bus_init() routine, which * might configure its internal logic to match the bus limitations. @@ -1729,6 +1889,13 @@ static int i3c_master_bus_init(struct i3c_master_controller *master) } /* + * Don't reset addresses if this is secondary master. + * Secondary masters can't do DAA. + */ + if (master->secondary) + return 0; + + /* * Reset all dynamic address that may have been assigned before * (assigned by the bootloader for example). */ @@ -1791,6 +1958,49 @@ i3c_master_search_i3c_dev_duplicate(struct i3c_dev_desc *refdev) return NULL; } +int i3c_master_add_i2c_dev(struct i3c_master_controller *master, + u16 addr, u8 lvr) +{ + enum i3c_addr_slot_status status; + struct i2c_dev_desc *i2cdev; + int ret; + + if (!master) + return -EINVAL; + + status = i3c_bus_get_addr_slot_status(&master->bus, + addr); + if (status != I3C_ADDR_SLOT_FREE) + return -EBUSY; + + i3c_bus_set_addr_slot_status(&master->bus, addr, + I3C_ADDR_SLOT_I2C_DEV); + + i2cdev = i3c_master_alloc_i2c_dev_no_boardinfo(master, addr, lvr); + if (IS_ERR(i2cdev)) { + ret = PTR_ERR(i2cdev); + goto err_free_dev; + } + + i2cdev->boardinfo = i3c_master_find_i2c_boardinfo(master, addr, lvr); + + ret = i3c_master_attach_i2c_dev(master, i2cdev); + if (ret) { + ret = PTR_ERR(i2cdev); + goto err_free_dev; + } + + return 0; + +err_free_dev: + i3c_bus_set_addr_slot_status(&master->bus, addr, + I3C_ADDR_SLOT_FREE); + i3c_master_free_i2c_dev(i2cdev); + + return ret; +} +EXPORT_SYMBOL_GPL(i3c_master_add_i2c_dev); + /** * i3c_master_add_i3c_dev_locked() - add an I3C slave to the bus * @master: master used to send frames on the bus @@ -2113,11 +2323,17 @@ static int i3c_master_i2c_adapter_xfer(struct i2c_adapter *adap, } i3c_bus_normaluse_lock(&master->bus); + ret = i3c_master_acquire_bus_ownership(master); + if (ret) + goto err_unlock_bus; + dev = i3c_master_find_i2c_dev_by_addr(master, addr); if (!dev) ret = -ENOENT; else ret = master->ops->i2c_xfers(dev, xfers, nxfers); + +err_unlock_bus: i3c_bus_normaluse_unlock(&master->bus); return ret ? ret : nxfers; @@ -2151,8 +2367,12 @@ static int i3c_master_i2c_adapter_init(struct i3c_master_controller *master) * We silently ignore failures here. The bus should keep working * correctly even if one or more i2c devices are not registered. */ - i3c_bus_for_each_i2cdev(&master->bus, i2cdev) + i3c_bus_for_each_i2cdev(&master->bus, i2cdev) { + if (!i2cdev->boardinfo) + continue; + i2cdev->dev = i2c_new_device(adap, &i2cdev->boardinfo->base); + } return 0; } @@ -2393,18 +2613,43 @@ static int i3c_master_check_ops(const struct i3c_master_controller_ops *ops) !ops->recycle_ibi_slot)) return -EINVAL; + if (ops->request_mastership && + (!ops->enable_mr_events || !ops->disable_mr_events)) + return -EINVAL; + return 0; } /** + * i3c_master_register_new_devs() - register new devices + * @master: master used to send frames on the bus + * + * This function is useful when devices were not added + * during initialization or when new device joined the bus + * which was under control of different master. + */ +void i3c_master_register_new_devs(struct i3c_master_controller *master) +{ + /* + * We can register I3C devices received from master by DEFSLVS. + */ + i3c_bus_normaluse_lock(&master->bus); + i3c_master_register_new_i3c_devs(master); + i3c_bus_normaluse_unlock(&master->bus); + + i3c_bus_normaluse_lock(&master->bus); + i3c_master_register_new_i2c_devs(master); + i3c_bus_normaluse_unlock(&master->bus); +} +EXPORT_SYMBOL_GPL(i3c_master_register_new_devs); + +/** * i3c_master_register() - register an I3C master * @master: master used to send frames on the bus * @parent: the parent device (the one that provides this I3C master * controller) * @ops: the master controller operations - * @secondary: true if you are registering a secondary master. Will return - * -ENOTSUPP if set to true since secondary masters are not yet - * supported + * @secondary: true if you are registering a secondary master. * * This function takes care of everything for you: * @@ -2427,10 +2672,6 @@ int i3c_master_register(struct i3c_master_controller *master, struct i2c_dev_boardinfo *i2cbi; int ret; - /* We do not support secondary masters yet. */ - if (secondary) - return -ENOTSUPP; - ret = i3c_master_check_ops(ops); if (ret) return ret; @@ -2504,9 +2745,11 @@ int i3c_master_register(struct i3c_master_controller *master, * register I3C devices dicovered during the initial DAA. */ master->init_done = true; - i3c_bus_normaluse_lock(&master->bus); - i3c_master_register_new_i3c_devs(master); - i3c_bus_normaluse_unlock(&master->bus); + i3c_master_register_new_devs(master); + + i3c_bus_maintenance_lock(&master->bus); + i3c_master_enable_mr_events(master); + i3c_bus_maintenance_unlock(&master->bus); return 0; @@ -2524,6 +2767,30 @@ int i3c_master_register(struct i3c_master_controller *master, EXPORT_SYMBOL_GPL(i3c_master_register); /** + * i3c_master_mastership_ack() - performs operations before bus handover. + * @master: master used to send frames on the bus + * @addr: I3C device address + * + * Basically, it sends DEFSLVS command to ensure new master is taking + * the bus with complete list of devices and then acknowledges bus takeover. + * + * Return: 0 in case of success, a negative error code otherwise. + */ +int i3c_master_mastership_ack(struct i3c_master_controller *master, + u8 addr) +{ + int ret; + + i3c_bus_maintenance_lock(&master->bus); + ret = i3c_master_get_accmst_locked(master, addr); + i3c_bus_maintenance_unlock(&master->bus); + + return ret; +} +EXPORT_SYMBOL_GPL(i3c_master_mastership_ack); + + +/** * i3c_master_unregister() - unregister an I3C master * @master: master used to send frames on the bus * @@ -2533,6 +2800,10 @@ EXPORT_SYMBOL_GPL(i3c_master_register); */ int i3c_master_unregister(struct i3c_master_controller *master) { + i3c_bus_maintenance_lock(&master->bus); + i3c_master_disable_mr_events(master); + i3c_bus_maintenance_unlock(&master->bus); + i3c_master_i2c_adapter_cleanup(master); i3c_master_unregister_i3c_devs(master); i3c_master_bus_cleanup(master); diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h index 42bb215..f32afd3 100644 --- a/include/linux/i3c/master.h +++ b/include/linux/i3c/master.h @@ -421,6 +421,12 @@ struct i3c_bus { * for a future IBI * This method is mandatory only if ->request_ibi is not * NULL. + * @request_mastership: requests bus mastership. Mastership is requested + * automatically when device driver wants to transfer + * data using master in slave mode. + * @enable_mr_events: enable the Mastership event. + * Mastership does not require handler. + * @disable_mr_events: disable the Mastership event. */ struct i3c_master_controller_ops { int (*bus_init)(struct i3c_master_controller *master); @@ -447,6 +453,10 @@ struct i3c_master_controller_ops { int (*disable_ibi)(struct i3c_dev_desc *dev); void (*recycle_ibi_slot)(struct i3c_dev_desc *dev, struct i3c_ibi_slot *slot); + void (*update_devs)(struct i3c_master_controller *master); + int (*request_mastership)(struct i3c_master_controller *master); + int (*enable_mr_events)(struct i3c_master_controller *master); + int (*disable_mr_events)(struct i3c_master_controller *master); }; /** @@ -526,6 +536,8 @@ int i3c_master_defslvs_locked(struct i3c_master_controller *master); int i3c_master_get_free_addr(struct i3c_master_controller *master, u8 start_addr); +int i3c_master_add_i2c_dev(struct i3c_master_controller *master, + u16 addr, u8 lvr); int i3c_master_add_i3c_dev_locked(struct i3c_master_controller *master, u8 addr); int i3c_master_do_daa(struct i3c_master_controller *master); @@ -538,6 +550,11 @@ int i3c_master_register(struct i3c_master_controller *master, const struct i3c_master_controller_ops *ops, bool secondary); int i3c_master_unregister(struct i3c_master_controller *master); +int i3c_master_get_accmst_locked(struct i3c_master_controller *master, + u8 addr); +int i3c_master_mastership_ack(struct i3c_master_controller *master, + u8 addr); +void i3c_master_register_new_devs(struct i3c_master_controller *master); /** * i3c_dev_get_master_data() - get master private data attached to an I3C From patchwork Sun Mar 10 13:58:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 10846305 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 21A6D1669 for ; Sun, 10 Mar 2019 13:59:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0734928DD1 for ; Sun, 10 Mar 2019 13:59:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEBF428E6B; Sun, 10 Mar 2019 13:59:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B32A228DD1 for ; Sun, 10 Mar 2019 13:59:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bRu+tqPNXMPJi0KWJoomPEhyPai8j3SWUUSx4qJBBDg=; b=GbKiXdnzFUghlv cKwcWEePhnRO20tTupi+/Rmp9qr0BgLrp219vnTU8eMEJpy5Rzw42ptA29pkAL21+EJ4hMZEy4gK+ zvDEE3ykh5xGQE/Aifhfas/bAAJnv3zoUietex4ubsawOCjeUykgGntrYQdEA3VAIEj9C2OFXL3Zc GI3GZgqYYKTOynyQKcyJCNKpk1fUnJ2uuPWhWUD1/C5a1po+8pUZdkcwkIVpYaxByAoUHRmBEdHjv 3u91NuPi2HxVjCaqZtC0KBZPxgcVwlqoTIVJXwtuHpcreDWCG/8J7CYwO4ADIzgqvT+XjtIX52aYg 7w5GB/n16Ok7v4XoxQaw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yzD-0002tA-DZ; Sun, 10 Mar 2019 13:59:31 +0000 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193] helo=mx0a-0014ca01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yz7-0002qW-BU for linux-i3c@lists.infradead.org; Sun, 10 Mar 2019 13:59:29 +0000 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2ADspKQ025223; Sun, 10 Mar 2019 06:59:21 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=QAK5VLRxuNDyI4TUikDzEOqp0peNIGeDt+m9dts5gZA=; b=JRdSND3YLJ97dT286ogp4pIJA0pCupmg7c2aBya9I++s8ODgKChZw9SRC4d2OJnHLypP R++mHJteQH7RDG6G3OXo+2SKjqaJNg5DMAs0ybRK4r/zkIuUzt6OwKH9Zid4SeY3PG4Z VYVpjq1HvIsVFxUyF8iWqGSwD/xNL8AfgYAqROIbRZhtmZW42QfHlHyjrRr3V7ly+zil D0eCEecnnGXi3rI24gGlyYiJBafgWtsGUuW+L9ezGu2R1n4ZsL7PFdOlSZD/ipAnYGRW RT3jHHGBepIORHLnKzjSIgOdBjJCwnE+jdt5/BOmouCJpOy820WX1mwo3lb50G6dqqzN TQ== Authentication-Results: cadence.com; spf=pass smtp.mailfrom=pgaj@cadence.com Received: from nam02-cy1-obe.outbound.protection.outlook.com (mail-cys01nam02lp2053.outbound.protection.outlook.com [104.47.37.53]) by mx0b-0014ca01.pphosted.com with ESMTP id 2r49y1cqyg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 10 Mar 2019 06:59:21 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QAK5VLRxuNDyI4TUikDzEOqp0peNIGeDt+m9dts5gZA=; b=UMV/F1A2jP8TjfsTpFmjDdNtLF2StOkvQiuGUeYvfH/Ernw6RQ4RuPBsbwdhhU4ks1m3xQ2G85PMoFq1gTgIN2hlS/YuF9J1mkTI1+ikwj+wJeXSnF7fwVhrDN+PuGHCBALkpkPIG7vbbEMrAz8N2+QEEmT5gd3396oxAbsKsGQ= Received: from DM5PR07CA0108.namprd07.prod.outlook.com (2603:10b6:4:ae::37) by DM6PR07MB4713.namprd07.prod.outlook.com (2603:10b6:5:a1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.19; Sun, 10 Mar 2019 13:59:18 +0000 Received: from BY2NAM05FT010.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::205) by DM5PR07CA0108.outlook.office365.com (2603:10b6:4:ae::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1686.18 via Frontend Transport; Sun, 10 Mar 2019 13:59:18 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 158.140.1.28 as permitted sender) Received: from sjmaillnx2.cadence.com (158.140.1.28) by BY2NAM05FT010.mail.protection.outlook.com (10.152.100.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.11 via Frontend Transport; Sun, 10 Mar 2019 13:59:18 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx2.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADxEpl032144 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Sun, 10 Mar 2019 06:59:17 -0700 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 10 Mar 2019 14:59:14 +0100 Received: from lvlogina.cadence.com (10.165.176.102) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sun, 10 Mar 2019 14:59:13 +0100 Received: from lvlogina.cadence.com (localhost.localdomain [127.0.0.1]) by lvlogina.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADxCh8022630; Sun, 10 Mar 2019 13:59:12 GMT Received: (from pgaj@localhost) by lvlogina.cadence.com (8.14.4/8.14.4/Submit) id x2ADxCuI022622; Sun, 10 Mar 2019 13:59:12 GMT From: Przemyslaw Gaj To: Subject: [PATCH v4 4/6] i3c: master: cdns: add support for mastership request to Cadence I3C master driver. Date: Sun, 10 Mar 2019 13:58:41 +0000 Message-ID: <20190310135843.21154-5-pgaj@cadence.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20190310135843.21154-1-pgaj@cadence.com> References: <20190310135843.21154-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(346002)(136003)(396003)(39860400002)(2980300002)(189003)(199004)(36092001)(106466001)(2351001)(246002)(8676002)(76176011)(42186006)(478600001)(105596002)(50466002)(2906002)(26826003)(316002)(48376002)(87636003)(54906003)(51416003)(47776003)(16586007)(50226002)(8936002)(86362001)(356004)(6666004)(186003)(2616005)(26005)(426003)(336012)(6916009)(14444005)(305945005)(5660300002)(30864003)(1076003)(36756003)(107886003)(4326008)(446003)(11346002)(5024004)(7636002)(126002)(476003)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4713; H:sjmaillnx2.cadence.com; FPR:; SPF:SoftFail; LANG:en; PTR:corp.cadence.com; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fd068eb0-4380-409d-dc06-08d6a5609695 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060); SRVR:DM6PR07MB4713; X-MS-TrafficTypeDiagnostic: DM6PR07MB4713: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4713; 20:5xNS0CH8p0GOinEdtdJo0U8wDLU49J7Prj23mFp+gzfvx7U5eFY4JfPCr6TE2JV6wBIFn1C2DJi313tpTrzaBpa2ybaJknCUml8DcFQRY7lLlAqOP67HS7bv86Va3R1Gs/ILXx5NfLSHfPwNCLOqmejjbeBQKeHezgBOzKalsYjA4hxb7Ep3ssqske+Zb1B7icBs3gZmx4/vD4PBy1DfUP+z1KZXHH1EJiq3k+qqgguzaOA6AZgZnzH9uc3aanfBdqKmcyWFMhkUnp6a13/l+YC5vZSbeBy0vLsalkIeL5IwpIZjFcyogPBZybiQGvVkfQsYKtiZtZ+umH0Ku8F05OV1kp0f0GR2s/RN/n1JsUmLcJ1Z0Zx0wh2tgwBExCDwG/0VXI9pQWT3BIaKOUTfRlFEzMvVVpbgpPF3KL+WKDLUxOeRZ57kifccZcsOx7hbpiTG4uSgrPy09t2wKuJhxdFFjP9v/UUMNarzNknCnT9sGSn5uxDbhuNybF1C0/+X X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0972DEC1D9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB4713; 23:KN6EYDonMY5WJ+T6itxZgBtL5lL6jDk2yAvBormAt?= CW0giy+JvMSQa1gI1EnLwApe2mV8YZR8Cjhdzh5EWqlCSbkEPngXHig6TP7IT+CXwS11LI9PAFs4picYBJ1od5D6Ai3dFAPY6ab7t7MRkR4+PLzTZyUh85D/oSSjGNZP6R5i3mgwacm/1rsc9hfXe8NJa1cCD+HDIyH1f8dFB4naa4YTmtLl+HzQn5kFAhMtnXlG//w3bvpBKB58Iq+Trq+6g9ptZ6eRVP0jIisvudLgKIAB9bcU8EOMpK2IZAVIfi/nT+JeL5pRA7EoGPiP8pyma7PIGEpvTZywYuTeWXV92N1VUc2RDc5iUBXefEQNfKywrRb7+H/0FbT6pxetjygmTqKaqwSuRfO2elUQE9yYKZu5TJom4YrE0NIq5IhyngcJRhN9VA7C10EOiomYUb9hErg9PbyIrN1/jx0eOOH2tOzb3IjixPPX32C1ox29uBKveY4AwZgykjXhd5ep0imIC86dmSNwzGnoLrQ0ryf2ng/S+bP9uTvCezUA7qjomtZyE1nEPPjqpxSCpTtm2qHPzvuF19DNd/tA0ypzIoGcZmzlzy39bNpAQ+MoSl05m6+CiC2odmqkpYu0p/uld1s7j39JG6HofxFaR5FzAaifUp9s27ysQR/RAm/JlNOos6TsMqKs25QoHtahjkcgL0eHS7AQBAFgNSlZuwT1PFSMDbpTPVZuKZBIQhvuNqrY3AFUWDDNn3kQlvIHiGUEvgAwprV1nMcy37om//02tJA4NoNX0KBK5pMskGvvDy4DmfRsGk1SWT9wqgpEeZNctqLddujZJSO/7RaSSwu07vVxcDkQiB2LQMYCDV4PIBX5QF6+ho/JM4VAKrjRZpGNhr34h1G+uEdxjsG8qsvRanH29K/pVl7PqoO+IJtzP8OlzevoouzLdV47UNMqQHGzhAGxY5ws5A1ot5cg8b2GMc/sZWcdk9hMspYt2Vr3Cemcqt6MfKrwTrWny57b7qMWdjRMtMDQlw5DrFEB/elFEXTNUp8Jv7UQEFEvFpXnK6LP9BHQmEAhlopgtld/g8aBz7WY8hNrTHqWLwxVZVB7eawlmjrt7R+5h2vAmhNzcsXMpqkhWE9IW5v+42ASbsVQNMjUIUIPPmTOMcIVnhjZ+CVrA== X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: T0byoUWvobBTlULcMhPlDPYyvfx2VTtpTD7mALGCFvTYHaN79hFvzPp1ZIkSxIYIfb7ldREsWunoUR/3FBxabBMLQykSGUk4E0bPtnTgIETm67ZK/iMwJRoeMmHLo6VNxTcWOl/PFmfs8kWODNoIwvbcQPcZYO2qBVPDq5daZTJoDuOcN8yRkDMbn+xSs1pT+GeAV2mcvR2kBoi1Mi/QKAqRznayXW8Y4m7o5kiVJfpRG39xwc8GLxImwej67pbO5xWf8BHfnarkhoimjZlS8RTJBu8VYLooFjC9y8toKEHZBOI4vn54r3V5DwcaEt0UngFuKf0IYSw7+EksHIrQ8DuBkjTr5PUT7ptdJJzcWAE6GQFwGeqePttf4fkBhKY5XgAh5PWT57IzoNUBgXVUweR7fQlIYn204nVQJKOIiVk= X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4713; 20:TZ3jE6Pvv49Atz3goh/SZNh4rKvk6aALqoQbVkncI82NR0BVjV3eKTfqXKJg+fDCRzN3nqpZF+KmtPNSNshfYhHfz9SxKavORUzKV4lWbl8aa29x6KSZqscFtGmbl54RQcFusMSHzuV7VuR3QoDSWoRn5V/M19HOnEA2odC6YRWfX+fPSzLp5NmZLvUi3lMqT+z2mXoM4dlBMJ8p0zC+wo8w/47efKFh16FBvXXPsJddJevMqZo1OZqXo+T2KezR X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2019 13:59:18.0730 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fd068eb0-4380-409d-dc06-08d6a5609695 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.28]; Helo=[sjmaillnx2.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4713 X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:_spf.salesforce.com include:mktomail.com include:spf-0014ca01.pphosted.com include:spf.protection.outlook.com include:auth.msgapp.com include:spf.mandrillapp.com ~all X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-10_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 priorityscore=1501 malwarescore=0 suspectscore=4 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903100109 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190310_065925_705774_059689DD X-CRM114-Status: GOOD ( 15.30 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, agolec@cadence.com, Przemyslaw Gaj , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds support for mastership request to Cadence I3C master driver. Mastership is requested automatically after secondary master receives mastership ENEC event. This allows secondary masters to initialize their bus. Signed-off-by: Przemyslaw Gaj --- Main changes between v3 and v4: - Refactored the code Main changes between v2 and v3: - Add mastership type - Add postponed master registration - Add update device definition on bus initialization time - Removed redundant mastership work structs - Reworked IBI slot lookup - Reworked Mastership event enabling/disabling Changes in v2: - Add work structs for mastership purpose - Add missing mastership disable feature --- drivers/i3c/master/i3c-master-cdns.c | 495 +++++++++++++++++++++++++++++++---- 1 file changed, 443 insertions(+), 52 deletions(-) diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c index 237f24a..61d6416 100644 --- a/drivers/i3c/master/i3c-master-cdns.c +++ b/drivers/i3c/master/i3c-master-cdns.c @@ -157,6 +157,7 @@ #define SLV_IMR 0x48 #define SLV_ICR 0x4c #define SLV_ISR 0x50 +#define SLV_INT_DEFSLVS BIT(21) #define SLV_INT_TM BIT(20) #define SLV_INT_ERROR BIT(19) #define SLV_INT_EVENT_UP BIT(18) @@ -388,8 +389,19 @@ struct cdns_i3c_xfer { struct cdns_i3c_cmd cmds[0]; }; +enum cdns_i3c_mr { + REQUEST, + HANDOFF, + TAKEOVER +}; + struct cdns_i3c_master { struct work_struct hj_work; + struct { + struct work_struct work; + enum cdns_i3c_mr mr_type; + u32 ibir; + } mastership; struct i3c_master_controller base; u32 free_rr_slots; unsigned int maxdevs; @@ -408,6 +420,8 @@ struct cdns_i3c_master { struct clk *pclk; struct cdns_i3c_master_caps caps; unsigned long i3c_scl_lim; + struct device *parent; + struct workqueue_struct *wq; }; static inline struct cdns_i3c_master * @@ -663,6 +677,88 @@ static void cdns_i3c_master_unqueue_xfer(struct cdns_i3c_master *master, spin_unlock_irqrestore(&master->xferqueue.lock, flags); } +static void +cdns_i3c_master_i3c_dev_rr_to_info(struct cdns_i3c_master *master, + unsigned int slot, + struct i3c_device_info *info) +{ + u32 rr; + + memset(info, 0, sizeof(*info)); + rr = readl(master->regs + DEV_ID_RR0(slot)); + info->dyn_addr = DEV_ID_RR0_GET_DEV_ADDR(rr); + rr = readl(master->regs + DEV_ID_RR2(slot)); + info->dcr = rr; + info->bcr = rr >> 8; + info->pid = rr >> 16; + info->pid |= (u64)readl(master->regs + DEV_ID_RR1(slot)) << 16; +} + +static void +cdns_i3c_master_i2c_dev_rr_to_info(struct cdns_i3c_master *master, + unsigned int slot, + u16 *addr, u8 *lvr) +{ + u32 rr; + + rr = readl(master->regs + DEV_ID_RR0(slot)); + *addr = DEV_ID_RR0_GET_DEV_ADDR(rr); + rr = readl(master->regs + DEV_ID_RR2(slot)); + *lvr = rr; +} + +static +int cdns_i3c_sec_master_request_mastership(struct i3c_master_controller *m) +{ + struct cdns_i3c_master *master = to_cdns_i3c_master(m); + u32 status; + int ret; + + status = readl(master->regs + MST_STATUS0); + if (WARN_ON(status & MST_STATUS0_MASTER_MODE)) + return -EEXIST; + + status = readl(master->regs + SLV_STATUS1); + if (status & SLV_STATUS1_MR_DIS) + return -EACCES; + + writel(SLV_INT_MR_DONE, master->regs + SLV_IER); + writel(readl(master->regs + CTRL) | CTRL_MST_INIT | CTRL_MST_ACK, + master->regs + CTRL); + + ret = readl_poll_timeout(master->regs + MST_STATUS0, status, + status & MST_STATUS0_MASTER_MODE, 100, + 100000); + return ret; +} + +static void cdns_i3c_master_update_devs(struct i3c_master_controller *m) +{ + struct cdns_i3c_master *master = to_cdns_i3c_master(m); + u32 val, newdevs; + u16 addr; + u8 lvr; + int slot; + struct i3c_device_info i3c_info; + + newdevs = readl(master->regs + DEVS_CTRL) & DEVS_CTRL_DEVS_ACTIVE_MASK; + for (slot = 1; slot <= master->maxdevs; slot++) { + val = readl(master->regs + DEV_ID_RR0(slot)); + + if ((newdevs & BIT(slot)) && (val & DEV_ID_RR0_IS_I3C)) { + cdns_i3c_master_i3c_dev_rr_to_info(master, slot, + &i3c_info); + + i3c_master_add_i3c_dev_locked(m, i3c_info.dyn_addr); + } else if ((newdevs & BIT(slot)) && + !(val & DEV_ID_RR0_IS_I3C)) { + cdns_i3c_master_i2c_dev_rr_to_info(master, slot, + &addr, &lvr); + i3c_master_add_i2c_dev(m, addr, lvr); + } + } +} + static enum i3c_error_code cdns_i3c_cmd_get_err(struct cdns_i3c_cmd *cmd) { switch (cmd->error) { @@ -913,6 +1009,7 @@ static int cdns_i3c_master_get_rr_slot(struct cdns_i3c_master *master, return ffs(master->free_rr_slots) - 1; } + activedevs = readl(master->regs + DEVS_CTRL) & DEVS_CTRL_DEVS_ACTIVE_MASK; @@ -1005,9 +1102,9 @@ static int cdns_i3c_master_attach_i2c_dev(struct i2c_dev_desc *dev) master->free_rr_slots &= ~BIT(slot); i2c_dev_set_master_data(dev, data); - writel(prepare_rr0_dev_address(dev->boardinfo->base.addr), + writel(prepare_rr0_dev_address(dev->addr), master->regs + DEV_ID_RR0(data->id)); - writel(dev->boardinfo->lvr, master->regs + DEV_ID_RR2(data->id)); + writel(dev->lvr, master->regs + DEV_ID_RR2(data->id)); writel(readl(master->regs + DEVS_CTRL) | DEVS_CTRL_DEV_ACTIVE(data->id), master->regs + DEVS_CTRL); @@ -1037,22 +1134,6 @@ static void cdns_i3c_master_bus_cleanup(struct i3c_master_controller *m) cdns_i3c_master_disable(master); } -static void cdns_i3c_master_dev_rr_to_info(struct cdns_i3c_master *master, - unsigned int slot, - struct i3c_device_info *info) -{ - u32 rr; - - memset(info, 0, sizeof(*info)); - rr = readl(master->regs + DEV_ID_RR0(slot)); - info->dyn_addr = DEV_ID_RR0_GET_DEV_ADDR(rr); - rr = readl(master->regs + DEV_ID_RR2(slot)); - info->dcr = rr; - info->bcr = rr >> 8; - info->pid = rr >> 16; - info->pid |= (u64)readl(master->regs + DEV_ID_RR1(slot)) << 16; -} - static void cdns_i3c_master_upd_i3c_scl_lim(struct cdns_i3c_master *master) { struct i3c_master_controller *m = &master->base; @@ -1180,10 +1261,6 @@ static int cdns_i3c_master_do_daa(struct i3c_master_controller *m) cdns_i3c_master_upd_i3c_scl_lim(master); - /* Unmask Hot-Join and Mastership request interrupts. */ - i3c_master_enec_locked(m, I3C_BROADCAST_ADDR, - I3C_CCC_EVENT_HJ | I3C_CCC_EVENT_MR); - return 0; } @@ -1247,15 +1324,17 @@ static int cdns_i3c_master_bus_init(struct i3c_master_controller *m) prescl1 = PRESCL_CTRL1_OD_LOW(ncycles); writel(prescl1, master->regs + PRESCL_CTRL1); - /* Get an address for the master. */ - ret = i3c_master_get_free_addr(m, 0); - if (ret < 0) - return ret; + if (!m->secondary) { + /* Get an address for the master. */ + ret = i3c_master_get_free_addr(m, 0); + if (ret < 0) + return ret; - writel(prepare_rr0_dev_address(ret) | DEV_ID_RR0_IS_I3C, - master->regs + DEV_ID_RR0(0)); + writel(prepare_rr0_dev_address(ret) | DEV_ID_RR0_IS_I3C, + master->regs + DEV_ID_RR0(0)); + } - cdns_i3c_master_dev_rr_to_info(master, 0, &info); + cdns_i3c_master_i3c_dev_rr_to_info(master, 0, &info); if (info.bcr & I3C_BCR_HDR_CAP) info.hdr_cap = I3C_CCC_HDR_MODE(I3C_HDR_DDR); @@ -1274,9 +1353,32 @@ static int cdns_i3c_master_bus_init(struct i3c_master_controller *m) cdns_i3c_master_enable(master); + if (m->secondary) { + i3c_bus_maintenance_lock(&master->base.bus); + cdns_i3c_master_update_devs(&master->base); + i3c_bus_maintenance_unlock(&master->base.bus); + } + return 0; } +static +struct i3c_dev_desc *cdns_i3c_get_ibi_device(struct cdns_i3c_master *master, + u32 ibir) +{ + struct i3c_dev_desc *dev; + u32 id = IBIR_SLVID(ibir); + + if (id >= master->ibi.num_slots || (ibir & IBIR_ERROR)) + return NULL; + + dev = master->ibi.slots[id]; + if (!dev) + return NULL; + + return dev; +} + static void cdns_i3c_master_handle_ibi(struct cdns_i3c_master *master, u32 ibir) { @@ -1354,27 +1456,100 @@ static void cnds_i3c_master_demux_ibis(struct cdns_i3c_master *master) case IBIR_TYPE_MR: WARN_ON(IBIR_XFER_BYTES(ibir) || (ibir & IBIR_ERROR)); + master->mastership.ibir = ibir; + master->mastership.mr_type = HANDOFF; + queue_work(master->base.wq, + &master->mastership.work); + break; default: break; } } } +static void cdns_i3c_master_bus_handoff(struct cdns_i3c_master *master) +{ + struct i3c_dev_desc *dev; + + dev = cdns_i3c_get_ibi_device(master, master->mastership.ibir); + + writel(MST_INT_MR_DONE, master->regs + MST_ICR); + + master->base.bus.cur_master = dev; +} + +static void cdns_i3c_master_mastership_takeover(struct cdns_i3c_master *master) +{ + if (master->base.init_done) { + i3c_bus_maintenance_lock(&master->base.bus); + cdns_i3c_master_update_devs(&master->base); + i3c_bus_maintenance_unlock(&master->base.bus); + + i3c_master_register_new_devs(&master->base); + } + + writel(readl(master->regs + CTRL) & ~CTRL_MST_ACK, master->regs + CTRL); +} + +static void cdns_i3c_sec_master_event_up(struct cdns_i3c_master *master) +{ + u32 status; + + writel(SLV_INT_EVENT_UP, master->regs + SLV_ICR); + status = readl(master->regs + SLV_STATUS1); + if (!(status & SLV_STATUS1_MR_DIS) && + !master->base.this) { + master->mastership.mr_type = REQUEST; + queue_work(master->wq, &master->mastership.work); + } +} + +static void cdns_i3c_sec_mastership_done(struct cdns_i3c_master *master) +{ + writel(SLV_INT_MR_DONE, master->regs + SLV_ICR); + + master->base.bus.cur_master = master->base.this; + + if (master->base.this) { + master->mastership.mr_type = TAKEOVER; + queue_work(master->base.wq, &master->mastership.work); + } +} + static irqreturn_t cdns_i3c_master_interrupt(int irq, void *data) { struct cdns_i3c_master *master = data; u32 status; - status = readl(master->regs + MST_ISR); - if (!(status & readl(master->regs + MST_IMR))) - return IRQ_NONE; + status = readl(master->regs + MST_STATUS0); + + if (!master->base.this || + master->base.this != master->base.bus.cur_master) { + status = readl(master->regs + SLV_ISR); + + if (!(status & readl(master->regs + SLV_IMR))) + return IRQ_NONE; + + if (status & SLV_INT_MR_DONE) + cdns_i3c_sec_mastership_done(master); - spin_lock(&master->xferqueue.lock); - cdns_i3c_master_end_xfer_locked(master, status); - spin_unlock(&master->xferqueue.lock); + if (status & SLV_INT_EVENT_UP) + cdns_i3c_sec_master_event_up(master); + } else { + status = readl(master->regs + MST_ISR); + if (!(status & readl(master->regs + MST_IMR))) + return IRQ_NONE; + + spin_lock(&master->xferqueue.lock); + cdns_i3c_master_end_xfer_locked(master, status); + spin_unlock(&master->xferqueue.lock); - if (status & MST_INT_IBIR_THR) - cnds_i3c_master_demux_ibis(master); + if (status & MST_INT_IBIR_THR) + cnds_i3c_master_demux_ibis(master); + + if (status & MST_INT_MR_DONE) + cdns_i3c_master_bus_handoff(master); + } return IRQ_HANDLED; } @@ -1443,30 +1618,54 @@ static int cdns_i3c_master_enable_ibi(struct i3c_dev_desc *dev) return ret; } -static int cdns_i3c_master_request_ibi(struct i3c_dev_desc *dev, - const struct i3c_ibi_setup *req) +static int cdns_i3c_master_find_ibi_slot(struct cdns_i3c_master *master, + struct i3c_dev_desc *dev, + s16 *slot) { - struct i3c_master_controller *m = i3c_dev_get_master(dev); - struct cdns_i3c_master *master = to_cdns_i3c_master(m); - struct cdns_i3c_i2c_dev_data *data = i3c_dev_get_master_data(dev); unsigned long flags; unsigned int i; - - data->ibi_pool = i3c_generic_ibi_alloc_pool(dev, req); - if (IS_ERR(data->ibi_pool)) - return PTR_ERR(data->ibi_pool); + int ret = -ENOENT; spin_lock_irqsave(&master->ibi.lock, flags); for (i = 0; i < master->ibi.num_slots; i++) { - if (!master->ibi.slots[i]) { - data->ibi = i; - master->ibi.slots[i] = dev; + /* + * We only need 'SIR' slots to describe IBI-capable devices. + * This slot may be used by mastership request interrupt, + * We can ruse the same 'SIR' map entry. + */ + if (master->ibi.slots[i] == dev) { + *slot = i; + ret = 0; break; } } + + if (ret) + for (i = 0; i < master->ibi.num_slots; i++) { + if (!master->ibi.slots[i]) { + master->ibi.slots[i] = dev; + *slot = i; + ret = 0; + break; + } + } spin_unlock_irqrestore(&master->ibi.lock, flags); - if (i < master->ibi.num_slots) + return ret; +} + +static int cdns_i3c_master_request_ibi(struct i3c_dev_desc *dev, + const struct i3c_ibi_setup *req) +{ + struct i3c_master_controller *m = i3c_dev_get_master(dev); + struct cdns_i3c_master *master = to_cdns_i3c_master(m); + struct cdns_i3c_i2c_dev_data *data = i3c_dev_get_master_data(dev); + + data->ibi_pool = i3c_generic_ibi_alloc_pool(dev, req); + if (IS_ERR(data->ibi_pool)) + return PTR_ERR(data->ibi_pool); + + if (cdns_i3c_master_find_ibi_slot(master, dev, &data->ibi) == 0) return 0; i3c_generic_ibi_free_pool(data->ibi_pool); @@ -1475,6 +1674,51 @@ static int cdns_i3c_master_request_ibi(struct i3c_dev_desc *dev, return -ENOSPC; } +static int +cdns_i3c_master_enable_mastership_events(struct i3c_master_controller *m) +{ + struct cdns_i3c_master *master = to_cdns_i3c_master(m); + struct cdns_i3c_i2c_dev_data *data; + struct i3c_dev_desc *i3cdev; + unsigned long flags; + u32 sircfg, sirmap; + int ret; + + i3c_bus_for_each_i3cdev(&m->bus, i3cdev) { + if (I3C_BCR_DEVICE_ROLE(i3cdev->info.bcr) != I3C_BCR_I3C_MASTER) + continue; + + data = i3c_dev_get_master_data(i3cdev); + if (!data) + continue; + + ret = cdns_i3c_master_find_ibi_slot(master, i3cdev, &data->ibi); + if (ret) + continue; + + spin_lock_irqsave(&master->ibi.lock, flags); + sirmap = readl(master->regs + SIR_MAP_DEV_REG(data->ibi)); + sirmap &= ~SIR_MAP_DEV_CONF_MASK(data->ibi); + sircfg = SIR_MAP_DEV_ROLE(i3cdev->info.bcr >> 6) | + SIR_MAP_DEV_DA(i3cdev->info.dyn_addr) | + SIR_MAP_DEV_PL(i3cdev->info.max_ibi_len) | + SIR_MAP_DEV_ACK; + + if (i3cdev->info.bcr & I3C_BCR_MAX_DATA_SPEED_LIM) + sircfg |= SIR_MAP_DEV_SLOW; + + sirmap |= SIR_MAP_DEV_CONF(data->ibi, sircfg); + writel(sirmap, master->regs + SIR_MAP_DEV_REG(data->ibi)); + spin_unlock_irqrestore(&master->ibi.lock, flags); + } + + /* Unmask Hot-Join and Mastership request interrupts. */ + i3c_master_enec_locked(&master->base, I3C_BROADCAST_ADDR, + I3C_CCC_EVENT_HJ | I3C_CCC_EVENT_MR); + + return 0; +} + static void cdns_i3c_master_free_ibi(struct i3c_dev_desc *dev) { struct i3c_master_controller *m = i3c_dev_get_master(dev); @@ -1490,6 +1734,52 @@ static void cdns_i3c_master_free_ibi(struct i3c_dev_desc *dev) i3c_generic_ibi_free_pool(data->ibi_pool); } +static int +cdns_i3c_master_disable_mastership_events(struct i3c_master_controller *m) +{ + struct cdns_i3c_master *master = to_cdns_i3c_master(m); + struct cdns_i3c_i2c_dev_data *data; + struct i3c_dev_desc *i3cdev; + unsigned long flags; + u32 sirmap; + int ret; + + ret = i3c_master_disec_locked(m, I3C_BROADCAST_ADDR, + I3C_CCC_EVENT_MR); + if (ret) + return ret; + + i3c_bus_for_each_i3cdev(&m->bus, i3cdev) { + if (I3C_BCR_DEVICE_ROLE(i3cdev->info.bcr) != I3C_BCR_I3C_MASTER) + continue; + + data = i3c_dev_get_master_data(i3cdev); + + ret = cdns_i3c_master_find_ibi_slot(master, i3cdev, &data->ibi); + if (ret) + continue; + + /* + * Do not modify SIR register and cleanup slots + * if regular IBI is enabled for this device. + */ + if (master->ibi.slots[data->ibi]->ibi->handler) + continue; + + spin_lock_irqsave(&master->ibi.lock, flags); + sirmap = readl(master->regs + SIR_MAP_DEV_REG(data->ibi)); + sirmap &= ~SIR_MAP_DEV_CONF_MASK(data->ibi); + sirmap |= SIR_MAP_DEV_CONF(data->ibi, + SIR_MAP_DEV_DA(I3C_BROADCAST_ADDR)); + writel(sirmap, master->regs + SIR_MAP_DEV_REG(data->ibi)); + spin_unlock_irqrestore(&master->ibi.lock, flags); + + cdns_i3c_master_free_ibi(i3cdev); + } + + return ret; +} + static void cdns_i3c_master_recycle_ibi_slot(struct i3c_dev_desc *dev, struct i3c_ibi_slot *slot) { @@ -1516,6 +1806,9 @@ static const struct i3c_master_controller_ops cdns_i3c_master_ops = { .request_ibi = cdns_i3c_master_request_ibi, .free_ibi = cdns_i3c_master_free_ibi, .recycle_ibi_slot = cdns_i3c_master_recycle_ibi_slot, + .request_mastership = cdns_i3c_sec_master_request_mastership, + .enable_mr_events = cdns_i3c_master_enable_mastership_events, + .disable_mr_events = cdns_i3c_master_disable_mastership_events }; static void cdns_i3c_master_hj(struct work_struct *work) @@ -1527,10 +1820,80 @@ static void cdns_i3c_master_hj(struct work_struct *work) i3c_master_do_daa(&master->base); } +static int cdns_i3c_sec_master_bus_init(struct cdns_i3c_master *master) +{ + u32 val; + int ret; + + val = readl(master->regs + SLV_STATUS1); + + if (!(val & SLV_STATUS1_HAS_DA)) + return -EFAULT; + + i3c_bus_maintenance_lock(&master->base.bus); + ret = cdns_i3c_sec_master_request_mastership(&master->base); + i3c_bus_maintenance_unlock(&master->base.bus); + + return ret; +} + +static void +cdns_i3c_master_mastership_request(struct cdns_i3c_master *master) +{ + int ret; + + ret = cdns_i3c_sec_master_bus_init(master); + if (ret) + return; + + ret = i3c_master_register(&master->base, master->parent, + &cdns_i3c_master_ops, true); + if (ret) + dev_err(&master->base.dev, "Master register failed\n"); +} + +static void cdns_i3c_master_mastership_handoff(struct cdns_i3c_master *master) +{ + int ret; + + struct i3c_dev_desc *dev; + u32 ibir = master->mastership.ibir; + + dev = cdns_i3c_get_ibi_device(master, ibir); + if (!dev) + return; + + ret = i3c_master_mastership_ack(&master->base, dev->info.dyn_addr); + if (ret) + dev_err(&master->base.dev, "Mastership handoff failed\n"); +} + +static void cdns_i3c_master_mastership(struct work_struct *work) +{ + struct cdns_i3c_master *master = container_of(work, + struct cdns_i3c_master, + mastership.work); + + switch (master->mastership.mr_type) { + case REQUEST: + cdns_i3c_master_mastership_request(master); + break; + case HANDOFF: + cdns_i3c_master_mastership_handoff(master); + break; + case TAKEOVER: + cdns_i3c_master_mastership_takeover(master); + break; + default: + break; + } +} + static int cdns_i3c_master_probe(struct platform_device *pdev) { struct cdns_i3c_master *master; struct resource *res; + bool secondary = false; int ret, irq; u32 val; @@ -1572,6 +1935,9 @@ static int cdns_i3c_master_probe(struct platform_device *pdev) INIT_LIST_HEAD(&master->xferqueue.list); INIT_WORK(&master->hj_work, cdns_i3c_master_hj); + INIT_WORK(&master->mastership.work, + cdns_i3c_master_mastership); + writel(0xffffffff, master->regs + MST_IDR); writel(0xffffffff, master->regs + SLV_IDR); ret = devm_request_irq(&pdev->dev, irq, cdns_i3c_master_interrupt, 0, @@ -1581,6 +1947,10 @@ static int cdns_i3c_master_probe(struct platform_device *pdev) platform_set_drvdata(pdev, master); + val = readl(master->regs + MST_STATUS0); + if (!(val & MST_STATUS0_MASTER_MODE)) + secondary = true; + val = readl(master->regs + CONF_STATUS0); /* Device ID0 is reserved to describe this master. */ @@ -1596,6 +1966,7 @@ static int cdns_i3c_master_probe(struct platform_device *pdev) spin_lock_init(&master->ibi.lock); master->ibi.num_slots = CONF_STATUS1_IBI_HW_RES(val); + master->ibi.slots = devm_kcalloc(&pdev->dev, master->ibi.num_slots, sizeof(*master->ibi.slots), GFP_KERNEL); @@ -1604,15 +1975,31 @@ static int cdns_i3c_master_probe(struct platform_device *pdev) writel(IBIR_THR(1), master->regs + CMD_IBI_THR_CTRL); writel(MST_INT_IBIR_THR, master->regs + MST_IER); - writel(DEVS_CTRL_DEV_CLR_ALL, master->regs + DEVS_CTRL); + + if (secondary) { + ret = cdns_i3c_sec_master_bus_init(master); + if (ret) + goto err_postpone_init; + } else + writel(DEVS_CTRL_DEV_CLR_ALL, master->regs + DEVS_CTRL); ret = i3c_master_register(&master->base, &pdev->dev, - &cdns_i3c_master_ops, false); + &cdns_i3c_master_ops, secondary); if (ret) goto err_disable_sysclk; return 0; +err_postpone_init: + master->wq = alloc_workqueue("%s", 0, 0, pdev->name); + if (!master->wq) + return -ENOMEM; + + master->parent = &pdev->dev; + writel(SLV_INT_EVENT_UP, master->regs + SLV_IER); + + return 0; + err_disable_sysclk: clk_disable_unprepare(master->sysclk); @@ -1627,6 +2014,9 @@ static int cdns_i3c_master_remove(struct platform_device *pdev) struct cdns_i3c_master *master = platform_get_drvdata(pdev); int ret; + if (master->wq) + destroy_workqueue(master->wq); + ret = i3c_master_unregister(&master->base); if (ret) return ret; @@ -1653,6 +2043,7 @@ static struct platform_driver cdns_i3c_master = { module_platform_driver(cdns_i3c_master); MODULE_AUTHOR("Boris Brezillon "); +MODULE_AUTHOR("Przemyslaw Gaj "); MODULE_DESCRIPTION("Cadence I3C master driver"); MODULE_LICENSE("GPL v2"); MODULE_ALIAS("platform:cdns-i3c-master"); From patchwork Sun Mar 10 13:58:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 10846299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CFB9A13B5 for ; Sun, 10 Mar 2019 13:59:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4AE128F2F for ; Sun, 10 Mar 2019 13:59:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8BF928FD3; Sun, 10 Mar 2019 13:59:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C20EC28F2F for ; Sun, 10 Mar 2019 13:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wbGG6jXWRduyY3b2ToJyFQtKrKNfOeA8EFnPQfF65KY=; b=Dtp2LUIb3xmWbT 4fvbON0mqV6zwtvE0aUJZeyP85G+JI28qri/eW4OPuLYqnuK0DYPxYjdKgR2krsvNQXZoFvW2Cl3X WsN6mKA3zna2KTw0pSaFXPie8bHxUTQ4Pd+E4KgkWbvcdxEREKWDrfzYjhrfgHJysnE1NjR1uCPrj nw3kRiDTaYwOjduEvk+v/GYtJPx9bmISqBAJ+fbixNGqfqMWawTL0zVeK0rLvS9MSdCaN8Bu+Ls7J 8sUQCFk+RhKzU/ZXmPZ57mo/GQoz+HGKE7hBlQcGjq6qvHlXC+q/D1ilfCjwMdwVw8xnVBRv9lBJC 1qbudyuwSQf1tDCw5f5A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yzC-0002st-Ag; Sun, 10 Mar 2019 13:59:30 +0000 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193] helo=mx0a-0014ca01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yz7-0002qY-PL for linux-i3c@lists.infradead.org; Sun, 10 Mar 2019 13:59:29 +0000 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2ADsBMw025122; Sun, 10 Mar 2019 06:59:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=GT/nD1Mut/FEb6zKYkPUEAXA1p/zPjjWqseBVahs4wM=; b=ENA/dYfucf8Z7KIFCcUF419vCZPBkPK3aNLV/aD1jqcfgNTzumqjfTw5Nqj5RoIOaHcr YNpjUMOMvqi5aDqDOADfzhaRQFgVnjzCYJyCW6DLJGKzQiMs46x7/XhgiFl3bP3UjGyr x+dtw1JpRnYo6mx7wzVDiBF234M5dmq+xG0NDL97Fz22BcRIdZRXku9geoaElIBmt6G8 smbFrvsxRliURMry+b4gATHpPavircdzCS35AI6kwJ37uYgraW72TXISckZ3wqE5cWeH TNbgJNZktb6vh0oSYzFPpC+koq2sEBrsYvt/QsE7pIT1pVIN/y1sjD6TnrfUZtJmsJtN pw== Authentication-Results: cadence.com; spf=pass smtp.mailfrom=pgaj@cadence.com Received: from nam05-co1-obe.outbound.protection.outlook.com (mail-co1nam05lp2050.outbound.protection.outlook.com [104.47.48.50]) by mx0b-0014ca01.pphosted.com with ESMTP id 2r49y1cqyk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 10 Mar 2019 06:59:22 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GT/nD1Mut/FEb6zKYkPUEAXA1p/zPjjWqseBVahs4wM=; b=Uyg6liK+9SmCUvpRrpaKAQxga3+AVlQl8SiGWkyeuiebzrI5byzHieCHHUZ4EjzhRkp7hP6InMt2lYOnNEYBr6wH5YvMgWIqjPs7cPM5xWsR/UZDHBJGU52fAdVWQYh6YrEIUhQhLcK5KNAnsrKv6p5ywpUWqzxq8C9sd9YpKkM= Received: from BYAPR07CA0062.namprd07.prod.outlook.com (2603:10b6:a03:60::39) by MN2PR07MB5920.namprd07.prod.outlook.com (2603:10b6:208:ae::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Sun, 10 Mar 2019 13:59:20 +0000 Received: from CO1NAM05FT038.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::209) by BYAPR07CA0062.outlook.office365.com (2603:10b6:a03:60::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.16 via Frontend Transport; Sun, 10 Mar 2019 13:59:20 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 158.140.1.28 as permitted sender) Received: from sjmaillnx2.cadence.com (158.140.1.28) by CO1NAM05FT038.mail.protection.outlook.com (10.152.96.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.11 via Frontend Transport; Sun, 10 Mar 2019 13:59:19 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx2.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADxEpn032144 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Sun, 10 Mar 2019 06:59:18 -0700 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 10 Mar 2019 14:59:15 +0100 Received: from lvlogina.cadence.com (10.165.176.102) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sun, 10 Mar 2019 14:59:15 +0100 Received: from lvlogina.cadence.com (localhost.localdomain [127.0.0.1]) by lvlogina.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADxFvl022682; Sun, 10 Mar 2019 13:59:15 GMT Received: (from pgaj@localhost) by lvlogina.cadence.com (8.14.4/8.14.4/Submit) id x2ADxFSa022674; Sun, 10 Mar 2019 13:59:15 GMT From: Przemyslaw Gaj To: Subject: [PATCH v4 5/6] i3c: master: Add module author Date: Sun, 10 Mar 2019 13:58:42 +0000 Message-ID: <20190310135843.21154-6-pgaj@cadence.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20190310135843.21154-1-pgaj@cadence.com> References: <20190310135843.21154-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(136003)(396003)(39860400002)(376002)(2980300002)(36092001)(189003)(199004)(50466002)(42186006)(8676002)(107886003)(51416003)(26005)(86362001)(305945005)(6916009)(54906003)(16586007)(356004)(316002)(106466001)(246002)(105596002)(186003)(2351001)(4326008)(76176011)(47776003)(8936002)(50226002)(126002)(476003)(486006)(2616005)(426003)(7636002)(87636003)(6666004)(4744005)(446003)(48376002)(11346002)(478600001)(26826003)(336012)(2906002)(5660300002)(1076003)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR07MB5920; H:sjmaillnx2.cadence.com; FPR:; SPF:SoftFail; LANG:en; PTR:corp.cadence.com; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 868aaaca-eb47-42f9-77be-08d6a5609799 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060); SRVR:MN2PR07MB5920; X-MS-TrafficTypeDiagnostic: MN2PR07MB5920: X-Microsoft-Exchange-Diagnostics: 1; MN2PR07MB5920; 20:M7bMFxY1aqO1wWeizEjA39yrqTLAN3Exp029FQsy4sPe5QnDk66wLYuMPsyoCZ6ROXtWaq1tOYcOKNNPvTf9Lv+omA7tVx0DcnwqNTOEfWofVUCTvjWbIGMTh6aVeydK+bYNXYIhVfQOSiJYeVee3pfNCk4XVwBBwJdwWqRI6T8kC3W55N093cq0NpIXwo+nJN4c739a/R626glPVoQMEzj00d/U9Gti7RZanwxndxZbI59voDqddmaWEsMFx27d4m3i3UVY8O1xde4JQ0VYp7+qt8nFHC2A8QluioaGyUkcTffkFqRbOzorOT3suTw4p7X1LyQ/zcf8qg7/7YRYv83JrtdwPheQM0JFVmINHEbbYkoe5U3+GS2Ik7CHZMIplU08cT5M210j+r/L5uZJDnyR1epESDjHHQVgSfvnZY5LqXl58sbDi3CLgmfcfGmVTCOPrLTR6PvtaS30Q1Q607q8SCBeG4aC3SOMgyTzGWfZA2j/p4zv8YUGDbBVIvcF X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0972DEC1D9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MN2PR07MB5920; 23:e6OrpNLL0L9Dk4ytdvJi1BvHpPyoGRFNfd0L0xv/c?= hp9UWvqZ9Gy/MIortAcZiXC/Suk+yefGvvtaGw3r3f5WsxaRQMwk7s+wzTIMZ6wxUUrnG3R7dYmWeTTi+hxf+I6XMAAzZlaFNpuJ+YnAdthsxaXhOiDLslElj+0rJRUGJ4HokH1MYpgO5txNcgk8Vz+7fSK8iOvbV3MNv8keKuiOivQ/6kLnMc9BSh3zViDUrPjCcM9kF/3iiOsDfFINNfMJN6r8HUWK5RJFWLnO5Bkh51nFs2EtZgNEOt6h0fOmSIjuplGOOZ2aORXCWHXIBTOlqbD75PbaSo7wqLOFpWJuQ3/snOJ0oar2bKuGF63XMEdpyWLPXeIamhmNF+UwRJsNtgl0ES0CaJoN2/lw8aCcvvabHdzcVBHCt4kUvOnjPt0D2oxQiI91btwsrI56EORYnkCML4bDTGRtLOUSrR26iQRyOQSimxmqbFcLOz9sjwUXbt1B/VkRYt3a+PPCl9L3bigshc4IJH4hyCLGYygf9mjC0sbt7j6793Xl7J5lc7QPNZFvfaUhChkAaDFG0ifcmrm38GN2MqQq3doX7Q+cynX7+0IzjWclKMxiv0sj98ZSatOFBhCDepedKEoAIWFtb2Yh029uOLc4jfQu0iXoRJkXxfoaJuITy56z4PmxUSY3G4VLKBpIEmU9uhp3V+Uti9gIRiGsPg/60bidIwqc9yCH6cZZ6TtpgojB5sg0RNGdre3c0a5EAY7dFErItSwgYUTd0pE4Im4dpUicHaYxXJn21P6U7dHyv+PL5Nr1UvEwvbxlNa2nXvrW1/pmENjCfm8p3SDW7d0ekwd1u5RNTbBmvfTkfDBwsUx2YrKB0nne2f4F2K4h99Vt/VZoKTE0D63tSxMtxTxBMZTD2U2lAKCYbEBjYsZEdIWWZKDCANeXjHGqlWaPXo6PpgNX6t1ienY+CF60dm9Dua4Bti534lnwog5ta8tvKuJHMqPMGXnOSX09Jiv+O9YPLIBM7vO0/gpX1NGhSBGn/mhGDdCW0lZpmPpmn1JkiH5O2s5WI67f3rFZvZPbjzM4ZYY9VRYIPMhSqEV0ofSsVkxezcQ1VTiU4vY0TG2vxiVzUgCKl4= X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: xYhyQwL5+tHV8gkhDuRLb01a9DekPxGGdbrftgFM5U2J44ff9z71Z8hWFc0uKC6Ua3Ak47RSwc9xELNz8fXZNpV0/5s8KuZrP2bsDrLYfC2XuoBx4Fu1R7juKoFbNEJnzfA0Hm8lKnPqGw2qzTlREDUE17NfxUrUo+QcKY6xyNe1WQPsnQHyWGJPJDcCOkeLOqraz3TjbcmIWMPB+ypw2uLPBBbc9u00ydGFUayYMf9w8SJ83EG9s0Ov/PXPpcY147fMfLdV/2e6rs+YfKeVvvKxU9Idem5roayTvonCzKIN4v7j44WgskmHnY7AqitqbOml8C3heIH7j/rzSchZnVlKuBnk/X13WpnHncObmNbK+SiqWeOrIlwqkWH9wqZ2xdTXQ4oge4pUXTgHOKsTeBGYEBgLxJWAJBJnjGN873c= X-Microsoft-Exchange-Diagnostics: 1; MN2PR07MB5920; 20:uDqPmVh8tP+zkUN9xXFIcl/ngbtVJkFa66fTyUSt9g0nFCmuDnrA0L64a/nMFAA7hHdKf8rqCV8z3HZWEvE/uUd1sCf8ryMK+oI2wdD6uauaXc8KAF/WPHPd3lIdEiMmxXuWa6+JTEbqOsQ2m0mvzl37uQZM8V/rBwcayENYoQQj5NPZUqtLBr1FyWT8GpFFfEqhhJyqXQszyNJqANuuxiMrPlaF4C7c1FAhL8kKji6UpEpSDwH59/V0vBOo1v8m X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2019 13:59:19.6843 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 868aaaca-eb47-42f9-77be-08d6a5609799 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.28]; Helo=[sjmaillnx2.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR07MB5920 X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:_spf.salesforce.com include:mktomail.com include:spf-0014ca01.pphosted.com include:spf.protection.outlook.com include:auth.msgapp.com include:spf.mandrillapp.com ~all X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-10_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903100109 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190310_065926_075792_45D706BC X-CRM114-Status: UNSURE ( 8.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, agolec@cadence.com, Przemyslaw Gaj , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds myself as an author of I3C framework. Signed-off-by: Przemyslaw Gaj --- drivers/i3c/master.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 7a84158..8d68001 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -3,6 +3,7 @@ * Copyright (C) 2018 Cadence Design Systems Inc. * * Author: Boris Brezillon + * Author: Przemyslaw Gaj */ #include @@ -2931,5 +2932,6 @@ static void __exit i3c_exit(void) module_exit(i3c_exit); MODULE_AUTHOR("Boris Brezillon "); +MODULE_AUTHOR("Przemyslaw Gaj "); MODULE_DESCRIPTION("I3C core"); MODULE_LICENSE("GPL v2"); From patchwork Sun Mar 10 13:58:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 10846307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F3B62922 for ; Sun, 10 Mar 2019 13:59:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBFEE28DD1 for ; Sun, 10 Mar 2019 13:59:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D01DF28E2A; Sun, 10 Mar 2019 13:59:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9FE0428E39 for ; Sun, 10 Mar 2019 13:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xY0d6tgUfy21pAgDeokVRPpKKyDMumBsU7VY3mvHkUM=; b=IOpmWPDVIJyayx 3mbCbS6EyOe0siNKLptIZojItQcHRoVoOJSYn+bITpnhrYF74xesd7ZG2JCCoozzPj1TLKHtBLAXS 8Ir3YrPzKGQ2KdSrEj4a1ta922AlWa1Q3/BV/bTZzX7/vJ6nGw4iZQI8j9HPe/CkBsi8Zy7OAHa37 JPL2XwMgVZnps+zz/YrIU9KBMBhMEvgj6/A6woh83sH/VEQEBzFv0NcqFojIOnEwOOGQxBC0PctJ1 76VnN+iCWv/LwmIX9Jytr+lwIfOtWjECih5pzjNDVL1gBqzoKKccEgUtCJjqcURabdq8hPujepKQP 98QlogyTLIt6MMc9qG6g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yzB-0002sa-WB; Sun, 10 Mar 2019 13:59:30 +0000 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193] helo=mx0a-0014ca01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2yz7-0002qa-EW for linux-i3c@lists.infradead.org; Sun, 10 Mar 2019 13:59:27 +0000 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2ADsBMx025122; Sun, 10 Mar 2019 06:59:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=eYhjsyGOCfLPGIALgjI24n0ERlk55slSrZPRy66W5/Y=; b=Fq5Ew433tSeeYrPqHIS+U5uwa15w7rX+IN8GQEWwFSP8DdaJ/Q4ykE6YcT/zHWNrvkje MeBhFV+mi6M/gK61yhxpgyrF6WZ+pqGeKnb4qqQ7Tu/XqVj/R8PZ/6ig6duplca8NaqY loNvr9zn2bqHQOEJ9AR5zfBKYdEGbs0sr0M8do6lqyGS2tPb61AwJYbbhY9HuEMehyB6 fP+5g6gYxSs6YHTNY+zF1Wf4JJX4Te4N72xE9z1fY7pxb6ATXxBNq4NEf+Hj3bD2WNDB ghysm/kIy/QyttzHqr7gTUugaiCEOZNcR2d1632J6nI3CapS5o+ox6NxZRBCbTQ55xDN Gw== Authentication-Results: cadence.com; spf=pass smtp.mailfrom=pgaj@cadence.com Received: from nam05-co1-obe.outbound.protection.outlook.com (mail-co1nam05lp2050.outbound.protection.outlook.com [104.47.48.50]) by mx0b-0014ca01.pphosted.com with ESMTP id 2r49y1cqyk-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 10 Mar 2019 06:59:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eYhjsyGOCfLPGIALgjI24n0ERlk55slSrZPRy66W5/Y=; b=cFAME8N6BJCx84d1qgARc8T/zb+iaUQfSKR/Z1cHzvgai8hnZGflXs38MClElBM+kECtYjj3BKtHKKUHdRefjPZtaZh1RwldsfRbZUVD7UR4/wIniZEPq3vrqrQ4RNoBhGSpeJFJdhERZtp61oiFLE7L6d/5hgdr33woJ/9j2Wg= Received: from BYAPR07CA0099.namprd07.prod.outlook.com (2603:10b6:a03:12b::40) by MN2PR07MB5920.namprd07.prod.outlook.com (2603:10b6:208:ae::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Sun, 10 Mar 2019 13:59:21 +0000 Received: from BY2NAM05FT058.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::206) by BYAPR07CA0099.outlook.office365.com (2603:10b6:a03:12b::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1686.17 via Frontend Transport; Sun, 10 Mar 2019 13:59:20 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 158.140.1.28 as permitted sender) Received: from sjmaillnx2.cadence.com (158.140.1.28) by BY2NAM05FT058.mail.protection.outlook.com (10.152.100.195) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.11 via Frontend Transport; Sun, 10 Mar 2019 13:59:19 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx2.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADxEpo032144 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Sun, 10 Mar 2019 06:59:19 -0700 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 10 Mar 2019 14:59:17 +0100 Received: from lvlogina.cadence.com (10.165.176.102) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sun, 10 Mar 2019 14:59:17 +0100 Received: from lvlogina.cadence.com (localhost.localdomain [127.0.0.1]) by lvlogina.cadence.com (8.14.4/8.14.4) with ESMTP id x2ADxGtU022987; Sun, 10 Mar 2019 13:59:16 GMT Received: (from pgaj@localhost) by lvlogina.cadence.com (8.14.4/8.14.4/Submit) id x2ADxG52022983; Sun, 10 Mar 2019 13:59:16 GMT From: Przemyslaw Gaj To: Subject: [PATCH v4 6/6] MAINTAINERS: add myself as co-maintainer of i3c subsystem Date: Sun, 10 Mar 2019 13:58:43 +0000 Message-ID: <20190310135843.21154-7-pgaj@cadence.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20190310135843.21154-1-pgaj@cadence.com> References: <20190310135843.21154-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(136003)(396003)(39860400002)(376002)(2980300002)(36092001)(189003)(199004)(50466002)(42186006)(8676002)(107886003)(51416003)(26005)(86362001)(305945005)(6916009)(54906003)(16586007)(356004)(316002)(106466001)(246002)(105596002)(186003)(2351001)(4326008)(76176011)(47776003)(8936002)(50226002)(126002)(476003)(486006)(2616005)(426003)(7636002)(87636003)(6666004)(4744005)(446003)(48376002)(11346002)(478600001)(26826003)(336012)(2906002)(5660300002)(1076003)(36756003)(42413003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR07MB5920; H:sjmaillnx2.cadence.com; FPR:; SPF:SoftFail; LANG:en; PTR:corp.cadence.com; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3b3debd3-e94f-4194-234b-08d6a56097ba X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060); SRVR:MN2PR07MB5920; X-MS-TrafficTypeDiagnostic: MN2PR07MB5920: X-Microsoft-Exchange-Diagnostics: 1; MN2PR07MB5920; 20:g3o7CuawHB61OSfs/CpdCH/vv75ipVBkGlfUeG9iQCD2INjwMG3AgUXzGJ/1IH95dzFr7h2Gr2EXwTbWJHcXL8tesSEf8wOQxMmbczkdmtw8iVrFB3KeePqWxgjSJcuF9lfLSFXyqcM8r3Y8T2aNzcssYQRI/DM6qQQu/hX5coanJNaMfHaalpQOe28KpsU3RQaKc/EnDv6hmKAlQxmY2xeCRgrlzpDeBBkY7C3bzf1b3g18p4SrETT/cfOqohwjHh6KhgLdRjotQF1nf8GTSmH/C8/VS6V3qfzbqxE2PRZPCXogKqr8d6VziXw/zLc4gmeK7HByw0udbuDO8zQ78JVdOSwHE0X8xOf4g4qj872jzAF4uFhb6ahAGszmUtuFnbMpq/QHjL1bd+5jJjgBJdYwaHPxhzuGYmxw8+D4h/ThNsVVr1FIdr/xBs4OS6NX//33fxy6qEntFjPzeHStT8DK7e/6/hO2AIv2xGvfadWZy6gz8Dit/ceecGJp8EqB X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0972DEC1D9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MN2PR07MB5920; 23:lGJksx3qBLNzuSqAfftKBk9nHq3X8Lg6CDYza5Gn3?= YoGqZ07aDQpy4ZVIcZTguLPLn3Ng2FFZVV848J4Gx+CNNP6WWcWk7c0MhhnNLV0PTkaEsoca6MAuCM27OE74Fd/vBw1ZFuIY7x2Tu0ifhC0DQmUwQ0K/unZCybX2g4a8uqk7r9q0wRxA4sBLVvJy+HFpG74GpN5twdUgv2J+QXIjN6jCkkjTcEN6jNyVo1dtbOvip7Lt9XYFzpn2HCqRIpWYA3aqzWW/4Ot0TxC+OrVSWqFKXoscgp4Kk1uDSEWa/d5RqMxjlwSXmQbC6Q0N4v80IDSXc0zBVF7LRVeeQC2yPc43X39wsDrCD6evyUr+/GvR8GF4GA4FMb22trRLV2t7ZJdYySCwLUZGJUTHn8cLny0MyVdGtsrXiKOQs5R2TA8yAW87cVxiqsmarpIjieSfmbREegMYuM2hm1KesoTrdGBlsSQeniSXfKutLw1vJvBXS+Fp4nfztIFvgPhPC5D+x717pPex8xYF85DSf+tpYkON4/iTHNlgiDAyvogt34ANE3CjrURo1MZ2K91PE8dwKeL/u9fQqJSCM6Wsw7J9vn8Tjax4tr7LDx6PasyF6KQ4FnPHq2WUtENJ8BJtAOw3QzDyZbVSOypIjrE8pgge0FXjZlst21fvg8aXB9cOXS210NksSBB5TUrVLG3Cq8qtMY6mVolz4Psjw0gYZpBbN652PihbJFzPnc1rjRr13WvXdFJzJm/81OYJm93gZRSWcwATnKerXL5CcBCkoWH4xys97BIw11juMTp7SvqBmgRF12sw5KpMwxLWacNU8ilhfVbth5fpJq0Tj26wXYWHIat8kTt1LNtDDuMy1P6yNuJQp8tnEGVcEePXHFTELw11CukOglvHTZ7INCgv5I3L1HcQ58RHFfT6yIMaXwY04jyRhrg1NffUGYcvSqT2JTap8yMHNoztU+ZDneDZZWA3XjehAwINZo9wCyItaySLlPXdtDNE+BQbERt1f554Fa4nvxrYT0JIw4je1llR2Tss2OJb486rEZ0rHaZfoXSlwZIhHXVTqCu4vfMFJj66GtO7CTSzsKK0/g6K3UgCiZckG/MLiwfo/fAEtZowb/GRzLi7w83RYW7dws0AjfaphLS X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: 94CaeItZk6D88gfrFbDnjiyJAiQMfC0krq3W3o8MTWHCogjvKTkPu8yADVOcr6D4nZeQwrYMAWQ7Gj/4ZB/LA35CWC6SUa3Ygr622H80gEdIKKD9mJI6Ci5x7TruzgHu8LMcdyFg/lnmaSkS2KSfX/BQnQCbldB36ssoQMZHOiaA6QNBaUVeDrJBbzUpW3J8G4QgE8+ZyVPVIDvjuD9YOd7Rly75EvUDBbS0Ta87e1wXlQxRTuwPlmfDgexbSgUkEOgW8A7kNX8z0uxKo59RXoc9LYD+1DXsSWimKP/JIgsAVIcemfkhxYrZ0DfDfzhK3AIXUneDUr0g/d64uko/v+ZbFw6tfsRwipcDFM7KRS5ELf4l+ybRGosG/mDLAnHDYgwJIXswXSGv+o03f3VQx26ThngAN3NeS9JnqIIoNbY= X-Microsoft-Exchange-Diagnostics: 1; MN2PR07MB5920; 20:Cc+A0S8zdr2hDSfJnE8jWJ73F3k8hWgFknGsLeIhxo5TX6P9wsLd/v3LzOskl7MVyrSYZj6NqWYUwBXpT/5MQq6pauiKzm+LqUVMk5T0ALjBgTalRNKiqHih+/P6zN433KpEtPmYYmNOSNQ1i1dxvOXOJuYwgDB2uahd/rjypMCWuRYykXa3LjeaKt+z8Fh8dpfkqGA1Z7DKQWKU9+Wdce3aZ9B3GVPkfP6Xq+jykFVZHoMuwq1ccgg06loV15Xq X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2019 13:59:19.9885 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b3debd3-e94f-4194-234b-08d6a56097ba X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.28]; Helo=[sjmaillnx2.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR07MB5920 X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:_spf.salesforce.com include:mktomail.com include:spf-0014ca01.pphosted.com include:spf.protection.outlook.com include:auth.msgapp.com include:spf.mandrillapp.com ~all X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-10_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=943 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903100109 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190310_065925_691636_7274DF67 X-CRM114-Status: UNSURE ( 8.78 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, agolec@cadence.com, Przemyslaw Gaj , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As discussed with Boris Brezillon - I'm adding myself as the co-maintainer. Signed-off-by: Przemyslaw Gaj --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index dce5c09..a5003bd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7175,6 +7175,7 @@ F: drivers/i2c/i2c-stub.c I3C SUBSYSTEM M: Boris Brezillon +M: Przemyslaw Gaj L: linux-i3c@lists.infradead.org T: git git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux.git S: Maintained