linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mailbox: pcc: Add PCC request and free channel declarations
@ 2016-06-14 23:12 Hoan Tran
  2016-06-15 15:55 ` Prakash, Prashanth
  0 siblings, 1 reply; 3+ messages in thread
From: Hoan Tran @ 2016-06-14 23:12 UTC (permalink / raw)
  To: Ashwin Chaugule, Jassi Brar, Rafael J. Wysocki, Len Brown
  Cc: Robert Moore, Lv Zheng, linux-acpi, linux-kernel, devel, lho,
	Duc Dang, Hoan Tran

As PCC will be used by other clients not only CPPC.
This change exports pcc_mbox_request_channel() and pcc_mbox_free_channel()
declarations

Signed-off-by: Hoan Tran <hotran@apm.com>
---
 include/acpi/cppc_acpi.h       | 4 ----
 include/linux/mailbox_client.h | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h
index dad8af3..819b4b9 100644
--- a/include/acpi/cppc_acpi.h
+++ b/include/acpi/cppc_acpi.h
@@ -130,8 +130,4 @@ extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
 extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
 extern int acpi_get_psd_map(struct cpudata **);
 
-/* Methods to interact with the PCC mailbox controller. */
-extern struct mbox_chan *
-	pcc_mbox_request_channel(struct mbox_client *, unsigned int);
-
 #endif /* _CPPC_ACPI_H*/
diff --git a/include/linux/mailbox_client.h b/include/linux/mailbox_client.h
index 41e2af8..2758d18 100644
--- a/include/linux/mailbox_client.h
+++ b/include/linux/mailbox_client.h
@@ -50,4 +50,8 @@ void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
 bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
 void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
 
+/* Methods to interact with the PCC mailbox controller. */
+struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *, int);
+void pcc_mbox_free_channel(struct mbox_chan *chan);
+
 #endif /* __MAILBOX_CLIENT_H */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mailbox: pcc: Add PCC request and free channel declarations
  2016-06-14 23:12 [PATCH] mailbox: pcc: Add PCC request and free channel declarations Hoan Tran
@ 2016-06-15 15:55 ` Prakash, Prashanth
  2016-06-15 22:18   ` Hoan Tran
  0 siblings, 1 reply; 3+ messages in thread
From: Prakash, Prashanth @ 2016-06-15 15:55 UTC (permalink / raw)
  To: Hoan Tran, Ashwin Chaugule, Jassi Brar, Rafael J. Wysocki, Len Brown
  Cc: Robert Moore, Lv Zheng, linux-acpi, linux-kernel, devel, lho, Duc Dang

Hi Hoan,

On 6/14/2016 5:12 PM, Hoan Tran wrote:
> As PCC will be used by other clients not only CPPC.
> This change exports pcc_mbox_request_channel() and pcc_mbox_free_channel()
> declarations
>
> Signed-off-by: Hoan Tran <hotran@apm.com>
> ---
>  include/acpi/cppc_acpi.h       | 4 ----
>  include/linux/mailbox_client.h | 4 ++++
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h
> index dad8af3..819b4b9 100644
> --- a/include/acpi/cppc_acpi.h
> +++ b/include/acpi/cppc_acpi.h
> @@ -130,8 +130,4 @@ extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
>  extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
>  extern int acpi_get_psd_map(struct cpudata **);
>  
> -/* Methods to interact with the PCC mailbox controller. */
> -extern struct mbox_chan *
> -	pcc_mbox_request_channel(struct mbox_client *, unsigned int);
> -
>  #endif /* _CPPC_ACPI_H*/
> diff --git a/include/linux/mailbox_client.h b/include/linux/mailbox_client.h
> index 41e2af8..2758d18 100644
> --- a/include/linux/mailbox_client.h
> +++ b/include/linux/mailbox_client.h
> @@ -50,4 +50,8 @@ void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
>  bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
>  void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
>  
> +/* Methods to interact with the PCC mailbox controller. */
> +struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *, int);
> +void pcc_mbox_free_channel(struct mbox_chan *chan);
> +
Since these APIs are specific to PCC, may be we should introduce a new header for pcc clients
instead of adding to the common mailbox_client header.
>  #endif /* __MAILBOX_CLIENT_H */

Thanks,
Prashanth

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mailbox: pcc: Add PCC request and free channel declarations
  2016-06-15 15:55 ` Prakash, Prashanth
@ 2016-06-15 22:18   ` Hoan Tran
  0 siblings, 0 replies; 3+ messages in thread
From: Hoan Tran @ 2016-06-15 22:18 UTC (permalink / raw)
  To: Prakash, Prashanth
  Cc: Ashwin Chaugule, Jassi Brar, Rafael J. Wysocki, Len Brown,
	Robert Moore, Lv Zheng, linux acpi, lkml, devel, Loc Ho,
	Duc Dang

Hi Prashanth,

On Wed, Jun 15, 2016 at 8:55 AM, Prakash, Prashanth
<pprakash@codeaurora.org> wrote:
> Hi Hoan,
>
> On 6/14/2016 5:12 PM, Hoan Tran wrote:
>> As PCC will be used by other clients not only CPPC.
>> This change exports pcc_mbox_request_channel() and pcc_mbox_free_channel()
>> declarations
>>
>> Signed-off-by: Hoan Tran <hotran@apm.com>
>> ---
>>  include/acpi/cppc_acpi.h       | 4 ----
>>  include/linux/mailbox_client.h | 4 ++++
>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h
>> index dad8af3..819b4b9 100644
>> --- a/include/acpi/cppc_acpi.h
>> +++ b/include/acpi/cppc_acpi.h
>> @@ -130,8 +130,4 @@ extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
>>  extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
>>  extern int acpi_get_psd_map(struct cpudata **);
>>
>> -/* Methods to interact with the PCC mailbox controller. */
>> -extern struct mbox_chan *
>> -     pcc_mbox_request_channel(struct mbox_client *, unsigned int);
>> -
>>  #endif /* _CPPC_ACPI_H*/
>> diff --git a/include/linux/mailbox_client.h b/include/linux/mailbox_client.h
>> index 41e2af8..2758d18 100644
>> --- a/include/linux/mailbox_client.h
>> +++ b/include/linux/mailbox_client.h
>> @@ -50,4 +50,8 @@ void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
>>  bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
>>  void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
>>
>> +/* Methods to interact with the PCC mailbox controller. */
>> +struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *, int);
>> +void pcc_mbox_free_channel(struct mbox_chan *chan);
>> +
> Since these APIs are specific to PCC, may be we should introduce a new header for pcc clients
> instead of adding to the common mailbox_client header.

Agreed, maybe I should create a "pcc.h" file inside "/include/acpi"
folder. If you have any suggestion about the location of this file,
please let me know.

Thanks
Hoan

>>  #endif /* __MAILBOX_CLIENT_H */
>
> Thanks,
> Prashanth

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-15 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-14 23:12 [PATCH] mailbox: pcc: Add PCC request and free channel declarations Hoan Tran
2016-06-15 15:55 ` Prakash, Prashanth
2016-06-15 22:18   ` Hoan Tran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).