Message ID | 1606574899-21433-1-git-send-email-pthombar@cadence.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=Ihvx=FC=lists.infradead.org=linux-i3c-bounces+linux-i3c=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A3FEC64E7A for <linux-i3c@archiver.kernel.org>; Sat, 28 Nov 2020 14:48:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 07C262465A for <linux-i3c@archiver.kernel.org>; Sat, 28 Nov 2020 14:48:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="k9gqaLLv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="AHpGSN49"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="0dqPLMwL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07C262465A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=7Oe+WF7N3V7Vc1d7oKm6OToLwDW/IcPzi+a8+2Pqmis=; b=k9gqaLLvH1RxQ51nKRNDwlZ73z RQw+4SsYY+5wnioPgyeb54UjRdrAGQusbih8SG2KYdbF2VY8RNLYMCO3DHQz2hNqSM3AuZ4KVmIvu y/ejZxY6H1qm6NhiPmK4QIdTU0O4b3uknmcZPgiRp+qTcJ94P7dygRtJDR8hGtC8js6JKWMnnle6O xVqDd6okUT1KjnLXSncZHhN8SRaqOCfLW4qJLgWgMDE4HB8ev/dHoB4cgScaG+C1qMaN4A6eXoB1a xyRpmMKY5E6G9V1gb7YOo8B9zgMQV6MTaHzVgKV1Dk1k2wLJ+BYeTqQzJ/4EgkGTnNEa44yeQ32Q+ B66doyyQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kj1WZ-0003xw-Dz; Sat, 28 Nov 2020 14:48:31 +0000 Received: from mx0a-0014ca01.pphosted.com ([208.84.65.235]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kj1WX-0003xd-Ce for linux-i3c@lists.infradead.org; Sat, 28 Nov 2020 14:48:30 +0000 Received: from pps.filterd (m0042385.ppops.net [127.0.0.1]) by mx0a-0014ca01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0ASElpkh027055; Sat, 28 Nov 2020 06:48:26 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=proofpoint; bh=6HLJSNbqupKDA6NkIIamnWz2e6tRBqh6fhldFQb6nC8=; b=AHpGSN49JTwW9S/B1/bMgtqLVj3DPeJdF4w3FLfbG3f6ky3RBUXqKYMx7MIMWswpGxMB qT2voof4f48wJDbWtnL9YBjOhjN4qW/R3oW8HTY1n27IHtZKS4Pgl9HS/ByPXyiCig7X zaPyBmSYoqBF96Dv/Xa+imwmrcK07cFtVOD1ENDMStFwTbXWiyyNyw6yRjdHB0uzpNOi 97NxbCKMUW3CYqLWbPOVDzB7p5Dw4LHUAIp5GJr/jo4cgEvp+TsHY+yjZ76gcrX75pFh KMkWfx0MI2oYqK5vbg5luVSHrnxgZ3270ubIJdHHt0E/LL/xoutiFCXM9eoRm+Xy7SYj fw== Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2103.outbound.protection.outlook.com [104.47.55.103]) by mx0a-0014ca01.pphosted.com with ESMTP id 353m02rf69-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 28 Nov 2020 06:48:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ofajjO7oup6hcKSTRPzU2MJDn7Wys93jKQvT3pUR8sHStyv5wLGljPFu9ql4+Fee6M6ml+elatDszhk41uXQRiVuM/uYxQ84re1xoxYCjJUId9qNoUZ+sQVGHjXC+zAa/T0Nu7CxWhRiypNUBSFbisokG/M27SsqyXKlsW+pTOKJhzToD1pPSgZqLIjaHyfU6GvHpF2kJBrIohHXRqCpWpwPQTN8KD6oKUBfeZcpdUFDbCtduXDO4+HGVjSP9Nu/h1I2Xglm8FfnPDfufirTbb3//crJPh+kDIpoa1FlCCVn8Vb/IxU9LibPBEdZZnlVzD+4/vw6G3bUdZ5lrEUW1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6HLJSNbqupKDA6NkIIamnWz2e6tRBqh6fhldFQb6nC8=; b=hH0OxfSfitTR8U58dZzXMW5cNV9PEiRWVF9J5eT8hGbIk1AzYA4TXktZwi0ejmosq90ERU9Tk/l3SfA+LEfNqejLPxSYP2CewC+qYidNibF218A1pSV5SFUejytccpzhQaJPkpKM6GqFvv33SK9mpJl6p/o9bYpPU350I7sxtEtRPDIEuzGO42xVRx0XbBhHa4yN2VLpwojbrBXV2qR7ZLrafiC0OW9+1kcZR2pmHwOXlq5kkpS53hBe4wbBML3Jh3jCw8yKdwif2GCCEWGxv1cwnjc6WjzZgkxECYwepXDCBuxWyXdqxeG28zrCfYYBknuy0hHK0zvC2oboIcI4Xw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 158.140.1.147) smtp.rcpttodomain=synopsys.com smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6HLJSNbqupKDA6NkIIamnWz2e6tRBqh6fhldFQb6nC8=; b=0dqPLMwLpJ4Nl2+Zjgyd+9oZftohmnQCDkuD+leGe+gt8Ktn2WkwcQWexNHGz8iyRdqDlAPnFE4owUAJeOahAITlWFEZ6Y5fqgmmWdSaXW89+LSSr4W9m44QA78/IEIOxWvNN9Sa7QgTIJQdEK2pf2q8UYk2NjJqoJPmFUk/bCw= Received: from MW2PR16CA0030.namprd16.prod.outlook.com (2603:10b6:907::43) by MW2PR07MB7897.namprd07.prod.outlook.com (2603:10b6:302:6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.30; Sat, 28 Nov 2020 14:48:24 +0000 Received: from MW2NAM12FT033.eop-nam12.prod.protection.outlook.com (2603:10b6:907:0:cafe::dd) by MW2PR16CA0030.outlook.office365.com (2603:10b6:907::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.20 via Frontend Transport; Sat, 28 Nov 2020 14:48:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 158.140.1.147) smtp.mailfrom=cadence.com; synopsys.com; dkim=none (message not signed) header.d=none;synopsys.com; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 158.140.1.147 as permitted sender) receiver=protection.outlook.com; client-ip=158.140.1.147; helo=sjmaillnx1.cadence.com; Received: from sjmaillnx1.cadence.com (158.140.1.147) by MW2NAM12FT033.mail.protection.outlook.com (10.13.181.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.11 via Frontend Transport; Sat, 28 Nov 2020 14:48:23 +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 0ASEmLjd013868 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Sat, 28 Nov 2020 06:48:22 -0800 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; Sat, 28 Nov 2020 15:48:20 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sat, 28 Nov 2020 15:48:20 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id 0ASEmKiL021471; Sat, 28 Nov 2020 15:48:20 +0100 Received: (from pthombar@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 0ASEmKHj021470; Sat, 28 Nov 2020 15:48:20 +0100 From: Parshuram Thombare <pthombar@cadence.com> To: <alexandre.belloni@bootlin.com>, <slongerbeam@gmail.com>, <vitor.soares@synopsys.com> Subject: [PATCH v9 6/7] i3c: master: sysfs key for acquire bus Date: Sat, 28 Nov 2020 15:48:19 +0100 Message-ID: <1606574899-21433-1-git-send-email-pthombar@cadence.com> X-Mailer: git-send-email 2.2.2 MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6864bc72-80ac-4e36-3491-08d893aca816 X-MS-TrafficTypeDiagnostic: MW2PR07MB7897: X-Microsoft-Antispam-PRVS: <MW2PR07MB7897DA2141F0A1658D649ACBC1F70@MW2PR07MB7897.namprd07.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:510; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Mhq/6/V4eI40aYC4XDe92dtS0tbbuyBluTHxNBlui2gPQA+YQV7vANAreQ/FG+qf2vnp8BlJFx9gRHIu+NXqmrjOsAFO2aXoMD1ob3NMoqu4bwrCobWKAgXi0zly4SxAdsL0mFs8IRuzOj2omyPdmR6r9JwFc5w2Py1EA+OnkUAjWcXBjfTCn1omyi+/3JJnTOrZX0XAWDrSjnTdZu+WqhCGQVFoGeg8sU6t7RDZBL58hJa2RkAf3iR+hZ/xKYNbfR9tlJ5I+By/WZjX7QYVP8IRyBzIW/KDMANDSZosIvYahseZFxLhj2HgmQhouO1JtbLzYFUpC91Hzh1YrMFleHcxfK366bDRm6OlWfVXM+0/MqTXR3ogr2epP6KIHOoIjzY9UClAWPynpZcM6tW4HvQP1gDtY6BR/J5KjemGkyo= X-Forefront-Antispam-Report: CIP:158.140.1.147; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:sjmaillnx1.cadence.com; PTR:unknown.Cadence.COM; CAT:NONE; SFS:(4636009)(136003)(396003)(39860400002)(346002)(376002)(36092001)(46966005)(5660300002)(54906003)(356005)(26005)(83380400001)(86362001)(7636003)(47076004)(8676002)(8936002)(478600001)(2616005)(4326008)(82740400003)(426003)(107886003)(316002)(36906005)(2906002)(82310400003)(110136005)(70206006)(186003)(70586007)(42186006)(336012)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2020 14:48:23.6061 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6864bc72-80ac-4e36-3491-08d893aca816 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.147]; Helo=[sjmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: MW2NAM12FT033.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR07MB7897 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-28_09:2020-11-26, 2020-11-28 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 adultscore=0 spamscore=0 suspectscore=0 mlxlogscore=918 lowpriorityscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011280090 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201128_094829_609024_BF6D686A X-CRM114-Status: GOOD ( 16.13 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-i3c.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-i3c>, <mailto:linux-i3c-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-i3c/> List-Post: <mailto:linux-i3c@lists.infradead.org> List-Help: <mailto:linux-i3c-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-i3c>, <mailto:linux-i3c-request@lists.infradead.org?subject=subscribe> Cc: praneeth@ti.com, mparab@cadence.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, Parshuram Thombare <pthombar@cadence.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-i3c" <linux-i3c-bounces@lists.infradead.org> Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org |
Series |
I3C mastership handover support
|
expand
|
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index c01ba00..beb7495 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -581,6 +581,23 @@ static ssize_t i2c_scl_frequency_show(struct device *dev, } static DEVICE_ATTR_RO(i2c_scl_frequency); +static ssize_t i3c_acquire_bus_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct i3c_master_controller *master = dev_to_i3cmaster(dev); + int ret; + + i3c_bus_normaluse_lock(&master->bus); + ret = i3c_master_acquire_bus(master); + i3c_bus_normaluse_unlock(&master->bus); + if (!ret) + i3c_master_enable_mr_events(master); + + return ret ?: count; +} +static DEVICE_ATTR_WO(i3c_acquire_bus); + static struct attribute *i3c_masterdev_attrs[] = { &dev_attr_mode.attr, &dev_attr_current_master.attr, @@ -591,6 +608,7 @@ static ssize_t i2c_scl_frequency_show(struct device *dev, &dev_attr_pid.attr, &dev_attr_dynamic_address.attr, &dev_attr_hdrcap.attr, + &dev_attr_i3c_acquire_bus.attr, NULL, }; ATTRIBUTE_GROUPS(i3c_masterdev);
Added support to acquire I3C bus through sysfs interface. Signed-off-by: Parshuram Thombare <pthombar@cadence.com> --- drivers/i3c/master.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)