* [PATCH 0/7] s5p-fimc/mipi-csis drivers cleanup
@ 2012-09-17 10:48 ` Sylwester Nawrocki
0 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:48 UTC (permalink / raw)
To: linux-media, kgene.kim
Cc: linux-arm-kernel, kyungmin.park, sw0312.kim, linux-samsung-soc,
Sylwester Nawrocki
This series is a cleanup of s5p-fimc/mipi-csis drivers and changes required
for adding device tree support. It depends on Arnd's platform data headers
cleanup patch:
"ARM: samsung: move platform_data definitions"
git.kernel.org/?p=linux/kernel/git/arm/arm-soc.git;a=commit;h=d7243bd51b783ffd2
Sylwester Nawrocki (7):
ARM: samsung: Remove unused fields from FIMC and CSIS platform data
ARM: samsung: Change __s5p_mipi_phy_control() function signature
ARM: EXYNOS: Change MIPI-CSIS device regulator supply names
s5p-csis: Replace phy_enable platform data callback with direct call
s5p-fimc: Remove unused platform data structure fields
s5p-csis: Allow to specify pixel clock's source through platform data
s5p-csis: Change regulator supply names
arch/arm/mach-exynos/mach-nuri.c | 7 ++-----
arch/arm/mach-exynos/mach-origen.c | 4 ++--
arch/arm/mach-exynos/mach-universal_c210.c | 7 ++-----
arch/arm/plat-samsung/setup-mipiphy.c | 20 +++++++-------------
drivers/media/video/s5p-fimc/mipi-csis.c | 23 +++++++++++++----------
include/linux/platform_data/mipi-csis.h | 30 ++++++++++++------------------
include/media/s5p_fimc.h | 2 --
7 files changed, 38 insertions(+), 55 deletions(-)
--
1.7.11.3
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 0/7] s5p-fimc/mipi-csis drivers cleanup
@ 2012-09-17 10:48 ` Sylwester Nawrocki
0 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:48 UTC (permalink / raw)
To: linux-arm-kernel
This series is a cleanup of s5p-fimc/mipi-csis drivers and changes required
for adding device tree support. It depends on Arnd's platform data headers
cleanup patch:
"ARM: samsung: move platform_data definitions"
git.kernel.org/?p=linux/kernel/git/arm/arm-soc.git;a=commit;h=d7243bd51b783ffd2
Sylwester Nawrocki (7):
ARM: samsung: Remove unused fields from FIMC and CSIS platform data
ARM: samsung: Change __s5p_mipi_phy_control() function signature
ARM: EXYNOS: Change MIPI-CSIS device regulator supply names
s5p-csis: Replace phy_enable platform data callback with direct call
s5p-fimc: Remove unused platform data structure fields
s5p-csis: Allow to specify pixel clock's source through platform data
s5p-csis: Change regulator supply names
arch/arm/mach-exynos/mach-nuri.c | 7 ++-----
arch/arm/mach-exynos/mach-origen.c | 4 ++--
arch/arm/mach-exynos/mach-universal_c210.c | 7 ++-----
arch/arm/plat-samsung/setup-mipiphy.c | 20 +++++++-------------
drivers/media/video/s5p-fimc/mipi-csis.c | 23 +++++++++++++----------
include/linux/platform_data/mipi-csis.h | 30 ++++++++++++------------------
include/media/s5p_fimc.h | 2 --
7 files changed, 38 insertions(+), 55 deletions(-)
--
1.7.11.3
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 1/7] ARM: samsung: Remove unused fields from FIMC and CSIS platform data
2012-09-17 10:48 ` Sylwester Nawrocki
@ 2012-09-17 10:51 ` Sylwester Nawrocki
-1 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:51 UTC (permalink / raw)
To: kgene.kim
Cc: linux-arm-kernel, kyungmin.park, sw0312.kim, linux-samsung-soc,
Sylwester Nawrocki
The MIPI-CSI2 bus data alignment is now being derived from the media
bus pixel code, the drivers don't use the corresponding structure
fields, so remove them. Also remove the s5p_csis_phy_enable callback
which is now used directly by s5p-csis driver.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/mach-nuri.c | 3 ---
arch/arm/mach-exynos/mach-universal_c210.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 667aefc..da6e7ce 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -1180,9 +1180,7 @@ static struct platform_device cam_8m_12v_fixed_rdev = {
static struct s5p_platform_mipi_csis mipi_csis_platdata = {
.clk_rate = 166000000UL,
.lanes = 2,
- .alignment = 32,
.hs_settle = 12,
- .phy_enable = s5p_csis_phy_enable,
};
#define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */
@@ -1226,7 +1224,6 @@ static struct s5p_fimc_isp_info nuri_camera_sensors[] = {
.bus_type = FIMC_MIPI_CSI2,
.board_info = &m5mols_board_info,
.clk_frequency = 24000000UL,
- .csi_data_align = 32,
},
};
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 3056fa7..0b0a2d0 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -944,9 +944,7 @@ static struct platform_device cam_s_if_fixed_reg_dev = {
static struct s5p_platform_mipi_csis mipi_csis_platdata = {
.clk_rate = 166000000UL,
.lanes = 2,
- .alignment = 32,
.hs_settle = 12,
- .phy_enable = s5p_csis_phy_enable,
};
#define GPIO_CAM_LEVEL_EN(n) EXYNOS4210_GPE4(n + 3)
@@ -1011,7 +1009,6 @@ static struct s5p_fimc_isp_info universal_camera_sensors[] = {
.board_info = &m5mols_board_info,
.i2c_bus_num = 0,
.clk_frequency = 24000000UL,
- .csi_data_align = 32,
},
#endif
};
--
1.7.11.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 1/7] ARM: samsung: Remove unused fields from FIMC and CSIS platform data
@ 2012-09-17 10:51 ` Sylwester Nawrocki
0 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:51 UTC (permalink / raw)
To: linux-arm-kernel
The MIPI-CSI2 bus data alignment is now being derived from the media
bus pixel code, the drivers don't use the corresponding structure
fields, so remove them. Also remove the s5p_csis_phy_enable callback
which is now used directly by s5p-csis driver.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/mach-nuri.c | 3 ---
arch/arm/mach-exynos/mach-universal_c210.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 667aefc..da6e7ce 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -1180,9 +1180,7 @@ static struct platform_device cam_8m_12v_fixed_rdev = {
static struct s5p_platform_mipi_csis mipi_csis_platdata = {
.clk_rate = 166000000UL,
.lanes = 2,
- .alignment = 32,
.hs_settle = 12,
- .phy_enable = s5p_csis_phy_enable,
};
#define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */
@@ -1226,7 +1224,6 @@ static struct s5p_fimc_isp_info nuri_camera_sensors[] = {
.bus_type = FIMC_MIPI_CSI2,
.board_info = &m5mols_board_info,
.clk_frequency = 24000000UL,
- .csi_data_align = 32,
},
};
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 3056fa7..0b0a2d0 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -944,9 +944,7 @@ static struct platform_device cam_s_if_fixed_reg_dev = {
static struct s5p_platform_mipi_csis mipi_csis_platdata = {
.clk_rate = 166000000UL,
.lanes = 2,
- .alignment = 32,
.hs_settle = 12,
- .phy_enable = s5p_csis_phy_enable,
};
#define GPIO_CAM_LEVEL_EN(n) EXYNOS4210_GPE4(n + 3)
@@ -1011,7 +1009,6 @@ static struct s5p_fimc_isp_info universal_camera_sensors[] = {
.board_info = &m5mols_board_info,
.i2c_bus_num = 0,
.clk_frequency = 24000000UL,
- .csi_data_align = 32,
},
#endif
};
--
1.7.11.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/7] ARM: samsung: Change __s5p_mipi_phy_control() function signature
2012-09-17 10:51 ` Sylwester Nawrocki
@ 2012-09-17 10:51 ` Sylwester Nawrocki
-1 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:51 UTC (permalink / raw)
To: kgene.kim
Cc: linux-arm-kernel, kyungmin.park, sw0312.kim, linux-samsung-soc,
Sylwester Nawrocki
Replace pdev argument __s5p_mipi_phy_control() helper with plain int
so MIPI-CSIS hardware instance index can be passed directly making
the function usable on platforms instantiated from device tree.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/plat-samsung/setup-mipiphy.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/arch/arm/plat-samsung/setup-mipiphy.c b/arch/arm/plat-samsung/setup-mipiphy.c
index 683c466..1474593 100644
--- a/arch/arm/plat-samsung/setup-mipiphy.c
+++ b/arch/arm/plat-samsung/setup-mipiphy.c
@@ -14,24 +14,18 @@
#include <linux/spinlock.h>
#include <mach/regs-clock.h>
-static int __s5p_mipi_phy_control(struct platform_device *pdev,
- bool on, u32 reset)
+static int __s5p_mipi_phy_control(int id, bool on, u32 reset)
{
static DEFINE_SPINLOCK(lock);
void __iomem *addr;
unsigned long flags;
- int pid;
u32 cfg;
- if (!pdev)
+ id = max(0, id);
+ if (id > 1)
return -EINVAL;
- pid = (pdev->id == -1) ? 0 : pdev->id;
-
- if (pid != 0 && pid != 1)
- return -EINVAL;
-
- addr = S5P_MIPI_DPHY_CONTROL(pid);
+ addr = S5P_MIPI_DPHY_CONTROL(id);
spin_lock_irqsave(&lock, flags);
@@ -52,12 +46,12 @@ static int __s5p_mipi_phy_control(struct platform_device *pdev,
return 0;
}
-int s5p_csis_phy_enable(struct platform_device *pdev, bool on)
+int s5p_csis_phy_enable(int id, bool on)
{
- return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_SRESETN);
+ return __s5p_mipi_phy_control(id, on, S5P_MIPI_DPHY_SRESETN);
}
int s5p_dsim_phy_enable(struct platform_device *pdev, bool on)
{
- return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_MRESETN);
+ return __s5p_mipi_phy_control(pdev->id, on, S5P_MIPI_DPHY_MRESETN);
}
--
1.7.11.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/7] ARM: samsung: Change __s5p_mipi_phy_control() function signature
@ 2012-09-17 10:51 ` Sylwester Nawrocki
0 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:51 UTC (permalink / raw)
To: linux-arm-kernel
Replace pdev argument __s5p_mipi_phy_control() helper with plain int
so MIPI-CSIS hardware instance index can be passed directly making
the function usable on platforms instantiated from device tree.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/plat-samsung/setup-mipiphy.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/arch/arm/plat-samsung/setup-mipiphy.c b/arch/arm/plat-samsung/setup-mipiphy.c
index 683c466..1474593 100644
--- a/arch/arm/plat-samsung/setup-mipiphy.c
+++ b/arch/arm/plat-samsung/setup-mipiphy.c
@@ -14,24 +14,18 @@
#include <linux/spinlock.h>
#include <mach/regs-clock.h>
-static int __s5p_mipi_phy_control(struct platform_device *pdev,
- bool on, u32 reset)
+static int __s5p_mipi_phy_control(int id, bool on, u32 reset)
{
static DEFINE_SPINLOCK(lock);
void __iomem *addr;
unsigned long flags;
- int pid;
u32 cfg;
- if (!pdev)
+ id = max(0, id);
+ if (id > 1)
return -EINVAL;
- pid = (pdev->id == -1) ? 0 : pdev->id;
-
- if (pid != 0 && pid != 1)
- return -EINVAL;
-
- addr = S5P_MIPI_DPHY_CONTROL(pid);
+ addr = S5P_MIPI_DPHY_CONTROL(id);
spin_lock_irqsave(&lock, flags);
@@ -52,12 +46,12 @@ static int __s5p_mipi_phy_control(struct platform_device *pdev,
return 0;
}
-int s5p_csis_phy_enable(struct platform_device *pdev, bool on)
+int s5p_csis_phy_enable(int id, bool on)
{
- return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_SRESETN);
+ return __s5p_mipi_phy_control(id, on, S5P_MIPI_DPHY_SRESETN);
}
int s5p_dsim_phy_enable(struct platform_device *pdev, bool on)
{
- return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_MRESETN);
+ return __s5p_mipi_phy_control(pdev->id, on, S5P_MIPI_DPHY_MRESETN);
}
--
1.7.11.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 3/7] ARM: EXYNOS: Change MIPI-CSIS device regulator supply names
2012-09-17 10:51 ` Sylwester Nawrocki
@ 2012-09-17 10:51 ` Sylwester Nawrocki
-1 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:51 UTC (permalink / raw)
To: kgene.kim
Cc: linux-arm-kernel, kyungmin.park, sw0312.kim, linux-samsung-soc,
Sylwester Nawrocki
Rename MIPI-CSIS regulator supply names to match definitions in
the driver after commit "s5p-csis: Change regulator supply names".
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/mach-nuri.c | 4 ++--
arch/arm/mach-exynos/mach-origen.c | 4 ++--
arch/arm/mach-exynos/mach-universal_c210.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index da6e7ce..bfe6955 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -378,10 +378,10 @@ static struct regulator_consumer_supply __initdata max8997_ldo1_[] = {
};
static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* USB */
- REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
+ REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
};
static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
- REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
+ REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
};
static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 65ac45b..b58bbca 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -96,12 +96,12 @@ static struct s3c2410_uartcfg origen_uartcfgs[] __initdata = {
};
static struct regulator_consumer_supply __initdata ldo3_consumer[] = {
- REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
+ REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */
REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */
};
static struct regulator_consumer_supply __initdata ldo6_consumer[] = {
- REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
+ REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
};
static struct regulator_consumer_supply __initdata ldo7_consumer[] = {
REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 0b0a2d0..ac00757 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -211,7 +211,7 @@ static struct regulator_consumer_supply lp3974_ldo3_consumer[] = {
REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
REGULATOR_SUPPLY("vdd", "exynos4-hdmi"),
REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"),
- REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"),
+ REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"),
};
static struct regulator_init_data lp3974_ldo3_data = {
@@ -275,7 +275,7 @@ static struct regulator_init_data lp3974_ldo6_data = {
};
static struct regulator_consumer_supply lp3974_ldo7_consumer[] = {
- REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"),
+ REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"),
};
static struct regulator_init_data lp3974_ldo7_data = {
--
1.7.11.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 3/7] ARM: EXYNOS: Change MIPI-CSIS device regulator supply names
@ 2012-09-17 10:51 ` Sylwester Nawrocki
0 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:51 UTC (permalink / raw)
To: linux-arm-kernel
Rename MIPI-CSIS regulator supply names to match definitions in
the driver after commit "s5p-csis: Change regulator supply names".
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/mach-nuri.c | 4 ++--
arch/arm/mach-exynos/mach-origen.c | 4 ++--
arch/arm/mach-exynos/mach-universal_c210.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index da6e7ce..bfe6955 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -378,10 +378,10 @@ static struct regulator_consumer_supply __initdata max8997_ldo1_[] = {
};
static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* USB */
- REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
+ REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
};
static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
- REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
+ REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
};
static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 65ac45b..b58bbca 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -96,12 +96,12 @@ static struct s3c2410_uartcfg origen_uartcfgs[] __initdata = {
};
static struct regulator_consumer_supply __initdata ldo3_consumer[] = {
- REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
+ REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */
REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */
};
static struct regulator_consumer_supply __initdata ldo6_consumer[] = {
- REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
+ REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
};
static struct regulator_consumer_supply __initdata ldo7_consumer[] = {
REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 0b0a2d0..ac00757 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -211,7 +211,7 @@ static struct regulator_consumer_supply lp3974_ldo3_consumer[] = {
REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
REGULATOR_SUPPLY("vdd", "exynos4-hdmi"),
REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"),
- REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"),
+ REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"),
};
static struct regulator_init_data lp3974_ldo3_data = {
@@ -275,7 +275,7 @@ static struct regulator_init_data lp3974_ldo6_data = {
};
static struct regulator_consumer_supply lp3974_ldo7_consumer[] = {
- REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"),
+ REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"),
};
static struct regulator_init_data lp3974_ldo7_data = {
--
1.7.11.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 4/7] s5p-csis: Replace phy_enable platform data callback with direct call
2012-09-17 10:48 ` Sylwester Nawrocki
(?)
(?)
@ 2012-09-17 10:54 ` Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 5/7] s5p-fimc: Remove unused platform data structure fields Sylwester Nawrocki
` (2 more replies)
-1 siblings, 3 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:54 UTC (permalink / raw)
To: linux-media
Cc: kyungmin.park, sw0312.kim, linux-samsung-soc, Sylwester Nawrocki
The phy_enable callback is common for all Samsung SoC platforms,
replace it with direct function call so the MIPI-CSI2 DPHY control
is also possible on device tree instantiated platforms.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/media/video/s5p-fimc/mipi-csis.c | 13 +++++++------
include/linux/platform_data/mipi-csis.h | 11 +++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/media/video/s5p-fimc/mipi-csis.c b/drivers/media/video/s5p-fimc/mipi-csis.c
index c9afb05..1a2db5d 100644
--- a/drivers/media/video/s5p-fimc/mipi-csis.c
+++ b/drivers/media/video/s5p-fimc/mipi-csis.c
@@ -150,6 +150,7 @@ static const struct s5pcsis_event s5pcsis_events[] = {
* protecting @format and @flags members
* @pads: CSIS pads array
* @sd: v4l2_subdev associated with CSIS device instance
+ * @index: the hardware instance index
* @pdev: CSIS platform device
* @regs: mmaped I/O registers memory
* @supplies: CSIS regulator supplies
@@ -165,6 +166,7 @@ struct csis_state {
struct mutex lock;
struct media_pad pads[CSIS_PADS_NUM];
struct v4l2_subdev sd;
+ u8 index;
struct platform_device *pdev;
void __iomem *regs;
struct regulator_bulk_data supplies[CSIS_NUM_SUPPLIES];
@@ -619,14 +621,15 @@ static int __devinit s5pcsis_probe(struct platform_device *pdev)
spin_lock_init(&state->slock);
state->pdev = pdev;
+ state->index = max(0, pdev->id);
pdata = pdev->dev.platform_data;
- if (pdata == NULL || pdata->phy_enable == NULL) {
+ if (pdata == NULL) {
dev_err(&pdev->dev, "Platform data not fully specified\n");
return -EINVAL;
}
- if ((pdev->id == 1 && pdata->lanes > CSIS1_MAX_LANES) ||
+ if ((state->index == 1 && pdata->lanes > CSIS1_MAX_LANES) ||
pdata->lanes > CSIS0_MAX_LANES) {
dev_err(&pdev->dev, "Unsupported number of data lanes: %d\n",
pdata->lanes);
@@ -709,7 +712,6 @@ e_clkput:
static int s5pcsis_pm_suspend(struct device *dev, bool runtime)
{
- struct s5p_platform_mipi_csis *pdata = dev->platform_data;
struct platform_device *pdev = to_platform_device(dev);
struct v4l2_subdev *sd = platform_get_drvdata(pdev);
struct csis_state *state = sd_to_csis_state(sd);
@@ -721,7 +723,7 @@ static int s5pcsis_pm_suspend(struct device *dev, bool runtime)
mutex_lock(&state->lock);
if (state->flags & ST_POWERED) {
s5pcsis_stop_stream(state);
- ret = pdata->phy_enable(state->pdev, false);
+ ret = s5p_csis_phy_enable(state->index, false);
if (ret)
goto unlock;
ret = regulator_bulk_disable(CSIS_NUM_SUPPLIES,
@@ -740,7 +742,6 @@ static int s5pcsis_pm_suspend(struct device *dev, bool runtime)
static int s5pcsis_pm_resume(struct device *dev, bool runtime)
{
- struct s5p_platform_mipi_csis *pdata = dev->platform_data;
struct platform_device *pdev = to_platform_device(dev);
struct v4l2_subdev *sd = platform_get_drvdata(pdev);
struct csis_state *state = sd_to_csis_state(sd);
@@ -758,7 +759,7 @@ static int s5pcsis_pm_resume(struct device *dev, bool runtime)
state->supplies);
if (ret)
goto unlock;
- ret = pdata->phy_enable(state->pdev, true);
+ ret = s5p_csis_phy_enable(state->index, true);
if (!ret) {
state->flags |= ST_POWERED;
} else {
diff --git a/include/linux/platform_data/mipi-csis.h b/include/linux/platform_data/mipi-csis.h
index c45b1e8..2e59e43 100644
--- a/include/linux/platform_data/mipi-csis.h
+++ b/include/linux/platform_data/mipi-csis.h
@@ -11,8 +11,6 @@
#ifndef __PLAT_SAMSUNG_MIPI_CSIS_H_
#define __PLAT_SAMSUNG_MIPI_CSIS_H_ __FILE__
-struct platform_device;
-
/**
* struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver
* @clk_rate: bus clock frequency
@@ -34,10 +32,11 @@ struct s5p_platform_mipi_csis {
/**
* s5p_csis_phy_enable - global MIPI-CSI receiver D-PHY control
- * @pdev: MIPI-CSIS platform device
- * @on: true to enable D-PHY and deassert its reset
- * false to disable D-PHY
+ * @id: MIPI-CSIS harware instance index (0...1)
+ * @on: true to enable D-PHY and deassert its reset
+ * false to disable D-PHY
+ * @return: 0 on success, or negative error code on failure
*/
-int s5p_csis_phy_enable(struct platform_device *pdev, bool on);
+int s5p_csis_phy_enable(int id, bool on);
#endif /* __PLAT_SAMSUNG_MIPI_CSIS_H_ */
--
1.7.11.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 5/7] s5p-fimc: Remove unused platform data structure fields
2012-09-17 10:54 ` [PATCH 4/7] s5p-csis: Replace phy_enable platform data callback with direct call Sylwester Nawrocki
@ 2012-09-17 10:54 ` Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 6/7] s5p-csis: Allow to specify pixel clock's source through platform data Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 7/7] s5p-csis: Change regulator supply names Sylwester Nawrocki
2 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:54 UTC (permalink / raw)
To: linux-media
Cc: kyungmin.park, sw0312.kim, linux-samsung-soc, Sylwester Nawrocki
alignment, fixed_phy_vdd and phy_enable fields are now unused
so removed them. The data alignment is now derived directly
from media bus pixel code, phy_enable callback has been replaced
with direct function call and fixed_phy_vdd was dropped in commit
438df3ebe5f0ce408490a777a758d5905f0dd58f
"[media] s5p-csis: Handle all available power supplies".
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
include/linux/platform_data/mipi-csis.h | 15 ++++-----------
include/media/s5p_fimc.h | 2 --
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/include/linux/platform_data/mipi-csis.h b/include/linux/platform_data/mipi-csis.h
index 2e59e43..8b703e1 100644
--- a/include/linux/platform_data/mipi-csis.h
+++ b/include/linux/platform_data/mipi-csis.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Samsung Electronics Co., Ltd.
*
- * S5P series MIPI CSI slave device support
+ * Samsung S5P/Exynos SoC series MIPI CSIS device support
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -13,21 +13,14 @@
/**
* struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver
- * @clk_rate: bus clock frequency
- * @lanes: number of data lanes used
- * @alignment: data alignment in bits
- * @hs_settle: HS-RX settle time
- * @fixed_phy_vdd: false to enable external D-PHY regulator management in the
- * driver or true in case this regulator has no enable function
- * @phy_enable: pointer to a callback controlling D-PHY enable/reset
+ * @clk_rate: bus clock frequency
+ * @lanes: number of data lanes used
+ * @hs_settle: HS-RX settle time
*/
struct s5p_platform_mipi_csis {
unsigned long clk_rate;
u8 lanes;
- u8 alignment;
u8 hs_settle;
- bool fixed_phy_vdd;
- int (*phy_enable)(struct platform_device *pdev, bool on);
};
/**
diff --git a/include/media/s5p_fimc.h b/include/media/s5p_fimc.h
index 09421a61..eaea62a 100644
--- a/include/media/s5p_fimc.h
+++ b/include/media/s5p_fimc.h
@@ -30,7 +30,6 @@ struct i2c_board_info;
* @board_info: pointer to I2C subdevice's board info
* @clk_frequency: frequency of the clock the host interface provides to sensor
* @bus_type: determines bus type, MIPI, ITU-R BT.601 etc.
- * @csi_data_align: MIPI-CSI interface data alignment in bits
* @i2c_bus_num: i2c control bus id the sensor is attached to
* @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU)
* @clk_id: index of the SoC peripheral clock for sensors
@@ -40,7 +39,6 @@ struct s5p_fimc_isp_info {
struct i2c_board_info *board_info;
unsigned long clk_frequency;
enum cam_bus_type bus_type;
- u16 csi_data_align;
u16 i2c_bus_num;
u16 mux_id;
u16 flags;
--
1.7.11.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 6/7] s5p-csis: Allow to specify pixel clock's source through platform data
2012-09-17 10:54 ` [PATCH 4/7] s5p-csis: Replace phy_enable platform data callback with direct call Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 5/7] s5p-fimc: Remove unused platform data structure fields Sylwester Nawrocki
@ 2012-09-17 10:54 ` Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 7/7] s5p-csis: Change regulator supply names Sylwester Nawrocki
2 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:54 UTC (permalink / raw)
To: linux-media
Cc: kyungmin.park, sw0312.kim, linux-samsung-soc, Sylwester Nawrocki
Depending on the sensor configuration it might be required to adjust
the CSIS's output pixel clock so it is greater than its input pixel
clock, in order to avoid the input data FIFO overflow.
Use platform data to select SCLK_CSIS clock from CMU as a source, rather
than CSI APB clock.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/media/video/s5p-fimc/mipi-csis.c | 4 +++-
include/linux/platform_data/mipi-csis.h | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/media/video/s5p-fimc/mipi-csis.c b/drivers/media/video/s5p-fimc/mipi-csis.c
index 1a2db5d..fbfe739 100644
--- a/drivers/media/video/s5p-fimc/mipi-csis.c
+++ b/drivers/media/video/s5p-fimc/mipi-csis.c
@@ -306,8 +306,10 @@ static void s5pcsis_set_params(struct csis_state *state)
val |= S5PCSIS_CTRL_ALIGN_32BIT;
else /* 24-bits */
val &= ~S5PCSIS_CTRL_ALIGN_32BIT;
- /* Not using external clock. */
+
val &= ~S5PCSIS_CTRL_WCLK_EXTCLK;
+ if (pdata->wclk_source)
+ val |= S5PCSIS_CTRL_WCLK_EXTCLK;
s5pcsis_write(state, S5PCSIS_CTRL, val);
/* Update the shadow register. */
diff --git a/include/linux/platform_data/mipi-csis.h b/include/linux/platform_data/mipi-csis.h
index 8b703e1..bf34e17 100644
--- a/include/linux/platform_data/mipi-csis.h
+++ b/include/linux/platform_data/mipi-csis.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd.
+ * Copyright (C) 2010 - 2012 Samsung Electronics Co., Ltd.
*
* Samsung S5P/Exynos SoC series MIPI CSIS device support
*
@@ -14,11 +14,13 @@
/**
* struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver
* @clk_rate: bus clock frequency
+ * @wclk_source: CSI wrapper clock selection: 0 - bus clock, 1 - ext. SCLK_CAM
* @lanes: number of data lanes used
* @hs_settle: HS-RX settle time
*/
struct s5p_platform_mipi_csis {
unsigned long clk_rate;
+ u8 wclk_source;
u8 lanes;
u8 hs_settle;
};
--
1.7.11.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 7/7] s5p-csis: Change regulator supply names
2012-09-17 10:54 ` [PATCH 4/7] s5p-csis: Replace phy_enable platform data callback with direct call Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 5/7] s5p-fimc: Remove unused platform data structure fields Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 6/7] s5p-csis: Allow to specify pixel clock's source through platform data Sylwester Nawrocki
@ 2012-09-17 10:54 ` Sylwester Nawrocki
2 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 10:54 UTC (permalink / raw)
To: linux-media
Cc: kyungmin.park, sw0312.kim, linux-samsung-soc, Sylwester Nawrocki
Rename the regulator supply names to more meaningful ones.
It's a prerequisite for adding device tree support.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/media/video/s5p-fimc/mipi-csis.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/video/s5p-fimc/mipi-csis.c b/drivers/media/video/s5p-fimc/mipi-csis.c
index fbfe739..4bf7a68 100644
--- a/drivers/media/video/s5p-fimc/mipi-csis.c
+++ b/drivers/media/video/s5p-fimc/mipi-csis.c
@@ -2,7 +2,7 @@
* Samsung S5P/EXYNOS4 SoC series MIPI-CSI receiver driver
*
* Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd.
- * Sylwester Nawrocki, <s.nawrocki@samsung.com>
+ * Sylwester Nawrocki <s.nawrocki@samsung.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -110,8 +110,8 @@ static char *csi_clock_name[] = {
#define NUM_CSIS_CLOCKS ARRAY_SIZE(csi_clock_name)
static const char * const csis_supply_name[] = {
- "vdd11", /* 1.1V or 1.2V (s5pc100) MIPI CSI suppply */
- "vdd18", /* VDD 1.8V and MIPI CSI PLL supply */
+ "vddcore", /* CSIS Core (1.0V, 1.1V or 1.2V) suppply */
+ "vddio", /* CSIS I/O and PLL (1.8V) supply */
};
#define CSIS_NUM_SUPPLIES ARRAY_SIZE(csis_supply_name)
--
1.7.11.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* RE: [PATCH 1/7] ARM: samsung: Remove unused fields from FIMC and CSIS platform data
2012-09-17 10:51 ` Sylwester Nawrocki
@ 2012-09-17 11:02 ` Kukjin Kim
-1 siblings, 0 replies; 20+ messages in thread
From: Kukjin Kim @ 2012-09-17 11:02 UTC (permalink / raw)
To: 'Sylwester Nawrocki'
Cc: linux-arm-kernel, kyungmin.park, sw0312.kim, linux-samsung-soc
Sylwester Nawrocki wrote:
>
> The MIPI-CSI2 bus data alignment is now being derived from the media
> bus pixel code, the drivers don't use the corresponding structure
> fields, so remove them. Also remove the s5p_csis_phy_enable callback
> which is now used directly by s5p-csis driver.
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> ---
> arch/arm/mach-exynos/mach-nuri.c | 3 ---
> arch/arm/mach-exynos/mach-universal_c210.c | 3 ---
> 2 files changed, 6 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-
> nuri.c
> index 667aefc..da6e7ce 100644
> --- a/arch/arm/mach-exynos/mach-nuri.c
> +++ b/arch/arm/mach-exynos/mach-nuri.c
> @@ -1180,9 +1180,7 @@ static struct platform_device cam_8m_12v_fixed_rdev
> = {
> static struct s5p_platform_mipi_csis mipi_csis_platdata = {
> .clk_rate = 166000000UL,
> .lanes = 2,
> - .alignment = 32,
> .hs_settle = 12,
> - .phy_enable = s5p_csis_phy_enable,
> };
>
> #define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */
> @@ -1226,7 +1224,6 @@ static struct s5p_fimc_isp_info
nuri_camera_sensors[]
> = {
> .bus_type = FIMC_MIPI_CSI2,
> .board_info = &m5mols_board_info,
> .clk_frequency = 24000000UL,
> - .csi_data_align = 32,
> },
> };
>
> diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-
> exynos/mach-universal_c210.c
> index 3056fa7..0b0a2d0 100644
> --- a/arch/arm/mach-exynos/mach-universal_c210.c
> +++ b/arch/arm/mach-exynos/mach-universal_c210.c
> @@ -944,9 +944,7 @@ static struct platform_device cam_s_if_fixed_reg_dev =
> {
> static struct s5p_platform_mipi_csis mipi_csis_platdata = {
> .clk_rate = 166000000UL,
> .lanes = 2,
> - .alignment = 32,
> .hs_settle = 12,
> - .phy_enable = s5p_csis_phy_enable,
> };
>
> #define GPIO_CAM_LEVEL_EN(n) EXYNOS4210_GPE4(n + 3)
> @@ -1011,7 +1009,6 @@ static struct s5p_fimc_isp_info
> universal_camera_sensors[] = {
> .board_info = &m5mols_board_info,
> .i2c_bus_num = 0,
> .clk_frequency = 24000000UL,
> - .csi_data_align = 32,
> },
> #endif
> };
> --
> 1.7.11.3
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 1/7] ARM: samsung: Remove unused fields from FIMC and CSIS platform data
@ 2012-09-17 11:02 ` Kukjin Kim
0 siblings, 0 replies; 20+ messages in thread
From: Kukjin Kim @ 2012-09-17 11:02 UTC (permalink / raw)
To: linux-arm-kernel
Sylwester Nawrocki wrote:
>
> The MIPI-CSI2 bus data alignment is now being derived from the media
> bus pixel code, the drivers don't use the corresponding structure
> fields, so remove them. Also remove the s5p_csis_phy_enable callback
> which is now used directly by s5p-csis driver.
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> ---
> arch/arm/mach-exynos/mach-nuri.c | 3 ---
> arch/arm/mach-exynos/mach-universal_c210.c | 3 ---
> 2 files changed, 6 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-
> nuri.c
> index 667aefc..da6e7ce 100644
> --- a/arch/arm/mach-exynos/mach-nuri.c
> +++ b/arch/arm/mach-exynos/mach-nuri.c
> @@ -1180,9 +1180,7 @@ static struct platform_device cam_8m_12v_fixed_rdev
> = {
> static struct s5p_platform_mipi_csis mipi_csis_platdata = {
> .clk_rate = 166000000UL,
> .lanes = 2,
> - .alignment = 32,
> .hs_settle = 12,
> - .phy_enable = s5p_csis_phy_enable,
> };
>
> #define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */
> @@ -1226,7 +1224,6 @@ static struct s5p_fimc_isp_info
nuri_camera_sensors[]
> = {
> .bus_type = FIMC_MIPI_CSI2,
> .board_info = &m5mols_board_info,
> .clk_frequency = 24000000UL,
> - .csi_data_align = 32,
> },
> };
>
> diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-
> exynos/mach-universal_c210.c
> index 3056fa7..0b0a2d0 100644
> --- a/arch/arm/mach-exynos/mach-universal_c210.c
> +++ b/arch/arm/mach-exynos/mach-universal_c210.c
> @@ -944,9 +944,7 @@ static struct platform_device cam_s_if_fixed_reg_dev =
> {
> static struct s5p_platform_mipi_csis mipi_csis_platdata = {
> .clk_rate = 166000000UL,
> .lanes = 2,
> - .alignment = 32,
> .hs_settle = 12,
> - .phy_enable = s5p_csis_phy_enable,
> };
>
> #define GPIO_CAM_LEVEL_EN(n) EXYNOS4210_GPE4(n + 3)
> @@ -1011,7 +1009,6 @@ static struct s5p_fimc_isp_info
> universal_camera_sensors[] = {
> .board_info = &m5mols_board_info,
> .i2c_bus_num = 0,
> .clk_frequency = 24000000UL,
> - .csi_data_align = 32,
> },
> #endif
> };
> --
> 1.7.11.3
^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [PATCH 2/7] ARM: samsung: Change __s5p_mipi_phy_control() function signature
2012-09-17 10:51 ` Sylwester Nawrocki
@ 2012-09-17 11:06 ` Kukjin Kim
-1 siblings, 0 replies; 20+ messages in thread
From: Kukjin Kim @ 2012-09-17 11:06 UTC (permalink / raw)
To: 'Sylwester Nawrocki'
Cc: linux-arm-kernel, kyungmin.park, sw0312.kim, linux-samsung-soc
Sylwester Nawrocki wrote:
>
> Replace pdev argument __s5p_mipi_phy_control() helper with plain int
> so MIPI-CSIS hardware instance index can be passed directly making
> the function usable on platforms instantiated from device tree.
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin <kgene.kim@samsung.com>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> ---
> arch/arm/plat-samsung/setup-mipiphy.c | 20 +++++++-------------
> 1 file changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/setup-mipiphy.c b/arch/arm/plat-
> samsung/setup-mipiphy.c
> index 683c466..1474593 100644
> --- a/arch/arm/plat-samsung/setup-mipiphy.c
> +++ b/arch/arm/plat-samsung/setup-mipiphy.c
> @@ -14,24 +14,18 @@
> #include <linux/spinlock.h>
> #include <mach/regs-clock.h>
>
> -static int __s5p_mipi_phy_control(struct platform_device *pdev,
> - bool on, u32 reset)
> +static int __s5p_mipi_phy_control(int id, bool on, u32 reset)
> {
> static DEFINE_SPINLOCK(lock);
> void __iomem *addr;
> unsigned long flags;
> - int pid;
> u32 cfg;
>
> - if (!pdev)
> + id = max(0, id);
> + if (id > 1)
> return -EINVAL;
>
> - pid = (pdev->id == -1) ? 0 : pdev->id;
> -
> - if (pid != 0 && pid != 1)
> - return -EINVAL;
> -
> - addr = S5P_MIPI_DPHY_CONTROL(pid);
> + addr = S5P_MIPI_DPHY_CONTROL(id);
>
> spin_lock_irqsave(&lock, flags);
>
> @@ -52,12 +46,12 @@ static int __s5p_mipi_phy_control(struct
> platform_device *pdev,
> return 0;
> }
>
> -int s5p_csis_phy_enable(struct platform_device *pdev, bool on)
> +int s5p_csis_phy_enable(int id, bool on)
> {
> - return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_SRESETN);
> + return __s5p_mipi_phy_control(id, on, S5P_MIPI_DPHY_SRESETN);
> }
>
> int s5p_dsim_phy_enable(struct platform_device *pdev, bool on)
> {
> - return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_MRESETN);
> + return __s5p_mipi_phy_control(pdev->id, on, S5P_MIPI_DPHY_MRESETN);
> }
> --
> 1.7.11.3
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 2/7] ARM: samsung: Change __s5p_mipi_phy_control() function signature
@ 2012-09-17 11:06 ` Kukjin Kim
0 siblings, 0 replies; 20+ messages in thread
From: Kukjin Kim @ 2012-09-17 11:06 UTC (permalink / raw)
To: linux-arm-kernel
Sylwester Nawrocki wrote:
>
> Replace pdev argument __s5p_mipi_phy_control() helper with plain int
> so MIPI-CSIS hardware instance index can be passed directly making
> the function usable on platforms instantiated from device tree.
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin <kgene.kim@samsung.com>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> ---
> arch/arm/plat-samsung/setup-mipiphy.c | 20 +++++++-------------
> 1 file changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/setup-mipiphy.c b/arch/arm/plat-
> samsung/setup-mipiphy.c
> index 683c466..1474593 100644
> --- a/arch/arm/plat-samsung/setup-mipiphy.c
> +++ b/arch/arm/plat-samsung/setup-mipiphy.c
> @@ -14,24 +14,18 @@
> #include <linux/spinlock.h>
> #include <mach/regs-clock.h>
>
> -static int __s5p_mipi_phy_control(struct platform_device *pdev,
> - bool on, u32 reset)
> +static int __s5p_mipi_phy_control(int id, bool on, u32 reset)
> {
> static DEFINE_SPINLOCK(lock);
> void __iomem *addr;
> unsigned long flags;
> - int pid;
> u32 cfg;
>
> - if (!pdev)
> + id = max(0, id);
> + if (id > 1)
> return -EINVAL;
>
> - pid = (pdev->id == -1) ? 0 : pdev->id;
> -
> - if (pid != 0 && pid != 1)
> - return -EINVAL;
> -
> - addr = S5P_MIPI_DPHY_CONTROL(pid);
> + addr = S5P_MIPI_DPHY_CONTROL(id);
>
> spin_lock_irqsave(&lock, flags);
>
> @@ -52,12 +46,12 @@ static int __s5p_mipi_phy_control(struct
> platform_device *pdev,
> return 0;
> }
>
> -int s5p_csis_phy_enable(struct platform_device *pdev, bool on)
> +int s5p_csis_phy_enable(int id, bool on)
> {
> - return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_SRESETN);
> + return __s5p_mipi_phy_control(id, on, S5P_MIPI_DPHY_SRESETN);
> }
>
> int s5p_dsim_phy_enable(struct platform_device *pdev, bool on)
> {
> - return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_MRESETN);
> + return __s5p_mipi_phy_control(pdev->id, on, S5P_MIPI_DPHY_MRESETN);
> }
> --
> 1.7.11.3
^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [PATCH 3/7] ARM: EXYNOS: Change MIPI-CSIS device regulator supply names
2012-09-17 10:51 ` Sylwester Nawrocki
@ 2012-09-17 11:07 ` Kukjin Kim
-1 siblings, 0 replies; 20+ messages in thread
From: Kukjin Kim @ 2012-09-17 11:07 UTC (permalink / raw)
To: 'Sylwester Nawrocki'
Cc: linux-arm-kernel, kyungmin.park, sw0312.kim, linux-samsung-soc
Sylwester Nawrocki wrote:
>
> Rename MIPI-CSIS regulator supply names to match definitions in
> the driver after commit "s5p-csis: Change regulator supply names".
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> ---
> arch/arm/mach-exynos/mach-nuri.c | 4 ++--
> arch/arm/mach-exynos/mach-origen.c | 4 ++--
> arch/arm/mach-exynos/mach-universal_c210.c | 4 ++--
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-
> nuri.c
> index da6e7ce..bfe6955 100644
> --- a/arch/arm/mach-exynos/mach-nuri.c
> +++ b/arch/arm/mach-exynos/mach-nuri.c
> @@ -378,10 +378,10 @@ static struct regulator_consumer_supply __initdata
> max8997_ldo1_[] = {
> };
> static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
> REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* USB */
> - REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
> + REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
> };
> static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
> - REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
> + REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
> };
> static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
> REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
> diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-
> exynos/mach-origen.c
> index 65ac45b..b58bbca 100644
> --- a/arch/arm/mach-exynos/mach-origen.c
> +++ b/arch/arm/mach-exynos/mach-origen.c
> @@ -96,12 +96,12 @@ static struct s3c2410_uartcfg origen_uartcfgs[]
> __initdata = {
> };
>
> static struct regulator_consumer_supply __initdata ldo3_consumer[] = {
> - REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
> + REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
> REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */
> REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */
> };
> static struct regulator_consumer_supply __initdata ldo6_consumer[] = {
> - REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
> + REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
> };
> static struct regulator_consumer_supply __initdata ldo7_consumer[] = {
> REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */
> diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-
> exynos/mach-universal_c210.c
> index 0b0a2d0..ac00757 100644
> --- a/arch/arm/mach-exynos/mach-universal_c210.c
> +++ b/arch/arm/mach-exynos/mach-universal_c210.c
> @@ -211,7 +211,7 @@ static struct regulator_consumer_supply
> lp3974_ldo3_consumer[] = {
> REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
> REGULATOR_SUPPLY("vdd", "exynos4-hdmi"),
> REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"),
> - REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"),
> + REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"),
> };
>
> static struct regulator_init_data lp3974_ldo3_data = {
> @@ -275,7 +275,7 @@ static struct regulator_init_data lp3974_ldo6_data = {
> };
>
> static struct regulator_consumer_supply lp3974_ldo7_consumer[] = {
> - REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"),
> + REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"),
> };
>
> static struct regulator_init_data lp3974_ldo7_data = {
> --
> 1.7.11.3
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 3/7] ARM: EXYNOS: Change MIPI-CSIS device regulator supply names
@ 2012-09-17 11:07 ` Kukjin Kim
0 siblings, 0 replies; 20+ messages in thread
From: Kukjin Kim @ 2012-09-17 11:07 UTC (permalink / raw)
To: linux-arm-kernel
Sylwester Nawrocki wrote:
>
> Rename MIPI-CSIS regulator supply names to match definitions in
> the driver after commit "s5p-csis: Change regulator supply names".
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> ---
> arch/arm/mach-exynos/mach-nuri.c | 4 ++--
> arch/arm/mach-exynos/mach-origen.c | 4 ++--
> arch/arm/mach-exynos/mach-universal_c210.c | 4 ++--
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-
> nuri.c
> index da6e7ce..bfe6955 100644
> --- a/arch/arm/mach-exynos/mach-nuri.c
> +++ b/arch/arm/mach-exynos/mach-nuri.c
> @@ -378,10 +378,10 @@ static struct regulator_consumer_supply __initdata
> max8997_ldo1_[] = {
> };
> static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
> REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* USB */
> - REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
> + REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
> };
> static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
> - REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
> + REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
> };
> static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
> REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
> diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-
> exynos/mach-origen.c
> index 65ac45b..b58bbca 100644
> --- a/arch/arm/mach-exynos/mach-origen.c
> +++ b/arch/arm/mach-exynos/mach-origen.c
> @@ -96,12 +96,12 @@ static struct s3c2410_uartcfg origen_uartcfgs[]
> __initdata = {
> };
>
> static struct regulator_consumer_supply __initdata ldo3_consumer[] = {
> - REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
> + REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
> REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */
> REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */
> };
> static struct regulator_consumer_supply __initdata ldo6_consumer[] = {
> - REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
> + REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
> };
> static struct regulator_consumer_supply __initdata ldo7_consumer[] = {
> REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */
> diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-
> exynos/mach-universal_c210.c
> index 0b0a2d0..ac00757 100644
> --- a/arch/arm/mach-exynos/mach-universal_c210.c
> +++ b/arch/arm/mach-exynos/mach-universal_c210.c
> @@ -211,7 +211,7 @@ static struct regulator_consumer_supply
> lp3974_ldo3_consumer[] = {
> REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
> REGULATOR_SUPPLY("vdd", "exynos4-hdmi"),
> REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"),
> - REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"),
> + REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"),
> };
>
> static struct regulator_init_data lp3974_ldo3_data = {
> @@ -275,7 +275,7 @@ static struct regulator_init_data lp3974_ldo6_data = {
> };
>
> static struct regulator_consumer_supply lp3974_ldo7_consumer[] = {
> - REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"),
> + REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"),
> };
>
> static struct regulator_init_data lp3974_ldo7_data = {
> --
> 1.7.11.3
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/7] ARM: samsung: Remove unused fields from FIMC and CSIS platform data
2012-09-17 11:02 ` Kukjin Kim
@ 2012-09-17 11:24 ` Sylwester Nawrocki
-1 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 11:24 UTC (permalink / raw)
To: Kukjin Kim, linux-media
Cc: linux-arm-kernel, kyungmin.park, sw0312.kim, linux-samsung-soc,
Mauro Carvalho Chehab
On 09/17/2012 01:02 PM, Kukjin Kim wrote:
> Sylwester Nawrocki wrote:
>>
>> The MIPI-CSI2 bus data alignment is now being derived from the media
>> bus pixel code, the drivers don't use the corresponding structure
>> fields, so remove them. Also remove the s5p_csis_phy_enable callback
>> which is now used directly by s5p-csis driver.
>>
>> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Thank you for your ack on these three first patches, I'll then ask
Mauro to push it upstream through his tree. As he usually sends
his patches out late during merge window, there should hopefully
be no merge conflicts.
Regards,
--
Sylwester Nawrocki
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 1/7] ARM: samsung: Remove unused fields from FIMC and CSIS platform data
@ 2012-09-17 11:24 ` Sylwester Nawrocki
0 siblings, 0 replies; 20+ messages in thread
From: Sylwester Nawrocki @ 2012-09-17 11:24 UTC (permalink / raw)
To: linux-arm-kernel
On 09/17/2012 01:02 PM, Kukjin Kim wrote:
> Sylwester Nawrocki wrote:
>>
>> The MIPI-CSI2 bus data alignment is now being derived from the media
>> bus pixel code, the drivers don't use the corresponding structure
>> fields, so remove them. Also remove the s5p_csis_phy_enable callback
>> which is now used directly by s5p-csis driver.
>>
>> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Thank you for your ack on these three first patches, I'll then ask
Mauro to push it upstream through his tree. As he usually sends
his patches out late during merge window, there should hopefully
be no merge conflicts.
Regards,
--
Sylwester Nawrocki
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2012-09-17 11:24 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17 10:48 [PATCH 0/7] s5p-fimc/mipi-csis drivers cleanup Sylwester Nawrocki
2012-09-17 10:48 ` Sylwester Nawrocki
2012-09-17 10:51 ` [PATCH 1/7] ARM: samsung: Remove unused fields from FIMC and CSIS platform data Sylwester Nawrocki
2012-09-17 10:51 ` Sylwester Nawrocki
2012-09-17 10:51 ` [PATCH 2/7] ARM: samsung: Change __s5p_mipi_phy_control() function signature Sylwester Nawrocki
2012-09-17 10:51 ` Sylwester Nawrocki
2012-09-17 11:06 ` Kukjin Kim
2012-09-17 11:06 ` Kukjin Kim
2012-09-17 10:51 ` [PATCH 3/7] ARM: EXYNOS: Change MIPI-CSIS device regulator supply names Sylwester Nawrocki
2012-09-17 10:51 ` Sylwester Nawrocki
2012-09-17 11:07 ` Kukjin Kim
2012-09-17 11:07 ` Kukjin Kim
2012-09-17 11:02 ` [PATCH 1/7] ARM: samsung: Remove unused fields from FIMC and CSIS platform data Kukjin Kim
2012-09-17 11:02 ` Kukjin Kim
2012-09-17 11:24 ` Sylwester Nawrocki
2012-09-17 11:24 ` Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 4/7] s5p-csis: Replace phy_enable platform data callback with direct call Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 5/7] s5p-fimc: Remove unused platform data structure fields Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 6/7] s5p-csis: Allow to specify pixel clock's source through platform data Sylwester Nawrocki
2012-09-17 10:54 ` [PATCH 7/7] s5p-csis: Change regulator supply names Sylwester Nawrocki
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.