All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mason <mpeg.blue@free.fr>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"Linux PM" <linux-pm@vger.kernel.org>,
	cpufreq <cpufreq@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Arnd Bergmann" <arnd@arndb.de>, "Måns Rullgård" <mans@mansr.com>
Subject: Re: RFC on cpufreq implementation
Date: Tue, 03 Feb 2015 16:07:18 -0800	[thread overview]
Message-ID: <54D162B6.2050602@free.fr> (raw)
In-Reply-To: <CAKohpomzCEjXUrxUJjypaA77=r4j_ZPa+x3gM=cNN0kc3ux0uQ@mail.gmail.com>

Viresh Kumar wrote:

> Mason wrote:
>
>> If it's supposed to go in drivers/cpufreq, I suppose there are naming
>> conventions to follow?
>
> You can check existing drivers.

All of them?

~/linux-3.19-rc7$ wc drivers/cpufreq/*
  31542  95730 813482 total

Are there perhaps 1 or 2 "golden standard" drivers that are well-written
and up-to-date with respect to current conventions?

>> Also, if it's in drivers/cpufreq, we are not supposed to include
>> any machine-specific includes? And I'm back to my original question
>> where am I supposed to store machine-specific information, such as
>> register descriptions and MMIO addresses and offsets?
>
> Define registers/etc in your driver only or somewhere in include/ .

Like Samsung did with include/dt-bindings/clock/exynos*.h ?

> Also, try to see if you can reuse cpufreq-dt.c, your driver wouldn't make
> it to the kernel otherwise.

Are you saying that use of DeviceTree is mandatory for new ARM ports?

In other words, ports using "board files" will not be accepted into
mainline, nor will drivers not using DT?

If that is correct, then my proposed cpufreq driver has exactly 0%
chance of being mainlined as-is, right?

I took a look at cpufreq-dt.c but I think it doesn't quite fit my use-case.
In my driver, I define "clock dividers" (typically 1,2,3,5,9) and these are
used to divide some baseline frequency that the cpufreq code doesn't need to
know. The baseline frequency is set by the boot loader, and Linux is not
supposed to change that, only apply the dividers if necessary.

What do you think of this use-case?

Regards.


WARNING: multiple messages have this Message-ID (diff)
From: mpeg.blue@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: RFC on cpufreq implementation
Date: Tue, 03 Feb 2015 16:07:18 -0800	[thread overview]
Message-ID: <54D162B6.2050602@free.fr> (raw)
In-Reply-To: <CAKohpomzCEjXUrxUJjypaA77=r4j_ZPa+x3gM=cNN0kc3ux0uQ@mail.gmail.com>

Viresh Kumar wrote:

> Mason wrote:
>
>> If it's supposed to go in drivers/cpufreq, I suppose there are naming
>> conventions to follow?
>
> You can check existing drivers.

All of them?

~/linux-3.19-rc7$ wc drivers/cpufreq/*
  31542  95730 813482 total

Are there perhaps 1 or 2 "golden standard" drivers that are well-written
and up-to-date with respect to current conventions?

>> Also, if it's in drivers/cpufreq, we are not supposed to include
>> any machine-specific includes? And I'm back to my original question
>> where am I supposed to store machine-specific information, such as
>> register descriptions and MMIO addresses and offsets?
>
> Define registers/etc in your driver only or somewhere in include/ .

Like Samsung did with include/dt-bindings/clock/exynos*.h ?

> Also, try to see if you can reuse cpufreq-dt.c, your driver wouldn't make
> it to the kernel otherwise.

Are you saying that use of DeviceTree is mandatory for new ARM ports?

In other words, ports using "board files" will not be accepted into
mainline, nor will drivers not using DT?

If that is correct, then my proposed cpufreq driver has exactly 0%
chance of being mainlined as-is, right?

I took a look at cpufreq-dt.c but I think it doesn't quite fit my use-case.
In my driver, I define "clock dividers" (typically 1,2,3,5,9) and these are
used to divide some baseline frequency that the cpufreq code doesn't need to
know. The baseline frequency is set by the boot loader, and Linux is not
supposed to change that, only apply the dividers if necessary.

What do you think of this use-case?

Regards.

  reply	other threads:[~2015-02-04  0:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15 17:24 RFC on cpufreq implementation Mason
2015-01-15 17:24 ` Mason
2015-01-16  9:08 ` Krzysztof Kozlowski
2015-01-16  9:08   ` Krzysztof Kozlowski
2015-01-16 11:10   ` Mason
2015-01-16 11:10     ` Mason
2015-01-16 11:43     ` Krzysztof Kozlowski
2015-01-16 11:43       ` Krzysztof Kozlowski
2015-01-16 11:43       ` Krzysztof Kozlowski
2015-01-16 12:10     ` Javi Merino
2015-01-16 12:10       ` Javi Merino
2015-01-16 14:00     ` Mason
2015-01-16 14:00       ` Mason
2015-01-19  7:52 ` Viresh Kumar
2015-01-19  7:52   ` Viresh Kumar
2015-01-19 22:03   ` Mason
2015-01-19 22:03     ` Mason
2015-01-20  3:55     ` Viresh Kumar
2015-01-20  3:55       ` Viresh Kumar
2015-01-19  9:22 ` Amit Kucheria
2015-01-19  9:22   ` Amit Kucheria
2015-01-19 22:13   ` Mason
2015-01-19 22:13     ` Mason
2015-01-29 16:43 ` Mason
2015-01-29 16:43   ` Mason
2015-01-30  1:15   ` Viresh Kumar
2015-01-30  1:15     ` Viresh Kumar
2015-01-30 23:44     ` Mason
2015-01-30 23:44       ` Mason
2015-02-02  3:58       ` Viresh Kumar
2015-02-02  3:58         ` Viresh Kumar
2015-02-04  0:07         ` Mason [this message]
2015-02-04  0:07           ` Mason
2015-02-04  0:32           ` Måns Rullgård
2015-02-04  0:32             ` Måns Rullgård
2015-02-04  4:12           ` Viresh Kumar
2015-02-04  4:12             ` Viresh Kumar

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=54D162B6.2050602@free.fr \
    --to=mpeg.blue@free.fr \
    --cc=arnd@arndb.de \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mans@mansr.com \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.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 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.