Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333792
b: refs/heads/master
c: 69a3d4f
h: refs/heads/master
v: v3
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Oct 6, 2012
1 parent acb20a3 commit 67619d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73f56c239f341f14cd1591fb0c3aafc673f4d409
refs/heads/master: 69a3d4f7b3f976192f8ac1ab760a026c737d0d56
20 changes: 7 additions & 13 deletions trunk/arch/arm/plat-samsung/setup-mipiphy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
}

0 comments on commit 67619d4

Please sign in to comment.