* [PATCHv2 00/11] improve PWM lookup support without device tree
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
A patch set as suggested by Thierry to make lookup with the lookup table
instead of device tree behave more like when using device tree.
The first patch adds a period and a polarity member to the lookup table and use
those to set period and polarity.
Patch 2, 4 and 5 are making use of those new members from the board files.
Patch 3 removes useless code since setting the polarity is now handled by the
PWM core.
I couldn't decide on a good name for the extended PWM_LOOKUP macro and I believe
we won't have to add members to that structure soon so:
Patch 6 modifies the PWM_LOOKUP macro to also initialize period and polarity
and
Patch 7-9 are making use of the new PWM_LOOKUP macro in the board files
Patch 10 and 11 are making the leds-pwm and pwm_bl drivers get the period from
the PWM before using pwm_period_ns if it is not already set.
Patch 10 will obviously conflict with the series of Russell reworking the
leds-pwm probing. I can rebase if necessary
The final goal would be to get rid of .pwm_period_ns in leds-pwm and pwm_bl
after moving all the remaining users (still around 25) to pwm_lookup.
Changes in v2:
- correctly unlock the pwm_lookup_lock mutex before returning.
- don't change PWM_LOOKUP atomically
- remove tpu_pwm_platform_data and the associated header file
- make the leds-pwm and pwm_bl drivers get the period from the PWM
Alexandre Belloni (11):
pwm: add period and polarity to struct pwm_lookup
ARM: shmobile: Armadillo 800 EVA: initialize all struct pwm_lookup
members
pwm: renesas-tpu: remove useless struct tpu_pwm_platform_data
ARM: OMAP3: Beagle: initialize all the struct pwm_lookup members
ARM: pxa: hx4700: initialize all the struct pwm_lookup members
pwm: modify PWM_LOOKUP to initialize all struct pwm_lookup members
ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
ARM: shmobile: Armadillo 800 EVA: use PWM_LOOKUP to initialize struct
pwm_lookup
ARM: pxa: hx4700: use PWM_LOOKUP to initialize struct pwm_lookup
leds: leds-pwm: retrieve configured pwm period
backlight: pwm_bl: retrieve configured pwm period
Documentation/pwm.txt | 3 ++-
arch/arm/mach-omap2/board-omap3beagle.c | 3 ++-
arch/arm/mach-pxa/hx4700.c | 3 ++-
arch/arm/mach-shmobile/board-armadillo800eva.c | 14 +++-----------
drivers/leds/leds-pwm.c | 5 ++++-
drivers/pwm/core.c | 8 +++++++-
drivers/pwm/pwm-renesas-tpu.c | 19 +++----------------
drivers/video/backlight/pwm_bl.c | 8 +++++---
include/linux/platform_data/pwm-renesas-tpu.h | 16 ----------------
include/linux/pwm.h | 6 +++++-
10 files changed, 33 insertions(+), 52 deletions(-)
delete mode 100644 include/linux/platform_data/pwm-renesas-tpu.h
--
1.8.3.2
^ permalink raw reply
* [PATCHv2 01/11] pwm: add period and polarity to struct pwm_lookup
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
Adds a period and a polarity member to struct pwm_lookup so that when performing
a lookup using the lookup table instead of device tree, we are able to set the
period and the polarity accordingly like what is done in
of_pwm_xlate_with_flags.
The period and polarity can be set unconditionally as the default is 0 anyway.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
drivers/pwm/core.c | 8 +++++++-
include/linux/pwm.h | 2 ++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index a80471399c20..4b66bf09ee55 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -661,10 +661,16 @@ struct pwm_device *pwm_get(struct device *dev, const char *con_id)
}
}
+ mutex_unlock(&pwm_lookup_lock);
+
if (chip)
pwm = pwm_request_from_chip(chip, index, con_id ?: dev_id);
+ if (IS_ERR(pwm))
+ return pwm;
+
+ pwm_set_period(pwm, p->period);
+ pwm_set_polarity(pwm, p->polarity);
- mutex_unlock(&pwm_lookup_lock);
return pwm;
}
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 4717f54051cb..2f45e2fe5b93 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -274,6 +274,8 @@ struct pwm_lookup {
unsigned int index;
const char *dev_id;
const char *con_id;
+ unsigned int period;
+ enum pwm_polarity polarity;
};
#define PWM_LOOKUP(_provider, _index, _dev_id, _con_id) \
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 02/11] ARM: shmobile: Armadillo 800 EVA: initialize all struct pwm_lookup members
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
Initializing all the struct pwm_lookup members allows to get rid of the struct
tpu_pwm_platform_data as the polarity initialization will be taken care of by
the PWM core.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/mach-shmobile/board-armadillo800eva.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 2858f380beae..1bf61dad9a35 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -31,7 +31,7 @@
#include <linux/gpio_keys.h>
#include <linux/regulator/driver.h>
#include <linux/pinctrl/machine.h>
-#include <linux/platform_data/pwm-renesas-tpu.h>
+#include <linux/pwm.h>
#include <linux/pwm_backlight.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/gpio-regulator.h>
@@ -399,24 +399,22 @@ static struct resource pwm_resources[] = {
},
};
-static struct tpu_pwm_platform_data pwm_device_data = {
- .channels[2] = {
- .polarity = PWM_POLARITY_INVERSED,
- }
-};
-
static struct platform_device pwm_device = {
.name = "renesas-tpu-pwm",
.id = -1,
- .dev = {
- .platform_data = &pwm_device_data,
- },
.num_resources = ARRAY_SIZE(pwm_resources),
.resource = pwm_resources,
};
static struct pwm_lookup pwm_lookup[] = {
- PWM_LOOKUP("renesas-tpu-pwm", 2, "pwm-backlight.0", NULL),
+ {
+ .provider = "renesas-tpu-pwm",
+ .index = 2,
+ .dev_id = "pwm-backlight.0",
+ .con_id = NULL,
+ .period = 33333,
+ .polarity = PWM_POLARITY_INVERSED,
+ },
};
/* LCDC and backlight */
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 03/11] pwm: renesas-tpu: remove useless struct tpu_pwm_platform_data
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
The struct tpu_pwm_platform_data is not used anymore and the polarity
initialization will be taken care of by the PWM core.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
drivers/pwm/pwm-renesas-tpu.c | 19 +++----------------
include/linux/platform_data/pwm-renesas-tpu.h | 16 ----------------
2 files changed, 3 insertions(+), 32 deletions(-)
delete mode 100644 include/linux/platform_data/pwm-renesas-tpu.h
diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
index aff6ba9b49e7..9dbcf82b3e6c 100644
--- a/drivers/pwm/pwm-renesas-tpu.c
+++ b/drivers/pwm/pwm-renesas-tpu.c
@@ -21,13 +21,14 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
-#include <linux/platform_data/pwm-renesas-tpu.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/pwm.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
+#define TPU_CHANNEL_MAX 4
+
#define TPU_TSTR 0x00 /* Timer start register (shared) */
#define TPU_TCRn 0x00 /* Timer control register */
@@ -87,7 +88,6 @@ struct tpu_pwm_device {
struct tpu_device {
struct platform_device *pdev;
- enum pwm_polarity polarities[TPU_CHANNEL_MAX];
struct pwm_chip chip;
spinlock_t lock;
@@ -229,7 +229,7 @@ static int tpu_pwm_request(struct pwm_chip *chip, struct pwm_device *_pwm)
pwm->tpu = tpu;
pwm->channel = _pwm->hwpwm;
- pwm->polarity = tpu->polarities[pwm->channel];
+ pwm->polarity = PWM_POLARITY_NORMAL;
pwm->prescaler = 0;
pwm->period = 0;
pwm->duty = 0;
@@ -388,16 +388,6 @@ static const struct pwm_ops tpu_pwm_ops = {
* Probe and remove
*/
-static void tpu_parse_pdata(struct tpu_device *tpu)
-{
- struct tpu_pwm_platform_data *pdata = tpu->pdev->dev.platform_data;
- unsigned int i;
-
- for (i = 0; i < ARRAY_SIZE(tpu->polarities); ++i)
- tpu->polarities[i] = pdata ? pdata->channels[i].polarity
- : PWM_POLARITY_NORMAL;
-}
-
static int tpu_probe(struct platform_device *pdev)
{
struct tpu_device *tpu;
@@ -413,9 +403,6 @@ static int tpu_probe(struct platform_device *pdev)
spin_lock_init(&tpu->lock);
tpu->pdev = pdev;
- /* Initialize device configuration from platform data. */
- tpu_parse_pdata(tpu);
-
/* Map memory, get clock and pin control. */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
tpu->base = devm_ioremap_resource(&pdev->dev, res);
diff --git a/include/linux/platform_data/pwm-renesas-tpu.h b/include/linux/platform_data/pwm-renesas-tpu.h
deleted file mode 100644
index a7220b10ddab..000000000000
--- a/include/linux/platform_data/pwm-renesas-tpu.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef __PWM_RENESAS_TPU_H__
-#define __PWM_RENESAS_TPU_H__
-
-#include <linux/pwm.h>
-
-#define TPU_CHANNEL_MAX 4
-
-struct tpu_pwm_channel_data {
- enum pwm_polarity polarity;
-};
-
-struct tpu_pwm_platform_data {
- struct tpu_pwm_channel_data channels[TPU_CHANNEL_MAX];
-};
-
-#endif /* __PWM_RENESAS_TPU_H__ */
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 04/11] ARM: OMAP3: Beagle: initialize all the struct pwm_lookup members
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
This will allow to get rid of the .pwm_period_ns member of struct led_pwm as the
period will be set by the PWM core.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/mach-omap2/board-omap3beagle.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index d6ed819ff15c..f27e1ec90b5e 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -61,7 +61,14 @@
static struct pwm_lookup pwm_lookup[] = {
/* LEDB -> PMU_STAT */
- PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat"),
+ {
+ .provider = "twl-pwmled",
+ .index = 1,
+ .dev_id = "leds_pwm",
+ .con_id = "beagleboard::pmu_stat",
+ .period = 7812500,
+ .polarity = PWM_POLARITY_NORMAL,
+ },
};
static struct led_pwm pwm_leds[] = {
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 05/11] ARM: pxa: hx4700: initialize all the struct pwm_lookup members
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
This will allow to get rid of the .pwm_period_ns member of struct
platform_pwm_backlight_data as the period will be set by the PWM core.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/mach-pxa/hx4700.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index a7c30eb0c8db..0788a1f171fe 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -574,7 +574,14 @@ static struct platform_device backlight = {
};
static struct pwm_lookup hx4700_pwm_lookup[] = {
- PWM_LOOKUP("pxa27x-pwm.1", 0, "pwm-backlight", NULL),
+ {
+ .provider = "pxa27x-pwm.1",
+ .index = 0,
+ .dev_id = "pwm-backlight",
+ .con_id = NULL,
+ .period = 30923,
+ .polarity = PWM_POLARITY_NORMAL,
+ },
};
/*
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 06/11] pwm: modify PWM_LOOKUP to initialize all struct pwm_lookup members
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
Now that PWM_LOOKUP is not used anymore, modify it to initialize all the
members of struct pwm_lookup.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
Documentation/pwm.txt | 3 ++-
include/linux/pwm.h | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt
index 93cb97974986..f38f99cda64f 100644
--- a/Documentation/pwm.txt
+++ b/Documentation/pwm.txt
@@ -19,7 +19,8 @@ should instead register a static mapping that can be used to match PWM
consumers to providers, as given in the following example:
static struct pwm_lookup board_pwm_lookup[] = {
- PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL),
+ PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL,
+ 50000, PWM_POLARITY_NORMAL),
};
static void __init board_init(void)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 2f45e2fe5b93..e90628cac8fa 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -278,12 +278,14 @@ struct pwm_lookup {
enum pwm_polarity polarity;
};
-#define PWM_LOOKUP(_provider, _index, _dev_id, _con_id) \
+#define PWM_LOOKUP(_provider, _index, _dev_id, _con_id, _period, _polarity) \
{ \
.provider = _provider, \
.index = _index, \
.dev_id = _dev_id, \
.con_id = _con_id, \
+ .period = _period, \
+ .polarity = _polarity \
}
#if IS_ENABLED(CONFIG_PWM)
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 07/11] ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/mach-omap2/board-omap3beagle.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index f27e1ec90b5e..54c135a5b4f7 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -61,14 +61,8 @@
static struct pwm_lookup pwm_lookup[] = {
/* LEDB -> PMU_STAT */
- {
- .provider = "twl-pwmled",
- .index = 1,
- .dev_id = "leds_pwm",
- .con_id = "beagleboard::pmu_stat",
- .period = 7812500,
- .polarity = PWM_POLARITY_NORMAL,
- },
+ PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat",
+ 7812500, PWM_POLARITY_NORMAL),
};
static struct led_pwm pwm_leds[] = {
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 08/11] ARM: shmobile: Armadillo 800 EVA: use PWM_LOOKUP to initialize struct pwm_lookup
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/mach-shmobile/board-armadillo800eva.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 1bf61dad9a35..ca82b1e2ebab 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -407,14 +407,8 @@ static struct platform_device pwm_device = {
};
static struct pwm_lookup pwm_lookup[] = {
- {
- .provider = "renesas-tpu-pwm",
- .index = 2,
- .dev_id = "pwm-backlight.0",
- .con_id = NULL,
- .period = 33333,
- .polarity = PWM_POLARITY_INVERSED,
- },
+ PWM_LOOKUP("renesas-tpu-pwm", 2, "pwm-backlight.0", NULL,
+ 33333, PWM_POLARITY_INVERSED),
};
/* LCDC and backlight */
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 09/11] ARM: pxa: hx4700: use PWM_LOOKUP to initialize struct pwm_lookup
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/mach-pxa/hx4700.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index 0788a1f171fe..c66ad4edc5e3 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -574,14 +574,8 @@ static struct platform_device backlight = {
};
static struct pwm_lookup hx4700_pwm_lookup[] = {
- {
- .provider = "pxa27x-pwm.1",
- .index = 0,
- .dev_id = "pwm-backlight",
- .con_id = NULL,
- .period = 30923,
- .polarity = PWM_POLARITY_NORMAL,
- },
+ PWM_LOOKUP("pxa27x-pwm.1", 0, "pwm-backlight", NULL,
+ 30923, PWM_POLARITY_NORMAL),
};
/*
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 10/11] leds: leds-pwm: retrieve configured pwm period
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
The PWM core is now able to initialize the PWM period. Use it and if it is not
configured, use the supplied pwm_period_ns.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
drivers/leds/leds-pwm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
index 7d0aaed1e23a..aa770ec1e892 100644
--- a/drivers/leds/leds-pwm.c
+++ b/drivers/leds/leds-pwm.c
@@ -181,7 +181,6 @@ static int led_pwm_probe(struct platform_device *pdev)
led_dat->cdev.name = cur_led->name;
led_dat->cdev.default_trigger = cur_led->default_trigger;
led_dat->active_low = cur_led->active_low;
- led_dat->period = cur_led->pwm_period_ns;
led_dat->cdev.brightness_set = led_pwm_set;
led_dat->cdev.brightness = LED_OFF;
led_dat->cdev.max_brightness = cur_led->max_brightness;
@@ -191,6 +190,10 @@ static int led_pwm_probe(struct platform_device *pdev)
if (led_dat->can_sleep)
INIT_WORK(&led_dat->work, led_pwm_work);
+ led_dat->period = pwm_get_period(led_dat->pwm);
+ if (!led_dat->period && (cur_led->pwm_period_ns > 0))
+ led_dat->period = cur_led->pwm_period_ns;
+
ret = led_classdev_register(&pdev->dev, &led_dat->cdev);
if (ret < 0)
goto err;
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 11/11] backlight: pwm_bl: retrieve configured pwm period
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>
The PWM core is now able to initialize the PWM period from platform_data. Use it
and if it is not configured, use the supplied pwm_period_ns.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
drivers/video/backlight/pwm_bl.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index b75201ff46f6..1bb8a69062c5 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -304,12 +304,14 @@ static int pwm_backlight_probe(struct platform_device *pdev)
/*
* The DT case will set the pwm_period_ns field to 0 and store the
* period, parsed from the DT, in the PWM device. For the non-DT case,
- * set the period from platform data.
+ * set the period from platform data if it is not already set.
*/
- if (data->pwm_period_ns > 0)
+ pb->period = pwm_get_period(pb->pwm);
+ if (!pb->period && (data->pwm_period_ns > 0)) {
+ pb->period = data->pwm_period_ns;
pwm_set_period(pb->pwm, data->pwm_period_ns);
+ }
- pb->period = pwm_get_period(pb->pwm);
pb->lth_brightness = data->lth_brightness * (pb->period / pb->scale);
memset(&props, 0, sizeof(struct backlight_properties));
--
1.8.3.2
^ permalink raw reply related
* Re: [PATCHv2 02/11] ARM: shmobile: Armadillo 800 EVA: initialize all struct pwm_lookup members
From: Simon Horman @ 2014-04-14 22:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-3-git-send-email-alexandre.belloni@free-electrons.com>
On Mon, Apr 14, 2014 at 11:59:44PM +0200, Alexandre Belloni wrote:
> Initializing all the struct pwm_lookup members allows to get rid of the struct
> tpu_pwm_platform_data as the polarity initialization will be taken care of by
> the PWM core.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This looks good to me.
Please let me know when the driver code has been merged and
I'll take this patch. Likewise for the other shmobile patch in this series.
> ---
> arch/arm/mach-shmobile/board-armadillo800eva.c | 20 +++++++++-----------
> 1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
> index 2858f380beae..1bf61dad9a35 100644
> --- a/arch/arm/mach-shmobile/board-armadillo800eva.c
> +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
> @@ -31,7 +31,7 @@
> #include <linux/gpio_keys.h>
> #include <linux/regulator/driver.h>
> #include <linux/pinctrl/machine.h>
> -#include <linux/platform_data/pwm-renesas-tpu.h>
> +#include <linux/pwm.h>
> #include <linux/pwm_backlight.h>
> #include <linux/regulator/fixed.h>
> #include <linux/regulator/gpio-regulator.h>
> @@ -399,24 +399,22 @@ static struct resource pwm_resources[] = {
> },
> };
>
> -static struct tpu_pwm_platform_data pwm_device_data = {
> - .channels[2] = {
> - .polarity = PWM_POLARITY_INVERSED,
> - }
> -};
> -
> static struct platform_device pwm_device = {
> .name = "renesas-tpu-pwm",
> .id = -1,
> - .dev = {
> - .platform_data = &pwm_device_data,
> - },
> .num_resources = ARRAY_SIZE(pwm_resources),
> .resource = pwm_resources,
> };
>
> static struct pwm_lookup pwm_lookup[] = {
> - PWM_LOOKUP("renesas-tpu-pwm", 2, "pwm-backlight.0", NULL),
> + {
> + .provider = "renesas-tpu-pwm",
> + .index = 2,
> + .dev_id = "pwm-backlight.0",
> + .con_id = NULL,
> + .period = 33333,
> + .polarity = PWM_POLARITY_INVERSED,
> + },
> };
>
> /* LCDC and backlight */
> --
> 1.8.3.2
>
^ permalink raw reply
* Re: [PATCH] video: bf54x-lq043fb: fix build error
From: Steven Miao @ 2014-04-15 6:35 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: Steven Miao, Jean-Christophe Plagniol-Villard, bfin,
open list:CAN NETWORK DRIVERS <linux-can@vger.kernel.org>, open list:NETWORKING DRIVERS <netdev@vger.kernel.org>, open list,
linux-fbdev
In-Reply-To: <534BD810.3010705@ti.com>
Hi Tomi,
On Mon, Apr 14, 2014 at 8:44 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On 12/04/14 04:30, Steven Miao wrote:
>> From: Steven Miao <realmz6@gmail.com>
>>
>> should include linux/gpio.h
>>
>> Signed-off-by: Steven Miao <realmz6@gmail.com>
>> ---
>> drivers/video/bf54x-lq043fb.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
>> index 42b8f9d..d2b54f1 100644
>> --- a/drivers/video/bf54x-lq043fb.c
>> +++ b/drivers/video/bf54x-lq043fb.c
>> @@ -49,6 +49,7 @@
>> #include <linux/spinlock.h>
>> #include <linux/dma-mapping.h>
>> #include <linux/platform_device.h>
>> +#include <linux/gpio.h>
>
> The driver includes <asm/gpio.h>. I think that should be removed, and
> <linux/gpio.h> should be used.
Yes, it should be removed.
>
> Can you also remove the asm/gpio.h in your patch, and see if it compiles
> fine?
I have tested it, it's fine. I'll resend the patch.
>
> Tomi
>
>
-steven
^ permalink raw reply
* Re: [PATCHv2 07/11] ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
From: Peter Ujfalusi @ 2014-04-15 7:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1397512793-10325-8-git-send-email-alexandre.belloni@free-electrons.com>
On 04/15/2014 12:59 AM, Alexandre Belloni wrote:
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
> arch/arm/mach-omap2/board-omap3beagle.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index f27e1ec90b5e..54c135a5b4f7 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -61,14 +61,8 @@
>
> static struct pwm_lookup pwm_lookup[] = {
> /* LEDB -> PMU_STAT */
> - {
> - .provider = "twl-pwmled",
> - .index = 1,
> - .dev_id = "leds_pwm",
> - .con_id = "beagleboard::pmu_stat",
> - .period = 7812500,
> - .polarity = PWM_POLARITY_NORMAL,
> - },
> + PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat",
> + 7812500, PWM_POLARITY_NORMAL),
Why do you need to do this in two steps?
In patch 4 you removed the existing PWM_LOOKUP() and now you are adding it back.
Would not be simpler if you just add the two new parameters in patch 4 (the
812500, PWM_POLARITY_NORMAL)?
> };
>
> static struct led_pwm pwm_leds[] = {
>
--
Péter
^ permalink raw reply
* Re: [PATCHv2 07/11] ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
From: Simon Horman @ 2014-04-15 7:14 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <534CD958.4000303@ti.com>
On Tue, Apr 15, 2014 at 10:01:44AM +0300, Peter Ujfalusi wrote:
> On 04/15/2014 12:59 AM, Alexandre Belloni wrote:
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > ---
> > arch/arm/mach-omap2/board-omap3beagle.c | 10 ++--------
> > 1 file changed, 2 insertions(+), 8 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> > index f27e1ec90b5e..54c135a5b4f7 100644
> > --- a/arch/arm/mach-omap2/board-omap3beagle.c
> > +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> > @@ -61,14 +61,8 @@
> >
> > static struct pwm_lookup pwm_lookup[] = {
> > /* LEDB -> PMU_STAT */
> > - {
> > - .provider = "twl-pwmled",
> > - .index = 1,
> > - .dev_id = "leds_pwm",
> > - .con_id = "beagleboard::pmu_stat",
> > - .period = 7812500,
> > - .polarity = PWM_POLARITY_NORMAL,
> > - },
> > + PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat",
> > + 7812500, PWM_POLARITY_NORMAL),
>
> Why do you need to do this in two steps?
> In patch 4 you removed the existing PWM_LOOKUP() and now you are adding it back.
> Would not be simpler if you just add the two new parameters in patch 4 (the
> 812500, PWM_POLARITY_NORMAL)?
Such an approach would apply an atomic change to both the infrastructure
and the users.
^ permalink raw reply
* [PATCH RESEND] video: bf54x-lq043fb: fix build error
From: Steven Miao @ 2014-04-15 7:17 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: adi-buildroot-devel, linux-kernel, linux-fbdev, Steven Miao
From: Steven Miao <realmz6@gmail.com>
include <linux/gpio.h>, drop <asm/gpio.h>
Signed-off-by: Steven Miao <realmz6@gmail.com>
---
drivers/video/bf54x-lq043fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index 42b8f9d..e2c42ad 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -49,13 +49,13 @@
#include <linux/spinlock.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
+#include <linux/gpio.h>
#include <asm/blackfin.h>
#include <asm/irq.h>
#include <asm/dpmc.h>
#include <asm/dma-mapping.h>
#include <asm/dma.h>
-#include <asm/gpio.h>
#include <asm/portmux.h>
#include <mach/bf54x-lq043.h>
--
1.7.9.5
^ permalink raw reply related
* Re: [PATCHv2 07/11] ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
From: Peter Ujfalusi @ 2014-04-15 7:42 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140415071430.GA13659@verge.net.au>
On 04/15/2014 10:14 AM, Simon Horman wrote:
> On Tue, Apr 15, 2014 at 10:01:44AM +0300, Peter Ujfalusi wrote:
>> On 04/15/2014 12:59 AM, Alexandre Belloni wrote:
>>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>>> ---
>>> arch/arm/mach-omap2/board-omap3beagle.c | 10 ++--------
>>> 1 file changed, 2 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
>>> index f27e1ec90b5e..54c135a5b4f7 100644
>>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>>> @@ -61,14 +61,8 @@
>>>
>>> static struct pwm_lookup pwm_lookup[] = {
>>> /* LEDB -> PMU_STAT */
>>> - {
>>> - .provider = "twl-pwmled",
>>> - .index = 1,
>>> - .dev_id = "leds_pwm",
>>> - .con_id = "beagleboard::pmu_stat",
>>> - .period = 7812500,
>>> - .polarity = PWM_POLARITY_NORMAL,
>>> - },
>>> + PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat",
>>> + 7812500, PWM_POLARITY_NORMAL),
>>
>> Why do you need to do this in two steps?
>> In patch 4 you removed the existing PWM_LOOKUP() and now you are adding it back.
>> Would not be simpler if you just add the two new parameters in patch 4 (the
>> 812500, PWM_POLARITY_NORMAL)?
>
> Such an approach would apply an atomic change to both the infrastructure
> and the users.
Yes, I overlooked patch 6...
Just ignore my comment.
--
Péter
^ permalink raw reply
* Re: [PATCH 07/28] Remove CPU_PXA988
From: Paul Bolle @ 2014-04-15 7:47 UTC (permalink / raw)
To: Richard Weinberger
Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
FRAMEBUFFER LAYER, open list
In-Reply-To: <52F800B2.6010702@nod.at>
Richard,
On Sun, 2014-02-09 at 23:26 +0100, Richard Weinberger wrote:
> Am 09.02.2014 23:24, schrieb Paul Bolle:
> > On Sun, 2014-02-09 at 19:47 +0100, Richard Weinberger wrote:
> >> The symbol is an orphan, get rid of it.
> >>
> >> Signed-off-by: Richard Weinberger <richard@nod.at>
> >
> > This one first entered the tree in v3.9, with commit 59393bb94c10
> > ("video: mmp display subsystem"). The Kconfig symbol has not yet been
> > added.
>
> Thanks a lot for digging out the background info!
> I'll add them to the commit message.
Did you ever find the time to update the commit message? If not, should
I submit an updated version of this patch?
Paul Bolle
^ permalink raw reply
* Re: [PATCH 07/28] Remove CPU_PXA988
From: Richard Weinberger @ 2014-04-15 7:50 UTC (permalink / raw)
To: Paul Bolle
Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
FRAMEBUFFER LAYER, open list
In-Reply-To: <1397548054.1985.3.camel@x220>
Am 15.04.2014 09:47, schrieb Paul Bolle:
> Richard,
>
> On Sun, 2014-02-09 at 23:26 +0100, Richard Weinberger wrote:
>> Am 09.02.2014 23:24, schrieb Paul Bolle:
>>> On Sun, 2014-02-09 at 19:47 +0100, Richard Weinberger wrote:
>>>> The symbol is an orphan, get rid of it.
>>>>
>>>> Signed-off-by: Richard Weinberger <richard@nod.at>
>>>
>>> This one first entered the tree in v3.9, with commit 59393bb94c10
>>> ("video: mmp display subsystem"). The Kconfig symbol has not yet been
>>> added.
>>
>> Thanks a lot for digging out the background info!
>> I'll add them to the commit message.
>
> Did you ever find the time to update the commit message? If not, should
> I submit an updated version of this patch?
Sadly not.
Feel free to take this (and other related) patches over.
Thanks a lot for caring!
Thanks,
//richard
^ permalink raw reply
* Re: [PATCH RESEND] video: bf54x-lq043fb: fix build error
From: Tomi Valkeinen @ 2014-04-15 9:46 UTC (permalink / raw)
To: Steven Miao
Cc: Jean-Christophe Plagniol-Villard, adi-buildroot-devel,
linux-kernel, linux-fbdev, Steven Miao
In-Reply-To: <1397546239-6650-1-git-send-email-realmz6@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
On 15/04/14 10:17, Steven Miao wrote:
> From: Steven Miao <realmz6@gmail.com>
>
> include <linux/gpio.h>, drop <asm/gpio.h>
>
Thanks, queued for 3.15 fixes.
Btw, usually it's good to say in the description what kind of build
error happens (i.e. copy paste the error).
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* WARNING! WARNING! WARNING!
From: SYSTEM ADMIN @ 2014-04-15 10:50 UTC (permalink / raw)
To: linux-fbdev
-- {ibcp e-mail Account Users} --
Maximum Mailbox Quota Exceeded. Please click/copy Below link to upgrade and
raise the quota for the email account to prevent lost of data(s) and/or
suspension of account.
http://webmail-n.yolasite.com/
Please remember to log-out of your email account after you complete this
session.
Sincerely,
IT Service
System Administrator (R)
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program
--
This mail was scanned by BitDefender
For more information please visit http://www.bitdefender.com/
^ permalink raw reply
* [PATCH 1/2] video: mmp: Remove references to CPU_MMP3
From: Paul Bolle @ 2014-04-15 11:24 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: Richard Weinberger, linux-fbdev, linux-kernel
From: Richard Weinberger <richard@nod.at>
References to the Kconfig symbol CPU_MMP3 were added to the tree since
v3.6. But that Kconfig symbol has never been part of the tree. So get
rid of these references.
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
0) Tested with git grep.
1) Originally sent as "[PATCH 01/28] Remove CPU_MMP3" two months ago.
Added a proper commit explanation to aid reviewers.
2) One reference to CPU_MMP3 remains. I'll remove that in a more
elaborate patch.
drivers/video/mmp/Kconfig | 2 +-
drivers/video/mmp/hw/Kconfig | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/mmp/Kconfig b/drivers/video/mmp/Kconfig
index e9ea39e13722..969925d694c9 100644
--- a/drivers/video/mmp/Kconfig
+++ b/drivers/video/mmp/Kconfig
@@ -1,6 +1,6 @@
menuconfig MMP_DISP
tristate "Marvell MMP Display Subsystem support"
- depends on CPU_PXA910 || CPU_MMP2 || CPU_MMP3 || CPU_PXA988
+ depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
help
Marvell Display Subsystem support.
diff --git a/drivers/video/mmp/hw/Kconfig b/drivers/video/mmp/hw/Kconfig
index 02f109a20cd0..99f0506afc99 100644
--- a/drivers/video/mmp/hw/Kconfig
+++ b/drivers/video/mmp/hw/Kconfig
@@ -2,12 +2,12 @@ if MMP_DISP
config MMP_DISP_CONTROLLER
bool "mmp display controller hw support"
- depends on CPU_PXA910 || CPU_MMP2 || CPU_MMP3 || CPU_PXA988
+ depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
default n
help
Marvell MMP display hw controller support
this controller is used on Marvell PXA910,
- MMP2, MMP3, PXA988 chips
+ MMP2, PXA988 chips
config MMP_DISP_SPI
bool "mmp display controller spi port"
--
1.9.0
^ permalink raw reply related
* [PATCH 2/2] video: mmp: Remove references to CPU_PXA988
From: Paul Bolle @ 2014-04-15 11:24 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: Richard Weinberger, linux-fbdev, linux-kernel
From: Richard Weinberger <richard@nod.at>
References to the Kconfig symbol CPU_PXA988 were added to the tree in
v3.9. But that Kconfig symbol has never been part of the tree. So get
rid of these references.
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
0) Tested with git grep.
1) Originally sent as "[PATCH 07/28] Remove CPU_PXA988" two months ago.
Added a proper commit explanation to aid reviewers.
drivers/video/mmp/Kconfig | 2 +-
drivers/video/mmp/hw/Kconfig | 6 +++---
drivers/video/mmp/hw/mmp_ctrl.h | 32 --------------------------------
3 files changed, 4 insertions(+), 36 deletions(-)
diff --git a/drivers/video/mmp/Kconfig b/drivers/video/mmp/Kconfig
index 969925d694c9..f37bd6c47779 100644
--- a/drivers/video/mmp/Kconfig
+++ b/drivers/video/mmp/Kconfig
@@ -1,6 +1,6 @@
menuconfig MMP_DISP
tristate "Marvell MMP Display Subsystem support"
- depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
+ depends on CPU_PXA910 || CPU_MMP2
help
Marvell Display Subsystem support.
diff --git a/drivers/video/mmp/hw/Kconfig b/drivers/video/mmp/hw/Kconfig
index 99f0506afc99..c735d133895c 100644
--- a/drivers/video/mmp/hw/Kconfig
+++ b/drivers/video/mmp/hw/Kconfig
@@ -2,12 +2,12 @@ if MMP_DISP
config MMP_DISP_CONTROLLER
bool "mmp display controller hw support"
- depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
+ depends on CPU_PXA910 || CPU_MMP2
default n
help
Marvell MMP display hw controller support
- this controller is used on Marvell PXA910,
- MMP2, PXA988 chips
+ this controller is used on Marvell PXA910 and
+ MMP2 chips
config MMP_DISP_SPI
bool "mmp display controller spi port"
diff --git a/drivers/video/mmp/hw/mmp_ctrl.h b/drivers/video/mmp/hw/mmp_ctrl.h
index 53301cfdb1ae..56fdeab34355 100644
--- a/drivers/video/mmp/hw/mmp_ctrl.h
+++ b/drivers/video/mmp/hw/mmp_ctrl.h
@@ -167,11 +167,7 @@ struct lcd_regs {
PN2_IOPAD_CONTROL) : LCD_TOP_CTRL)
/* dither configure */
-#ifdef CONFIG_CPU_PXA988
-#define LCD_DITHER_CTRL (0x01EC)
-#else
#define LCD_DITHER_CTRL (0x00A0)
-#endif
#define DITHER_TBL_INDEX_SEL(s) ((s) << 16)
#define DITHER_MODE2(m) ((m) << 12)
@@ -186,15 +182,6 @@ struct lcd_regs {
#define DITHER_EN1 (1)
/* dither table data was fixed by video bpp of input and output*/
-#ifdef CONFIG_CPU_PXA988
-#define DITHER_TB_4X4_INDEX0 (0x6e4ca280)
-#define DITHER_TB_4X4_INDEX1 (0x5d7f91b3)
-#define DITHER_TB_4X8_INDEX0 (0xb391a280)
-#define DITHER_TB_4X8_INDEX1 (0x7f5d6e4c)
-#define DITHER_TB_4X8_INDEX2 (0x80a291b3)
-#define DITHER_TB_4X8_INDEX3 (0x4c6e5d7f)
-#define LCD_DITHER_TBL_DATA (0x01F0)
-#else
#define DITHER_TB_4X4_INDEX0 (0x3b19f7d5)
#define DITHER_TB_4X4_INDEX1 (0x082ac4e6)
#define DITHER_TB_4X8_INDEX0 (0xf7d508e6)
@@ -202,7 +189,6 @@ struct lcd_regs {
#define DITHER_TB_4X8_INDEX2 (0xc4e6d5f7)
#define DITHER_TB_4X8_INDEX3 (0x082a193b)
#define LCD_DITHER_TBL_DATA (0x00A4)
-#endif
/* Video Frame 0&1 start address registers */
#define LCD_SPU_DMA_START_ADDR_Y0 0x00C0
@@ -933,16 +919,9 @@ struct lcd_regs {
#define LCD_PN2_SQULN2_CTRL (0x02F0)
#define ALL_LAYER_ALPHA_SEL (0x02F4)
-/* pxa988 has different MASTER_CTRL from MMP3/MMP2 */
-#ifdef CONFIG_CPU_PXA988
-#define TIMING_MASTER_CONTROL (0x01F4)
-#define MASTER_ENH(id) (1 << ((id) + 5))
-#define MASTER_ENV(id) (1 << ((id) + 6))
-#else
#define TIMING_MASTER_CONTROL (0x02F8)
#define MASTER_ENH(id) (1 << (id))
#define MASTER_ENV(id) (1 << ((id) + 4))
-#endif
#define DSI_START_SEL_SHIFT(id) (((id) << 1) + 8)
#define timing_master_config(path, dsi_id, lcd_id) \
@@ -1312,19 +1291,8 @@ struct dsi_regs {
#define DSI_PHY_TIME_3_CFG_CSR_TIME_REQRDY_MASK (0xff)
#define DSI_PHY_TIME_3_CFG_CSR_TIME_REQRDY_SHIFT 0
-/*
- * DSI timings
- * PXA988 has diffrent ESC CLK with MMP2/MMP3
- * it will be used in dsi_set_dphy() in pxa688_phy.c
- * as low power mode clock.
- */
-#ifdef CONFIG_CPU_PXA988
-#define DSI_ESC_CLK 52 /* Unit: Mhz */
-#define DSI_ESC_CLK_T 19 /* Unit: ns */
-#else
#define DSI_ESC_CLK 66 /* Unit: Mhz */
#define DSI_ESC_CLK_T 15 /* Unit: ns */
-#endif
/* LVDS */
/* LVDS_PHY_CTRL */
--
1.9.0
^ permalink raw reply related
* Re: [PATCH 1/2] video: mmp: Remove references to CPU_MMP3
From: Jingoo Han @ 2014-04-15 12:08 UTC (permalink / raw)
To: 'Paul Bolle', 'Tomi Valkeinen'
Cc: 'Jean-Christophe Plagniol-Villard',
'Richard Weinberger', linux-fbdev, linux-kernel,
'Jingoo Han'
In-Reply-To: <1397561044.1985.47.camel@x220>
On Tuesday, April 15, 2014 8:24 PM, Paul Bolle wrote:
>
> From: Richard Weinberger <richard@nod.at>
>
> References to the Kconfig symbol CPU_MMP3 were added to the tree since
> v3.6. But that Kconfig symbol has never been part of the tree. So get
> rid of these references.
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Best regards,
Jingoo Han
> ---
> 0) Tested with git grep.
>
> 1) Originally sent as "[PATCH 01/28] Remove CPU_MMP3" two months ago.
> Added a proper commit explanation to aid reviewers.
>
> 2) One reference to CPU_MMP3 remains. I'll remove that in a more
> elaborate patch.
>
> drivers/video/mmp/Kconfig | 2 +-
> drivers/video/mmp/hw/Kconfig | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/mmp/Kconfig b/drivers/video/mmp/Kconfig
> index e9ea39e13722..969925d694c9 100644
> --- a/drivers/video/mmp/Kconfig
> +++ b/drivers/video/mmp/Kconfig
> @@ -1,6 +1,6 @@
> menuconfig MMP_DISP
> tristate "Marvell MMP Display Subsystem support"
> - depends on CPU_PXA910 || CPU_MMP2 || CPU_MMP3 || CPU_PXA988
> + depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
> help
> Marvell Display Subsystem support.
>
> diff --git a/drivers/video/mmp/hw/Kconfig b/drivers/video/mmp/hw/Kconfig
> index 02f109a20cd0..99f0506afc99 100644
> --- a/drivers/video/mmp/hw/Kconfig
> +++ b/drivers/video/mmp/hw/Kconfig
> @@ -2,12 +2,12 @@ if MMP_DISP
>
> config MMP_DISP_CONTROLLER
> bool "mmp display controller hw support"
> - depends on CPU_PXA910 || CPU_MMP2 || CPU_MMP3 || CPU_PXA988
> + depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
> default n
> help
> Marvell MMP display hw controller support
> this controller is used on Marvell PXA910,
> - MMP2, MMP3, PXA988 chips
> + MMP2, PXA988 chips
>
> config MMP_DISP_SPI
> bool "mmp display controller spi port"
> --
> 1.9.0
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox