util: Add some helper to move integers to pointer and vice-versa
util: Add some helper to move integers to pointer and vice-versa

This will be useful when an implementation of a generic API requires an
int as user data when such has been defined to be a pointer.

int do_something(struct device *dev, void *user_data);

When the implementation would:

int impl_do_something(struct device *dev, void *user_data)
{
        int identifier = POINTER_TO_INT(user_data);
	...

Change-Id: Ic892927a03ac49e95527ef8e0e817d00256aa3bb
Signed-off-by: Tomasz Bursztyka <ba81a3a719836727e6857ae83462b9f52ec41006@linux.intel.com>

ldts/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,kraj/zephyr,jamesonwilliams/zephyr-kernel,zephyrproject-rtos/zephyr,zephyriot/zephyr,runchip/zephyr-cc3200,sharronliu/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,coldnew/zephyr-project-fork,mbolivar/zephyr,sharronliu/zephyr,zephyriot/zephyr,rsalveti/zephyr,bigdinotech/zephyr,fractalclone/zephyr-riscv,sharronliu/zephyr,Vudentz/zephyr,runchip/zephyr-cc3220,kraj/zephyr,GiulianoFranchetto/zephyr,mbolivar/zephyr,holtmann/zephyr,fbsder/zephyr,finikorg/zephyr,punitvara/zephyr,zephyriot/zephyr,explora26/zephyr,32bitmicro/zephyr,bboozzoo/zephyr,mirzak/zephyr-os,32bitmicro/zephyr,aceofall/zephyr-iotos,fractalclone/zephyr-riscv,Vudentz/zephyr,ldts/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,mbolivar/zephyr,bigdinotech/zephyr,pklazy/zephyr,coldnew/zephyr-project-fork,runchip/zephyr-cc3220,sharronliu/zephyr,holtmann/zephyr,erwango/zephyr,explora26/zephyr,ldts/zephyr,jamesonwilliams/zephyr-kernel,bigdinotech/zephyr,Vudentz/zephyr,holtmann/zephyr,nashif/zephyr,ldts/zephyr,tidyjiang8/zephyr-doc,mirzak/zephyr-os,pklazy/zephyr,galak/zephyr,pklazy/zephyr,jamesonwilliams/zephyr-kernel,bigdinotech/zephyr,bboozzoo/zephyr,runchip/zephyr-cc3200,GiulianoFranchetto/zephyr,jamesonwilliams/zephyr-kernel,mirzak/zephyr-os,galak/zephyr,32bitmicro/zephyr,bboozzoo/zephyr,bboozzoo/zephyr,punitvara/zephyr,punitvara/zephyr,Vudentz/zephyr,sharronliu/zephyr,pklazy/zephyr,runchip/zephyr-cc3200,erwango/zephyr,Vudentz/zephyr,rsalveti/zephyr,explora26/zephyr,tidyjiang8/zephyr-doc,fbsder/zephyr,fbsder/zephyr,erwango/zephyr,bigdinotech/zephyr,erwango/zephyr,rsalveti/zephyr,galak/zephyr,ldts/zephyr,kraj/zephyr,punitvara/zephyr,finikorg/zephyr,rsalveti/zephyr,32bitmicro/zephyr,kraj/zephyr,mbolivar/zephyr,GiulianoFranchetto/zephyr,kraj/zephyr,tidyjiang8/zephyr-doc,galak/zephyr,finikorg/zephyr,mbolivar/zephyr,runchip/zephyr-cc3200,holtmann/zephyr,aceofall/zephyr-iotos,fractalclone/zephyr-riscv,pklazy/zephyr,runchip/zephyr-cc3220,aceofall/zephyr-iotos,fractalclone/zephyr-riscv,punitvara/zephyr,runchip/zephyr-cc3200,32bitmicro/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,erwango/zephyr,rsalveti/zephyr,aceofall/zephyr-iotos,nashif/zephyr,explora26/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,runchip/zephyr-cc3220,tidyjiang8/zephyr-doc,fractalclone/zephyr-riscv,coldnew/zephyr-project-fork,runchip/zephyr-cc3220,mirzak/zephyr-os,fbsder/zephyr,jamesonwilliams/zephyr-kernel,zephyriot/zephyr,holtmann/zephyr,GiulianoFranchetto/zephyr,bboozzoo/zephyr,aceofall/zephyr-iotos,mirzak/zephyr-os,coldnew/zephyr-project-fork,tidyjiang8/zephyr-doc,coldnew/zephyr-project-fork,explora26/zephyr,zephyriot/zephyr,fbsder/zephyr