RE: [PATCH v2 08/18] GPIO: OMAP: Use wkup regs off/suspend support flag

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

 



Kevin,
[...]
> > -#endif
> > -		default:
> > -			continue;
> > -		}
> > +		if (!bank->suspend_support)
> > +			return 0;
> 
> Rather than check the flag here in every suspend, don't add a suspend
> method in dev_pm_ops for banks that don't have the wkup_* registers.
While trying to implement this comment I am facing issues:

struct device_driver {
...
        const struct dev_pm_ops *pm;

...
};
Since *pm is constant we can not assign pm->suspend/resume dynamically.
Also, I am not sure if it is permissible to have following code in probe:

... omap_gpio_probe(...)
{
...
        if (bank->regs->wkup_status) {
                pdrv->driver.pm->suspend = omap_gpio_suspend;
                pdrv->driver.pm->resume = omap_gpio_resume;
        }
...

[...]
--
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