[go: nahoru, domu]

History log of /drivers/pwm/pwm-samsung.c
Revision Date Author Comments
3bdf878102110c916dd6a9fb0df9ecfde93a3c83 12-May-2014 Ajay Kumar <ajaykumar.rs@samsung.com> pwm: samsung: do not set manual update bit in pwm_samsung_config

pwm_samsung_config() sets the manual update bit via a call to the
pwm_samsung_enable() function even when the channel is already running.
This causes noticable flicker on display if we try to change the
backlight brightness from minimum to maximum, continuously.

So, we remove the call to pwm_samsung_enable() from pwm_samsung_config
to avoid the flicker and this change doesn't harm normal working since
the pwm-backlight driver already calls pwm_samsung_enable() where
needed.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
4407b6d243293e84546f4b1dbbe1ed8e9d797a6c 26-Feb-2014 Jingoo Han <jg1.han@samsung.com> pwm: samsung: Use SIMPLE_DEV_PM_OPS macro

Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
b577cdcf174b0e88091cb7c9926c44cda87d3d0d 29-Oct-2013 Sachin Kamat <sachin.kamat@linaro.org> pwm: samsung: Fix kernel warning while unexporting a channel

PWM channel data was set to NULL before freeing it. This caused the
following kernel warning while unexporting the channel. Set the channel
data to NULL after freeing it.

[ 70.495000] WARNING: CPU: 0 PID: 1 at drivers/base/devres.c:805 pwm_put+0x48/0x80()
[ 70.505000] Modules linked in:
[ 70.505000] CPU: 0 PID: 1 Comm: sh Not tainted 3.12.0-rc6-next-20131024-00012-gd4aec04-dirty #58
[ 70.515000] [<c0014ddc>] (unwind_backtrace+0x0/0xf4) from [<c0011784>] (show_stack+0x10/0x14)
[ 70.525000] [<c0011784>] (show_stack+0x10/0x14) from [<c03a3cbc>] (dump_stack+0x7c/0xb0)
[ 70.530000] [<c03a3cbc>] (dump_stack+0x7c/0xb0) from [<c001de68>] (warn_slowpath_common+0x6c/0x88)
[ 70.540000] [<c001de68>] (warn_slowpath_common+0x6c/0x88) from [<c001df20>] (warn_slowpath_null+0x1c/0x24)
[ 70.550000] [<c001df20>] (warn_slowpath_null+0x1c/0x24) from [<c01d1af8>] (pwm_put+0x48/0x80)
[ 70.560000] [<c01d1af8>] (pwm_put+0x48/0x80) from [<c01d21c8>] (pwm_unexport_store+0x94/0xac)
[ 70.565000] [<c01d21c8>] (pwm_unexport_store+0x94/0xac) from [<c010991c>] (sysfs_write_file+0x148/0x1d8)
[ 70.575000] [<c010991c>] (sysfs_write_file+0x148/0x1d8) from [<c00b2a80>] (vfs_write+0xb4/0x1a0)
[ 70.585000] [<c00b2a80>] (vfs_write+0xb4/0x1a0) from [<c00b3068>] (SyS_write+0x3c/0x78)
[ 70.595000] [<c00b3068>] (SyS_write+0x3c/0x78) from [<c000e2e0>] (ret_fast_syscall+0x0/0x30)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
c3bdfe1f1e4e1e195945c55a2256eba89334d36c 27-Sep-2013 Sachin Kamat <sachin.kamat@linaro.org> pwm: samsung: Include linux/of.h header

'of_match_ptr' is defined in linux/of.h. Include it explicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
11ad39ede24ee42909d58dc95031d96da46e33bd 06-Apr-2013 Tomasz Figa <tomasz.figa@gmail.com> pwm: Add new pwm-samsung driver

This patch introduces new Samsung PWM driver, which is completely
rewritten to be multiplatform- and DeviceTree-aware.

In addition, remaining problems of old driver are fixed, such as:
- proper handling of hardware variants,
- synchronization on SMP systems,
- handling of boundary parameter values,
- hardware sharing with PWM clocksource driver,
- undefined state of PWM output after stopping PWM channel.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Mark Brown <broonie@linaro.org>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
615c19e1607be1586aa2848712770423288c4f0e 06-Apr-2013 Tomasz Figa <tomasz.figa@gmail.com> pwm: samsung: Rename to pwm-samsung-legacy

This patch renames the old pwm-samsung driver to pwm-samsung-legacy to
create place for the new, rewritten, DT-aware pwm-samsung driver.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Mark Brown <broonie@linaro.org>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
c509a8e521939ca1fd4ba31feca4718328044230 08-Mar-2013 Jingoo Han <jg1.han@samsung.com> pwm: samsung: convert s3c_pwm to dev_pm_ops

Instead of using legacy suspend/resume methods, using newer dev_pm_ops
structure allows better control over power management.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
20e8ac3eea4dcfeea6ebeae57cd2c739fa48da11 14-Dec-2012 Joonyoung Shim <jy0922.shim@samsung.com> pwm: samsung: add missing s3c->pwm_id assignment

The s3c->pwm_id is used to calculate offset of related register.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
77f37917a6f2bd8635b553178bb34bdd80f08e40 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> pwm: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fd1091125a1d11fcc635749d0d3dec36904a7a48 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> pwm: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c2d476a98f71c55e9acdca1d5a1080a22c0622af 02-Sep-2012 Thierry Reding <thierry.reding@avionic-design.de> pwm: Check for negative duty-cycle and period

Make sure the duty-cycle and period passed in are not negative. This
should eventually be made implicit by making them unsigned. While at
it, the drivers' .config() implementations can have the equivalent
checks removed.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Axel Lin <axel.lin@gmail.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Jonghwan Choi <jhbird.choi@samsung.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "Philip, Avinash" <avinashphilip@ti.com>
Cc: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
ecefeb79218064bf011c5d3ff25322ffa60c302c 02-Aug-2012 Jingoo Han <jg1.han@samsung.com> pwm: samsung: add missing device pointer to struct pwm_chip

This patch adds missing device pointer to struct pwm_chip. If the
device pointer is NULL, pwmchip_add() will return error.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
2437b0d95c609365ce88039b96a1c020af71c6dc 06-Jul-2012 Sachin Kamat <sachin.kamat@linaro.org> pwm: Use pr_* functions in pwm-samsung.c file

Replace printk with pr_* functions to avoid checkpatch warnings.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
6192fa87447ed3c6c4005be640a088fa8e5733f8 29-Jun-2012 Axel Lin <axel.lin@gmail.com> pwm: Convert pwm-samsung to use devm_* APIs

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
215c29d3d0e925189ade522d1ea6052a320d7692 15-Mar-2012 Sascha Hauer <s.hauer@pengutronix.de> ARM Samsung: Move s3c pwm driver to pwm framework

Move the driver to drivers/pwm/ and convert it to use the framework.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
[eric@eukrea.com: fix pwmchip_add return code test]
Signed-off-by: Eric BĂ©nard <eric@eukrea.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>