Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1562666
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] pinctrl: Allow configuration of pins from gpiolib based drivers |
| Date | 2017-01-19 13:20 +0100 |
| Message-ID | <t1jR8-1qs-11@gated-at.bofh.it> (permalink) |
| References | <t1hvX-8e7-3@gated-at.bofh.it> <t1hvX-8e7-1@gated-at.bofh.it> |
| Organization | Intel Finland Oy |
On Thu, 2017-01-19 at 12:48 +0300, Mika Westerberg wrote: > When a GPIO driver is backed by a pinctrl driver the GPIO driver > sometimes needs to call the pinctrl driver to configure certain > things, > like whether the pin is used as input or output. In addition to this > there are other configurations applicable to GPIOs such as setting > debounce time of the GPIO. > > To support this we introduce a new function pinctrl_gpio_set_config() > that can be used by gpiolib based driver to pass configuration > requests > to the backing pinctrl driver. > + mutex_lock(&pctldev->mutex); > + pin = gpio_to_pin(range, gpio); > + ret = pinconf_set_config(pctldev, pin, configs, > ARRAY_SIZE(configs)); > + mutex_unlock(&pctldev->mutex); Does gpio_to_pin() require to be under lock? -- Andy Shevchenko <andriy.shevchenko@linux.intel.com> Intel Finland Oy
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/3] pinctrl: Allow configuration of pins from gpiolib based drivers Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-01-19 10:50 +0100
Re: [PATCH 2/3] pinctrl: Allow configuration of pins from gpiolib based drivers Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-19 13:20 +0100
Re: [PATCH 2/3] pinctrl: Allow configuration of pins from gpiolib based drivers Linus Walleij <linus.walleij@linaro.org> - 2017-01-20 09:50 +0100
csiph-web