On Fri, Oct 12, 2012 at 11:27 PM, Daniel Mack <[email protected]> wrote:
> On 12.10.2012 23:26, Linus Walleij wrote:
>> On Fri, Oct 12, 2012 at 5:55 PM, Daniel Mack <[email protected]> wrote:
>>
>>> This allows DT driven boards to allocate and configure the pinmux once
>>> the driver is probed.
>>>
>>> Signed-off-by: Daniel Mack <[email protected]>
>>> Cc: Linus Walleij <[email protected]>
>>> Cc: Dmitry Torokhov <[email protected]>
>>
>> (...)
>>> +       /* request pin mux */
>>> +       pinctrl = devm_pinctrl_get_select_default(dev);
>>> +       if (IS_ERR(pinctrl))
>>> +               dev_warn(dev, "pins are not configured from the driver\n");
>>
>> I think dev_warn() is rather nasty to throw in here, dev_info() is OK.
>
> Well, dev_warn is used everywhere else for this particular warning, but
> I can change that of course.

Yeah true ... just that I think that in this case most platforms will
rely on the fall through mechanism where the gpio_get()
and set_direction will fall through to the special-purpose functions
in the gpio driver calling out to pinctrl. So it's actually not an error.

This pinctrl handle is only intended for biasing pins etc, right?

NO muxing!

Because we wrote in Documentation/pinctrl.txt that if GPIO
and pin control handle the same lines, they should be
implemented in the gpio driver by calling out to pinctrl's
extern int pinctrl_request_gpio(unsigned gpio);
extern void pinctrl_free_gpio(unsigned gpio);
extern int pinctrl_gpio_direction_input(unsigned gpio);
extern int pinctrl_gpio_direction_output(unsigned gpio);

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to