Re: [PATCH v4] pinctrl: to avoid duplicated calling enable_pinmux_setting for a pin

From: Stephen Warren
Date: Wed Jun 04 2014 - 00:59:40 EST


On 06/03/2014 07:28 PM, FanWu wrote:
> On 06/04/2014 12:49 AM, Stephen Warren wrote:
>> On 06/03/2014 01:37 AM, fwu@xxxxxxxxxxx wrote:
>>> From: Fan Wu <fwu@xxxxxxxxxxx>
>>>
>>> What the patch did:
>>> 1.To call pinmux_disable_setting ahead of pinmux_enable_setting in
>>> each time of
>>> calling pinctrl_select_state
>>> 2.Remove the HW disable operation in in pinmux_disable_setting function.
>>> 3.Remove the disable ops in struct pinmux_ops
>> ...
>>> Signed-off-by: Fan Wu <fwu@xxxxxxxxxxx>
>>> Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>
>>
>> As I mentioned in my previous email, I didn't sign this off. I made some
>> suggestions for a better alternative in that email.
>>
>> If I *had* written that s-o-b, then it should be before yours in the
>> patch description since you handled the patch last.
>>
>
> The Signed-off didn't bother me.
> I will Choose your option 2# and thanks for your suggestion about this :)
>
>
>>> diff --git a/include/linux/pinctrl/pinmux.h
>>> b/include/linux/pinctrl/pinmux.h
>>
>>> @@ -70,8 +70,6 @@ struct pinmux_ops {
>>> unsigned * const num_groups);
>>> int (*enable) (struct pinctrl_dev *pctldev, unsigned
>>> func_selector,
>>> unsigned group_selector);
>>> - void (*disable) (struct pinctrl_dev *pctldev, unsigned
>>> func_selector,
>>> - unsigned group_selector);
>>
>> This will cause a compile failure, since many drivers still set the
>> .disable function pointer. You need to update all the driver files to
>> remove those functions too. There's quite a bit of code in some of those
>> functions, so you'd need the relevant driver maintainers to confirm it's
>> OK to remove it. I think only the owners of pinctrl-egra and
>> pinctrl-single have ack'd this concept so far.
>>
>
> For this part, I think I mentioned this before, simply removing disable
> ops will introduce the compiling error.
> I think there are several ways to handle this:
> 1. Don't remove the disable ops in struct pinmux_ops in this patch but
> to remove the disable ops in struct pinmux_ops after the another patch
> is merged, which is used to remove all of the disable ops user in all
> drivers.
> 2. Just remove the disable ops in pinmux_ops in this patch, and make a
> another patch ASAP to remove all the disable ops user in all drivers.
> 3. Remove the disable ops in struct pinmux_ops and remove all the
> disable ops user in all drivers, all in this patch.
>
>
> For the solution 2, I just think it may be not a good way to include so
> much content in a patch, which are not in a same code level.
>
> I am just inclined to use solution 1# or 3#.

I would expect option 3.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/