Re: [PATCH] omap2plus: smartreflex: remove sr debug directory in omap_sr_remove()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Sawant, Anand" <sawant@xxxxxx> writes:

> Kevin,
>
> On Sat, Feb 12, 2011 at 5:20 AM, Kevin Hilman <khilman@xxxxxx> wrote:
>> Hi Anand,
>>
>> Anand S Sawant <sawant@xxxxxx> writes:
>>
>>> omap_sr_probe() creates the smartreflex debug directory and its
>>> underlying nvalue debug directory. These directories are removed in
>>> omap_sr_remove().
>>>
>>> Basic smartreflex functionality tested on OMAP3630 Zoom3 & OMAP4430 SDP
>>>
>>> Signed-off-by: Anand S Sawant <sawant@xxxxxx>
>>
>> Looks good.
>>
>> Please repost with the linux-arm-kernel list in CC:
>> linux-arm-kernel@xxxxxxxxxxxxxxxxxxxx ÂThend, unless there are other
>> comments/objections, I'll queue this for 2.6.39.
>>
>
> Thanks, will repost.
>
>> Also, can summarize on which platforms this was tested.
>
> I tested SR functionality at the default OPP on 3630 Zoom3 &
> OMAP4430 SDP.

What I was wondering is how you tested the functionality of the changes
you made, namely the sr-remove path.

Kevin

>> Just curious:
>> Were you able to build SR as a module to test this?
>>
>
> No.
>
> Best Regards,
>
> Anand S Sawant
>> Kevin
>>
>>> ---
>>> Âarch/arm/mach-omap2/smartreflex.c | Â 24 ++++++++++++++----------
>>> Â1 files changed, 14 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
>>> index d7deadf..57df5cf 100644
>>> --- a/arch/arm/mach-omap2/smartreflex.c
>>> +++ b/arch/arm/mach-omap2/smartreflex.c
>>> @@ -54,6 +54,7 @@ struct omap_sr {
>>>    struct list_head        Ânode;
>>>    struct omap_sr_nvalue_table   *nvalue_table;
>>>    struct voltagedomain      Â*voltdm;
>>> +   struct dentry          *dbg_dir;
>>> Â};
>>>
>>> Â/* sr_list contains all the instances of smartreflex module */
>>> @@ -822,7 +823,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
>>> Â Â Â struct omap_sr *sr_info = kzalloc(sizeof(struct omap_sr), GFP_KERNEL);
>>> Â Â Â struct omap_sr_data *pdata = pdev->dev.platform_data;
>>> Â Â Â struct resource *mem, *irq;
>>> - Â Â struct dentry *vdd_dbg_dir, *dbg_dir, *nvalue_dir;
>>> + Â Â struct dentry *vdd_dbg_dir, *nvalue_dir;
>>> Â Â Â struct omap_volt_data *volt_data;
>>> Â Â Â int i, ret = 0;
>>>
>>> @@ -894,23 +895,24 @@ static int __init omap_sr_probe(struct platform_device *pdev)
>>> Â Â Â if (!vdd_dbg_dir)
>>> Â Â Â Â Â Â Â return -EINVAL;
>>>
>>> - Â Â dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir);
>>> - Â Â if (IS_ERR(dbg_dir)) {
>>> + Â Â sr_info->dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir);
>>> + Â Â if (IS_ERR(sr_info->dbg_dir)) {
>>> Â Â Â Â Â Â Â dev_err(&pdev->dev, "%s: Unable to create debugfs directory\n",
>>> Â Â Â Â Â Â Â Â Â Â Â __func__);
>>> - Â Â Â Â Â Â return PTR_ERR(dbg_dir);
>>> + Â Â Â Â Â Â return PTR_ERR(sr_info->dbg_dir);
>>> Â Â Â }
>>>
>>> - Â Â (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUGO, dbg_dir,
>>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â (void *)sr_info, &pm_sr_fops);
>>> - Â Â (void) debugfs_create_x32("errweight", S_IRUGO, dbg_dir,
>>> + Â Â /* Using S_IWUSR to fix checkpatch warning */
>>> + Â Â (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR,
>>> + Â Â Â Â Â Â Â Â Â Â sr_info->dbg_dir, (void *)sr_info, &pm_sr_fops);
>>> + Â Â (void) debugfs_create_x32("errweight", S_IRUGO, sr_info->dbg_dir,
>>> Â Â Â Â Â Â Â Â Â Â Â &sr_info->err_weight);
>>> - Â Â (void) debugfs_create_x32("errmaxlimit", S_IRUGO, dbg_dir,
>>> + Â Â (void) debugfs_create_x32("errmaxlimit", S_IRUGO, sr_info->dbg_dir,
>>> Â Â Â Â Â Â Â Â Â Â Â &sr_info->err_maxlimit);
>>> - Â Â (void) debugfs_create_x32("errminlimit", S_IRUGO, dbg_dir,
>>> + Â Â (void) debugfs_create_x32("errminlimit", S_IRUGO, sr_info->dbg_dir,
>>> Â Â Â Â Â Â Â Â Â Â Â &sr_info->err_minlimit);
>>>
>>> - Â Â nvalue_dir = debugfs_create_dir("nvalue", dbg_dir);
>>> + Â Â nvalue_dir = debugfs_create_dir("nvalue", sr_info->dbg_dir);
>>> Â Â Â if (IS_ERR(nvalue_dir)) {
>>> Â Â Â Â Â Â Â dev_err(&pdev->dev, "%s: Unable to create debugfs directory"
>>> Â Â Â Â Â Â Â Â Â Â Â "for n-values\n", __func__);
>>> @@ -974,6 +976,8 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
>>>
>>> Â Â Â if (sr_info->autocomp_active)
>>> Â Â Â Â Â Â Â sr_stop_vddautocomp(sr_info);
>>> + Â Â if (sr_info->dbg_dir)
>>> + Â Â Â Â Â Â debugfs_remove_recursive(sr_info->dbg_dir);
>>>
>>> Â Â Â list_del(&sr_info->node);
>>> Â Â Â iounmap(sr_info->base);
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux