1. 11 Jun, 2024 2 commits
    • Guenter Roeck's avatar
      hwmon: (pmbus/mp2856) Let enum chips start with index 0 · e229c6e8
      Guenter Roeck authored
      Earlier it was assumed that the data pointer in of_device_id must not start
      with 0 (NULL) if i2c_get_match_data() is used. However, it turns out that
      this is perfectly fine as long as there is also an i2c_device_id array with
      the same data, which is used as fallback in that case.
      
      Let enum chips start with 0 to avoid confusion against other drivers
      where the enum starts with 0 and i2c_get_match_data() is used as well.
      
      While doing that, remove chip_id from struct mp2856_data since it is only
      used in the probe function, and typecast the result of i2c_get_match_data()
      to kernel_ulong_t to avoid the double typecast.
      
      Cc: Peter Yin <peteryin.openbmc@gmail.com>
      Cc: Potin Lai <potin.lai.pt@gmail.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      e229c6e8
    • Guenter Roeck's avatar
      hwmon: (pmbus/max31827) Explain why enum chips must not start with 0 · 138d45d9
      Guenter Roeck authored
      If a driver calls device_get_match_data(), the .data pointer in its id
      data structures must not be NULL/0 because device_get_match_data()
      returns NULL if an entry is not found. Explain that in a comment to avoid
      confusion why this is required in this driver but not in other drivers.
      
      Cc: Daniel Matyas <daniel.matyas@analog.com>
      Acked-by: default avatarNuno Sa <nuno.sa@analog.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      138d45d9
  2. 10 Jun, 2024 7 commits
  3. 08 Jun, 2024 31 commits