Merge tag 'for-3.6-rc3' of git://gitorious.org/linux-pwm/linux-pwm

Pull pwm fixes from Thierry Reding:
"These patches fix the Samsung PWM driver and perform some minor
cleanups like fixing checkpatch and sparse warnings.

Two redundant error messages are removed and the Kconfig help text for
the PWM subsystem is made more descriptive."

* tag 'for-3.6-rc3' of git://gitorious.org/linux-pwm/linux-pwm:
pwm: Improve Kconfig help text
pwm: core: Fix coding style issues
pwm: vt8500: Fix coding style issue
pwm: Remove a redundant error message when devm_request_and_ioremap fails
pwm: samsung: add missing device pointer to struct pwm_chip
pwm: Add missing static storage class specifiers in core.c file

+24 -5
drivers/pwm/Kconfig
··· 1 1 menuconfig PWM 2 - bool "PWM Support" 2 + bool "Pulse-Width Modulation (PWM) Support" 3 3 depends on !MACH_JZ4740 && !PUV3_PWM 4 4 help 5 - This enables PWM support through the generic PWM framework. 6 - You only need to enable this, if you also want to enable 7 - one or more of the PWM drivers below. 5 + Generic Pulse-Width Modulation (PWM) support. 8 6 9 - If unsure, say N. 7 + In Pulse-Width Modulation, a variation of the width of pulses 8 + in a rectangular pulse signal is used as a means to alter the 9 + average power of the signal. Applications include efficient 10 + power delivery and voltage regulation. In computer systems, 11 + PWMs are commonly used to control fans or the brightness of 12 + display backlights. 13 + 14 + This framework provides a generic interface to PWM devices 15 + within the Linux kernel. On the driver side it provides an API 16 + to register and unregister a PWM chip, an abstraction of a PWM 17 + controller, that supports one or more PWM devices. Client 18 + drivers can request PWM devices and use the generic framework 19 + to configure as well as enable and disable them. 20 + 21 + This generic framework replaces the legacy PWM framework which 22 + allows only a single driver implementing the required API. Not 23 + all legacy implementations have been ported to the framework 24 + yet. The framework provides an API that is backward compatible 25 + with the legacy framework so that existing client drivers 26 + continue to work as expected. 27 + 28 + If unsure, say no. 10 29 11 30 if PWM 12 31
+6 -6
drivers/pwm/core.c
··· 129 129 return 0; 130 130 } 131 131 132 - static struct pwm_device *of_pwm_simple_xlate(struct pwm_chip *pc, 133 - const struct of_phandle_args *args) 132 + static struct pwm_device * 133 + of_pwm_simple_xlate(struct pwm_chip *pc, const struct of_phandle_args *args) 134 134 { 135 135 struct pwm_device *pwm; 136 136 ··· 149 149 return pwm; 150 150 } 151 151 152 - void of_pwmchip_add(struct pwm_chip *chip) 152 + static void of_pwmchip_add(struct pwm_chip *chip) 153 153 { 154 154 if (!chip->dev || !chip->dev->of_node) 155 155 return; ··· 162 162 of_node_get(chip->dev->of_node); 163 163 } 164 164 165 - void of_pwmchip_remove(struct pwm_chip *chip) 165 + static void of_pwmchip_remove(struct pwm_chip *chip) 166 166 { 167 167 if (chip->dev && chip->dev->of_node) 168 168 of_node_put(chip->dev->of_node); ··· 527 527 struct pwm_device *pwm_get(struct device *dev, const char *con_id) 528 528 { 529 529 struct pwm_device *pwm = ERR_PTR(-EPROBE_DEFER); 530 - const char *dev_id = dev ? dev_name(dev): NULL; 530 + const char *dev_id = dev ? dev_name(dev) : NULL; 531 531 struct pwm_chip *chip = NULL; 532 532 unsigned int index = 0; 533 533 unsigned int best = 0; ··· 609 609 mutex_lock(&pwm_lock); 610 610 611 611 if (!test_and_clear_bit(PWMF_REQUESTED, &pwm->flags)) { 612 - pr_warning("PWM device already freed\n"); 612 + pr_warn("PWM device already freed\n"); 613 613 goto out; 614 614 } 615 615
+1
drivers/pwm/pwm-samsung.c
··· 225 225 226 226 /* calculate base of control bits in TCON */ 227 227 s3c->tcon_base = id == 0 ? 0 : (id * 4) + 4; 228 + s3c->chip.dev = &pdev->dev; 228 229 s3c->chip.ops = &s3c_pwm_ops; 229 230 s3c->chip.base = -1; 230 231 s3c->chip.npwm = 1;
+1 -3
drivers/pwm/pwm-tegra.c
··· 187 187 } 188 188 189 189 pwm->mmio_base = devm_request_and_ioremap(&pdev->dev, r); 190 - if (!pwm->mmio_base) { 191 - dev_err(&pdev->dev, "failed to ioremap() region\n"); 190 + if (!pwm->mmio_base) 192 191 return -EADDRNOTAVAIL; 193 - } 194 192 195 193 platform_set_drvdata(pdev, pwm); 196 194
+1 -3
drivers/pwm/pwm-tiecap.c
··· 192 192 } 193 193 194 194 pc->mmio_base = devm_request_and_ioremap(&pdev->dev, r); 195 - if (!pc->mmio_base) { 196 - dev_err(&pdev->dev, "failed to ioremap() registers\n"); 195 + if (!pc->mmio_base) 197 196 return -EADDRNOTAVAIL; 198 - } 199 197 200 198 ret = pwmchip_add(&pc->chip); 201 199 if (ret < 0) {
+1 -3
drivers/pwm/pwm-tiehrpwm.c
··· 371 371 } 372 372 373 373 pc->mmio_base = devm_request_and_ioremap(&pdev->dev, r); 374 - if (!pc->mmio_base) { 375 - dev_err(&pdev->dev, "failed to ioremap() registers\n"); 374 + if (!pc->mmio_base) 376 375 return -EADDRNOTAVAIL; 377 - } 378 376 379 377 ret = pwmchip_add(&pc->chip); 380 378 if (ret < 0) {
+1 -1
drivers/pwm/pwm-vt8500.c
··· 41 41 cpu_relax(); 42 42 43 43 if (unlikely(!loops)) 44 - pr_warning("Waiting for status bits 0x%x to clear timed out\n", 44 + pr_warn("Waiting for status bits 0x%x to clear timed out\n", 45 45 bitmask); 46 46 } 47 47