Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21053
b: refs/heads/master
c: 4ebf2d0
h: refs/heads/master
i:
  21051: 9197db8
v: v3
  • Loading branch information
Pavel Machek authored and Russell King committed Mar 15, 2006
1 parent 6bee1d3 commit 5f85017
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17320a9644a45ccac51ce4ff4333276844abf72d
refs/heads/master: 4ebf2d00260bac5213c5dfb8d257e15e40503725
21 changes: 21 additions & 0 deletions trunk/arch/arm/common/locomo.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,22 @@ static int locomo_resume(struct platform_device *dev)
}
#endif


#define LCM_ALC_EN 0x8000

void frontlight_set(struct locomo *lchip, int duty, int vr, int bpwf)
{
unsigned long flags;

spin_lock_irqsave(&lchip->lock, flags);
locomo_writel(bpwf, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);
udelay(100);
locomo_writel(duty, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD);
locomo_writel(bpwf | LCM_ALC_EN, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);
spin_unlock_irqrestore(&lchip->lock, flags);
}


/**
* locomo_probe - probe for a single LoCoMo chip.
* @phys_addr: physical address of device.
Expand Down Expand Up @@ -688,6 +704,11 @@ __locomo_probe(struct device *me, struct resource *mem, int irq)
/* FrontLight */
locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);
locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD);

/* Same constants can be used for collie and poodle
(depending on CONFIG options in original sharp code)? */
frontlight_set(lchip, 163, 0, 148);

/* Longtime timer */
locomo_writel(0, lchip->base + LOCOMO_LTINT);
/* SPI */
Expand Down

0 comments on commit 5f85017

Please sign in to comment.