diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2010-08-30 12:07:58 +0900 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-09-14 17:59:31 +0900 |
commit | cbd2780fcefc370732c1f1526fb784573308177d (patch) | |
tree | 6a94bdcf020f2c7e1d29b80b06a54aaea4954805 /arch/arm/mach-s3c64xx/dev-spi.c | |
parent | 0770e5280efd6f0001972a2b5127dffad0e22591 (diff) |
ARM: SAMSUNG: Fix on s5p_gpio_[get,set]_drvstr
This patch fixes bug on gpio drive strength helper function.
The offset should be like follwoing.
- off = chip->chip.base - pin;
+ off = pin - chip->chip.base;
In the s5p_gpio_get_drvstr(),
the second line is unnecessary, because overwrite drvstr.
drvstr = __raw_readl(reg);
- drvstr = 0xffff & (0x3 << shift);
And need 2bit masking before return the drvstr value.
drvstr = drvstr >> shift;
+ drvstr &= 0x3;
In the s5p_gpio_set_drvstr(), need relevant bit clear.
tmp = __raw_readl(reg);
+ tmp &= ~(0x3 << shift);
tmp |= drvstr << shift;
Reported-by: Jaecheol Lee <jc.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c64xx/dev-spi.c')
0 files changed, 0 insertions, 0 deletions