All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] PM / devfreq: Update the devfreq and devfreq-event device
       [not found] <CGME20170123033151epcas5p3349612f1f97c31d85d90604cbca8a19d@epcas5p3.samsung.com>
@ 2017-01-23  3:31 ` Chanwoo Choi
       [not found]   ` <CGME20170123033151epcas5p3a484d70bbdef282b92eb8d97d912e75c@epcas5p3.samsung.com>
                     ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Chanwoo Choi @ 2017-01-23  3:31 UTC (permalink / raw)
  To: myungjoo.ham, kyungmin.park, rjw; +Cc: cw00.choi, linux-pm, linux-kernel

This patches update the devfreq and devfreq-event device. I add the summary
of each patch as following.
- Patch1 fixes the wrong description of governor_userspace.c.
- Patch2 show the information of registered PPMU devices.
- Patch3/4 modify the name of sysfs entry for devfreq/devfreq-event device

Changes from v3:
(https://lkml.org/lkml/2017/1/16/254)
- Patch3 initializes the init value of 'event_no' in order to remove
  the unneeded operation (-1) when calling the atomic_inc_return(&event_no).
- Patch4 uses the integer type for unique number of devfreq device.

Changes from v2:
(https://lkml.org/lkml/2016/12/28/102)
- On v2 patchset, patch1/2/3/5 were merged on devfreq git repo.
- Remain the warning message for exynos-ppmu.c
  when failed to get the clock of ppmu.
- Rebase these patches on devfreq git repo[1].

Changes from v1:
- Rebase these patches on v4.10-rc1.
- Include the separate patch[2] in these patches.

[1] https://git.kernel.org/cgit/linux/kernel/git/mzx/devfreq.git/ (branch:
for-4.10-rc)
[2] https://lkml.org/lkml/2016/12/16/7
- [PATCH] PM / devfreq: Fix the wrong description for userspace governor

Chanwoo Choi (4):
  PM / devfreq: Fix the wrong description for userspace governor
  PM / devfreq: exynos-ppmu: Show the registred device for ppmu device
  PM / devfreq: Simplify the sysfs name of devfreq-event device
  PM / devfreq: Modify the device name as devfreq[X] for sysfs

 drivers/devfreq/devfreq-event.c      | 4 ++--
 drivers/devfreq/devfreq.c            | 4 +++-
 drivers/devfreq/event/exynos-ppmu.c  | 3 +++
 drivers/devfreq/governor_userspace.c | 3 +--
 4 files changed, 9 insertions(+), 5 deletions(-)

-- 
1.9.1

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

* [PATCH v4 1/4] PM / devfreq: Fix the wrong description for userspace governor
       [not found]   ` <CGME20170123033151epcas5p3a484d70bbdef282b92eb8d97d912e75c@epcas5p3.samsung.com>
@ 2017-01-23  3:31     ` Chanwoo Choi
  2017-01-24  3:42     ` MyungJoo Ham
  1 sibling, 0 replies; 10+ messages in thread
From: Chanwoo Choi @ 2017-01-23  3:31 UTC (permalink / raw)
  To: myungjoo.ham, kyungmin.park, rjw; +Cc: cw00.choi, linux-pm, linux-kernel

This patch fixes the wrong description of governor_userspace.c
and removes the unneeded blank line.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/governor_userspace.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/devfreq/governor_userspace.c b/drivers/devfreq/governor_userspace.c
index 9db4d6f2006a..176976068bcd 100644
--- a/drivers/devfreq/governor_userspace.c
+++ b/drivers/devfreq/governor_userspace.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/devfreq/governor_simpleondemand.c
+ *  linux/drivers/devfreq/governor_userspace.c
  *
  *  Copyright (C) 2011 Samsung Electronics
  *	MyungJoo Ham <myungjoo.ham@samsung.com>
@@ -50,7 +50,6 @@ static ssize_t store_freq(struct device *dev, struct device_attribute *attr,
 	unsigned long wanted;
 	int err = 0;
 
-
 	mutex_lock(&devfreq->lock);
 	data = devfreq->data;
 
-- 
1.9.1

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

* [PATCH v4 2/4] PM / devfreq: exynos-ppmu: Show the registred device for ppmu device
       [not found]   ` <CGME20170123033151epcas5p341aa786474af221e390eed87ea48381e@epcas5p3.samsung.com>
@ 2017-01-23  3:31     ` Chanwoo Choi
  2017-01-24  3:42     ` MyungJoo Ham
  1 sibling, 0 replies; 10+ messages in thread
From: Chanwoo Choi @ 2017-01-23  3:31 UTC (permalink / raw)
  To: myungjoo.ham, kyungmin.park, rjw; +Cc: cw00.choi, linux-pm, linux-kernel

This patch just adds the simple log to show the PPMU device's registration
during the kernel booting.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/event/exynos-ppmu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index fb3706faf5bd..9b7350935b73 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -643,6 +643,9 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
 				"failed to add devfreq-event device\n");
 			return PTR_ERR(edev[i]);
 		}
+
+		pr_info("exynos-ppmu: new PPMU device registered %s (%s)\n",
+			dev_name(&pdev->dev), desc[i].name);
 	}
 
 	clk_prepare_enable(info->ppmu.clk);
-- 
1.9.1

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

* [PATCH v4 3/4] PM / devfreq: Simplify the sysfs name of devfreq-event device
       [not found]   ` <CGME20170123033152epcas5p34efc72ecd1afb21efca58421ab41cbc6@epcas5p3.samsung.com>
@ 2017-01-23  3:31     ` Chanwoo Choi
  0 siblings, 0 replies; 10+ messages in thread
From: Chanwoo Choi @ 2017-01-23  3:31 UTC (permalink / raw)
  To: myungjoo.ham, kyungmin.park, rjw; +Cc: cw00.choi, linux-pm, linux-kernel

This patch just removes '.' character from the sysfs name of devfreq-event
device as following. Usually, the subsystem uses the similiar naming style
such as {framework name}{Number}.
- old : /sys/class/devfreq-event/event.[X]
- new : /sys/class/devfreq-event/event[X]

And this patch initializes the value of 'event_no' with -1
in order to remove the unneeded operation (-1) when calling
the atomic_inc_return(&event_no).

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/devfreq-event.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/devfreq/devfreq-event.c b/drivers/devfreq/devfreq-event.c
index 9aea2c7ecbe6..8648b32ebc89 100644
--- a/drivers/devfreq/devfreq-event.c
+++ b/drivers/devfreq/devfreq-event.c
@@ -306,7 +306,7 @@ struct devfreq_event_dev *devfreq_event_add_edev(struct device *dev,
 						struct devfreq_event_desc *desc)
 {
 	struct devfreq_event_dev *edev;
-	static atomic_t event_no = ATOMIC_INIT(0);
+	static atomic_t event_no = ATOMIC_INIT(-1);
 	int ret;
 
 	if (!dev || !desc)
@@ -329,7 +329,7 @@ struct devfreq_event_dev *devfreq_event_add_edev(struct device *dev,
 	edev->dev.class = devfreq_event_class;
 	edev->dev.release = devfreq_event_release_edev;
 
-	dev_set_name(&edev->dev, "event.%d", atomic_inc_return(&event_no) - 1);
+	dev_set_name(&edev->dev, "event%d", atomic_inc_return(&event_no));
 	ret = device_register(&edev->dev);
 	if (ret < 0) {
 		put_device(&edev->dev);
-- 
1.9.1

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

* [PATCH v4 4/4] PM / devfreq: Modify the device name as devfreq[X] for sysfs
       [not found]   ` <CGME20170123033152epcas5p3c2d5ced0fcce359e8fd2d0576462c029@epcas5p3.samsung.com>
@ 2017-01-23  3:31     ` Chanwoo Choi
  0 siblings, 0 replies; 10+ messages in thread
From: Chanwoo Choi @ 2017-01-23  3:31 UTC (permalink / raw)
  To: myungjoo.ham, kyungmin.park, rjw; +Cc: cw00.choi, linux-pm, linux-kernel

This patch modifies the device name as devfreq[X] for sysfs by using the 'devfreq'
prefix word instead of separate device name. On user-space aspect, user would
find the some devfreq drvier with 'devfreq[X]' pattern. So, this patch modify the
device name as following:
- /sys/class/devfreq/[non-standard device name] -> /sys/class/devfreq/devfreq[X]

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/devfreq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 8e5938c9c7d6..493f9ce250ff 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -527,6 +527,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
 	struct devfreq *devfreq;
 	struct devfreq_governor *governor;
+	static atomic_t devfreq_no = ATOMIC_INIT(-1);
 	int err = 0;
 
 	if (!dev || !profile || !governor_name) {
@@ -568,7 +569,8 @@ struct devfreq *devfreq_add_device(struct device *dev,
 		mutex_lock(&devfreq->lock);
 	}
 
-	dev_set_name(&devfreq->dev, "%s", dev_name(dev));
+	dev_set_name(&devfreq->dev, "devfreq%d",
+				atomic_inc_return(&devfreq_no));
 	err = device_register(&devfreq->dev);
 	if (err) {
 		mutex_unlock(&devfreq->lock);
-- 
1.9.1

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

* RE: [PATCH v4 1/4] PM / devfreq: Fix the wrong description for userspace governor
       [not found]   ` <CGME20170123033151epcas5p3a484d70bbdef282b92eb8d97d912e75c@epcas5p3.samsung.com>
  2017-01-23  3:31     ` [PATCH v4 1/4] PM / devfreq: Fix the wrong description for userspace governor Chanwoo Choi
@ 2017-01-24  3:42     ` MyungJoo Ham
  2017-01-30 10:44       ` Rafael J. Wysocki
  2017-01-31  4:51       ` MyungJoo Ham
  1 sibling, 2 replies; 10+ messages in thread
From: MyungJoo Ham @ 2017-01-24  3:42 UTC (permalink / raw)
  To: Chanwoo Choi, Kyungmin Park, rjw; +Cc: linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

> This patch fixes the wrong description of governor_userspace.c
> and removes the unneeded blank line.
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---

Applied in for-next



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

* RE: [PATCH v4 2/4] PM / devfreq: exynos-ppmu: Show the registred device for ppmu device
       [not found]   ` <CGME20170123033151epcas5p341aa786474af221e390eed87ea48381e@epcas5p3.samsung.com>
  2017-01-23  3:31     ` [PATCH v4 2/4] PM / devfreq: exynos-ppmu: Show the registred device for ppmu device Chanwoo Choi
@ 2017-01-24  3:42     ` MyungJoo Ham
  2017-01-24  8:15       ` Chanwoo Choi
  1 sibling, 1 reply; 10+ messages in thread
From: MyungJoo Ham @ 2017-01-24  3:42 UTC (permalink / raw)
  To: Chanwoo Choi, Kyungmin Park, rjw; +Cc: linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

> This patch just adds the simple log to show the PPMU device's registration
> during the kernel booting.
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>  drivers/devfreq/event/exynos-ppmu.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Applied in for-next



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

* Re: [PATCH v4 2/4] PM / devfreq: exynos-ppmu: Show the registred device for ppmu device
  2017-01-24  3:42     ` MyungJoo Ham
@ 2017-01-24  8:15       ` Chanwoo Choi
  0 siblings, 0 replies; 10+ messages in thread
From: Chanwoo Choi @ 2017-01-24  8:15 UTC (permalink / raw)
  To: myungjoo.ham, Kyungmin Park, rjw; +Cc: linux-pm, linux-kernel

On 2017년 01월 24일 12:42, MyungJoo Ham wrote:
>> This patch just adds the simple log to show the PPMU device's registration
>> during the kernel booting.
>>
>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>> ---
>>  drivers/devfreq/event/exynos-ppmu.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
> 
> Applied in for-next

I'd like you to review the patch3 and patch4.
On v4, The patch4 is modified according to your comment.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

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

* Re: [PATCH v4 1/4] PM / devfreq: Fix the wrong description for userspace governor
  2017-01-24  3:42     ` MyungJoo Ham
@ 2017-01-30 10:44       ` Rafael J. Wysocki
  2017-01-31  4:51       ` MyungJoo Ham
  1 sibling, 0 replies; 10+ messages in thread
From: Rafael J. Wysocki @ 2017-01-30 10:44 UTC (permalink / raw)
  To: Myungjoo Ham; +Cc: Chanwoo Choi, Kyungmin Park, rjw, linux-pm, linux-kernel

On Tue, Jan 24, 2017 at 4:42 AM, MyungJoo Ham <myungjoo.ham@samsung.com> wrote:
>> This patch fixes the wrong description of governor_userspace.c
>> and removes the unneeded blank line.
>>
>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>> ---
>
> Applied in for-next


Quite frankly I'm not entirely sure what's going on in the devfreq land.

Some patches are ACKed by you, some of them are applied and it is hard
to say what the rule is.

Besides, it is quite late in the cycle, so it would be nice to receive
a pull request for the devfreq material already collected for 4.11.

Thanks,
Rafael

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

* RE: Re: [PATCH v4 1/4] PM / devfreq: Fix the wrong description for userspace governor
  2017-01-24  3:42     ` MyungJoo Ham
  2017-01-30 10:44       ` Rafael J. Wysocki
@ 2017-01-31  4:51       ` MyungJoo Ham
  1 sibling, 0 replies; 10+ messages in thread
From: MyungJoo Ham @ 2017-01-31  4:51 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Chanwoo Choi, Kyungmin Park, rjw, linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

> On Tue, Jan 24, 2017 at 4:42 AM, MyungJoo Ham <myungjoo.ham@samsung.com> wrote:
> >> This patch fixes the wrong description of governor_userspace.c
> >> and removes the unneeded blank line.
> >>
> >> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> >> ---
> >
> > Applied in for-next
> 
> 
> Quite frankly I'm not entirely sure what's going on in the devfreq land.
> 
> Some patches are ACKed by you, some of them are applied and it is hard
> to say what the rule is.
> 
> Besides, it is quite late in the cycle, so it would be nice to receive
> a pull request for the devfreq material already collected for 4.11.
> 
> Thanks,
> Rafael

- The patches that change ABI is being delayed
  for further discussions with Chanwoo.

- The patches that change mechanisms of handling passive governor
differently in devfreq.c require further updates from Chanwoo;
so they are being not applied for now as well.

If it appears that those two patchset are not going to make in time
(mid this week), I'll send out pull-request for 4.11 without them.


Cheers,
MyungJoo 


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

end of thread, other threads:[~2017-01-31  5:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170123033151epcas5p3349612f1f97c31d85d90604cbca8a19d@epcas5p3.samsung.com>
2017-01-23  3:31 ` [PATCH v4 0/4] PM / devfreq: Update the devfreq and devfreq-event device Chanwoo Choi
     [not found]   ` <CGME20170123033151epcas5p3a484d70bbdef282b92eb8d97d912e75c@epcas5p3.samsung.com>
2017-01-23  3:31     ` [PATCH v4 1/4] PM / devfreq: Fix the wrong description for userspace governor Chanwoo Choi
2017-01-24  3:42     ` MyungJoo Ham
2017-01-30 10:44       ` Rafael J. Wysocki
2017-01-31  4:51       ` MyungJoo Ham
     [not found]   ` <CGME20170123033151epcas5p341aa786474af221e390eed87ea48381e@epcas5p3.samsung.com>
2017-01-23  3:31     ` [PATCH v4 2/4] PM / devfreq: exynos-ppmu: Show the registred device for ppmu device Chanwoo Choi
2017-01-24  3:42     ` MyungJoo Ham
2017-01-24  8:15       ` Chanwoo Choi
     [not found]   ` <CGME20170123033152epcas5p34efc72ecd1afb21efca58421ab41cbc6@epcas5p3.samsung.com>
2017-01-23  3:31     ` [PATCH v4 3/4] PM / devfreq: Simplify the sysfs name of devfreq-event device Chanwoo Choi
     [not found]   ` <CGME20170123033152epcas5p3c2d5ced0fcce359e8fd2d0576462c029@epcas5p3.samsung.com>
2017-01-23  3:31     ` [PATCH v4 4/4] PM / devfreq: Modify the device name as devfreq[X] for sysfs Chanwoo Choi

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.