mbox series

[v3,0/3] Enhancements for tmp51x driver

Message ID 20230825205345.632792-1-biju.das.jz@bp.renesas.com (mailing list archive)
Headers show
Series Enhancements for tmp51x driver | expand

Message

Biju Das Aug. 25, 2023, 8:53 p.m. UTC
This patch series aims to add enhancements for tmp51x driver.
 * patch#1 Adds max_channels variable to struct tmp51x_data for HW
           differences and fixes the invalid channel number in
           tmp51x_is_visible().
 * patch#2 Drops enum tmp51x_ids and variable id from struct tmp51x_data
	   as all HW differences can be handled by
 * Patch#3 Simplify tmp51x_read_properties()

This patch series is only compile tested.

v2->v3:
 * Dropped patch#1 and patch#2 as it is accepted
 * Split patch#3 into 3.
 * Avoided Yoda style logic in tmp51x_is_visible().
 * Replaced OF/ID data from tmp51x_ids->max_channels
 * Updated the macro TMP51X_TEMP_CONFIG_DEFAULT by adding bit definitions
   for Configuration register 2.
 * Dropped unused macros TMP51{2,3}_TEMP_CONFIG_DEFAULT.

v1->v2:
 * Created 2 new patches. Patch#1 for fixing channel number in
   tmp51x_is_visible() and patch#3 avoids using enum chip id for HW
   differences and improves the code by avoiding checks.

Biju Das (3):
  hwmon: tmp513: Add max_channels variable to struct tmp51x_data
  hwmon: tmp513: Drop enum tmp51x_ids and variable id from struct
    tmp51x_data
  hwmon: tmp513: Simplify tmp51x_read_properties()

 drivers/hwmon/tmp513.c | 59 ++++++++++++++++++++++--------------------
 1 file changed, 31 insertions(+), 28 deletions(-)