All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support
@ 2012-09-12 11:33 Sachin Kamat
  2012-09-12 11:33 ` [PATCH 1/3] ARM: EXYNOS: Use generic pwm driver in Origen board Sachin Kamat
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sachin Kamat @ 2012-09-12 11:33 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: kgene.kim, thierry.reding, tushar.behera, sachin.kamat, patches

This series adds support for generic PWM framework which requires
that the board setup code register a static mapping that can be
used to match PWM consumers to providers.

This series is based on for-next branch of Kukjin's tree.

Sachin Kamat (2):
  ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12
  ARM: EXYNOS: Add generic PWM lookup support for SMDKV310

Tushar Behera (1):
  ARM: EXYNOS: Use generic pwm driver in Origen board

 arch/arm/mach-exynos/Kconfig         |    3 +++
 arch/arm/mach-exynos/mach-origen.c   |    6 ++++++
 arch/arm/mach-exynos/mach-smdk4x12.c |    6 ++++++
 arch/arm/mach-exynos/mach-smdkv310.c |    7 +++++++
 4 files changed, 22 insertions(+), 0 deletions(-)

-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] ARM: EXYNOS: Use generic pwm driver in Origen board
  2012-09-12 11:33 [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support Sachin Kamat
@ 2012-09-12 11:33 ` Sachin Kamat
  2012-09-12 11:33 ` [PATCH 2/3] ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12 Sachin Kamat
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Sachin Kamat @ 2012-09-12 11:33 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: kgene.kim, thierry.reding, tushar.behera, sachin.kamat, patches

From: Tushar Behera <tushar.behera@linaro.org>

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/Kconfig       |    1 +
 arch/arm/mach-exynos/mach-origen.c |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 195b50e..4b7d15d 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -348,6 +348,7 @@ config MACH_ORIGEN
 	select EXYNOS4_SETUP_FIMD0
 	select EXYNOS4_SETUP_SDHCI
 	select EXYNOS4_SETUP_USB_PHY
+	select S3C24XX_PWM
 	help
 	  Machine support for ORIGEN based on Samsung EXYNOS4210
 
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 5ec563b..0a3c4ef 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -15,6 +15,7 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/input.h>
+#include <linux/pwm.h>
 #include <linux/pwm_backlight.h>
 #include <linux/gpio_keys.h>
 #include <linux/i2c.h>
@@ -614,6 +615,10 @@ static struct platform_device origen_lcd_hv070wsa = {
 	.dev.platform_data	= &origen_lcd_hv070wsa_data,
 };
 
+static struct pwm_lookup origen_pwm_lookup[] = {
+	PWM_LOOKUP("s3c24xx-pwm.0", 0, "pwm-backlight.0", NULL),
+};
+
 #ifdef CONFIG_DRM_EXYNOS
 static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
 	.panel	= {
@@ -798,6 +803,7 @@ static void __init origen_machine_init(void)
 
 	platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
 
+	pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup));
 	samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
 
 	origen_bt_setup();
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12
  2012-09-12 11:33 [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support Sachin Kamat
  2012-09-12 11:33 ` [PATCH 1/3] ARM: EXYNOS: Use generic pwm driver in Origen board Sachin Kamat
@ 2012-09-12 11:33 ` Sachin Kamat
  2012-09-12 11:33 ` [PATCH 3/3] ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 Sachin Kamat
  2012-09-12 12:17 ` [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support Thierry Reding
  3 siblings, 0 replies; 6+ messages in thread
From: Sachin Kamat @ 2012-09-12 11:33 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: kgene.kim, thierry.reding, tushar.behera, sachin.kamat, patches

Generic PWM framework requires that the board setup code
register a static mapping that can be used to match PWM
consumers to providers.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/Kconfig         |    1 +
 arch/arm/mach-exynos/mach-smdk4x12.c |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 4b7d15d..798634d 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -384,6 +384,7 @@ config MACH_SMDK4212
 	select EXYNOS4_SETUP_KEYPAD
 	select EXYNOS4_SETUP_SDHCI
 	select EXYNOS4_SETUP_USB_PHY
+	select S3C24XX_PWM
 	help
 	  Machine support for Samsung SMDK4212
 
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index ee069b4..9c74e8f 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -17,6 +17,7 @@
 #include <linux/mfd/max8997.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_device.h>
+#include <linux/pwm.h>
 #include <linux/pwm_backlight.h>
 #include <linux/regulator/machine.h>
 #include <linux/serial_core.h>
@@ -222,6 +223,10 @@ static struct platform_pwm_backlight_data smdk4x12_bl_data = {
 	.pwm_period_ns  = 1000,
 };
 
+static struct pwm_lookup smdk4x12_pwm_lookup[] = {
+	PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL),
+};
+
 static uint32_t smdk4x12_keymap[] __initdata = {
 	/* KEY(row, col, keycode) */
 	KEY(1, 3, KEY_1), KEY(1, 4, KEY_2), KEY(1, 5, KEY_3),
@@ -349,6 +354,7 @@ static void __init smdk4x12_machine_init(void)
 				ARRAY_SIZE(smdk4x12_i2c_devs7));
 
 	samsung_bl_set(&smdk4x12_bl_gpio_info, &smdk4x12_bl_data);
+	pwm_add_table(smdk4x12_pwm_lookup, ARRAY_SIZE(smdk4x12_pwm_lookup));
 
 	samsung_keypad_set_platdata(&smdk4x12_keypad_data);
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] ARM: EXYNOS: Add generic PWM lookup support for SMDKV310
  2012-09-12 11:33 [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support Sachin Kamat
  2012-09-12 11:33 ` [PATCH 1/3] ARM: EXYNOS: Use generic pwm driver in Origen board Sachin Kamat
  2012-09-12 11:33 ` [PATCH 2/3] ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12 Sachin Kamat
@ 2012-09-12 11:33 ` Sachin Kamat
  2012-09-12 12:17 ` [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support Thierry Reding
  3 siblings, 0 replies; 6+ messages in thread
From: Sachin Kamat @ 2012-09-12 11:33 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: kgene.kim, thierry.reding, tushar.behera, sachin.kamat, patches

Generic PWM framework requires that the board setup code
register a static mapping that can be used to match PWM
consumers to providers.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/Kconfig         |    1 +
 arch/arm/mach-exynos/mach-smdkv310.c |    7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 798634d..9abdd57 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -221,6 +221,7 @@ config MACH_SMDKV310
 	select EXYNOS4_SETUP_KEYPAD
 	select EXYNOS4_SETUP_SDHCI
 	select EXYNOS4_SETUP_USB_PHY
+	select S3C24XX_PWM
 	help
 	  Machine support for Samsung SMDKV310
 
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index 208aa62..e53e66d 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -18,6 +18,7 @@
 #include <linux/io.h>
 #include <linux/i2c.h>
 #include <linux/input.h>
+#include <linux/pwm.h>
 #include <linux/pwm_backlight.h>
 #include <linux/platform_data/s3c-hsotg.h>
 
@@ -355,6 +356,10 @@ static struct platform_pwm_backlight_data smdkv310_bl_data = {
 	.pwm_period_ns  = 1000,
 };
 
+static struct pwm_lookup smdkv310_pwm_lookup[] = {
+	PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL),
+};
+
 /* I2C module and id for HDMIPHY */
 static struct i2c_board_info hdmiphy_info = {
 	I2C_BOARD_INFO("hdmiphy-exynos4210", 0x38),
@@ -399,6 +404,8 @@ static void __init smdkv310_machine_init(void)
 	samsung_keypad_set_platdata(&smdkv310_keypad_data);
 
 	samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
+	pwm_add_table(smdkv310_pwm_lookup, ARRAY_SIZE(smdkv310_pwm_lookup));
+
 #ifdef CONFIG_DRM_EXYNOS
 	s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
 	exynos4_fimd0_gpio_setup_24bpp();
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support
  2012-09-12 11:33 [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support Sachin Kamat
                   ` (2 preceding siblings ...)
  2012-09-12 11:33 ` [PATCH 3/3] ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 Sachin Kamat
@ 2012-09-12 12:17 ` Thierry Reding
  2012-09-14  4:02   ` kgene
  3 siblings, 1 reply; 6+ messages in thread
From: Thierry Reding @ 2012-09-12 12:17 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-samsung-soc, kgene.kim, tushar.behera, patches

[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]

On Wed, Sep 12, 2012 at 05:03:29PM +0530, Sachin Kamat wrote:
> This series adds support for generic PWM framework which requires
> that the board setup code register a static mapping that can be
> used to match PWM consumers to providers.
> 
> This series is based on for-next branch of Kukjin's tree.
> 
> Sachin Kamat (2):
>   ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12
>   ARM: EXYNOS: Add generic PWM lookup support for SMDKV310
> 
> Tushar Behera (1):
>   ARM: EXYNOS: Use generic pwm driver in Origen board
> 
>  arch/arm/mach-exynos/Kconfig         |    3 +++
>  arch/arm/mach-exynos/mach-origen.c   |    6 ++++++
>  arch/arm/mach-exynos/mach-smdk4x12.c |    6 ++++++
>  arch/arm/mach-exynos/mach-smdkv310.c |    7 +++++++
>  4 files changed, 22 insertions(+), 0 deletions(-)

These look great. I'm glad somebody's starting to convert boards to use
the lookup tables. Eventually when every board has been converted we can
transition to the new API by getting rid of pwm_request() and pwm_free()
in the user drivers and using only the counterparts from the new API.

All three patches: Reviewed-by: <thierry.reding@avionic-design.de>

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support
  2012-09-12 12:17 ` [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support Thierry Reding
@ 2012-09-14  4:02   ` kgene
  0 siblings, 0 replies; 6+ messages in thread
From: kgene @ 2012-09-14  4:02 UTC (permalink / raw)
  To: 'Thierry Reding', 'Sachin Kamat'
  Cc: linux-samsung-soc, tushar.behera, patches

> On Wed, Sep 12, 2012 at 05:03:29PM +0530, Sachin Kamat wrote:
> > This series adds support for generic PWM framework which requires
> > that the board setup code register a static mapping that can be
> > used to match PWM consumers to providers.
> >
> > This series is based on for-next branch of Kukjin's tree.
> >
> > Sachin Kamat (2):
> >   ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12
> >   ARM: EXYNOS: Add generic PWM lookup support for SMDKV310
> >
> > Tushar Behera (1):
> >   ARM: EXYNOS: Use generic pwm driver in Origen board
> >
> >  arch/arm/mach-exynos/Kconfig         |    3 +++
> >  arch/arm/mach-exynos/mach-origen.c   |    6 ++++++
> >  arch/arm/mach-exynos/mach-smdk4x12.c |    6 ++++++
> >  arch/arm/mach-exynos/mach-smdkv310.c |    7 +++++++
> >  4 files changed, 22 insertions(+), 0 deletions(-)
> 
> These look great. I'm glad somebody's starting to convert boards to use
> the lookup tables. Eventually when every board has been converted we can
> transition to the new API by getting rid of pwm_request() and pwm_free()
> in the user drivers and using only the counterparts from the new API.
> 
Yeah, agree :-)

> All three patches: Reviewed-by: <thierry.reding@avionic-design.de>

Thanks, applied this series.

K-Gene <kgene@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-14  4:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12 11:33 [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support Sachin Kamat
2012-09-12 11:33 ` [PATCH 1/3] ARM: EXYNOS: Use generic pwm driver in Origen board Sachin Kamat
2012-09-12 11:33 ` [PATCH 2/3] ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12 Sachin Kamat
2012-09-12 11:33 ` [PATCH 3/3] ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 Sachin Kamat
2012-09-12 12:17 ` [PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support Thierry Reding
2012-09-14  4:02   ` kgene

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.