lkml.org 
[lkml]   [2012]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [rtc-linux] [PATCHv3 8/9] arm: vt8500: gpio: Devicetree support for arch-vt8500
Date
>> Converted the existing arch-vt8500 gpio to a platform_device.
>> Added support for WM8505 and WM8650 GPIO controllers.
>(...)
>> + unsigned val;

>I asked about the datatype for this "val", it sure isn't "unsigned".

>I suspected the registers were only 8bit and so it should be u8.
>But atleast use u32 if you must use all these bits.

Sorry - missed adding this to my list of fixes. I've used u32 as the
datasheet advises these are 32-bit registers and must be
read/written as such.
Changes included in v4.

>(...)
>> + val = readl(vt8500_chip->base + vt8500_chip->regs->en);
>> + val |= BIT(offset);
>> + writel(val, vt8500_chip->base + vt8500_chip->regs->en);

>BTW: have you considered [readl|writel]_relaxed?

I haven't - and to be honest I didn't know what difference it would
make until I read up on it.
Most of this code already existed in mainline in
arch/arm/mach-vt8500/gpio.c and I simply moved it across to
drivers/gpio and made some changes/additions. Having looked,
I don't see any reason why it can't use the _relaxed variants.
Changes included in v4.


I'll post up v4 for review when I get home in about 7 hours.

Work always gets in the way of being productive :)


Regards

Tony Prisk

\
 
 \ /
  Last update: 2012-08-22 16:01    [W:4.737 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site