Update devfreq next for v5.16
Detailed description for this pull request 1. Add minor update for exynos-ppmu devfreq-event driver - Devicetree naming convention requires the device node manes to use hyphens instead of underscope. In order to support this requirement, changes the code with hyphens. - Simplify parsing event-type from devicetree without behavior changes 2. Strengthen check for freq_table in devfreq core - Check whether both freq_table is not NULL and size of freq_table is not zero in order to prevent the error by mistake of devfreq driver developer. -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEEsSpuqBtbWtRe4rLGnM3fLN7rz1MFAmF449YWHGN3MDAuY2hv aUBzYW1zdW5nLmNvbQAKCRCczd8s3uvPU9dlD/9hiVqplSwtW2BKWPkkedJLnWFp ji+OrCzuIk4HK8U5Yzejs6qoU4ZhQd7W6jtLvaN8ptJ1lgbe8x3IYC9WBqjBNHrC Vc0Rl+8mDB1AzAHk4veQN0JQlmcm+0CoAx00CdjrL8pFcxdr8AKIZ0fdK5LFo5Ks GOEa/iCRqpCBWXoA5PIVENbD8W57ZUOTaLoaHHJbBmX04E6lWJk/u+NKXWhJNdxn awKpA36tK3wYIbtJuAqv2fWyAIOaHRPUmP0KDJBAqWYMRtQ7LzTrPfDdzmZbI5fX wg0UFu2H9tmH7fuOK4ZjSLIqwyzljG3Vj3NxevPcnBF1IQ2rKLETtZ0zy6pONFSK 396ZV+LaRjln0dMwjWJrYLsICqiCxGIDhcjSfCA8+2fFAifkeE6hyGhmt7FAcKoc LqDeE3DAhdAT4hGEo35s8HislMC/svnA/WmrY2DzRGXC9O7qKqFrPsrGiGtjwrGo vEsyIqLvmsY33GIJx66B/kdkhqjkV76qWS+cW+QCBdvp9qTSCwCMI5IjZZpdSMf8 wZtWUe2neNCBDSY0B5q68+Zad/D40+cvckGtac13JGh3qDQpvZBTM6uGxfT09rxf fk7rlY3Hs9Lwq2W1uFEVTG9PROCNd0GBaQwr4ZvB/iaIBFR0woiqC098BZKC8Fmj TTaZP8Gf23b1bcJZ7A== =KYy7 -----END PGP SIGNATURE----- Merge tag 'devfreq-next-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for v5.16 from Chanwoo Choi: "1. Minor update for exynos-ppmu devfreq-event driver - Devicetree naming convention requires the device node names to use hyphens instead of underlines. In order to support this requirement, changes the code with hyphens. - Simplify parsing event-type from devicetree without behavior changes. 2. Strengthen check for freq_table in devfreq core - Check whether both freq_table is not NULL and size of freq_table is not zero in order to prevent the error by mistake of devfreq driver developer. * tag 'devfreq-next-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: Strengthen check for freq_table devfreq: exynos-ppmu: simplify parsing event-type from DT devfreq: exynos-ppmu: use node names with hyphens
This commit is contained in:
commit
031eda1840
@ -827,7 +827,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
|
||||
goto err_dev;
|
||||
}
|
||||
|
||||
if (!devfreq->profile->max_state && !devfreq->profile->freq_table) {
|
||||
if (!devfreq->profile->max_state || !devfreq->profile->freq_table) {
|
||||
mutex_unlock(&devfreq->lock);
|
||||
err = set_freq_table(devfreq);
|
||||
if (err < 0)
|
||||
|
@ -94,11 +94,16 @@ static struct __exynos_ppmu_events {
|
||||
PPMU_EVENT(d1-general),
|
||||
PPMU_EVENT(d1-rt),
|
||||
|
||||
/* For Exynos5422 SoC */
|
||||
/* For Exynos5422 SoC, deprecated (backwards compatible) */
|
||||
PPMU_EVENT(dmc0_0),
|
||||
PPMU_EVENT(dmc0_1),
|
||||
PPMU_EVENT(dmc1_0),
|
||||
PPMU_EVENT(dmc1_1),
|
||||
/* For Exynos5422 SoC */
|
||||
PPMU_EVENT(dmc0-0),
|
||||
PPMU_EVENT(dmc0-1),
|
||||
PPMU_EVENT(dmc1-0),
|
||||
PPMU_EVENT(dmc1-1),
|
||||
};
|
||||
|
||||
static int __exynos_ppmu_find_ppmu_id(const char *edev_name)
|
||||
@ -561,13 +566,10 @@ static int of_get_devfreq_events(struct device_node *np,
|
||||
* use default if not.
|
||||
*/
|
||||
if (info->ppmu_type == EXYNOS_TYPE_PPMU_V2) {
|
||||
int id;
|
||||
/* Not all registers take the same value for
|
||||
* read+write data count.
|
||||
*/
|
||||
id = __exynos_ppmu_find_ppmu_id(desc[j].name);
|
||||
|
||||
switch (id) {
|
||||
switch (ppmu_events[i].id) {
|
||||
case PPMU_PMNCNT0:
|
||||
case PPMU_PMNCNT1:
|
||||
case PPMU_PMNCNT2:
|
||||
|
Loading…
x
Reference in New Issue
Block a user