Merge tag 'pwm/for-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 9 Sep 2015 17:55:32 +0000 (10:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 9 Sep 2015 17:55:32 +0000 (10:55 -0700)
Pull pwm updates from Thierry Reding:
 "This set of changes introduces the beginnings of a new API that's
  based around the concept of states that can be atomically applied.
  Drivers go to various lengths to implement something similar, which
  indicates that the core should really be providing the necessary
  framework.

  On top of that, there is a bit of cleanup as well as improved
  kerneldoc and integration into the device-drivers DocBook.

  Regarding drivers there is a new one for the NXP LPC18xx family of
  SoCs and a couple of fixes for existing drivers (pca9685, Broadcom
  Kona and Atmel HLCDC)"

* tag 'pwm/for-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
  ARM: at91: pwm: atmel-hlcdc: Add at91sam9n12 errata
  pwm: Add NXP LPC18xx PWM/SCT DT binding documentation
  pwm: NXP LPC18xx PWM/SCT driver
  pwm-pca9685: Support changing the output frequency
  pwm-pca9685: Fix several driver bugs
  pwm: kona: Modify settings application sequence
  pwm: pca9685: Drop owner assignment
  pwm: Add to device-drivers documentation
  pwm: Clean up kerneldoc
  pwm: Remove useless whitespace
  pwm: sysfs: Remove unnecessary padding
  pwm: sysfs: Properly convert from enum to string
  pwm: Make use of pwm_get_xxx() helpers where appropriate
  pwm: Add pwm_get_polarity() helper function
  pwm: Constify PWM device where possible
  pwm: Add the pwm_is_enabled() helper

1  2 
Documentation/DocBook/device-drivers.tmpl
drivers/pwm/Kconfig
drivers/pwm/Makefile

@@@ -66,7 -66,6 +66,7 @@@
  !Ekernel/time/hrtimer.c
       </sect1>
       <sect1><title>Workqueues and Kevents</title>
 +!Iinclude/linux/workqueue.h
  !Ekernel/workqueue.c
       </sect1>
       <sect1><title>Internal Functions</title>
@@@ -217,40 -216,6 +217,40 @@@ X!Isound/sound_firmware.
  -->
    </chapter>
  
 +  <chapter id="mediadev">
 +     <title>Media Devices</title>
 +
 +     <sect1><title>Video2Linux devices</title>
 +!Iinclude/media/v4l2-async.h
 +!Iinclude/media/v4l2-ctrls.h
 +!Iinclude/media/v4l2-dv-timings.h
 +!Iinclude/media/v4l2-event.h
 +!Iinclude/media/v4l2-flash-led-class.h
 +!Iinclude/media/v4l2-mediabus.h
 +!Iinclude/media/v4l2-mem2mem.h
 +!Iinclude/media/v4l2-of.h
 +!Iinclude/media/v4l2-subdev.h
 +!Iinclude/media/videobuf2-core.h
 +!Iinclude/media/videobuf2-memops.h
 +     </sect1>
 +     <sect1><title>Digital TV (DVB) devices</title>
 +!Idrivers/media/dvb-core/dvb_ca_en50221.h
 +!Idrivers/media/dvb-core/dvb_frontend.h
 +!Idrivers/media/dvb-core/dvb_math.h
 +!Idrivers/media/dvb-core/dvb_ringbuffer.h
 +!Idrivers/media/dvb-core/dvbdev.h
 +     </sect1>
 +     <sect1><title>Remote Controller devices</title>
 +!Iinclude/media/rc-core.h
 +     </sect1>
 +     <sect1><title>Media Controller devices</title>
 +!Iinclude/media/media-device.h
 +!Iinclude/media/media-devnode.h
 +!Iinclude/media/media-entity.h
 +     </sect1>
 +
 +  </chapter>
 +
    <chapter id="uart16x50">
       <title>16x50 UART Driver</title>
  !Edrivers/tty/serial/serial_core.c
@@@ -490,4 -455,31 +490,31 @@@ X!Ilib/fonts/fonts.
  !Edrivers/hsi/hsi.c
    </chapter>
  
+   <chapter id="pwm">
+     <title>Pulse-Width Modulation (PWM)</title>
+     <para>
+       Pulse-width modulation is a modulation technique primarily used to
+       control power supplied to electrical devices.
+     </para>
+     <para>
+       The PWM framework provides an abstraction for providers and consumers
+       of PWM signals. A controller that provides one or more PWM signals is
+       registered as <structname>struct pwm_chip</structname>. Providers are
+       expected to embed this structure in a driver-specific structure. This
+       structure contains fields that describe a particular chip.
+     </para>
+     <para>
+       A chip exposes one or more PWM signal sources, each of which exposed
+       as a <structname>struct pwm_device</structname>. Operations can be
+       performed on PWM devices to control the period, duty cycle, polarity
+       and active state of the signal.
+     </para>
+     <para>
+       Note that PWM devices are exclusive resources: they can always only be
+       used by one consumer at a time.
+     </para>
+ !Iinclude/linux/pwm.h
+ !Edrivers/pwm/core.c
+   </chapter>
  </book>
diff --combined drivers/pwm/Kconfig
@@@ -111,13 -111,6 +111,13 @@@ config PWM_CLPS711
          To compile this driver as a module, choose M here: the module
          will be called pwm-clps711x.
  
 +config PWM_CRC
 +      bool "Intel Crystalcove (CRC) PWM support"
 +      depends on X86 && INTEL_SOC_PMIC
 +      help
 +        Generic PWM framework driver for Crystalcove (CRC) PMIC based PWM
 +        control.
 +
  config PWM_EP93XX
        tristate "Cirrus Logic EP93xx PWM support"
        depends on ARCH_EP93XX
@@@ -180,6 -173,18 +180,18 @@@ config PWM_LP394
          To compile this driver as a module, choose M here: the module
          will be called pwm-lp3943.
  
+ config PWM_LPC18XX_SCT
+       tristate "LPC18xx/43xx PWM/SCT support"
+       depends on ARCH_LPC18XX
+       help
+         Generic PWM framework driver for NXP LPC18xx PWM/SCT which
+         supports 16 channels.
+         A maximum of 15 channels can be requested simultaneously and
+         must have the same period.
+         To compile this driver as a module, choose M here: the module
+         will be called pwm-lpc18xx-sct.
  config PWM_LPC32XX
        tristate "LPC32XX PWM support"
        depends on ARCH_LPC32XX
diff --combined drivers/pwm/Makefile
@@@ -8,13 -8,13 +8,14 @@@ obj-$(CONFIG_PWM_BCM_KONA)    += pwm-bcm-k
  obj-$(CONFIG_PWM_BCM2835)     += pwm-bcm2835.o
  obj-$(CONFIG_PWM_BFIN)                += pwm-bfin.o
  obj-$(CONFIG_PWM_CLPS711X)    += pwm-clps711x.o
 +obj-$(CONFIG_PWM_CRC)         += pwm-crc.o
  obj-$(CONFIG_PWM_EP93XX)      += pwm-ep93xx.o
  obj-$(CONFIG_PWM_FSL_FTM)     += pwm-fsl-ftm.o
  obj-$(CONFIG_PWM_IMG)         += pwm-img.o
  obj-$(CONFIG_PWM_IMX)         += pwm-imx.o
  obj-$(CONFIG_PWM_JZ4740)      += pwm-jz4740.o
  obj-$(CONFIG_PWM_LP3943)      += pwm-lp3943.o
+ obj-$(CONFIG_PWM_LPC18XX_SCT) += pwm-lpc18xx-sct.o
  obj-$(CONFIG_PWM_LPC32XX)     += pwm-lpc32xx.o
  obj-$(CONFIG_PWM_LPSS)                += pwm-lpss.o
  obj-$(CONFIG_PWM_LPSS_PCI)    += pwm-lpss-pci.o