Lines Matching refs:dev
78 static int reserve_map(struct device *dev, struct pinctrl_map **map, in reserve_map() argument
116 static int add_map_configs(struct device *dev, struct pinctrl_map **map, in add_map_configs() argument
140 static int add_config(struct device *dev, unsigned long **configs, in add_config() argument
174 struct device *dev, in samsung_dt_subnode_to_map() argument
198 ret = add_config(dev, &configs, &num_configs, config); in samsung_dt_subnode_to_map()
203 dev_err(dev, "could not parse property %s\n", in samsung_dt_subnode_to_map()
215 dev_err(dev, "could not parse property samsung,pins\n"); in samsung_dt_subnode_to_map()
220 ret = reserve_map(dev, map, reserved_maps, num_maps, reserve); in samsung_dt_subnode_to_map()
233 ret = add_map_configs(dev, map, reserved_maps, in samsung_dt_subnode_to_map()
265 return samsung_dt_subnode_to_map(drvdata, pctldev->dev, in samsung_dt_node_to_map()
271 ret = samsung_dt_subnode_to_map(drvdata, pctldev->dev, np, map, in samsung_dt_node_to_map()
669 struct device *dev, in samsung_pinctrl_create_groups() argument
678 groups = devm_kcalloc(dev, ctrldesc->npins, sizeof(*groups), in samsung_pinctrl_create_groups()
695 static int samsung_pinctrl_create_function(struct device *dev, in samsung_pinctrl_create_function() argument
709 dev_err(dev, "invalid pin list in %pOFn node", func_np); in samsung_pinctrl_create_function()
715 func->groups = devm_kcalloc(dev, npins, sizeof(char *), GFP_KERNEL); in samsung_pinctrl_create_function()
725 dev_err(dev, in samsung_pinctrl_create_function()
739 struct device *dev, in samsung_pinctrl_create_functions() argument
744 struct device_node *dev_np = dev->of_node; in samsung_pinctrl_create_functions()
772 functions = devm_kcalloc(dev, func_cnt, sizeof(*functions), in samsung_pinctrl_create_functions()
787 ret = samsung_pinctrl_create_function(dev, drvdata, in samsung_pinctrl_create_functions()
801 ret = samsung_pinctrl_create_function(dev, drvdata, in samsung_pinctrl_create_functions()
828 struct device *dev = &pdev->dev; in samsung_pinctrl_parse_dt() local
833 groups = samsung_pinctrl_create_groups(dev, drvdata, &grp_cnt); in samsung_pinctrl_parse_dt()
835 dev_err(dev, "failed to parse pin groups\n"); in samsung_pinctrl_parse_dt()
839 functions = samsung_pinctrl_create_functions(dev, drvdata, &func_cnt); in samsung_pinctrl_parse_dt()
841 dev_err(dev, "failed to parse pin functions\n"); in samsung_pinctrl_parse_dt()
869 pindesc = devm_kcalloc(&pdev->dev, in samsung_pinctrl_register()
885 pin_names = devm_kzalloc(&pdev->dev, in samsung_pinctrl_register()
907 drvdata->pctl_dev = devm_pinctrl_register(&pdev->dev, ctrldesc, in samsung_pinctrl_register()
910 dev_err(&pdev->dev, "could not register pinctrl driver\n"); in samsung_pinctrl_register()
968 gc->parent = &pdev->dev; in samsung_gpiolib_register()
972 ret = devm_gpiochip_add_data(&pdev->dev, gc, bank); in samsung_gpiolib_register()
974 dev_err(&pdev->dev, "failed to register gpio_chip %s, error code: %d\n", in samsung_gpiolib_register()
986 struct device_node *node = pdev->dev.of_node; in samsung_pinctrl_get_soc_data_for_of_alias()
992 dev_err(&pdev->dev, "failed to get alias id\n"); in samsung_pinctrl_get_soc_data_for_of_alias()
996 of_data = of_device_get_match_data(&pdev->dev); in samsung_pinctrl_get_soc_data_for_of_alias()
998 dev_err(&pdev->dev, "invalid alias id %d\n", id); in samsung_pinctrl_get_soc_data_for_of_alias()
1019 static void samsung_banks_node_get(struct device *dev, struct samsung_pinctrl_drv_data *d) in samsung_banks_node_get() argument
1034 dev_err(dev, "Too long pin bank name '%s', ignoring\n", in samsung_banks_node_get()
1039 for_each_gpiochip_node(dev, child) { in samsung_banks_node_get()
1051 dev_warn(dev, "Missing node for bank %s - invalid DTB\n", in samsung_banks_node_get()
1076 d->pin_banks = devm_kcalloc(&pdev->dev, d->nr_banks, in samsung_pinctrl_get_soc_data()
1087 dev_err(&pdev->dev, "failed to get mem%d resource\n", i); in samsung_pinctrl_get_soc_data()
1090 virt_base[i] = devm_ioremap(&pdev->dev, res->start, in samsung_pinctrl_get_soc_data()
1093 dev_err(&pdev->dev, "failed to ioremap %pR\n", res); in samsung_pinctrl_get_soc_data()
1125 samsung_banks_node_get(&pdev->dev, d); in samsung_pinctrl_get_soc_data()
1137 struct device *dev = &pdev->dev; in samsung_pinctrl_probe() local
1140 drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); in samsung_pinctrl_probe()
1146 dev_err(&pdev->dev, "driver data not available\n"); in samsung_pinctrl_probe()
1149 drvdata->dev = dev; in samsung_pinctrl_probe()
1195 static int __maybe_unused samsung_pinctrl_suspend(struct device *dev) in samsung_pinctrl_suspend() argument
1197 struct samsung_pinctrl_drv_data *drvdata = dev_get_drvdata(dev); in samsung_pinctrl_suspend()
1245 static int __maybe_unused samsung_pinctrl_resume(struct device *dev) in samsung_pinctrl_resume() argument
1247 struct samsung_pinctrl_drv_data *drvdata = dev_get_drvdata(dev); in samsung_pinctrl_resume()