1. 07 Nov, 2022 3 commits
  2. 04 Nov, 2022 4 commits
  3. 02 Nov, 2022 2 commits
    • Vaibhav Gupta's avatar
      fmc-eeprom: Maintain the reference count of the device. · 59a48ab0
      Vaibhav Gupta authored
      With nvmem framework, the reference counter of the nvmem device is
      increased when we ask the device from the kernel via helper functions
      like "nvmem_device_find()", "nvmem_device_get()", etc. If reference
      count is zero, the driver can be unloaded (rmmod) during ongoing
      operations.
      
      Thus, the reference count should be incremented during add, and
      decremented during delete.
      Reported-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
      Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
      59a48ab0
    • Vaibhav Gupta's avatar
      fmc-eeprom: Use "nvmem_device_find()" to get nvmem device · fe4f3dfc
      Vaibhav Gupta authored
      To use "nvmem_device_get()" we need to find correct name of our nvmem
      device, which is a very complex job than it seems.
      
      The way nvmem-consumer framework is designed, we only have the info
      about the parent device which is handled by i2c. Thus, there is no
      non-hackish way we can get the name of our nvmem-device.
      
      One pattern which is helpful is that the nvmem framework names its
      devices by just appending an id to the name of the parent device. So,
      if the parent device is "2-0050", the nvmem device will be 2-0050<id>.
      
      The silver lining in our case is that as per FMC standard, we have only
      one eeprom/nvmem device per i2c handler. Thus, we just need to check
      that out of all nvmem devices, which one contains the name of our
      i2c handler.
      Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
      fe4f3dfc
  4. 07 Sep, 2022 1 commit
  5. 15 Aug, 2022 3 commits
  6. 26 Jul, 2022 2 commits
  7. 23 Feb, 2022 3 commits
  8. 29 Jul, 2021 4 commits
  9. 06 Jul, 2021 4 commits
  10. 10 Dec, 2020 4 commits
  11. 26 Nov, 2020 6 commits
  12. 26 Oct, 2020 4 commits