Hello, may i ask how you performed the linkage for i2c read and write functions, i have some problem linking those, i tried to copy some of the bits from the code you provided, so i have the following: BMA4_INTF_RET_TYPE bma4_i2c_read(uint8_t reg_addr, uint8_t *reg_data, uint32_t len, void *intf_ptr) { uint8_t dev_addr = *(uint8_t*)intf_ptr; return i2c_burst_read(intf_ptr, 0x18, reg_addr, reg_data, len); } /*! * I2C write function map to COINES platform */ BMA4_INTF_RET_TYPE bma4_i2c_write(uint8_t reg_addr, const uint8_t *reg_data, uint32_t len, void *intf_ptr) { uint8_t dev_addr = *(uint8_t*)intf_ptr; return i2c_burst_write(intf_ptr, 0x18, reg_addr, reg_data, len); } and in the init function i have: struct device *i2c_dev = device_get_binding("I2C_2"); and: bma->intf = BMA4_I2C_INTF; bma->bus_read = bma4_i2c_read; bma->bus_write = bma4_i2c_write; bma->intf_ptr = i2c_dev; i have a bus fault possabily cased by a null pointer some where. it would be great if you showed me the steps for doing this linkage.
... View more