/* Write to register 'reg' of PM3386 device 'pm', and perform a readback from the identification register.  */
static void pm3386_reg_write(int pm, int reg, u16 value)
/* Write to register 'reg' of PM3386 device 'pm', and perform a readback from the identification register.  */
static void pm3386_reg_write(int pm, int reg, u16 value)
{
	void *_reg;
	u16 dummy;
	_reg = (void *)ENP2611_PM3386_0_VIRT_BASE;
	if (pm == 1)
		_reg = (void *)ENP2611_PM3386_1_VIRT_BASE;
	*((volatile u16 *)(_reg + (reg << 1))) = value;
	dummy = *((volatile u16 *)_reg);
	__asm__ __volatile__("mov %0, %0" : "+r" (dummy));
}