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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25549EB64DC for ; Wed, 21 Jun 2023 16:32:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232708AbjFUQc6 (ORCPT ); Wed, 21 Jun 2023 12:32:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232446AbjFUQcr (ORCPT ); Wed, 21 Jun 2023 12:32:47 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC90719AC; Wed, 21 Jun 2023 09:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=5dBxOnSqaP3QLEUj6Sd6hECMtB3+CNTVZ5h451XFYfA=; b=mL1RtX6Vd70D+UhrlC6/uRbPqV nt/7qe4B7Y10bRL5lxVeYQTGDr+wBCm+40cCVy6RFNrxk1KRRMEXzE1Eew42L0zBNv6Hchyluk12e R0KdVeO5Zb8bZKZRR/CK+3VfbY3f7MsCYNrBriSlwJipifTOZ5skrp77J3JSthSZtkFQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qC0jY-00HAET-Fg; Wed, 21 Jun 2023 18:31:04 +0200 Date: Wed, 21 Jun 2023 18:31:04 +0200 From: Andrew Lunn To: "Limonciello, Mario" Cc: Johannes Berg , Evan Quan , rafael@kernel.org, lenb@kernel.org, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mdaenzer@redhat.com, maarten.lankhorst@linux.intel.com, tzimmermann@suse.de, hdegoede@redhat.com, jingyuwang_vip@163.com, lijo.lazar@amd.com, jim.cromie@gmail.com, bellosilicio@gmail.com, andrealmeid@igalia.com, trix@redhat.com, jsg@jsg.id.au, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH V4 1/8] drivers/acpi: Add support for Wifi band RF mitigations Message-ID: <9435a928-04c4-442f-89f2-e76713c908a5@lunn.ch> References: <20230621054603.1262299-1-evan.quan@amd.com> <20230621054603.1262299-2-evan.quan@amd.com> <3a7c8ffa-de43-4795-ae76-5cd9b00c52b5@lunn.ch> <216f3c5aa1299100a0009ddf4e95b019855a32be.camel@sipsolutions.net> <98c858e6-fb18-d50f-6eea-eddc63ba136f@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <98c858e6-fb18-d50f-6eea-eddc63ba136f@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > I think there is enough details for this to happen. It's done > so that either the AML can natively behave as a consumer or a > driver can behave as a consumer. > > > > > +/** > > > > > + * APIs needed by drivers/subsystems for contributing frequencies: > > > > > + * During probe, check `wbrf_supported_producer` to see if WBRF is supported. > > > > > + * If adding frequencies, then call `wbrf_add_exclusion` with the > > > > > + * start and end points specified for the frequency ranges added. > > > > > + * If removing frequencies, then call `wbrf_remove_exclusion` with > > > > > + * start and end points specified for the frequency ranges added. > > > > > + */ > > > > > +bool wbrf_supported_producer(struct acpi_device *adev); > > > > > +int wbrf_add_exclusion(struct acpi_device *adev, > > > > > + struct wbrf_ranges_in *in); > > > > > +int wbrf_remove_exclusion(struct acpi_device *adev, > > > > > + struct wbrf_ranges_in *in); > > > > Could struct device be used here, to make the API agnostic to where > > > > the information is coming from? That would then allow somebody in the > > > > future to implement a device tree based information provider. > > > That does make sense, and it wouldn't even be that much harder if we > > > assume in a given platform there's only one provider > > That seems like a very reasonable assumption. It is theoretically > > possible to build an ACPI + DT hybrid, but i've never seen it actually > > done. > > > > If an ARM64 ACPI BIOS could implement this, then i would guess the low > > level bits would be solved, i guess jumping into the EL1 > > firmware. Putting DT on top instead should not be too hard. > > > > Andrew > > To make life easier I'll ask whether we can include snippets of > the matching ASL for this first implementation as part of the > public ACPI spec that matches this code when we release it. So it sounds like you are pretty open about this, there should be enough information for independent implementations. So please do make the APIs between the providers and the consumers abstract, struct device, not an ACPI object. Andrew