[PATCH linux v2 2/3] drivers: hwmon: ASPEED AST2500 PWM driver

Joel Stanley joel at jms.id.au
Mon Nov 28 16:14:51 AEDT 2016


On Thu, Nov 24, 2016 at 7:56 PM, Jaghathiswari Rankappagounder
Natarajan <jaghu at google.com> wrote:
>
>
> On Tue, Nov 8, 2016 at 11:15 PM, Joel Stanley <joel at jms.id.au> wrote:
>>
>> Hello Jaghu,
>>
>> On Wed, Nov 9, 2016 at 12:41 PM, Jaghathiswari Rankappagounder
>> Natarajan <jaghu at google.com> wrote:
>> > The ASPEED AST2500 PWM controller can support upto 8 PWM output ports.
>>
>> I noticed that the ast2500 and ast2400 share the same PWM IP, so we
>> can use the same driver for both. You should reflect this in the
>> naming of the Kconfig, filename, commit message and the code itself.
>>
>> > There are three different PWM sources(types M, N and O)
>> > and each PWM output port can be assigned a particular PWM source.
>> > There is a sysfs file through which the user can control
>> > the duty cycle of a particular PWM port. The duty cycle can range from 0
>> > to
>> > 100 percent.
>>
>> Can you explain why this is a hwmon driver and not a pwm driver?
>
> The fan tacho controller shares some common registers with PWM
> controller; the fan tacho controller needs to be a hwmon driver; so if PWM
> controller driver is a hwmon driver, then there is flexibility to add fan
> tacho controller functionality to the same PWM driver and make it as common
> driver for PWM and fan tacho controller.
> The duty_cycle value available in pwm  sysfs interface needs to be
> configured in nano seconds and the duty_cycle value available in hwmon sysfs
> interface can be configured with a integer value (ranging from 0 to 255;
> with 255 being 100 percent). So thought that hwmon sysfs interface is
> easier.

Okay. Make sure you include this information in your cover letter and
the commit message for the driver.


More information about the openbmc mailing list