author | Philip, Avinash <avinashphilip@ti.com> | |
Sun, 11 Mar 2012 08:21:38 +0000 (13:51 +0530) | ||
committer | Philip, Avinash <avinashphilip@ti.com> | |
Tue, 13 Mar 2012 12:40:37 +0000 (18:10 +0530) | ||
commit | 1a4e5993c3ba20a3f51cb9327d280d3af46d23d5 | |
tree | ac49398fb022c15c8fb8b40f4543360ef82e8055 | tree | snapshot (tar.xz tar.gz zip) |
parent | 3eb340941afcf89ca29b0c8c9484aa3549c6beeb | commit | diff |
PWM: ecap: Clean the access method for PWMSS config space.
This patch
1. Cleans up actions required to access PWMSS config space. This
involves removal of semaphore, usage of use count values,
config_mem_base, etc. This is legitimate as multiple probe will not
overlap unless we sleep. Also multiple ioremap will succeed on same
address. So we can remap the PWMSS config space from respective drivers.
2. Replaces __raw [read/write] functions with [read/write], as these
functions inserts memory barrier instructions required with ARMv6+
3. Also corrects the coding style for write and read usage for more code
readability by read modify write approach.
5. Removes usage of clk_enabled flag.
6. Fixes the way of handling clock on pwm start and stop. In pwm start
clock should be enabled and disable of the clock should done from stop.
Failure condition added to fail on starting of running pwm device and
stopping of non-running pwm. For other API's, they have to explicitly
handle clock.
7. Adds config_mem_base variable to handle PWMSS config space in
ecap_pwm structure.
Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
This patch
1. Cleans up actions required to access PWMSS config space. This
involves removal of semaphore, usage of use count values,
config_mem_base, etc. This is legitimate as multiple probe will not
overlap unless we sleep. Also multiple ioremap will succeed on same
address. So we can remap the PWMSS config space from respective drivers.
2. Replaces __raw [read/write] functions with [read/write], as these
functions inserts memory barrier instructions required with ARMv6+
3. Also corrects the coding style for write and read usage for more code
readability by read modify write approach.
5. Removes usage of clk_enabled flag.
6. Fixes the way of handling clock on pwm start and stop. In pwm start
clock should be enabled and disable of the clock should done from stop.
Failure condition added to fail on starting of running pwm device and
stopping of non-running pwm. For other API's, they have to explicitly
handle clock.
7. Adds config_mem_base variable to handle PWMSS config space in
ecap_pwm structure.
Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
drivers/pwm/ecap.c | diff | blob | history |