Thread (1 message) 1 message, 1 author, 2012-07-17

Re: [PATCH v2 1/2] pinctrl: pinctrl-imx: add support for set bits for general purpose registers

From: Linus Walleij <hidden>
Date: 2012-07-17 18:15:40
Also in: linux-arm-kernel

On Tue, Jul 17, 2012 at 5:02 AM, Dong Aisheng [off-list ref] wrote:
On Sun, Jul 15, 2012 at 04:43:03AM +0800, Linus Walleij wrote:
quoted
This whole issue appears in other systems so you're not alone
on this, for example the ux500 PRCMU driver has exactly these
properties.
So how does ux500 PRCMU handle this?
First, this driver is in MFD which is the most apropriate place I can
think of right now.

Then we have accessor functions, but when we just want to read/write a
register we have this API:

u32 db8500_prcmu_read(unsigned int reg);
void db8500_prcmu_write(unsigned int reg, u32 value);
void db8500_prcmu_write_masked(unsigned int reg, u32 mask, u32 value);

The third function is an oddity which performs read-modify-write
on the other side (firmware).

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help