doc: replace @return by Return:
[platform/kernel/u-boot.git] / drivers / pinctrl / intel / pinctrl.c
index ba21c9d..1607000 100644 (file)
@@ -60,7 +60,7 @@
  *
  * @comm: Community to search
  * @gpio: Pad number to look up (assumed to be valid)
- * @return offset, 0 for first GPIO in community
+ * Return: offset, 0 for first GPIO in community
  */
 static size_t relative_pad_in_comm(const struct pad_community *comm,
                                   uint gpio)
@@ -75,7 +75,7 @@ static size_t relative_pad_in_comm(const struct pad_community *comm,
  *
  * @comm: Community to search
  * @relative_pad: Pad to look up
- * @return group number if found (see community_n_groups, etc.), or
+ * Return: group number if found (see community_n_groups, etc.), or
  *     -ESPIPE if no groups, or -ENOENT if not found
  */
 static int pinctrl_group_index(const struct pad_community *comm,
@@ -135,7 +135,7 @@ static u32 pinctrl_bitmask_within_group(const struct pad_community *comm,
  *
  * @pad: Pad to check
  * @devp: Returns the device for that pad
- * @return 0 if OK, -ENOTBLK if no device was found for the given pin
+ * Return: 0 if OK, -ENOTBLK if no device was found for the given pin
  */
 static int pinctrl_get_device(uint pad, struct udevice **devp)
 {
@@ -143,7 +143,7 @@ static int pinctrl_get_device(uint pad, struct udevice **devp)
 
        /*
         * We have to probe each one of these since the community link is only
-        * attached in intel_pinctrl_ofdata_to_platdata().
+        * attached in intel_pinctrl_of_to_plat().
         */
        uclass_foreach_dev_probe(UCLASS_PINCTRL, dev) {
                struct intel_pinctrl_priv *priv = dev_get_priv(dev);
@@ -154,7 +154,7 @@ static int pinctrl_get_device(uint pad, struct udevice **devp)
                        return 0;
                }
        }
-       printf("pad %d not found\n", pad);
+       log_debug("pad %d not found\n", pad);
 
        return -ENOTBLK;
 }
@@ -274,7 +274,9 @@ static int pinctrl_configure_itss(struct udevice *dev,
        irq = pcr_read32(dev, PAD_CFG1_OFFSET(pad_cfg_offset));
        irq &= PAD_CFG1_IRQ_MASK;
        if (!irq) {
-               log_err("GPIO %u doesn't support APIC routing\n", cfg->pad);
+               if (spl_phase() > PHASE_TPL)
+                       log_err("GPIO %u doesn't support APIC routing\n",
+                               cfg->pad);
 
                return -EPROTONOSUPPORT;
        }
@@ -314,7 +316,8 @@ static int pinctrl_pad_reset_config_override(const struct pad_community *comm,
                        return config_value;
                }
        }
-       log_err("Logical-to-Chipset mapping not found\n");
+       if (spl_phase() > PHASE_TPL)
+               log_err("Logical-to-Chipset mapping not found\n");
 
        return -ENOENT;
 }
@@ -343,7 +346,7 @@ static const int mask[4] = {
  *
  * @dev: Pinctrl device containing the pad (see pinctrl_get_device())
  * @cfg: Configuration to apply
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
  */
 static int pinctrl_configure_pad(struct udevice *dev,
                                 const struct pad_config *cfg)
@@ -613,15 +616,16 @@ int pinctrl_config_pads_for_node(struct udevice *dev, ofnode node)
        return 0;
 }
 
-int intel_pinctrl_ofdata_to_platdata(struct udevice *dev,
-                                    const struct pad_community *comm,
-                                    int num_cfgs)
+int intel_pinctrl_of_to_plat(struct udevice *dev,
+                            const struct pad_community *comm, int num_cfgs)
 {
-       struct p2sb_child_platdata *pplat = dev_get_parent_platdata(dev);
+       struct p2sb_child_plat *pplat = dev_get_parent_plat(dev);
        struct intel_pinctrl_priv *priv = dev_get_priv(dev);
 
        if (!comm) {
-               log_err("Cannot find community for pid %d\n", pplat->pid);
+               if (spl_phase() > PHASE_TPL)
+                       log_err("Cannot find community for pid %d\n",
+                               pplat->pid);
                return -EDOM;
        }
        priv->comm = comm;