From: Mark Brown <broonie@kernel.org>
To: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: arnd@arndb.de, linux-acpi@vger.kernel.org,
linaro-acpi@lists.linaro.org, rjw@rjwysocki.net
Subject: Re: [PATCH v3 1/3] Mailbox: Add support for PCC mailbox and channels
Date: Wed, 27 Aug 2014 11:27:08 +0100 [thread overview]
Message-ID: <20140827102708.GW17528@sirena.org.uk> (raw)
In-Reply-To: <1409081738-5602-2-git-send-email-ashwin.chaugule@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1744 bytes --]
On Tue, Aug 26, 2014 at 03:35:36PM -0400, Ashwin Chaugule wrote:
> The PCC (Platform Communication Channel) is a generic
> mailbox to be used by PCC clients such as CPPC, RAS
> and MPST as defined in the ACPI 5.0+ spec. This patch
> modifies the Mailbox framework to lookup PCC mailbox
> controllers and channels such that PCC drivers can work
> with or without ACPI support in the kernel.
>
> Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
> ---
> drivers/mailbox/mailbox.c | 118 ++++++++++++++++++++++++++++++++++---
> include/linux/mailbox_client.h | 6 ++
> include/linux/mailbox_controller.h | 1 +
> 3 files changed, 118 insertions(+), 7 deletions(-)
Based on the patch description (adding support for a particular kind of
mailbox) I'd expect to see a new driver or helper library being added to
drivers/mailbox rather than changes in the mailbox core. If changes in
the core are needed to support this I'd expect to see them broken out as
separate patches.
> +static struct mbox_controller *
> +mbox_find_pcc_controller(char *name)
> +{
> + struct mbox_controller *mbox;
> + list_for_each_entry(mbox, &mbox_cons, node) {
> + if (mbox->name)
> + if (!strcmp(mbox->name, name))
> + return mbox;
> + }
> +
> + return NULL;
> +}
This doesn't look particularly PCC specific?
> /* Sanity check */
> - if (!mbox || !mbox->dev || !mbox->ops || !mbox->num_chans)
> +
> + /*
> + * PCC clients and controllers are currently not backed by
> + * platform device structures.
> + */
> +#ifndef CONFIG_PCC
> + if (!mbox->dev)
> + return -EINVAL;
> +#endif
It seems better to make this consistent - either enforce it all the time
or don't enforce it.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-08-27 10:27 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 19:35 [PATCH v3 0/3] PCC: Platform Communication Channel Ashwin Chaugule
2014-08-26 19:35 ` [PATCH v3 1/3] Mailbox: Add support for PCC mailbox and channels Ashwin Chaugule
2014-08-27 10:27 ` Mark Brown [this message]
2014-08-27 13:07 ` Ashwin Chaugule
2014-08-27 19:09 ` Mark Brown
2014-08-27 21:49 ` Ashwin Chaugule
2014-08-28 10:10 ` Mark Brown
2014-08-28 12:31 ` Ashwin Chaugule
2014-08-28 8:39 ` Arnd Bergmann
2014-08-28 10:15 ` Mark Brown
2014-08-28 20:34 ` Ashwin Chaugule
2014-09-02 18:16 ` Ashwin Chaugule
2014-09-02 19:22 ` [Linaro-acpi] " Arnd Bergmann
2014-09-02 20:15 ` Ashwin Chaugule
2014-09-02 23:03 ` Mark Brown
2014-09-03 15:23 ` Ashwin Chaugule
2014-09-03 15:27 ` Arnd Bergmann
2014-09-03 15:36 ` Mark Brown
2014-09-03 15:41 ` Arnd Bergmann
2014-09-03 15:51 ` Mark Brown
2014-09-03 11:23 ` Arnd Bergmann
2014-09-03 14:49 ` Mark Brown
2014-09-03 14:50 ` Arnd Bergmann
2014-08-28 12:21 ` Ashwin Chaugule
2014-08-26 19:35 ` [PATCH v3 2/3] Add support for Platform Communication Channel Ashwin Chaugule
2014-08-27 10:29 ` Mark Brown
2014-08-26 19:35 ` [PATCH v3 3/3] PCC-test: Test driver to trigger PCC commands Ashwin Chaugule
2014-08-27 10:30 ` Mark Brown
2014-08-27 11:53 ` Ashwin Chaugule
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=20140827102708.GW17528@sirena.org.uk \
--to=broonie@kernel.org \
--cc=arnd@arndb.de \
--cc=ashwin.chaugule@linaro.org \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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.