struct pinctrl_dev *get_pinctrl_dev_from_of_node(struct device_node *np) { struct pinctrl_dev *pctldev;
mutex_lock(&pinctrldev_list_mutex);
list_for_each_entry(pctldev, &pinctrldev_list, node) if (pctldev->dev->of_node == np) { mutex_unlock(&pinctrldev_list_mutex); return pctldev; }
mutex_unlock(&pinctrldev_list_mutex); return NULL; }