ajuckler opened a new pull request, #17331:
URL: https://github.com/apache/nuttx/pull/17331

   ## Summary
   
   This adds a device ID to `at25ee_initialize` and `ee25xx_initialize` to 
allow multi-device support.
   
   Both drivers are using hard-coded `SPIDEV_EEPROM(0)` internally, which does 
not allow using multiple instances on the same bus, or combination with other 
EEPROMs on the same bus. This PR allows to provide the SPI ID during driver 
initialization, which is then used as argument to `SPIDEV_EEPROM` internally.
   
   This implementation is NOT backward compatible as the `_initialize` function 
signatures have changed.
   
   ## Impact
   
   The `at25ee_initialize` and `ee25xx_initialize` signatures have changed and 
take the device ID as additional parameter.
   
   The current behaviour is obtained by setting the ID to 0:
   | Before | After |
   | :----- | :---- |
   | `ee25xx_initialize(spi_dev, devname, devtype, readonly)` | 
`ee25xx_initialize(spi_dev, 0, devname, devtype, readonly)` |
   | `at25ee_initialize(spi_dev, devtype, readonly)`          | 
`at25ee_initialize(spi_dev, 0, devtype, readonly)`          |
   
   ## Testing
   
   **To be retested** on a custom target (STM32F7-based) with a Rhom 
BR25G256FVT EEPROM (equivalent to a Microchip 25xx256).
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to