From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no 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 E08B4C5ACD7 for ; Wed, 18 Mar 2020 13:22:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B14F22076F for ; Wed, 18 Mar 2020 13:22:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pljoYwtn"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="JorCG4C+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B14F22076F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mOyjz2Ucg2GdeSOJBzbBml9OiQKoB2DOiEdWG5+p4SQ=; b=pljoYwtn/dRDVc ktedRTlB3N04uO2zY1Oul7U1EMqDfG675EhUNyWinQJE9AL1T9eVPNYColXqp6NsJY9Xnmbz5g6eU U8KYiDCZR7BAdTUS7KnczF+ipIYvgffbup1ZVv4awbmpMj1Fa+jq7TVDj7VDCVFztMDlDx2g9/1h2 86/FsOjO97B2PBkzGd+Q6A74S5qh60x+RHvJwwakswdElUPg3/XRAgbGH3USV/yW2Q/GPbgoGpSGz N/LKvG4o7CkmS8KtCqq1lW4h2lV6vdhVavIG0iPDSgP4cixVGpoMNOvon9WU9sTmySUXjz1W23VDY 5/yjXqPmlRfzjVCqI0Nw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEYek-0003nW-Ie; Wed, 18 Mar 2020 13:22:46 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEYeh-0003kc-OO for linux-arm-kernel@lists.infradead.org; Wed, 18 Mar 2020 13:22:45 +0000 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 00DA32076F; Wed, 18 Mar 2020 13:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584537763; bh=CKEreA8CUxYmEbiSZgNzqX5KgmCpM63Ng+o18LXBl38=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JorCG4C+ZGySiVuSu/z2+zdsj8FFbdzJ/Mp1MEZsbo/dyOHhwA/+Mw/1buc1hJZkx lOo2bzLYuiL6RFah4WngRMZW5fEq0OyfOlc8GblgkDZG5603FFUj+eWm4DEUKSAsZi joOSh8U3p8fA7Jx9In9dBPuZhzY5YPFNM1LDPeWI= Date: Wed, 18 Mar 2020 14:22:41 +0100 From: Greg KH To: Mathieu Poirier , Mike Leach , Suzuki K Poulose Subject: Re: [PATCH 01/13] coresight: cti: Initial CoreSight CTI Driver Message-ID: <20200318132241.GB2789508@kroah.com> References: <20200309161748.31975-1-mathieu.poirier@linaro.org> <20200309161748.31975-2-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200309161748.31975-2-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200318_062243_812040_B2619B82 X-CRM114-Status: GOOD ( 14.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 09, 2020 at 10:17:36AM -0600, Mathieu Poirier wrote: > From: Mike Leach > > This introduces a baseline CTI driver and associated configuration files. > > Uses the platform agnostic naming standard for CoreSight devices, along > with a generic platform probing method that currently supports device > tree descriptions, but allows for the ACPI bindings to be added once these > have been defined for the CTI devices. > > Driver will probe for the device on the AMBA bus, and load the CTI driver > on CoreSight ID match to CTI IDs in tables. > > Initial sysfs support for enable / disable provided. > > Default CTI interconnection data is generated based on hardware > register signal counts, with no additional connection information. > > Signed-off-by: Mike Leach > Reviewed-by: Mathieu Poirier > Reviewed-by: Suzuki K Poulose > Signed-off-by: Mathieu Poirier You didn't cc: all of them to get review comments? I've added it above... And signed-off-by implies reviewed-by. > +/* basic attributes */ > +static ssize_t enable_show(struct device *dev, > + struct device_attribute *attr, > + char *buf) > +{ > + int enable_req; > + bool enabled, powered; > + struct cti_drvdata *drvdata = dev_get_drvdata(dev->parent); > + ssize_t size = 0; > + > + enable_req = atomic_read(&drvdata->config.enable_req_count); > + spin_lock(&drvdata->spinlock); > + powered = drvdata->config.hw_powered; > + enabled = drvdata->config.hw_enabled; > + spin_unlock(&drvdata->spinlock); > + > + if (powered) { > + size = scnprintf(buf, PAGE_SIZE, "cti %s; powered;\n", > + enabled ? "enabled" : "disabled"); > + } else { > + size = scnprintf(buf, PAGE_SIZE, "cti %s; unpowered;\n", > + enable_req ? "enable req" : "disabled"); sysfs files should never need scnprintf() as you "know" a single value will fit into a PAGE_SIZE. And shouldn't this just be a single value, this looks like it is 2 values in one line, that then needs to be parsed, is that to be expected? Where is the documentation for this new sysfs file? > +const struct attribute_group *coresight_cti_groups[] = { > + &coresight_cti_group, > + NULL, > +}; ATTRIBUTE_GROUPS()? > +static struct amba_driver cti_driver = { > + .drv = { > + .name = "coresight-cti", > + .owner = THIS_MODULE, Aren't amba drivers smart enough to set this properly on their own? {sigh} greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel