• Jean Delvare's avatar
    [PATCH] I2C: pwm support in w83781d.c · a30b044a
    Jean Delvare authored
    Here is a general pwm support cleanup patch for the w83781d chip driver.
    Featuring:
    
    * Don't pretend that we handle PWM on AS99127F chips. We don't know how
    it works, and one of the register we are accessing for now is clearly
    not a PWM register, and changing its value usually breaks temperature
    readings.
    
    * Discard irrelevant comments.
    
    * Rewrite show_pwmenable_reg. It was obviously taken from the 2.4
    driver, with unneeded tests and the code was much too complicated
    anyway. And now we handle errors correctly.
    
    * Initialize pwm_enable at load time. So far it was done conditionally
    (if init=1) while it should always be done. And pwm2_enable wasn't read
    from the chip, while it should.
    
    I could test that my AS99127F doesn't expose pwm files through ssysfs
    anymore. Which means that I couldn't test the rest of the pwm changes,
    unfortunately.
    
    I've applied similar changes to our 2.4/CVS repository.
    a30b044a
w83781d.c 50.5 KB