Re: [PWM v6 1/3] PWM: Implement a generic PWM framework

From: Jack Stone
Date: Tue Mar 08 2011 - 13:21:50 EST


On 07/03/2011 17:08, Bill Gatliff wrote:
> Jack:
>
> On Mon, Mar 7, 2011 at 10:35 AM, Bill Gatliff <bgat@xxxxxxxxxxxxxxx> wrote:
>> On Sun, Mar 6, 2011 at 10:20 PM, Jack Stone <jwjstone@xxxxxxxxxxx> wrote:
>>>> +menuconfig GENERIC_PWM
>>>> + tristate "PWM Support"
>>>> + help
>>>> + Enables PWM device support implemented via a generic
>>>> + framework. If unsure, say N.
>>>> +
>>>
>>> Does this need help text? Can't we just select GENERIC_PWM for the
>>> drivers / users that need it?
>>
>> That would be my preference, actually. I'll see if I can do that at
>> the next review.
>
> Actually, I take that back. Unlike gpiolib, the PWM API isn't
> mandatory. So I think I'll leave this as a menuconfig.
>
>
> b.g.

It's up to you, of course, but I don't see why I would want to choose.

It makes life much easier for users if they only have to support one way
of talking to PWM devices and any device can be connected to any user,
with appropriate connections provided by platform data.

If you make it a depend rather than it being selected when needed then
either the driver supports multiple interfaces (which is harder to
maintain) or the person configuring the kernel has to know to build
GENERIC_PWM to get the drivers they want.

It seems much simpler to me to always use it in appropriate
drivers/users and therefore if the person configuring the kernel does
not have to know anything new and the support will only be included if
needed.

Just my £0.02,

Jack
--
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/