Re: [RFC PATCH 2/4] bus: ti-sysc: Add generic enable/disable functions
From: Tony Lindgren
Date: Tue Apr 02 2019 - 13:14:54 EST
* Roger Quadros <rogerq@xxxxxx> [190402 13:38]:
> For non legacy cases, add generic sysc_enable_module()
> and sysc_disable_module() functions.
Looks OK to me. Can you please add a comment mentioning that we're
not currently blocking clockdomain autoidle? See clkdm_deny_idle()
use in omap_hwmod.c.
> + if (idlemodes & BIT(SYSC_IDLE_SMART_WKUP)) {
> + best_mode = SYSC_IDLE_SMART_WKUP;
> + } else if (idlemodes & BIT(SYSC_IDLE_SMART)) {
> + best_mode = SYSC_IDLE_SMART;
> + } else if (idlemodes & SYSC_IDLE_FORCE) {
> + best_mode = SYSC_IDLE_FORCE;
> + } else {
> + dev_err(dev, "%s: invalid midlemode\n", __func__);
> + return -EINVAL;
> + }
...
> + if (idlemodes & BIT(SYSC_IDLE_SMART_WKUP)) {
> + best_mode = SYSC_IDLE_SMART_WKUP;
> + } else if (idlemodes & BIT(SYSC_IDLE_SMART)) {
> + best_mode = SYSC_IDLE_SMART;
> + } else if (idlemodes & SYSC_IDLE_FORCE) {
> + best_mode = SYSC_IDLE_FORCE;
> + } else {
> + dev_err(dev, "%s: invalid sidlemode\n", __func__);
> + return -EINVAL;
> + }
Can you please add a helper function for getting the best
idle mode?
Regards,
Tony