* [RFC 0/3] omap3+: sr: Minor fix and cleanups
@ 2011-03-02 15:57 Jarkko Nikula
2011-03-02 15:57 ` [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls Jarkko Nikula
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Jarkko Nikula @ 2011-03-02 15:57 UTC (permalink / raw)
To: linux-omap; +Cc: Thara Gopinath, Nishanth Menon
Hi
I found a minor issue from smartreflex that it allows to enable multiple times
smartreflex class driver from userspace. Then two cleanups.
Nishant: I think this will conflict with your class 1.5 set. I think my
1/3 is worth to fix now and for 2-3/3 I don't have any particular priority.
I can rebase them on top of yours, you could take them with your set etc.
--
Jarkko
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls
2011-03-02 15:57 [RFC 0/3] omap3+: sr: Minor fix and cleanups Jarkko Nikula
@ 2011-03-02 15:57 ` Jarkko Nikula
2011-03-02 16:52 ` Nishanth Menon
2011-03-02 15:57 ` [RFC 2/3] omap3+: sr: Sync sr_stop_vddautocomp implementation with sr_start_vddautocomp Jarkko Nikula
2011-03-02 15:57 ` [RFC 3/3] omap3+: sr: Reuse sr_[start|stop]_vddautocomp functions Jarkko Nikula
2 siblings, 1 reply; 9+ messages in thread
From: Jarkko Nikula @ 2011-03-02 15:57 UTC (permalink / raw)
To: linux-omap; +Cc: Thara Gopinath, Nishanth Menon, Jarkko Nikula
Currently it is possible to enable multiple times the smartreflex class
driver from userspace via ../smartreflex/autocomp debugfs entry. Fix this
by checking the autocomp_active state in sr_start_vddautocomp.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
---
Not known to cause any problems at the moment with class3 driver.
---
arch/arm/mach-omap2/smartreflex.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 95ac336..d94894a 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -213,6 +213,9 @@ static void sr_set_regfields(struct omap_sr *sr)
static void sr_start_vddautocomp(struct omap_sr *sr)
{
+ if (sr->autocomp_active)
+ return;
+
if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) {
dev_warn(&sr->pdev->dev,
"%s: smartreflex class driver not registered\n",
--
1.7.2.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [RFC 2/3] omap3+: sr: Sync sr_stop_vddautocomp implementation with sr_start_vddautocomp
2011-03-02 15:57 [RFC 0/3] omap3+: sr: Minor fix and cleanups Jarkko Nikula
2011-03-02 15:57 ` [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls Jarkko Nikula
@ 2011-03-02 15:57 ` Jarkko Nikula
2011-03-02 15:57 ` [RFC 3/3] omap3+: sr: Reuse sr_[start|stop]_vddautocomp functions Jarkko Nikula
2 siblings, 0 replies; 9+ messages in thread
From: Jarkko Nikula @ 2011-03-02 15:57 UTC (permalink / raw)
To: linux-omap; +Cc: Thara Gopinath, Nishanth Menon, Jarkko Nikula
This is mostly preparation for another patch that takes these functions into
use from omap_sr_enable and omap_sr_disable.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
---
arch/arm/mach-omap2/smartreflex.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index d94894a..11741d8 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -229,6 +229,9 @@ static void sr_start_vddautocomp(struct omap_sr *sr)
static void sr_stop_vddautocomp(struct omap_sr *sr)
{
+ if (!sr->autocomp_active)
+ return;
+
if (!sr_class || !(sr_class->disable)) {
dev_warn(&sr->pdev->dev,
"%s: smartreflex class driver not registered\n",
@@ -236,10 +239,8 @@ static void sr_stop_vddautocomp(struct omap_sr *sr)
return;
}
- if (sr->autocomp_active) {
- sr_class->disable(sr->voltdm, 1);
+ if (!sr_class->disable(sr->voltdm, 1))
sr->autocomp_active = false;
- }
}
/*
--
1.7.2.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [RFC 3/3] omap3+: sr: Reuse sr_[start|stop]_vddautocomp functions
2011-03-02 15:57 [RFC 0/3] omap3+: sr: Minor fix and cleanups Jarkko Nikula
2011-03-02 15:57 ` [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls Jarkko Nikula
2011-03-02 15:57 ` [RFC 2/3] omap3+: sr: Sync sr_stop_vddautocomp implementation with sr_start_vddautocomp Jarkko Nikula
@ 2011-03-02 15:57 ` Jarkko Nikula
2011-03-02 16:59 ` Nishanth Menon
2 siblings, 1 reply; 9+ messages in thread
From: Jarkko Nikula @ 2011-03-02 15:57 UTC (permalink / raw)
To: linux-omap; +Cc: Thara Gopinath, Nishanth Menon, Jarkko Nikula
sr_start_vddautocomp and sr_stop_autocomp functions can be reused from
omap_sr_enable, omap_sr_disable and omap_sr_disable_reset_volt and by
adding one additional argument sr_stop_autocomp.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
---
arch/arm/mach-omap2/smartreflex.c | 41 ++++++------------------------------
1 files changed, 7 insertions(+), 34 deletions(-)
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 11741d8..7e6002f 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -227,7 +227,7 @@ static void sr_start_vddautocomp(struct omap_sr *sr)
sr->autocomp_active = true;
}
-static void sr_stop_vddautocomp(struct omap_sr *sr)
+static void sr_stop_vddautocomp(struct omap_sr *sr, int is_volt_reset)
{
if (!sr->autocomp_active)
return;
@@ -239,7 +239,7 @@ static void sr_stop_vddautocomp(struct omap_sr *sr)
return;
}
- if (!sr_class->disable(sr->voltdm, 1))
+ if (!sr_class->disable(sr->voltdm, is_volt_reset))
sr->autocomp_active = false;
}
@@ -681,16 +681,7 @@ void omap_sr_enable(struct voltagedomain *voltdm)
return;
}
- if (!sr->autocomp_active)
- return;
-
- if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) {
- dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
- "registered\n", __func__);
- return;
- }
-
- sr_class->enable(voltdm);
+ sr_start_vddautocomp(sr);
}
/**
@@ -714,16 +705,7 @@ void omap_sr_disable(struct voltagedomain *voltdm)
return;
}
- if (!sr->autocomp_active)
- return;
-
- if (!sr_class || !(sr_class->disable)) {
- dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
- "registered\n", __func__);
- return;
- }
-
- sr_class->disable(voltdm, 0);
+ sr_stop_vddautocomp(sr, 0);
}
/**
@@ -747,16 +729,7 @@ void omap_sr_disable_reset_volt(struct voltagedomain *voltdm)
return;
}
- if (!sr->autocomp_active)
- return;
-
- if (!sr_class || !(sr_class->disable)) {
- dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
- "registered\n", __func__);
- return;
- }
-
- sr_class->disable(voltdm, 1);
+ sr_stop_vddautocomp(sr, 1);
}
/**
@@ -809,7 +782,7 @@ static int omap_sr_autocomp_store(void *data, u64 val)
}
if (!val)
- sr_stop_vddautocomp(sr_info);
+ sr_stop_vddautocomp(sr_info, 1);
else
sr_start_vddautocomp(sr_info);
@@ -976,7 +949,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
}
if (sr_info->autocomp_active)
- sr_stop_vddautocomp(sr_info);
+ sr_stop_vddautocomp(sr_info, 1);
list_del(&sr_info->node);
iounmap(sr_info->base);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls
2011-03-02 15:57 ` [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls Jarkko Nikula
@ 2011-03-02 16:52 ` Nishanth Menon
0 siblings, 0 replies; 9+ messages in thread
From: Nishanth Menon @ 2011-03-02 16:52 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-omap, Thara Gopinath
Jarkko Nikula wrote, on 03/02/2011 09:27 PM:
> Currently it is possible to enable multiple times the smartreflex class
> driver from userspace via ../smartreflex/autocomp debugfs entry. Fix this
> by checking the autocomp_active state in sr_start_vddautocomp.
>
> Signed-off-by: Jarkko Nikula<jhnikula@gmail.com>
> ---
> Not known to cause any problems at the moment with class3 driver.
> ---
> arch/arm/mach-omap2/smartreflex.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index 95ac336..d94894a 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -213,6 +213,9 @@ static void sr_set_regfields(struct omap_sr *sr)
>
> static void sr_start_vddautocomp(struct omap_sr *sr)
> {
> + if (sr->autocomp_active)
> + return;
> +
> if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) {
> dev_warn(&sr->pdev->dev,
> "%s: smartreflex class driver not registered\n",
is'nt:
http://marc.info/?l=linux-omap&m=129906344711663&w=2
better since the issue with userspace access -> debugfs?
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 3/3] omap3+: sr: Reuse sr_[start|stop]_vddautocomp functions
2011-03-02 15:57 ` [RFC 3/3] omap3+: sr: Reuse sr_[start|stop]_vddautocomp functions Jarkko Nikula
@ 2011-03-02 16:59 ` Nishanth Menon
2011-03-03 0:48 ` Kevin Hilman
0 siblings, 1 reply; 9+ messages in thread
From: Nishanth Menon @ 2011-03-02 16:59 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-omap, Thara Gopinath
Jarkko Nikula wrote, on 03/02/2011 09:27 PM:
> sr_start_vddautocomp and sr_stop_autocomp functions can be reused from
> omap_sr_enable, omap_sr_disable and omap_sr_disable_reset_volt and by
> adding one additional argument sr_stop_autocomp.
>
> Signed-off-by: Jarkko Nikula<jhnikula@gmail.com>
> ---
> arch/arm/mach-omap2/smartreflex.c | 41 ++++++------------------------------
> 1 files changed, 7 insertions(+), 34 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index 11741d8..7e6002f 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -227,7 +227,7 @@ static void sr_start_vddautocomp(struct omap_sr *sr)
> sr->autocomp_active = true;
> }
>
> -static void sr_stop_vddautocomp(struct omap_sr *sr)
> +static void sr_stop_vddautocomp(struct omap_sr *sr, int is_volt_reset)
> {
> if (!sr->autocomp_active)
> return;
> @@ -239,7 +239,7 @@ static void sr_stop_vddautocomp(struct omap_sr *sr)
> return;
> }
>
> - if (!sr_class->disable(sr->voltdm, 1))
> + if (!sr_class->disable(sr->voltdm, is_volt_reset))
> sr->autocomp_active = false;
> }
>
> @@ -681,16 +681,7 @@ void omap_sr_enable(struct voltagedomain *voltdm)
> return;
> }
>
> - if (!sr->autocomp_active)
> - return;
> -
> - if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) {
> - dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
> - "registered\n", __func__);
> - return;
> - }
> -
> - sr_class->enable(voltdm);
> + sr_start_vddautocomp(sr);
> }
>
> /**
> @@ -714,16 +705,7 @@ void omap_sr_disable(struct voltagedomain *voltdm)
> return;
> }
>
> - if (!sr->autocomp_active)
> - return;
> -
> - if (!sr_class || !(sr_class->disable)) {
> - dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
> - "registered\n", __func__);
> - return;
> - }
> -
> - sr_class->disable(voltdm, 0);
> + sr_stop_vddautocomp(sr, 0);
> }
>
> /**
> @@ -747,16 +729,7 @@ void omap_sr_disable_reset_volt(struct voltagedomain *voltdm)
> return;
> }
>
> - if (!sr->autocomp_active)
> - return;
> -
> - if (!sr_class || !(sr_class->disable)) {
> - dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
> - "registered\n", __func__);
> - return;
> - }
> -
> - sr_class->disable(voltdm, 1);
> + sr_stop_vddautocomp(sr, 1);
> }
>
> /**
> @@ -809,7 +782,7 @@ static int omap_sr_autocomp_store(void *data, u64 val)
> }
>
> if (!val)
> - sr_stop_vddautocomp(sr_info);
> + sr_stop_vddautocomp(sr_info, 1);
> else
> sr_start_vddautocomp(sr_info);
>
> @@ -976,7 +949,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
> }
>
> if (sr_info->autocomp_active)
> - sr_stop_vddautocomp(sr_info);
> + sr_stop_vddautocomp(sr_info, 1);
>
> list_del(&sr_info->node);
> iounmap(sr_info->base);
Looks like a nice cleanup to me.
if the motivation of patch 1/3 is to do this cleanup, I am altogether
for it (lesser code == lesser bugs ;) ). btw, this should not impact
class1.5 either - core sr.c sequencing has not been modified in sr1.5 :)
Depending on Kevin's views, either you or I or both of us can rebase
depending on whose ever series gets pulled in first.. (either should be
a very minimal effort).
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 3/3] omap3+: sr: Reuse sr_[start|stop]_vddautocomp functions
2011-03-02 16:59 ` Nishanth Menon
@ 2011-03-03 0:48 ` Kevin Hilman
2011-03-03 0:52 ` Nishanth Menon
0 siblings, 1 reply; 9+ messages in thread
From: Kevin Hilman @ 2011-03-03 0:48 UTC (permalink / raw)
To: Nishanth Menon; +Cc: Jarkko Nikula, linux-omap, Thara Gopinath
Nishanth Menon <nm@ti.com> writes:
> Jarkko Nikula wrote, on 03/02/2011 09:27 PM:
>> sr_start_vddautocomp and sr_stop_autocomp functions can be reused from
>> omap_sr_enable, omap_sr_disable and omap_sr_disable_reset_volt and by
>> adding one additional argument sr_stop_autocomp.
>>
>> Signed-off-by: Jarkko Nikula<jhnikula@gmail.com>
>> ---
>> arch/arm/mach-omap2/smartreflex.c | 41 ++++++------------------------------
>> 1 files changed, 7 insertions(+), 34 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
>> index 11741d8..7e6002f 100644
>> --- a/arch/arm/mach-omap2/smartreflex.c
>> +++ b/arch/arm/mach-omap2/smartreflex.c
>> @@ -227,7 +227,7 @@ static void sr_start_vddautocomp(struct omap_sr *sr)
>> sr->autocomp_active = true;
>> }
>>
>> -static void sr_stop_vddautocomp(struct omap_sr *sr)
>> +static void sr_stop_vddautocomp(struct omap_sr *sr, int is_volt_reset)
>> {
>> if (!sr->autocomp_active)
>> return;
>> @@ -239,7 +239,7 @@ static void sr_stop_vddautocomp(struct omap_sr *sr)
>> return;
>> }
>>
>> - if (!sr_class->disable(sr->voltdm, 1))
>> + if (!sr_class->disable(sr->voltdm, is_volt_reset))
>> sr->autocomp_active = false;
>> }
>>
>> @@ -681,16 +681,7 @@ void omap_sr_enable(struct voltagedomain *voltdm)
>> return;
>> }
>>
>> - if (!sr->autocomp_active)
>> - return;
>> -
>> - if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) {
>> - dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
>> - "registered\n", __func__);
>> - return;
>> - }
>> -
>> - sr_class->enable(voltdm);
>> + sr_start_vddautocomp(sr);
>> }
>>
>> /**
>> @@ -714,16 +705,7 @@ void omap_sr_disable(struct voltagedomain *voltdm)
>> return;
>> }
>>
>> - if (!sr->autocomp_active)
>> - return;
>> -
>> - if (!sr_class || !(sr_class->disable)) {
>> - dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
>> - "registered\n", __func__);
>> - return;
>> - }
>> -
>> - sr_class->disable(voltdm, 0);
>> + sr_stop_vddautocomp(sr, 0);
>> }
>>
>> /**
>> @@ -747,16 +729,7 @@ void omap_sr_disable_reset_volt(struct voltagedomain *voltdm)
>> return;
>> }
>>
>> - if (!sr->autocomp_active)
>> - return;
>> -
>> - if (!sr_class || !(sr_class->disable)) {
>> - dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
>> - "registered\n", __func__);
>> - return;
>> - }
>> -
>> - sr_class->disable(voltdm, 1);
>> + sr_stop_vddautocomp(sr, 1);
>> }
>>
>> /**
>> @@ -809,7 +782,7 @@ static int omap_sr_autocomp_store(void *data, u64 val)
>> }
>>
>> if (!val)
>> - sr_stop_vddautocomp(sr_info);
>> + sr_stop_vddautocomp(sr_info, 1);
>> else
>> sr_start_vddautocomp(sr_info);
>>
>> @@ -976,7 +949,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
>> }
>>
>> if (sr_info->autocomp_active)
>> - sr_stop_vddautocomp(sr_info);
>> + sr_stop_vddautocomp(sr_info, 1);
>>
>> list_del(&sr_info->node);
>> iounmap(sr_info->base);
>
> Looks like a nice cleanup to me.
>
> if the motivation of patch 1/3 is to do this cleanup, I am altogether
> for it (lesser code == lesser bugs ;) ). btw, this should not impact
> class1.5 either - core sr.c sequencing has not been modified in sr1.5
> :)
>
> Depending on Kevin's views, either you or I or both of us can rebase
> depending on whose ever series gets pulled in first.. (either should
> be a very minimal effort).
Nishanth,
I'd prefer if you handle these. You can add them to the fixup/cleanup
part of your SR1.5 series.
Thanks,
Kevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 3/3] omap3+: sr: Reuse sr_[start|stop]_vddautocomp functions
2011-03-03 0:48 ` Kevin Hilman
@ 2011-03-03 0:52 ` Nishanth Menon
2011-03-03 6:57 ` Jarkko Nikula
0 siblings, 1 reply; 9+ messages in thread
From: Nishanth Menon @ 2011-03-03 0:52 UTC (permalink / raw)
To: Kevin Hilman; +Cc: Jarkko Nikula, linux-omap, Thara Gopinath
Kevin Hilman wrote, on 03/03/2011 06:18 AM:
> Nishanth Menon<nm@ti.com> writes:
>
>> Jarkko Nikula wrote, on 03/02/2011 09:27 PM:
>>> sr_start_vddautocomp and sr_stop_autocomp functions can be reused from
>>> omap_sr_enable, omap_sr_disable and omap_sr_disable_reset_volt and by
>>> adding one additional argument sr_stop_autocomp.
>>>
>>> Signed-off-by: Jarkko Nikula<jhnikula@gmail.com>
>>> ---
>>> arch/arm/mach-omap2/smartreflex.c | 41 ++++++------------------------------
>>> 1 files changed, 7 insertions(+), 34 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
>>> index 11741d8..7e6002f 100644
>>> --- a/arch/arm/mach-omap2/smartreflex.c
>>> +++ b/arch/arm/mach-omap2/smartreflex.c
>>> @@ -227,7 +227,7 @@ static void sr_start_vddautocomp(struct omap_sr *sr)
>>> sr->autocomp_active = true;
>>> }
>>>
>>> -static void sr_stop_vddautocomp(struct omap_sr *sr)
>>> +static void sr_stop_vddautocomp(struct omap_sr *sr, int is_volt_reset)
>>> {
>>> if (!sr->autocomp_active)
>>> return;
>>> @@ -239,7 +239,7 @@ static void sr_stop_vddautocomp(struct omap_sr *sr)
>>> return;
>>> }
>>>
>>> - if (!sr_class->disable(sr->voltdm, 1))
>>> + if (!sr_class->disable(sr->voltdm, is_volt_reset))
>>> sr->autocomp_active = false;
>>> }
>>>
>>> @@ -681,16 +681,7 @@ void omap_sr_enable(struct voltagedomain *voltdm)
>>> return;
>>> }
>>>
>>> - if (!sr->autocomp_active)
>>> - return;
>>> -
>>> - if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) {
>>> - dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
>>> - "registered\n", __func__);
>>> - return;
>>> - }
>>> -
>>> - sr_class->enable(voltdm);
>>> + sr_start_vddautocomp(sr);
>>> }
>>>
>>> /**
>>> @@ -714,16 +705,7 @@ void omap_sr_disable(struct voltagedomain *voltdm)
>>> return;
>>> }
>>>
>>> - if (!sr->autocomp_active)
>>> - return;
>>> -
>>> - if (!sr_class || !(sr_class->disable)) {
>>> - dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
>>> - "registered\n", __func__);
>>> - return;
>>> - }
>>> -
>>> - sr_class->disable(voltdm, 0);
>>> + sr_stop_vddautocomp(sr, 0);
>>> }
>>>
>>> /**
>>> @@ -747,16 +729,7 @@ void omap_sr_disable_reset_volt(struct voltagedomain *voltdm)
>>> return;
>>> }
>>>
>>> - if (!sr->autocomp_active)
>>> - return;
>>> -
>>> - if (!sr_class || !(sr_class->disable)) {
>>> - dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not"
>>> - "registered\n", __func__);
>>> - return;
>>> - }
>>> -
>>> - sr_class->disable(voltdm, 1);
>>> + sr_stop_vddautocomp(sr, 1);
>>> }
>>>
>>> /**
>>> @@ -809,7 +782,7 @@ static int omap_sr_autocomp_store(void *data, u64 val)
>>> }
>>>
>>> if (!val)
>>> - sr_stop_vddautocomp(sr_info);
>>> + sr_stop_vddautocomp(sr_info, 1);
>>> else
>>> sr_start_vddautocomp(sr_info);
>>>
>>> @@ -976,7 +949,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
>>> }
>>>
>>> if (sr_info->autocomp_active)
>>> - sr_stop_vddautocomp(sr_info);
>>> + sr_stop_vddautocomp(sr_info, 1);
>>>
>>> list_del(&sr_info->node);
>>> iounmap(sr_info->base);
>>
>> Looks like a nice cleanup to me.
>>
>> if the motivation of patch 1/3 is to do this cleanup, I am altogether
>> for it (lesser code == lesser bugs ;) ). btw, this should not impact
>> class1.5 either - core sr.c sequencing has not been modified in sr1.5
>> :)
>>
>> Depending on Kevin's views, either you or I or both of us can rebase
>> depending on whose ever series gets pulled in first.. (either should
>> be a very minimal effort).
>
> Nishanth,
>
> I'd prefer if you handle these. You can add them to the fixup/cleanup
> part of your SR1.5 series.
ok will pull this in as part of sr1.5 series if no further review comments.
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC 3/3] omap3+: sr: Reuse sr_[start|stop]_vddautocomp functions
2011-03-03 0:52 ` Nishanth Menon
@ 2011-03-03 6:57 ` Jarkko Nikula
0 siblings, 0 replies; 9+ messages in thread
From: Jarkko Nikula @ 2011-03-03 6:57 UTC (permalink / raw)
To: Nishanth Menon; +Cc: Kevin Hilman, linux-omap, Thara Gopinath
On Thu, 03 Mar 2011 06:22:36 +0530
Nishanth Menon <nm@ti.com> wrote:
> Kevin Hilman wrote, on 03/03/2011 06:18 AM:
> > Nishanth Menon<nm@ti.com> writes:
> >> Looks like a nice cleanup to me.
> >>
> >> if the motivation of patch 1/3 is to do this cleanup, I am altogether
> >> for it (lesser code == lesser bugs ;) ). btw, this should not impact
> >> class1.5 either - core sr.c sequencing has not been modified in sr1.5
> >> :)
> >>
Heh, no any hidded motivation here. I was just blind to see your 12/18
and I found the issue and cleanup possibilities at the same time and
decided to put them into same RFC set :-)
> > Nishanth,
> >
> > I'd prefer if you handle these. You can add them to the fixup/cleanup
> > part of your SR1.5 series.
>
> ok will pull this in as part of sr1.5 series if no further review comments.
>
Ok, that's fine to me (though your set has the priority as I didn't
notice the 12/18).
--
Jarkko
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-03-03 6:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02 15:57 [RFC 0/3] omap3+: sr: Minor fix and cleanups Jarkko Nikula
2011-03-02 15:57 ` [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls Jarkko Nikula
2011-03-02 16:52 ` Nishanth Menon
2011-03-02 15:57 ` [RFC 2/3] omap3+: sr: Sync sr_stop_vddautocomp implementation with sr_start_vddautocomp Jarkko Nikula
2011-03-02 15:57 ` [RFC 3/3] omap3+: sr: Reuse sr_[start|stop]_vddautocomp functions Jarkko Nikula
2011-03-02 16:59 ` Nishanth Menon
2011-03-03 0:48 ` Kevin Hilman
2011-03-03 0:52 ` Nishanth Menon
2011-03-03 6:57 ` Jarkko Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox