i.mx6 PMU MMPF0100 Driver porting

Source: Internet
Author: User

/************************************************************************** * i.mx6 MMPF0100 driver PO rting * Description: * Although the motherboard has MMPF0100 chip, but did not register the device and use the PMU driver, is a waste, * of course, because of the need, so the PMU driver registration. * 2016-3-31 Shenzhen Nanshan Ping Shan village Zengjianfeng ****************************************************** *******************/Reference Document: PF0100 PMIC drivers https://community.freescale.com/thread/308531first, Cat arch/arm/mach-mx6/mx6q_sabresd_pmic_pfuze100.c ...#definePfuze100_i2c_device_name "Pfuze100"/*7-bit i²c bus slave address*/    #definePFUZE100_I2C_ADDR (0x08)    ......    Static structI2c_board_info __initdata Pfuze100_i2c_device ={i2c_board_info (Pfuze100_i2c_device_name, Pfuze100_i2c_addr),. Platform_data= &Pfuze100_plat,}; int__init mx6q_sabresd_init_pfuze100 (u32 int_gpio) {PFUZE100_I2C_DEVICE.IRQ= GPIO_TO_IRQ (Int_gpio);/*Update INT Gpio*/        returnI2c_register_board_info (1, &pfuze100_i2c_device,1); } II, Cat arch/arm/mach-mx6/board-mx6dl_sabresd.hStaticiomux_v3_cfg_t mx6dl_sabresd_pads[] = {        ...... Mx6q_pad_gpio_18__gpio_7_13, ...} Third, Cat Arch/arm/mach-mx6/board-mx6q_sabresd.c ...#defineSabreauto_pmic_int Imx_gpio_nr (7, 13)    ......    /** PMU MMPF0100 devices*/ret= Gpio_request (Sabreauto_pmic_int,"Pfuze-int"); if(ret) {PRINTK (Kern_err"Request Pfuze-int error!! \ n"); return; } Else{gpio_direction_input (sabreauto_pmic_int);    MX6Q_SABRESD_INIT_PFUZE100 (Sabreauto_pmic_int); }    ...... Four, I²c-Tools Check Registration: [email protected]:/data/local #/i2cdetect-r-y1                                          0  1  2  3  4  5  6  7  8  9a b c d E Fxx:----------UU--------------Ten: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -:--------------------------UU---- -: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -: -- -- -- -- -- -- -- --[email protected]:/data/Local # V, view driver information: [email protected]:/sys/bus/i2c/devices/1-0008# cat Pfuze_ctl reg000:Tenreg001:xxreg002:xxreg003: +reg004:xxreg005: onreg006:3f reg007: onreg008:xxreg009:7f reg010:xxreg011:xxreg012:xxreg013:xxreg014:xxreg015:Bayireg016:xxreg017:xxreg018:3f reg019:xxreg020:xxreg021:xxreg022:xxreg023:xxreg024:xxreg025:xxreg026:xxreg027:Tenreg028:xxreg029:xxreg030:xxreg031:xxreg032:2b reg033:1b reg034:2b reg035:0c reg036:c4 reg037:xxreg038:xxreg039:xxreg040:xxreg041:xxreg042:xxreg043:xxreg044:xxreg045:xxreg046:2b reg047:1b reg048:2b reg049:0c reg050:c4 reg051:xxreg052:xxreg053: thereg054: thereg055: thereg056:0c reg057:d4 reg058:xxreg059:xxreg060:2c reg061:2c reg062:2c reg063:0c reg064:e4 reg065:xxreg066:xxreg067:2c reg068:2c reg069:2c reg070:0c reg071:e4 reg072:xxreg073:xxreg074:6f reg075:6f reg076:6f reg077:0c reg078:f4 reg079:xxreg080:xxreg081:xxreg082:xxreg083:xxreg084:xxreg085:xxreg086:xxreg087:xxreg088:xxreg089:xxreg090:xxreg091:xxreg092:xxreg093:xxreg094:xxreg095:xxreg096:xxreg097:xxreg098:xxreg099:xxreg100:xxreg101:xxreg102: -reg103:xxreg104:xxreg105:xxreg106:Tenreg107: .reg108:1e reg109:1e reg110: -reg111:Tenreg112:1a reg113:1f reg114:xxreg115:xxreg116:xxreg117:xxreg118:xxreg119:xxreg120:xxreg121:xxreg122:xxreg123:xxreg124:xxreg125:xxreg126:xxreg127:xx[email protected]:/sys/bus/i2c/devices/1-0008#

i.mx6 PMU MMPF0100 Driver porting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.