All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bartłomiej Konecki" <bartekkonecki97@gmail.com>
To: Vaibhav Agarwal <vaibhav.sr@gmail.com>,
	Mark Greer <mgreer@animalcreek.com>,
	Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: [PATCH] staging: greybus: document codec mutex usage
Date: Thu, 19 Feb 2026 14:28:19 +0100	[thread overview]
Message-ID: <aZcP88KGUnxDBjTT@LT495s> (raw)

Add comments describing lock and register_mutex
in struct gbaudio_codec_info.
The lock protects the codec runtime state and module/DAI lists, while
register_mutex protects hardware registers.
Improve readability and clarify locking semantics.

Signed-off-by: Bartłomiej Konecki <bartekkonecki97@gmail.com>
---
 drivers/staging/greybus/audio_codec.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index f3f7a7ec6be4..90dd3426d4a4 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -70,8 +70,9 @@ struct gbaudio_codec_info {
 	struct list_head module_list;
 	/* to maintain runtime stream params for each DAI */
 	struct list_head dai_list;
-	struct mutex lock;
+	struct mutex lock;	/* protects codec state and module/DAI lists */
 	struct mutex register_mutex;
+	/* serializes access to codec hardware registers*/
 };
 
 struct gbaudio_widget {
-- 
2.47.3


             reply	other threads:[~2026-02-19 13:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-19 13:28 Bartłomiej Konecki [this message]
2026-02-19 14:31 ` [PATCH] staging: greybus: document codec mutex usage Dan Carpenter

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=aZcP88KGUnxDBjTT@LT495s \
    --to=bartekkonecki97@gmail.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mgreer@animalcreek.com \
    --cc=vaibhav.sr@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.