pinctrl-nomadik.c (3007d941bef84f78b6cf19cdfd5da80319cd28ae) | pinctrl-nomadik.c (323de9efdf3e75d1dfb48003a52e59d6d9d4c7a5) |
---|---|
1/* 2 * Generic GPIO driver for logic cells found in the Nomadik SoC 3 * 4 * Copyright (C) 2008,2009 STMicroelectronics 5 * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it> 6 * Rewritten based on work by Prafulla WADASKAR <prafulla.wadaskar@st.com> 7 * Copyright (C) 2011-2013 Linus Walleij <linus.walleij@linaro.org> 8 * --- 2015 unchanged lines hidden (view full) --- 2024 npct->soc->gpio_ranges[i].gc = &nmk_gpio_chips[npct->soc->gpio_ranges[i].id]->chip; 2025 } 2026 2027 nmk_pinctrl_desc.pins = npct->soc->pins; 2028 nmk_pinctrl_desc.npins = npct->soc->npins; 2029 npct->dev = &pdev->dev; 2030 2031 npct->pctl = pinctrl_register(&nmk_pinctrl_desc, &pdev->dev, npct); | 1/* 2 * Generic GPIO driver for logic cells found in the Nomadik SoC 3 * 4 * Copyright (C) 2008,2009 STMicroelectronics 5 * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it> 6 * Rewritten based on work by Prafulla WADASKAR <prafulla.wadaskar@st.com> 7 * Copyright (C) 2011-2013 Linus Walleij <linus.walleij@linaro.org> 8 * --- 2015 unchanged lines hidden (view full) --- 2024 npct->soc->gpio_ranges[i].gc = &nmk_gpio_chips[npct->soc->gpio_ranges[i].id]->chip; 2025 } 2026 2027 nmk_pinctrl_desc.pins = npct->soc->pins; 2028 nmk_pinctrl_desc.npins = npct->soc->npins; 2029 npct->dev = &pdev->dev; 2030 2031 npct->pctl = pinctrl_register(&nmk_pinctrl_desc, &pdev->dev, npct); |
2032 if (!npct->pctl) { | 2032 if (IS_ERR(npct->pctl)) { |
2033 dev_err(&pdev->dev, "could not register Nomadik pinctrl driver\n"); | 2033 dev_err(&pdev->dev, "could not register Nomadik pinctrl driver\n"); |
2034 return -EINVAL; | 2034 return PTR_ERR(npct->pctl); |
2035 } 2036 2037 /* We will handle a range of GPIO pins */ 2038 for (i = 0; i < npct->soc->gpio_num_ranges; i++) 2039 pinctrl_add_gpio_range(npct->pctl, &npct->soc->gpio_ranges[i]); 2040 2041 platform_set_drvdata(pdev, npct); 2042 dev_info(&pdev->dev, "initialized Nomadik pin control driver\n"); --- 45 unchanged lines hidden --- | 2035 } 2036 2037 /* We will handle a range of GPIO pins */ 2038 for (i = 0; i < npct->soc->gpio_num_ranges; i++) 2039 pinctrl_add_gpio_range(npct->pctl, &npct->soc->gpio_ranges[i]); 2040 2041 platform_set_drvdata(pdev, npct); 2042 dev_info(&pdev->dev, "initialized Nomadik pin control driver\n"); --- 45 unchanged lines hidden --- |