All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: linux-hwmon@vger.kernel.org
Cc: Cosmin Tanislav <demonsingur@gmail.com>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH v4 1/6] hwmon: adt7x10: Refactor to use with_info API
Date: Thu, 23 Dec 2021 12:52:13 -0800	[thread overview]
Message-ID: <20211223205219.2184104-1-linux@roeck-us.net> (raw)

V1 -> V2:
 * add device managed action for restoring config
 * merge multiple small related patches into a single patch
   that converts the driver to use devm_hwmon_device_register_with_info
 * switch to devm_request_threaded_irq after switching to
   devm_hwmon_device_register_with_info to make sure that it is impossible
   for the interrupt handler to access the freed hwmon device
 * drop core driver remove callback

V2 -> V3:
 * merge patch that passes name from i2c driver into the
   devm_hwmon_device_register_with_info patch

v3 -> v4:
 * Use regmap to hide chip specifics and to cache register values
 * Various minor changes and fixes
   * With the use of regmap, the bus device (bus_dev) is no longer needed,
     and the patch introducing it was dropped
   * Hysteresis value calculations depend on two values: The associated
     register value and the hysteresis itself. All calculations must be
     protected to ensure that one value isn't changed during calculations.
     Add the missing locks to both the hysteresis read and write functions.
   * Restoring the original configuration is only necessary if it was
     actually changed. Only call devm_add_action_or_reset() if that is the
     case. This also lets us drop the associated check in the action
     function.
   * Use enum to index ADT7X10_REG_TEMP[]
   * Check all attributes in is_visible function explicitly.
     While this is strictly speaking not necessary (the mode for
     unsupported attributes should not be requested), I find the explicit
     checks easier to understand and less error prone.
   * Drop linux/hwmon-sysfs.h include and add missing linux/device.h include
   * Squash patches 6/7 (pass hwinfo dev to irq handler) and patch 7/7
     (use hwmon_notify_event) into a single patch; otherwise bus_dev would
     still be needed temporarily.

 Note: This version of the series was module tested for ADT7410, but not
       on real hardware, and not for ADT7310/7320/7420.

             reply	other threads:[~2021-12-23 20:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 20:52 Guenter Roeck [this message]
2021-12-23 20:52 ` [PATCH v4 1/6] hwmon: adt7x10: Convert to use regmap Guenter Roeck
2021-12-23 20:52 ` [PATCH v4 2/6] hwmon: (adt7x10) Add device managed action for restoring config Guenter Roeck
2021-12-23 20:52 ` [PATCH v4 3/6] hwmon: (adt7x10) Use devm_hwmon_device_register_with_info Guenter Roeck
2021-12-23 20:52 ` [PATCH v4 4/6] hwmon: (adt7x10) Use devm_request_threaded_irq Guenter Roeck
2021-12-23 20:52 ` [PATCH v4 5/6] hwmon: (adt7x10) Remove empty driver removal callback Guenter Roeck
2021-12-23 20:52 ` [PATCH v4 6/6] hwmon: (adt7x10) Use hwmon_notify_event Guenter Roeck
2022-02-07 11:14 ` [PATCH v4 1/6] hwmon: adt7x10: Refactor to use with_info API Cosmin Tanislav
2022-02-07 22:31   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211223205219.2184104-1-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=demonsingur@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.