Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH 08/16] backlight: pwm_bl: set pwm polarity when using platform data
From: Alexandre Belloni @ 2014-03-19 13:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1395234209-15546-1-git-send-email-alexandre.belloni@free-electrons.com>

Set inversed polarity when .pwm_active_low is set in the platform_data. With
device tree, this is taken care of by of_pwm_xlate_with_flags(), called from
of_pwm_get().

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/video/backlight/pwm_bl.c | 8 ++++++++
 include/linux/pwm_backlight.h    | 1 +
 2 files changed, 9 insertions(+)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index b75201ff46f6..ffdd3b2b2742 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -309,6 +309,14 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 	if (data->pwm_period_ns > 0)
 		pwm_set_period(pb->pwm, data->pwm_period_ns);
 
+	/*
+	 * The DT case is taking care of polarity in of_pwm_get(). For the
+	 * non-DT case, set the polarity from platform data.
+	 */
+	if (data->pwm_active_low)
+		if (pwm_set_polarity(pb->pwm, PWM_POLARITY_INVERSED))
+			dev_err(&pdev->dev, "impossible to invert polarity\n");
+
 	pb->period = pwm_get_period(pb->pwm);
 	pb->lth_brightness = data->lth_brightness * (pb->period / pb->scale);
 
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h
index 2de2e275b2cb..b924fce5c97a 100644
--- a/include/linux/pwm_backlight.h
+++ b/include/linux/pwm_backlight.h
@@ -15,6 +15,7 @@ struct platform_pwm_backlight_data {
 	unsigned int dft_brightness;
 	unsigned int lth_brightness;
 	unsigned int pwm_period_ns;
+	bool pwm_active_low;
 	unsigned int *levels;
 	int enable_gpio;
 	unsigned long enable_gpio_flags;
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 07/16] PWM: atmel: allow building for AVR32
From: Alexandre Belloni @ 2014-03-19 13:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1395234209-15546-1-git-send-email-alexandre.belloni@free-electrons.com>

The Atmel PWM IP can be found on avr32 chips. This allows selecting and building
the driver on avr32.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/pwm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 22f2f2857b82..892dd1ab4134 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -43,7 +43,7 @@ config PWM_AB8500
 
 config PWM_ATMEL
 	tristate "Atmel PWM support"
-	depends on ARCH_AT91
+	depends on ARCH_AT91 || AVR32
 	help
 	  Generic PWM framework driver for Atmel SoC.
 
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 06/16] ARM: at91: remove useless at91_pwm_leds()
From: Alexandre Belloni @ 2014-03-19 13:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1395234209-15546-1-git-send-email-alexandre.belloni@free-electrons.com>

Now that all at91 boards using leds-atmel-pwm switched to leds-pwm, the
at91_pwm_leds() function is not used anymore.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/board.h |  1 -
 arch/arm/mach-at91/leds.c  | 37 -------------------------------------
 2 files changed, 38 deletions(-)

diff --git a/arch/arm/mach-at91/board.h b/arch/arm/mach-at91/board.h
index 4e773b55bc2d..836e9a537e0c 100644
--- a/arch/arm/mach-at91/board.h
+++ b/arch/arm/mach-at91/board.h
@@ -123,6 +123,5 @@ extern void __init at91_add_device_can(struct at91_can_data *data);
 
  /* LEDs */
 extern void __init at91_gpio_leds(struct gpio_led *leds, int nr);
-extern void __init at91_pwm_leds(struct gpio_led *leds, int nr);
 
 #endif
diff --git a/arch/arm/mach-at91/leds.c b/arch/arm/mach-at91/leds.c
index 3e22978b5547..684723ba24f3 100644
--- a/arch/arm/mach-at91/leds.c
+++ b/arch/arm/mach-at91/leds.c
@@ -53,40 +53,3 @@ void __init at91_gpio_leds(struct gpio_led *leds, int nr)
 void __init at91_gpio_leds(struct gpio_led *leds, int nr) {}
 #endif
 
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (CONFIG_LEDS_ATMEL_PWM)
-
-/*
- * PWM Leds
- */
-
-static struct gpio_led_platform_data pwm_led_data;
-
-static struct platform_device at91_pwm_leds_device = {
-	.name			= "leds-atmel-pwm",
-	.id			= -1,
-	.dev.platform_data	= &pwm_led_data,
-};
-
-void __init at91_pwm_leds(struct gpio_led *leds, int nr)
-{
-	int i;
-	u32 pwm_mask = 0;
-
-	if (!nr)
-		return;
-
-	for (i = 0; i < nr; i++)
-		pwm_mask |= (1 << leds[i].gpio);
-
-	pwm_led_data.leds = leds;
-	pwm_led_data.num_leds = nr;
-
-	at91_add_device_pwm(pwm_mask);
-	platform_device_register(&at91_pwm_leds_device);
-}
-#else
-void __init at91_pwm_leds(struct gpio_led *leds, int nr){}
-#endif
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 05/16] ARM: at91: at91sam9rl: switch to generic PWM framework
From: Alexandre Belloni @ 2014-03-19 13:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1395234209-15546-1-git-send-email-alexandre.belloni@free-electrons.com>

Switch to the pwm/pwm-atmel driver instead of misc/atmel_pwm

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/at91sam9rl.c         |  1 +
 arch/arm/mach-at91/at91sam9rl_devices.c | 11 ++---------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index 4d2006351d1d..bc035a9ff53c 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -199,6 +199,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("pclk", "fffc4000.ssc", &ssc1_clk),
 	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi0_clk),
 	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.1", &twi1_clk),
+	CLKDEV_CON_DEV_ID(NULL, "at91sam9rl-pwm", &pwm_clk),
 	CLKDEV_CON_ID("pioA", &pioA_clk),
 	CLKDEV_CON_ID("pioB", &pioB_clk),
 	CLKDEV_CON_ID("pioC", &pioC_clk),
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index 9ccae034119c..a396d6d56ffe 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -797,9 +797,7 @@ static void __init at91_add_device_watchdog(void) {}
  *  PWM
  * --------------------------------------------------------------------*/
 
-#if defined(CONFIG_ATMEL_PWM)
-static u32 pwm_mask;
-
+#if IS_ENABLED(CONFIG_PWM_ATMEL)
 static struct resource pwm_resources[] = {
 	[0] = {
 		.start	= AT91SAM9RL_BASE_PWMC,
@@ -814,11 +812,8 @@ static struct resource pwm_resources[] = {
 };
 
 static struct platform_device at91sam9rl_pwm0_device = {
-	.name	= "atmel_pwm",
+	.name	= "at91sam9rl-pwm",
 	.id	= -1,
-	.dev	= {
-		.platform_data		= &pwm_mask,
-	},
 	.resource	= pwm_resources,
 	.num_resources	= ARRAY_SIZE(pwm_resources),
 };
@@ -837,8 +832,6 @@ void __init at91_add_device_pwm(u32 mask)
 	if (mask & (1 << AT91_PWM3))
 		at91_set_B_periph(AT91_PIN_PD8, 1);	/* enable PWM3 */
 
-	pwm_mask = mask;
-
 	platform_device_register(&at91sam9rl_pwm0_device);
 }
 #else
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 04/16] ARM: at91: sam9263ek: use generic leds_pwm driver
From: Alexandre Belloni @ 2014-03-19 13:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1395234209-15546-1-git-send-email-alexandre.belloni@free-electrons.com>

Switch to the generic leds_pwm driver instead of leds-atmel-pwm.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/board-sam9263ek.c | 56 ++++++++++++++++++++++++++++++------
 1 file changed, 48 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 2f931915c80c..f8496868d9ba 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -32,6 +32,8 @@
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
 #include <linux/leds.h>
+#include <linux/pwm.h>
+#include <linux/leds_pwm.h>
 
 #include <video/atmel_lcdc.h>
 
@@ -368,21 +370,48 @@ static struct gpio_led ek_leds[] = {
 		.name			= "ds3",
 		.gpio			= AT91_PIN_PB7,
 		.default_trigger	= "heartbeat",
+	},
+#if !IS_ENABLED(CONFIG_LEDS_PWM)
+	{
+		.name			= "ds1",
+		.gpio			= AT91_PIN_PB8,
+		.active_low		= 1,
+		.default_trigger	= "none",
 	}
+#endif
 };
 
 /*
  * PWM Leds
  */
-static struct gpio_led ek_pwm_led[] = {
-	/* For now only DS1 is PWM-driven (by pwm1) */
+static struct pwm_lookup pwm_lookup[] = {
+	PWM_LOOKUP("at91sam9rl-pwm", 1, "leds_pwm", "ds1"),
+};
+
+#if IS_ENABLED(CONFIG_LEDS_PWM)
+static struct led_pwm pwm_leds[] = {
 	{
-		.name			= "ds1",
-		.gpio			= 1,	/* is PWM channel number */
-		.active_low		= 1,
-		.default_trigger	= "none",
-	}
+		.name = "ds1",
+		.max_brightness = 255,
+		.pwm_period_ns  = 5000,
+		.active_low = 1,
+	},
+};
+
+static struct led_pwm_platform_data pwm_data = {
+	.num_leds       = ARRAY_SIZE(pwm_leds),
+	.leds           = pwm_leds,
+};
+
+static struct platform_device leds_pwm = {
+	.name   = "leds_pwm",
+	.id     = -1,
+	.dev    = {
+		.platform_data = &pwm_data,
+	},
 };
+#endif
+
 
 /*
  * CAN
@@ -402,6 +431,12 @@ static struct at91_can_data ek_can_data = {
 	.transceiver_switch = sam9263ek_transceiver_switch,
 };
 
+static struct platform_device *devices[] __initdata = {
+#if IS_ENABLED(CONFIG_LEDS_PWM)
+	&leds_pwm,
+#endif
+};
+
 static void __init ek_board_init(void)
 {
 	/* Serial */
@@ -436,9 +471,14 @@ static void __init ek_board_init(void)
 	at91_add_device_ac97(&ek_ac97_data);
 	/* LEDs */
 	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
-	at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
+	pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup));
+#if IS_ENABLED(CONFIG_LEDS_PWM)
+	at91_add_device_pwm(1 << AT91_PWM1);
+#endif
 	/* CAN */
 	at91_add_device_can(&ek_can_data);
+	/* Other platform devices */
+	platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
 MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 03/16] ARM: at91: at91sam9263: switch to generic PWM framework
From: Alexandre Belloni @ 2014-03-19 13:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1395234209-15546-1-git-send-email-alexandre.belloni@free-electrons.com>

Switch to the pwm/pwm-atmel driver instead of misc/atmel_pwm

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/at91sam9263.c         |  1 +
 arch/arm/mach-at91/at91sam9263_devices.c | 11 ++---------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 37b90f4b990c..d0c2d4955cd7 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -198,6 +198,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
 	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
 	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "at91sam9rl-pwm", &pwm_clk),
 	/* fake hclk clock */
 	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
 	CLKDEV_CON_ID("pioA", &pioA_clk),
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 4aeadddbc181..160acd96cdda 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -1129,9 +1129,7 @@ static void __init at91_add_device_watchdog(void) {}
  *  PWM
  * --------------------------------------------------------------------*/
 
-#if defined(CONFIG_ATMEL_PWM)
-static u32 pwm_mask;
-
+#if IS_ENABLED(CONFIG_PWM_ATMEL)
 static struct resource pwm_resources[] = {
 	[0] = {
 		.start	= AT91SAM9263_BASE_PWMC,
@@ -1146,11 +1144,8 @@ static struct resource pwm_resources[] = {
 };
 
 static struct platform_device at91sam9263_pwm0_device = {
-	.name	= "atmel_pwm",
+	.name	= "at91sam9rl-pwm",
 	.id	= -1,
-	.dev	= {
-		.platform_data		= &pwm_mask,
-	},
 	.resource	= pwm_resources,
 	.num_resources	= ARRAY_SIZE(pwm_resources),
 };
@@ -1169,8 +1164,6 @@ void __init at91_add_device_pwm(u32 mask)
 	if (mask & (1 << AT91_PWM3))
 		at91_set_B_periph(AT91_PIN_PB29, 1);	/* enable PWM3 */
 
-	pwm_mask = mask;
-
 	platform_device_register(&at91sam9263_pwm0_device);
 }
 #else
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 02/16] ARM: at91: sam9m10g45ek: use generic leds_pwm driver
From: Alexandre Belloni @ 2014-03-19 13:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1395234209-15546-1-git-send-email-alexandre.belloni@free-electrons.com>

Switch to the generic leds_pwm driver instead of leds-atmel-pwm.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/board-sam9m10g45ek.c | 43 ++++++++++++++++++++++++++-------
 1 file changed, 34 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index f2f7ce9643ce..a98e92525fdb 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -26,6 +26,8 @@
 #include <linux/leds.h>
 #include <linux/atmel-mci.h>
 #include <linux/delay.h>
+#include <linux/pwm.h>
+#include <linux/leds_pwm.h>
 
 #include <linux/platform_data/at91_adc.h>
 
@@ -415,7 +417,7 @@ static struct gpio_led ek_leds[] = {
 		.active_low		= 1,
 		.default_trigger	= "nand-disk",
 	},
-#if !(defined(CONFIG_LEDS_ATMEL_PWM) || defined(CONFIG_LEDS_ATMEL_PWM_MODULE))
+#if !IS_ENABLED(CONFIG_LEDS_PWM)
 	{	/* "right" led, green, userled1, pwm1 */
 		.name			= "d7",
 		.gpio			= AT91_PIN_PD31,
@@ -429,22 +431,42 @@ static struct gpio_led ek_leds[] = {
 /*
  * PWM Leds
  */
-static struct gpio_led ek_pwm_led[] = {
-#if defined(CONFIG_LEDS_ATMEL_PWM) || defined(CONFIG_LEDS_ATMEL_PWM_MODULE)
+static struct pwm_lookup pwm_lookup[] = {
+	PWM_LOOKUP("at91sam9rl-pwm", 1, "leds_pwm", "d7"),
+};
+
+#if IS_ENABLED(CONFIG_LEDS_PWM)
+static struct led_pwm pwm_leds[] = {
 	{	/* "right" led, green, userled1, pwm1 */
-		.name			= "d7",
-		.gpio			= 1,	/* is PWM channel number */
-		.active_low		= 1,
-		.default_trigger	= "none",
+		.name = "d7",
+		.max_brightness	= 255,
+		.pwm_period_ns	= 5000,
+		.active_low = 1,
 	},
-#endif
 };
 
+static struct led_pwm_platform_data pwm_data = {
+	.num_leds	= ARRAY_SIZE(pwm_leds),
+	.leds		= pwm_leds,
+};
+
+static struct platform_device leds_pwm = {
+	.name	= "leds_pwm",
+	.id	= -1,
+	.dev	= {
+		.platform_data = &pwm_data,
+	},
+};
+#endif
+
 static struct platform_device *devices[] __initdata = {
 #if defined(CONFIG_SOC_CAMERA_OV2640) || \
 	defined(CONFIG_SOC_CAMERA_OV2640_MODULE)
 	&isi_ov2640,
 #endif
+#if IS_ENABLED(CONFIG_LEDS_PWM)
+	&leds_pwm,
+#endif
 };
 
 static void __init ek_board_init(void)
@@ -485,7 +507,10 @@ static void __init ek_board_init(void)
 	at91_add_device_ac97(&ek_ac97_data);
 	/* LEDs */
 	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
-	at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
+	pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup));
+#if IS_ENABLED(CONFIG_LEDS_PWM)
+	at91_add_device_pwm(1 << AT91_PWM1);
+#endif
 	/* Other platform devices */
 	platform_add_devices(devices, ARRAY_SIZE(devices));
 }
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 01/16] ARM: at91: at91sam9g45: switch to generic PWM framework
From: Alexandre Belloni @ 2014-03-19 13:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1395234209-15546-1-git-send-email-alexandre.belloni@free-electrons.com>

Switch to the pwm/pwm-atmel driver instead of misc/atmel_pwm

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/at91sam9g45.c         |  1 +
 arch/arm/mach-at91/at91sam9g45_devices.c | 11 ++---------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 3c519a7a938f..2d3c6e1ac158 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -250,6 +250,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID(NULL, "atmel_sha", &aestdessha_clk),
 	CLKDEV_CON_DEV_ID(NULL, "atmel_tdes", &aestdessha_clk),
 	CLKDEV_CON_DEV_ID(NULL, "atmel_aes", &aestdessha_clk),
+	CLKDEV_CON_DEV_ID(NULL, "at91sam9rl-pwm", &pwm_clk),
 	/* more usart lookup table for DT entries */
 	CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck),
 	CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk),
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 87135a61357d..25ba920cbe84 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -1332,9 +1332,7 @@ static void __init at91_add_device_watchdog(void) {}
  *  PWM
  * --------------------------------------------------------------------*/
 
-#if defined(CONFIG_ATMEL_PWM) || defined(CONFIG_ATMEL_PWM_MODULE)
-static u32 pwm_mask;
-
+#if IS_ENABLED(CONFIG_PWM_ATMEL)
 static struct resource pwm_resources[] = {
 	[0] = {
 		.start	= AT91SAM9G45_BASE_PWMC,
@@ -1349,11 +1347,8 @@ static struct resource pwm_resources[] = {
 };
 
 static struct platform_device at91sam9g45_pwm0_device = {
-	.name	= "atmel_pwm",
+	.name	= "at91sam9rl-pwm",
 	.id	= -1,
-	.dev	= {
-		.platform_data		= &pwm_mask,
-	},
 	.resource	= pwm_resources,
 	.num_resources	= ARRAY_SIZE(pwm_resources),
 };
@@ -1372,8 +1367,6 @@ void __init at91_add_device_pwm(u32 mask)
 	if (mask & (1 << AT91_PWM3))
 		at91_set_B_periph(AT91_PIN_PD0, 1);	/* enable PWM3 */
 
-	pwm_mask = mask;
-
 	platform_device_register(&at91sam9g45_pwm0_device);
 }
 #else
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 00/16] move at91 and avr32 to the PWM framework, remove obsolete drivers
From: Alexandre Belloni @ 2014-03-19 13:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

This patch set swtiches the at91 and avr32 SoCs and board to the generic PWM
framework. This allows to remove the obsolete leds-atmel-pwm, atmel-pwm-bl and
atmel_pwm drivers.

The first 6 patches take care of the AT91 boards and removes a useless function
in the process.

Patch 7 makes pwm-ateml buildable for AVR32

Patch 8 allows setting the pwm polarity for pwm_bl when using platform data.
This is required afterwards for the favr-32

Patches 9-13 take care of the AVR32 boards. This has only been compile tested as
I don't own any of those boards.

And the last 3 patches are removing the now obsolete drivers.

As a note, the atmel_pwm driver has two features not yet available through
pwm-atmel:
 - it is possible to pass an IRQ handler that will get called each time one of
   the channel period has been acheived.
 - it was possible to set clka and clkb, two clock that divided mck before
   feeding the pwm controller.

Those features are not used by anything in the mainline. I'm not sure we can
implement the first one. We'll get back the second one once all the boards have
swtiched to the common clock framework.


Alexandre Belloni (16):
  ARM: at91: at91sam9g45: switch to generic PWM framework
  ARM: at91: sam9m10g45ek: use generic leds_pwm driver
  ARM: at91: at91sam9263: switch to generic PWM framework
  ARM: at91: sam9263ek: use generic leds_pwm driver
  ARM: at91: at91sam9rl: switch to generic PWM framework
  ARM: at91: remove useless at91_pwm_leds()
  PWM: atmel: allow building for AVR32
  backlight: pwm_bl: set pwm polarity when using platform data
  avr32/at32ap: switch to the generic PWM framework
  avr32: MRMT: use generic leds_pwm driver
  avr32: merisc: use generic leds_pwm driver
  avr32: favr-32: use generic pwm_bl driver
  avr32: update defconfig to use the generic PWM framework
  backlight: atmel-pwm-bl: remove obsolete driver
  leds: atmel-pwm: remove obsolete driver
  misc: atmel_pwm: remove obsolete driver

 arch/arm/mach-at91/at91sam9263.c           |   1 +
 arch/arm/mach-at91/at91sam9263_devices.c   |  11 +-
 arch/arm/mach-at91/at91sam9g45.c           |   1 +
 arch/arm/mach-at91/at91sam9g45_devices.c   |  11 +-
 arch/arm/mach-at91/at91sam9rl.c            |   1 +
 arch/arm/mach-at91/at91sam9rl_devices.c    |  11 +-
 arch/arm/mach-at91/board-sam9263ek.c       |  56 +++-
 arch/arm/mach-at91/board-sam9m10g45ek.c    |  43 ++-
 arch/arm/mach-at91/board.h                 |   1 -
 arch/arm/mach-at91/leds.c                  |  37 ---
 arch/avr32/boards/atngw100/mrmt.c          |  35 ++-
 arch/avr32/boards/favr-32/setup.c          |  49 ++--
 arch/avr32/boards/merisc/setup.c           |  34 ++-
 arch/avr32/configs/atngw100_mrmt_defconfig |   5 +-
 arch/avr32/configs/atstk1002_defconfig     |   5 +-
 arch/avr32/configs/atstk1003_defconfig     |   5 +-
 arch/avr32/configs/atstk1004_defconfig     |   5 +-
 arch/avr32/configs/atstk1006_defconfig     |   5 +-
 arch/avr32/configs/favr-32_defconfig       |   6 +-
 arch/avr32/configs/merisc_defconfig        |   5 +-
 arch/avr32/mach-at32ap/at32ap700x.c        |   7 +-
 drivers/leds/Kconfig                       |   8 -
 drivers/leds/Makefile                      |   1 -
 drivers/leds/leds-atmel-pwm.c              | 149 -----------
 drivers/misc/Kconfig                       |   9 -
 drivers/misc/Makefile                      |   1 -
 drivers/misc/atmel_pwm.c                   | 402 -----------------------------
 drivers/pwm/Kconfig                        |   2 +-
 drivers/video/backlight/Kconfig            |  11 -
 drivers/video/backlight/Makefile           |   1 -
 drivers/video/backlight/atmel-pwm-bl.c     | 223 ----------------
 drivers/video/backlight/pwm_bl.c           |   8 +
 include/linux/atmel-pwm-bl.h               |  43 ---
 include/linux/atmel_pwm.h                  |  70 -----
 include/linux/pwm_backlight.h              |   1 +
 35 files changed, 199 insertions(+), 1064 deletions(-)
 delete mode 100644 drivers/leds/leds-atmel-pwm.c
 delete mode 100644 drivers/misc/atmel_pwm.c
 delete mode 100644 drivers/video/backlight/atmel-pwm-bl.c
 delete mode 100644 include/linux/atmel-pwm-bl.h
 delete mode 100644 include/linux/atmel_pwm.h

-- 
1.8.3.2


^ permalink raw reply

* Re: [PATCH] Video: atmel: avoid the id of fix screen info is overwritten
From: Tomi Valkeinen @ 2014-03-19 11:04 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1395215275-14345-1-git-send-email-voice.shen@atmel.com>

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

On 19/03/14 09:47, Bo Shen wrote:
> Correct passing parameter sequence, which will avoid the id of
> fix screen info is overwritten.
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> ---
>  drivers/video/atmel_lcdfb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
> index cd96162..695f28a 100644
> --- a/drivers/video/atmel_lcdfb.c
> +++ b/drivers/video/atmel_lcdfb.c
> @@ -1190,12 +1190,12 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
>  	if (!sinfo->config)
>  		goto free_info;
>  
> -	strcpy(info->fix.id, sinfo->pdev->name);
>  	info->flags = ATMEL_LCDFB_FBINFO_DEFAULT;
>  	info->pseudo_palette = sinfo->pseudo_palette;
>  	info->fbops = &atmel_lcdfb_ops;
>  
>  	info->fix = atmel_lcdfb_fix;
> +	strcpy(info->fix.id, sinfo->pdev->name);
>  
>  	/* Enable LCDC Clocks */
>  	sinfo->bus_clk = clk_get(dev, "hclk");
> 

Thanks, queued for 3.15.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCH] Video: atmel: avoid the id of fix screen info is overwritten
From: Nicolas Ferre @ 2014-03-19  9:50 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1395215275-14345-1-git-send-email-voice.shen@atmel.com>

On 19/03/2014 08:47, Bo Shen :
> Correct passing parameter sequence, which will avoid the id of
> fix screen info is overwritten.
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks.

> ---
>  drivers/video/atmel_lcdfb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
> index cd96162..695f28a 100644
> --- a/drivers/video/atmel_lcdfb.c
> +++ b/drivers/video/atmel_lcdfb.c
> @@ -1190,12 +1190,12 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
>  	if (!sinfo->config)
>  		goto free_info;
>  
> -	strcpy(info->fix.id, sinfo->pdev->name);
>  	info->flags = ATMEL_LCDFB_FBINFO_DEFAULT;
>  	info->pseudo_palette = sinfo->pseudo_palette;
>  	info->fbops = &atmel_lcdfb_ops;
>  
>  	info->fix = atmel_lcdfb_fix;
> +	strcpy(info->fix.id, sinfo->pdev->name);
>  
>  	/* Enable LCDC Clocks */
>  	sinfo->bus_clk = clk_get(dev, "hclk");
> 


-- 
Nicolas Ferre

^ permalink raw reply

* Re: [PATCHv2 4/8] Doc/DT: Add DT binding documentation for HDMI Connector
From: Philipp Zabel @ 2014-03-19  9:36 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: devicetree, linux-fbdev, Russell King - ARM Linux, dri-devel,
	Andrzej Hajda, Geert Uytterhoeven, Laurent Pinchart, Rob Herring,
	linux-arm-kernel, Sebastian Hesselbarth
In-Reply-To: <53295E84.2020106@ti.com>

Hi Tomi,

Am Mittwoch, den 19.03.2014, 11:08 +0200 schrieb Tomi Valkeinen:
> On 19/03/14 10:22, Philipp Zabel wrote:
> 
> > I don't disagree, either. I have no objection against the bindings
> > themselves.
> > 
> > Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
> 
> Thanks. Is the ack for this particular binding, or for the whole series?

Thanks for asking, I haven't really looked at the TPD12S015 binding.
The rest of the series, yes.

regards
Philipp


^ permalink raw reply

* Re: [PATCHv2 4/8] Doc/DT: Add DT binding documentation for HDMI Connector
From: Tomi Valkeinen @ 2014-03-19  9:08 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: devicetree, linux-fbdev, Russell King - ARM Linux, Sascha Hauer,
	Tomasz Figa, dri-devel, Archit Taneja, Inki Dae, Andrzej Hajda,
	Rob Clark, Thierry Reding, Geert Uytterhoeven, Laurent Pinchart,
	Daniel Vetter, linux-arm-kernel, Sebastian Hesselbarth
In-Reply-To: <1395217360.4300.9.camel@paszta.hi.pengutronix.de>

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

On 19/03/14 10:22, Philipp Zabel wrote:

> I don't disagree, either. I have no objection against the bindings
> themselves.
> 
> Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

Thanks. Is the ack for this particular binding, or for the whole series?

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCHv2 4/8] Doc/DT: Add DT binding documentation for HDMI Connector
From: Philipp Zabel @ 2014-03-19  8:22 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: devicetree, linux-fbdev, Russell King - ARM Linux, dri-devel,
	Andrzej Hajda, Geert Uytterhoeven, Laurent Pinchart, Rob Herring,
	linux-arm-kernel, Sebastian Hesselbarth
In-Reply-To: <53295132.6000003@ti.com>

Am Mittwoch, den 19.03.2014, 10:11 +0200 schrieb Tomi Valkeinen:
> On 19/03/14 10:03, Philipp Zabel wrote:
> 
> >>> Geert's comment also applies to all other connector types. These can be
> >>> input connectors, too.
> >>
> >> We might not need to define all the properties required by input connectors 
> >> now, but we need to make sure that future extensions will be backward-
> >> compatible. I don't see a problem in making the connector DT bindings depend 
> >> on the direction as long as the direction is specified in the DT node, either 
> >> explicitly or implicitly.
> >>
> >> An obvious solution would be to have separate "hdmi-input-connector" and 
> >> "hdmi-output-connector" compatible strings but I don't like that, as there's 
> >> no difference in the HDMI connector itself, only in the usage.
> > 
> > I don't think this is necessary, either. I just meant the wording for
> > the video port should leave the direction unspecified. I imagine
> > somebody somewhere will connect a HDMI connector to a mux so that it can
> > be either input or output.
> 
> I don't disagree, but I think it's better to change the wording when
> someone has a working setup and can try it. These bindings have been
> designed only with video output in mind, and I'd rather have them
> constrained to that purpose for now.
> 
> One reason for keeping them output only is that when someone wants to
> use these for capture, he needs to change the binding docs, and it'll
> gather more attention than just using the bindings in a board's dts.
> 
> That said, we should take care to make the bindings so that nothing
> prevents their use for capture (which I think they allow in their
> current form).

I don't disagree, either. I have no objection against the bindings
themselves.

Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp


^ permalink raw reply

* Re: [PATCHv2 4/8] Doc/DT: Add DT binding documentation for HDMI Connector
From: Tomi Valkeinen @ 2014-03-19  8:11 UTC (permalink / raw)
  To: Philipp Zabel, Laurent Pinchart
  Cc: devicetree, linux-fbdev, Russell King - ARM Linux, Sascha Hauer,
	Tomasz Figa, dri-devel, Archit Taneja, Inki Dae, Andrzej Hajda,
	Rob Clark, Thierry Reding, Geert Uytterhoeven, Daniel Vetter,
	linux-arm-kernel, Sebastian Hesselbarth
In-Reply-To: <1395216233.4300.6.camel@paszta.hi.pengutronix.de>

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

On 19/03/14 10:03, Philipp Zabel wrote:

>>> Geert's comment also applies to all other connector types. These can be
>>> input connectors, too.
>>
>> We might not need to define all the properties required by input connectors 
>> now, but we need to make sure that future extensions will be backward-
>> compatible. I don't see a problem in making the connector DT bindings depend 
>> on the direction as long as the direction is specified in the DT node, either 
>> explicitly or implicitly.
>>
>> An obvious solution would be to have separate "hdmi-input-connector" and 
>> "hdmi-output-connector" compatible strings but I don't like that, as there's 
>> no difference in the HDMI connector itself, only in the usage.
> 
> I don't think this is necessary, either. I just meant the wording for
> the video port should leave the direction unspecified. I imagine
> somebody somewhere will connect a HDMI connector to a mux so that it can
> be either input or output.

I don't disagree, but I think it's better to change the wording when
someone has a working setup and can try it. These bindings have been
designed only with video output in mind, and I'd rather have them
constrained to that purpose for now.

One reason for keeping them output only is that when someone wants to
use these for capture, he needs to change the binding docs, and it'll
gather more attention than just using the bindings in a board's dts.

That said, we should take care to make the bindings so that nothing
prevents their use for capture (which I think they allow in their
current form).

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCHv2 4/8] Doc/DT: Add DT binding documentation for HDMI Connector
From: Philipp Zabel @ 2014-03-19  8:03 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: devicetree, linux-fbdev, Russell King - ARM Linux, dri-devel,
	Andrzej Hajda, Tomi Valkeinen, Geert Uytterhoeven, Rob Herring,
	linux-arm-kernel, Sebastian Hesselbarth
In-Reply-To: <1664822.t9aWz7hh4g@avalon>

Hi Laurent,

Am Mittwoch, den 19.03.2014, 00:43 +0100 schrieb Laurent Pinchart:
> Hello,
> 
> On Tuesday 18 March 2014 09:43:54 Philipp Zabel wrote:
> > Am Dienstag, den 18.03.2014, 10:15 +0200 schrieb Tomi Valkeinen:
> > > Add DT binding documentation for HDMI Connector.
> > > 
> > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > > Reviewed-by: Archit Taneja <archit@ti.com>
> > > ---
> > > 
> > >  .../devicetree/bindings/video/hdmi-connector.txt   | 28 +++++++++++++++++
> > >  1 file changed, 28 insertions(+)
> > >  create mode 100644
> > >  Documentation/devicetree/bindings/video/hdmi-connector.txt> 
> > > diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt
> > > b/Documentation/devicetree/bindings/video/hdmi-connector.txt new file
> > > mode 100644
> > > index 000000000000..ccccc19e2573
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/video/hdmi-connector.txt
> > > @@ -0,0 +1,28 @@
> > > +HDMI Connector
> > > +=======
> > > +
> > > +Required properties:
> > > +- compatible: "hdmi-connector"
> > > +- type: the HDMI connector type: "a", "b", "c", "d" or "e"
> > > +
> > > +Optional properties:
> > > +- label: a symbolic name for the connector
> > > +
> > > +Required nodes:
> > > +- Video port for HDMI input
> > 
> > Geert's comment also applies to all other connector types. These can be
> > input connectors, too.
> 
> We might not need to define all the properties required by input connectors 
> now, but we need to make sure that future extensions will be backward-
> compatible. I don't see a problem in making the connector DT bindings depend 
> on the direction as long as the direction is specified in the DT node, either 
> explicitly or implicitly.
>
> An obvious solution would be to have separate "hdmi-input-connector" and 
> "hdmi-output-connector" compatible strings but I don't like that, as there's 
> no difference in the HDMI connector itself, only in the usage.

I don't think this is necessary, either. I just meant the wording for
the video port should leave the direction unspecified. I imagine
somebody somewhere will connect a HDMI connector to a mux so that it can
be either input or output.

> We could also add a "direction" property (possibly later, with a default value 
> of "output" in that case), or rely on the link direction, but in the latter 
> case that would require reaching an agreement in the current link directions 
> debate.

If we add a direction property, I think it should be on the ports.

regards
Philipp


^ permalink raw reply

* [PATCH] Video: atmel: avoid the id of fix screen info is overwritten
From: Bo Shen @ 2014-03-19  7:47 UTC (permalink / raw)
  To: linux-arm-kernel

Correct passing parameter sequence, which will avoid the id of
fix screen info is overwritten.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
 drivers/video/atmel_lcdfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index cd96162..695f28a 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -1190,12 +1190,12 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
 	if (!sinfo->config)
 		goto free_info;
 
-	strcpy(info->fix.id, sinfo->pdev->name);
 	info->flags = ATMEL_LCDFB_FBINFO_DEFAULT;
 	info->pseudo_palette = sinfo->pseudo_palette;
 	info->fbops = &atmel_lcdfb_ops;
 
 	info->fix = atmel_lcdfb_fix;
+	strcpy(info->fix.id, sinfo->pdev->name);
 
 	/* Enable LCDC Clocks */
 	sinfo->bus_clk = clk_get(dev, "hclk");
-- 
1.8.5.2


^ permalink raw reply related

* Re: [PATCHv2 4/8] Doc/DT: Add DT binding documentation for HDMI Connector
From: Laurent Pinchart @ 2014-03-18 23:43 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: devicetree, linux-fbdev, Russell King - ARM Linux, dri-devel,
	Andrzej Hajda, Tomi Valkeinen, Geert Uytterhoeven, Rob Herring,
	linux-arm-kernel, Sebastian Hesselbarth
In-Reply-To: <1395132234.4134.1.camel@paszta.hi.pengutronix.de>

Hello,

On Tuesday 18 March 2014 09:43:54 Philipp Zabel wrote:
> Am Dienstag, den 18.03.2014, 10:15 +0200 schrieb Tomi Valkeinen:
> > Add DT binding documentation for HDMI Connector.
> > 
> > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > Reviewed-by: Archit Taneja <archit@ti.com>
> > ---
> > 
> >  .../devicetree/bindings/video/hdmi-connector.txt   | 28 +++++++++++++++++
> >  1 file changed, 28 insertions(+)
> >  create mode 100644
> >  Documentation/devicetree/bindings/video/hdmi-connector.txt> 
> > diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt
> > b/Documentation/devicetree/bindings/video/hdmi-connector.txt new file
> > mode 100644
> > index 000000000000..ccccc19e2573
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/video/hdmi-connector.txt
> > @@ -0,0 +1,28 @@
> > +HDMI Connector
> > +=======
> > +
> > +Required properties:
> > +- compatible: "hdmi-connector"
> > +- type: the HDMI connector type: "a", "b", "c", "d" or "e"
> > +
> > +Optional properties:
> > +- label: a symbolic name for the connector
> > +
> > +Required nodes:
> > +- Video port for HDMI input
> 
> Geert's comment also applies to all other connector types. These can be
> input connectors, too.

We might not need to define all the properties required by input connectors 
now, but we need to make sure that future extensions will be backward-
compatible. I don't see a problem in making the connector DT bindings depend 
on the direction as long as the direction is specified in the DT node, either 
explicitly or implicitly.

An obvious solution would be to have separate "hdmi-input-connector" and 
"hdmi-output-connector" compatible strings but I don't like that, as there's 
no difference in the HDMI connector itself, only in the usage.

We could also add a "direction" property (possibly later, with a default value 
of "output" in that case), or rely on the link direction, but in the latter 
case that would require reaching an agreement in the current link directions 
debate.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply

* Re: [PATCH 6/9] Doc/DT: Add DT binding documentation for MIPI DSI CM Panel
From: Laurent Pinchart @ 2014-03-18 12:43 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: devicetree, linux-fbdev, Russell King - ARM Linux, dri-devel,
	Andrzej Hajda, linux-arm-kernel, Sebastian Hesselbarth
In-Reply-To: <5327E8D3.5010907@ti.com>

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

Hi Tomi,

On Tuesday 18 March 2014 08:33:55 Tomi Valkeinen wrote:
> On 17/03/14 16:22, Laurent Pinchart wrote:
> >> +Example
> >> +-------
> >> +
> >> +lcd0: display {
> >> +	compatible = "tpo,taal", "panel-dsi-cm";
> >> +	label = "lcd0";
> >> +
> >> +	gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>;	/* 102, reset */
> > 
> > If the panel uses a TE GPIO but no reset GPIO, do you plan to express this
> > with a "hole" for the reset GPIO ? e.g. something like
> > 
> > 	gpios = <0>, <&gpio4 6 GPIO_ACTIVE_HIGH>;
> 
> Yes.
> 
> > Wouldn't it be better to split the gpios property into "reset-gpios" and
> > "te- gpios" ?
> 
> Yes, I can change it. I don't have a strong preference.
> 
> I've gotten similar comments for other bindings also, so I guess the
> preferred way is to use named "-gpios" properties for everything except
> the case where you really have multiple gpios with the same purpose?

That's my understanding, yes.

> The gpio binding documentation doesn't give much guidance on this.

-- 
Regards,

Laurent Pinchart

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: [PATCHv2 2/8] Doc/DT: Add DT binding documentation for Analog TV Connector
From: Tomi Valkeinen @ 2014-03-18  8:52 UTC (permalink / raw)
  To: Geert Uytterhoeven, Philipp Zabel
  Cc: devicetree@vger.kernel.org, Linux Fbdev development list,
	Russell King - ARM Linux, Sascha Hauer, Tomasz Figa,
	DRI Development, Inki Dae, Andrzej Hajda, Rob Clark,
	Thierry Reding, Laurent Pinchart, Daniel Vetter, Archit Taneja,
	linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth
In-Reply-To: <CAMuHMdVhh_qqXvUP9zUo0iCJ=O6bLqp-qTdaMQNLNcVgAgROBg@mail.gmail.com>

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

On 18/03/14 10:40, Geert Uytterhoeven wrote:
> Hi Tomi,
> 
> On Tue, Mar 18, 2014 at 9:15 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/video/analog-tv-connector.txt
>> @@ -0,0 +1,25 @@
>> +Analog TV Connector
>> +===================
>> +
>> +Required properties:
>> +- compatible: "composite-connector" or "svideo-connector"
>> +
>> +Optional properties:
>> +- label: a symbolic name for the connector
>> +
>> +Required nodes:
>> +- Video port for TV input
> 
> Only input, not output?

Yes, I have only made the bindings for display. I have no experience on
the capture side. I can change the port bindings for the connectors to
say they may be input or output, but I have to say I have no idea
whether the bindings work for capture.

But this is also something that I think could be extended in the future,
when we have some code to actually use them on capture pipeline. For now
it may be safer to keep them only for display.

> Have you considered adding bindings for other analog connector types?
>   - composite (YCbCr),
>   - component with and without sync-on-green (RGB and RGBHV),
>   - D-terminal (D1/D2/D3/D4/D5).
> 
> Am I missing some?

No, I haven't. I have no experience on those, and generally very little
experience on analog video. I've added bindings only for the hardware I
have.

If there are lots of different analog TV connectors, should I just split
the current "analog-tv-connector" into separate composite and svideo,
instead of trying to manage them with a single one? The reason I
combined composite and svideo was that there didn't seem anything else
to specify than the connector type.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCHv2 4/8] Doc/DT: Add DT binding documentation for HDMI Connector
From: Philipp Zabel @ 2014-03-18  8:43 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: devicetree, linux-fbdev, Russell King - ARM Linux, dri-devel,
	Andrzej Hajda, Geert Uytterhoeven, Laurent Pinchart, Rob Herring,
	linux-arm-kernel, Sebastian Hesselbarth
In-Reply-To: <1395130547-18633-5-git-send-email-tomi.valkeinen@ti.com>

Hi Tomi,

Am Dienstag, den 18.03.2014, 10:15 +0200 schrieb Tomi Valkeinen:
> Add DT binding documentation for HDMI Connector.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Reviewed-by: Archit Taneja <archit@ti.com>
> ---
>  .../devicetree/bindings/video/hdmi-connector.txt   | 28 ++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt
> 
> diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt b/Documentation/devicetree/bindings/video/hdmi-connector.txt
> new file mode 100644
> index 000000000000..ccccc19e2573
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/video/hdmi-connector.txt
> @@ -0,0 +1,28 @@
> +HDMI Connector
> +=======
> +
> +Required properties:
> +- compatible: "hdmi-connector"
> +- type: the HDMI connector type: "a", "b", "c", "d" or "e"
> +
> +Optional properties:
> +- label: a symbolic name for the connector
> +
> +Required nodes:
> +- Video port for HDMI input

Geert's comment also applies to all other connector types. These can be
input connectors, too.

regards
Philipp



^ permalink raw reply

* Re: [PATCHv2 2/8] Doc/DT: Add DT binding documentation for Analog TV Connector
From: Geert Uytterhoeven @ 2014-03-18  8:40 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: devicetree@vger.kernel.org, Linux Fbdev development list,
	Russell King - ARM Linux, DRI Development, Andrzej Hajda,
	Rob Herring, Laurent Pinchart,
	linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth
In-Reply-To: <1395130547-18633-3-git-send-email-tomi.valkeinen@ti.com>

Hi Tomi,

On Tue, Mar 18, 2014 at 9:15 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/video/analog-tv-connector.txt
> @@ -0,0 +1,25 @@
> +Analog TV Connector
> +=========> +
> +Required properties:
> +- compatible: "composite-connector" or "svideo-connector"
> +
> +Optional properties:
> +- label: a symbolic name for the connector
> +
> +Required nodes:
> +- Video port for TV input

Only input, not output?

Have you considered adding bindings for other analog connector types?
  - composite (YCbCr),
  - component with and without sync-on-green (RGB and RGBHV),
  - D-terminal (D1/D2/D3/D4/D5).

Am I missing some?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* [PATCHv2 8/8] Doc/DT: Add DT binding documentation for tpd12s015 encoder
From: Tomi Valkeinen @ 2014-03-18  8:15 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Philipp Zabel, Laurent Pinchart, Russell King - ARM Linux,
	Sascha Hauer, Sebastian Hesselbarth, Rob Clark, Inki Dae,
	Andrzej Hajda, Tomasz Figa, Thierry Reding, Geert Uytterhoeven,
	Rob Herring, Daniel Vetter, Archit Taneja, Tomi Valkeinen
In-Reply-To: <1395130547-18633-1-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>

Add DT binding documentation for tpd12s015 encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
---
 .../devicetree/bindings/video/ti,tpd12s015.txt     | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt

diff --git a/Documentation/devicetree/bindings/video/ti,tpd12s015.txt b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt
new file mode 100644
index 000000000000..26e6d32e3f20
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt
@@ -0,0 +1,44 @@
+TPD12S015 HDMI level shifter and ESD protection chip
+==========================
+
+Required properties:
+- compatible: "ti,tpd12s015"
+
+Optional properties:
+- gpios: CT CP HPD, LS OE and HPD gpios
+
+Required nodes:
+- Video port 0 for HDMI input
+- Video port 1 for HDMI output
+
+Example
+-------
+
+tpd12s015: encoder@1 {
+	compatible = "ti,tpd12s015";
+
+	gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+		<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+		<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			tpd12s015_in: endpoint@0 {
+				remote-endpoint = <&hdmi_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			tpd12s015_out: endpoint@0 {
+				remote-endpoint = <&hdmi_connector_in>;
+			};
+		};
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related

* [PATCHv2 7/8] Doc/DT: Add DT binding documentation for TFP410 encoder
From: Tomi Valkeinen @ 2014-03-18  8:15 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Philipp Zabel, Laurent Pinchart, Russell King - ARM Linux,
	Sascha Hauer, Sebastian Hesselbarth, Rob Clark, Inki Dae,
	Andrzej Hajda, Tomasz Figa, Thierry Reding, Geert Uytterhoeven,
	Rob Herring, Daniel Vetter, Archit Taneja, Tomi Valkeinen
In-Reply-To: <1395130547-18633-1-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>

Add DT binding documentation for TFP410 encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
---
 .../devicetree/bindings/video/ti,tfp410.txt        | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt

diff --git a/Documentation/devicetree/bindings/video/ti,tfp410.txt b/Documentation/devicetree/bindings/video/ti,tfp410.txt
new file mode 100644
index 000000000000..2cbe32a3d0bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,tfp410.txt
@@ -0,0 +1,41 @@
+TFP410 DPI to DVI encoder
+============+
+Required properties:
+- compatible: "ti,tfp410"
+
+Optional properties:
+- powerdown-gpios: power-down gpio
+
+Required nodes:
+- Video port 0 for DPI input
+- Video port 1 for DVI output
+
+Example
+-------
+
+tfp410: encoder@0 {
+	compatible = "ti,tfp410";
+	powerdown-gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			tfp410_in: endpoint@0 {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			tfp410_out: endpoint@0 {
+				remote-endpoint = <&dvi_connector_in>;
+			};
+		};
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related

* [PATCHv2 6/8] Doc/DT: Add DT binding documentation for Sony acx565akm panel
From: Tomi Valkeinen @ 2014-03-18  8:15 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Philipp Zabel, Laurent Pinchart, Russell King - ARM Linux,
	Sascha Hauer, Sebastian Hesselbarth, Rob Clark, Inki Dae,
	Andrzej Hajda, Tomasz Figa, Thierry Reding, Geert Uytterhoeven,
	Rob Herring, Daniel Vetter, Archit Taneja, Tomi Valkeinen
In-Reply-To: <1395130547-18633-1-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>

Add DT binding documentation for Sony acx565akm panel

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Sebastian Reichel <sre@debian.org>
Reviewed-by: Archit Taneja <archit@ti.com>
---
 .../devicetree/bindings/video/sony,acx565akm.txt   | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt

diff --git a/Documentation/devicetree/bindings/video/sony,acx565akm.txt b/Documentation/devicetree/bindings/video/sony,acx565akm.txt
new file mode 100644
index 000000000000..e12333280749
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/sony,acx565akm.txt
@@ -0,0 +1,30 @@
+Sony ACX565AKM SDI Panel
+============
+
+Required properties:
+- compatible: "sony,acx565akm"
+
+Optional properties:
+- label: a symbolic name for the panel
+- reset-gpios: panel reset gpio
+
+Required nodes:
+- Video port for SDI input
+
+Example
+-------
+
+acx565akm@2 {
+	compatible = "sony,acx565akm";
+	spi-max-frequency = <6000000>;
+	reg = <2>;
+
+	label = "lcd";
+	reset-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */
+
+	port {
+		lcd_in: endpoint {
+			remote-endpoint = <&sdi_out>;
+		};
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox