Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6771336rwr; Tue, 25 Apr 2023 03:38:23 -0700 (PDT) X-Google-Smtp-Source: AKy350Y2+gDSYcVRHTR8ofbCNOWHhwuNKoNoX/lsEaTyNCZHDlxXkSNDMIbtd93lc031JAaKiVG7 X-Received: by 2002:a05:6a20:2d0a:b0:ee:d553:5cee with SMTP id g10-20020a056a202d0a00b000eed5535ceemr18670549pzl.16.1682419102679; Tue, 25 Apr 2023 03:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682419102; cv=none; d=google.com; s=arc-20160816; b=P4ENyUE9jXSL+kHBEvFk+o0Fz4ENCWpyCHM9VV8OGTyxtIcWlYict+kwSOZy3uiC6y wjRQ61TV3JuLuuAxji9vN4drSeypUUt8KRoyxDI8klh9m4NpkFwCq4dltgmldnTp1a5O 2td/O28V4nVy0Odb8QNd6bblDHHENGe0ajbeTA+BX5UdgszyHnw+jWnE/sL5jLr49g7V laj4Vq1fiQbQWITeS0RTiGPOdnqPL9OfIiRpRTHGe56GPQnBXov+GrjgS1mhU58uwSq7 nhL759OKQeew97iCmhHvIEyLrsvcYtdmfz7OTUusAEqFLYFDOktJEHSEwrtksbpc2x9D dYXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=HbGHcsXQhAzm5A0QrdVjeu/RX2cwJVdZzQHbkjLBgtY=; b=Gnx0R7LiMJ0BTFbc4T8CquhtHM/Xt7qSBl/R0wz+GpKnwcAhf1m4CrPWp0DLcwYlBL rHmetqP+IJdFIxl2w7fyptwePd6YRWXMvOND5nXNjyEZjpuBCJKHJPZc62hy/cYWOwvq QGuOpEJodsiYrO23Q6M8S3khG1Xena5umUogo6pZp1VKYir8lcqDIQb0x+GfxTpUr45c HLZ24qwFxMpowmiSixYiCerGEp+4p3DU2hv1iwEi/5TXezv+RFC1BuXc59nH9VKljQdA YvkJLEbXhViEiqwlJ+ASUfjJAXR6M1KNAYaPIllbIJbEfwyxXxORgTJeyJ9jpnhpEmUb aiBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v20-20020a634654000000b005139e0d2b5csi8575949pgk.487.2023.04.25.03.38.08; Tue, 25 Apr 2023 03:38:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233615AbjDYKat (ORCPT + 99 others); Tue, 25 Apr 2023 06:30:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233329AbjDYKas (ORCPT ); Tue, 25 Apr 2023 06:30:48 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AFDED13E; Tue, 25 Apr 2023 03:30:45 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3E06A2F4; Tue, 25 Apr 2023 03:31:29 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D7A423F5A1; Tue, 25 Apr 2023 03:30:42 -0700 (PDT) Date: Tue, 25 Apr 2023 11:30:40 +0100 From: Sudeep Holla To: Arnd Bergmann , Huisong Li Cc: Bjorn Andersson , Matthias Brugger , Sudeep Holla , AngeloGioacchino Del Regno , Shawn Guo , linux-kernel@vger.kernel.org, soc@kernel.org, wanghuiqiang@huawei.com, tanxiaofei@huawei.com, liuyonglong@huawei.com, huangdaode@huawei.com, linux-acpi@vger.kernel.org, Len Brown , "Rafael J. Wysocki" , devicetree@vger.kernel.org, Rob Herring , Frank Rowand , Krzysztof Kozlowski Subject: Re: [PATCH] soc: hisilicon: Support HCCS driver on Kunpeng SoC Message-ID: <20230425103040.znv66k364ant6klq@bogus> References: <20230424073020.4039-1-lihuisong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Arnd for cc-ing the ALKML. On Mon, Apr 24, 2023 at 10:09:47AM +0200, Arnd Bergmann wrote: > On Mon, Apr 24, 2023, at 09:30, Huisong Li wrote: [...] > > + > > +static int hccs_get_device_property(struct hccs_dev *hdev) > > +{ > > + struct device *dev = hdev->dev; > > + > > + if (device_property_read_u32(dev, "device-flags", &hdev->flags)) { > > + dev_err(hdev->dev, "no device-flags property.\n"); > > + return -ENODEV; > > + } > > + > > + if (device_property_read_u8(dev, "pcc-type", &hdev->type)) { > > + dev_err(hdev->dev, "no pcc-type property.\n"); > > + return -ENODEV; > > + } > > + > > + if (device_property_read_u32(dev, "pcc-chan-id", &hdev->chan_id)) { > > + dev_err(hdev->dev, "no pcc-channel property.\n"); > > + return -ENODEV; > > + } > > + > > + hdev->intr_mode = hccs_get_bit(hdev->flags, HCCS_DEV_FLAGS_INTR_B); > > + if (!hccs_dev_property_supported(hdev)) > > + return -EOPNOTSUPP; > > + > > Where are the device properties documented? I'm never quite sure how > to handle these for ACPI-only drivers, since we don't normally have the > bindings in Documentation/devicetree/bindings/, but it feels like there > should be some properly reviewed document somewhere else. > > Adding ACPI and devicetree maintainers to Cc for clarification. Why are these DSD style properties added here ? Why can't we just make use of _CRS with Generic Address Structure(GAS) register entry for each of the PCC channel which eliminates the need of "pcc-chan-id". The type must be deduced from the order in the list of _CRS if needed. I don't quite understand what magic the flags contain here to provide any info there. -- Regards, Sudeep