lkml.org 
[lkml]   [2012]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 11/20] pinctrl: Downgrade pinctrl_get warning when no maps are found
    Date
    This may be perfectly legitimate. An IP block may get re-used
    across SoCs. Not all of those SoCs may need pinmux settings for the
    IP block, e.g. if one SoC dedicates pins to that function but
    another doesn't. The driver won't know this, and will always
    attempt to set up the pinmux. The mapping table defines whether any
    HW programming is actually needed.

    Signed-off-by: Stephen Warren <swarren@nvidia.com>
    ---
    drivers/pinctrl/core.c | 17 ++++++++++-------
    1 files changed, 10 insertions(+), 7 deletions(-)

    diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
    index 37dfac7..54e24f7 100644
    --- a/drivers/pinctrl/core.c
    +++ b/drivers/pinctrl/core.c
    @@ -542,13 +542,16 @@ static struct pinctrl *pinctrl_get_locked(struct device *dev, const char *name)
    num_maps++;
    }

    - /* We should have atleast one map, right */
    - if (!num_maps) {
    - pr_err("could not find any mux maps for device %s, ID %s\n",
    - devname, name);
    - kfree(p);
    - return ERR_PTR(-EINVAL);
    - }
    + /*
    + * This may be perfectly legitimate. An IP block may get re-used
    + * across SoCs. Not all of those SoCs may need pinmux settings for the
    + * IP block, e.g. if one SoC dedicates pins to that function but
    + * another doesn't. The driver won't know this, and will always
    + * attempt to set up the pinmux. The mapping table defines whether any
    + * HW programming is actually needed.
    + */
    + if (!num_maps)
    + dev_info(dev, "zero maps found for state %s\n", name);

    pr_debug("found %u mux maps for device %s, UD %s\n",
    num_maps, devname, name);
    --
    1.7.5.4


    \
     
     \ /
      Last update: 2012-02-20 07:53    [W:5.046 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site