mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@kernel.org>
To: Aniruddha Rao <anrao@nvidia.com>
Cc: jonathanh@nvidia.com, linux-tegra@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 5/5] firmware: tegra: bpmp: Add MBWT sysfs interface
Date: Tue, 15 Sep 2026 16:13:57 +0200	[thread overview]
Message-ID: <aqlSR8I7hJEiKAwI@orome> (raw)
In-Reply-To: <20260910085919.2522241-6-anrao@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]

On Thu, Sep 10, 2026 at 08:59:19AM +0000, Aniruddha Rao wrote:
[...]
> diff --git a/drivers/firmware/tegra/bpmp-sysfs.c b/drivers/firmware/tegra/bpmp-sysfs.c
> new file mode 100644
> index 000000000000..f56836fa3314
> --- /dev/null
> +++ b/drivers/firmware/tegra/bpmp-sysfs.c
> @@ -0,0 +1,205 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2026, NVIDIA CORPORATION.
> + */
> +
> +#include <linux/device.h>
> +#include <linux/kobject.h>
> +#include <linux/kstrtox.h>
> +#include <linux/mutex.h>
> +#include <linux/slab.h>
> +#include <linux/sysfs.h>
> +
> +#include <soc/tegra/bpmp.h>
> +#include <soc/tegra/bpmp-abi.h>
> +
> +#include "bpmp-private.h"
> +
> +#define TEGRA_BPMP_MBWT_NUM_GROUPS	6
> +#define TEGRA_BPMP_MBWT_NUM_VCS		3
> +
> +struct tegra_bpmp_mbwt_attr {
> +	struct kobj_attribute attr;
> +	struct tegra_bpmp_mbwt_sysfs *mbwt;
> +	unsigned int instance;
> +	unsigned int vc_type;
> +};
> +
> +struct tegra_bpmp_mbwt_sysfs {
> +	struct tegra_bpmp *bpmp;
> +	struct kobject *root;
> +	struct kobject *group[TEGRA_BPMP_MBWT_NUM_GROUPS];
> +	struct kobject *vc[TEGRA_BPMP_MBWT_NUM_GROUPS]
> +			  [TEGRA_BPMP_MBWT_NUM_VCS];
> +	struct tegra_bpmp_mbwt_attr attrs[TEGRA_BPMP_MBWT_NUM_GROUPS]
> +				       [TEGRA_BPMP_MBWT_NUM_VCS];

Should these be dynamically allocated? If there's a remote chance that
we'll see other sets of groups and VCs, this should probably be
parameterized by some SoC-specific data.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2026-09-15 14:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10  8:59 [PATCH v4 0/5] firmware: tegra: bpmp: Add ACPI and MBWT support Aniruddha Rao
2026-09-10  8:59 ` [PATCH v4 1/5] firmware: tegra: bpmp: Move channel initialization to helper Aniruddha Rao
2026-09-10  8:59 ` [PATCH v4 2/5] firmware: tegra: bpmp: Add ACPI support Aniruddha Rao
2026-09-15 14:04   ` Thierry Reding
2026-09-10  8:59 ` [PATCH v4 3/5] firmware: tegra: bpmp: Add the Memory Bandwidth Throttler ABI definitions Aniruddha Rao
2026-09-10  8:59 ` [PATCH v4 4/5] firmware: tegra: bpmp: Add MBWT BPMP helpers Aniruddha Rao
2026-09-10  8:59 ` [PATCH v4 5/5] firmware: tegra: bpmp: Add MBWT sysfs interface Aniruddha Rao
2026-09-15 14:13   ` Thierry Reding [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqlSR8I7hJEiKAwI@orome \
    --to=thierry.reding@kernel.org \
    --cc=anrao@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®