pwm: pxa: Add device tree support

This patch adds device tree support to the PXA's PWM driver.  Nothing
needs to be extracted from the device tree node by the PWM device.
Client devices need only specify the period; the per-chip index is
implicitly zero because one device node must be present for each PWM
output in use.  This approach is more convenient due to the wide
variability in the number of PWM channels present across the various PXA
variants, and is made possible by the fact that the register sets for
each PWM channel are segregated from each other.  An of_xlate() method
is added to parse this single-cell node.  The existing ID table is
reused for the match table data.

Tested on a Palm Treo 680 (both platform data and DT cases).

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: sysfs: Convert to use ATTRIBUTE_GROUPS macro

Use new ATTRIBUTE_GROUPS macro to reduce the number of lines of code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: jz4740: Pass device to clk_get()

In preparation to switching the jz4740 clk driver to the common clk framework
make sure to pass the device to clk_get().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: jz4740: Use devm_clk_get()

Using the managed version of clk_get() makes the code a bit shorter and the
error paths less complicated.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: renesas-tpu: Enable driver compilation with COMPILE_TEST

This helps increasing build testing coverage.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-pwm@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: pca9685: depends on I2C rather than REGMAP_I2C

REGMAP_I2C is not a visible config option.
Thus make PWM_PCA9685 depend on I2c and then select REGMAP_I2C.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
backlight: pwm_bl: Remove error message upon devm_kzalloc() failure

No need to have a specific OOM message, since there is generic MM out of memory
message in place.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: atmel-pwm: Add Atmel PWM controller driver

Add a PWM framework driver for the PWM controller found on Atmel SoCs.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
[thierry.reding: coding style and other minor cleanups]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
of: Add Atmel PWM controller device tree binding

The Atmel PWM controller uses the standard device tree bindings for PWM
controllers.

Signed-off-by: Bo Shen <voice.shen@atmel.com>

Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Kumar Gala <galak@codeaurora.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: atmel-pwm: Do not unprepare clock after successful registration

When the PWM controller is registered successfully, the clock can not
unprepare, so fix it.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: use seq_puts() instead of seq_printf()

For a constant format without additional arguments, use seq_puts()
instead of seq_printf(). Also, the following checkpatch warning is
fixed.

  WARNING: Prefer seq_puts to seq_printf

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: ep93xx: split module author names

Split module author names in order to fix the following
checkpatch warning.

  WARNING: quoted string split across lines

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: pxa: remove unnecessary space before tabs

Remove unnecessary space before tabs in order to fix the following
checkpatch warning.

  WARNING: please, no space before tabs

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
pwm: tiehrpwm: use dev_err() instead of pr_err()

Use dev_err() instead of pr_err() to provide a better message
to userspace.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
swiotlb: update format

Documentation/kernel-parameters.txt doesn't contain up-to-date
documentation regarding swiotlb= parameter. Update it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
swiotlb: Don't DoS us with 'swiotlb buffer is full' (v2)

There is no need for that so lets use ratelimiting.
Also add some extra information to be helpful.

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[v2: s/ld/zs on the printk]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
cris: remove deprecated IRQF_DISABLED

This patch proposes to remove the IRQF_DISABLED flag from CRIS
architecture code. It's a NOOP since 2.6.35 and it will be removed
one day.

Comments mentioning IRQF_DISABLED are also updated, knowing
that all interrupts are now "fast interrupts", their handlers
running with interrupts disabled.

Don't hesitate to let me know if you have other ways of
rephrasing the comments!

This is an update for 3.11 of a patch already sent for 3.10

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
cris: sync_serial: remove interruptible_sleep_on

sleep_on and its variants are racy and going away. This replaces
the two uses in the cris sync_serial drivers with the equivalent
but race-free wait_event_interruptible.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mikael Starvik <starvik@axis.com>
Cc: linux-cris-kernel@axis.com
Signed-off-by: Jesper Nilsson <jespern@axis.com>
CRIS: Add missing syscalls

Complete list of syscalls for CRISv10 and CRISv32.
Clean up some whitespace at the same time.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cleanup whitespace, remove old author tag

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>