pinctrl-samsung.c (6724af486903df57338c14424e02599e371cf563) | pinctrl-samsung.c (323de9efdf3e75d1dfb48003a52e59d6d9d4c7a5) |
---|---|
1/* 2 * pin-controller/pin-mux/pin-config/gpio-driver for Samsung's SoC's. 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com 6 * Copyright (c) 2012 Linaro Ltd 7 * http://www.linaro.org 8 * --- 792 unchanged lines hidden (view full) --- 801 if (IS_ERR(groups)) { 802 dev_err(dev, "failed to parse pin groups\n"); 803 return PTR_ERR(groups); 804 } 805 806 functions = samsung_pinctrl_create_functions(dev, drvdata, &func_cnt); 807 if (IS_ERR(functions)) { 808 dev_err(dev, "failed to parse pin functions\n"); | 1/* 2 * pin-controller/pin-mux/pin-config/gpio-driver for Samsung's SoC's. 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com 6 * Copyright (c) 2012 Linaro Ltd 7 * http://www.linaro.org 8 * --- 792 unchanged lines hidden (view full) --- 801 if (IS_ERR(groups)) { 802 dev_err(dev, "failed to parse pin groups\n"); 803 return PTR_ERR(groups); 804 } 805 806 functions = samsung_pinctrl_create_functions(dev, drvdata, &func_cnt); 807 if (IS_ERR(functions)) { 808 dev_err(dev, "failed to parse pin functions\n"); |
809 return PTR_ERR(groups); | 809 return PTR_ERR(functions); |
810 } 811 812 drvdata->pin_groups = groups; 813 drvdata->nr_groups = grp_cnt; 814 drvdata->pmx_functions = functions; 815 drvdata->nr_functions = func_cnt; 816 817 return 0; --- 50 unchanged lines hidden (view full) --- 868 } 869 } 870 871 ret = samsung_pinctrl_parse_dt(pdev, drvdata); 872 if (ret) 873 return ret; 874 875 drvdata->pctl_dev = pinctrl_register(ctrldesc, &pdev->dev, drvdata); | 810 } 811 812 drvdata->pin_groups = groups; 813 drvdata->nr_groups = grp_cnt; 814 drvdata->pmx_functions = functions; 815 drvdata->nr_functions = func_cnt; 816 817 return 0; --- 50 unchanged lines hidden (view full) --- 868 } 869 } 870 871 ret = samsung_pinctrl_parse_dt(pdev, drvdata); 872 if (ret) 873 return ret; 874 875 drvdata->pctl_dev = pinctrl_register(ctrldesc, &pdev->dev, drvdata); |
876 if (!drvdata->pctl_dev) { | 876 if (IS_ERR(drvdata->pctl_dev)) { |
877 dev_err(&pdev->dev, "could not register pinctrl driver\n"); | 877 dev_err(&pdev->dev, "could not register pinctrl driver\n"); |
878 return -EINVAL; | 878 return PTR_ERR(drvdata->pctl_dev); |
879 } 880 881 for (bank = 0; bank < drvdata->nr_banks; ++bank) { 882 pin_bank = &drvdata->pin_banks[bank]; 883 pin_bank->grange.name = pin_bank->name; 884 pin_bank->grange.id = bank; 885 pin_bank->grange.pin_base = drvdata->pin_base 886 + pin_bank->pin_base; --- 411 unchanged lines hidden --- | 879 } 880 881 for (bank = 0; bank < drvdata->nr_banks; ++bank) { 882 pin_bank = &drvdata->pin_banks[bank]; 883 pin_bank->grange.name = pin_bank->name; 884 pin_bank->grange.id = bank; 885 pin_bank->grange.pin_base = drvdata->pin_base 886 + pin_bank->pin_base; --- 411 unchanged lines hidden --- |