Commit d1e7c13a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'hwmon-for-v5.13-rc2' of...

Merge tag 'hwmon-for-v5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "Fix bugs/regressions in adm9240, ltc2992, pmbus/fsp-3y, and occ
  drivers, plus a minor cleanup in the corsair-psu driver"

* tag 'hwmon-for-v5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (adm9240) Fix writes into inX_max attributes
  hwmon: (ltc2992) Put fwnode in error case during ->probe()
  hwmon: (pmbus/fsp-3y) Fix FSP-3Y YH-5151E non-compliant vout encoding
  hwmon: (occ) Fix poll rate limiting
  hwmon: (corsair-psu) Remove unneeded semicolons
parents c06a2ba6 3b5169c2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -485,7 +485,7 @@ static int adm9240_in_write(struct device *dev, u32 attr, int channel, long val)
		reg = ADM9240_REG_IN_MIN(channel);
		break;
	case hwmon_in_max:
		reg = ADM9240_REG_IN(channel);
		reg = ADM9240_REG_IN_MAX(channel);
		break;
	default:
		return -EOPNOTSUPP;
+2 −2
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ static umode_t corsairpsu_hwmon_power_is_visible(const struct corsairpsu_data *p
		return 0444;
	default:
		return 0;
	};
	}
}

static umode_t corsairpsu_hwmon_in_is_visible(const struct corsairpsu_data *priv, u32 attr,
@@ -376,7 +376,7 @@ static umode_t corsairpsu_hwmon_in_is_visible(const struct corsairpsu_data *priv
		break;
	default:
		break;
	};
	}

	return res;
}
+6 −2
Original line number Diff line number Diff line
@@ -900,11 +900,15 @@ static int ltc2992_parse_dt(struct ltc2992_state *st)

	fwnode_for_each_available_child_node(fwnode, child) {
		ret = fwnode_property_read_u32(child, "reg", &addr);
		if (ret < 0)
		if (ret < 0) {
			fwnode_handle_put(child);
			return ret;
		}

		if (addr > 1)
		if (addr > 1) {
			fwnode_handle_put(child);
			return -EINVAL;
		}

		ret = fwnode_property_read_u32(child, "shunt-resistor-micro-ohms", &val);
		if (!ret)
+3 −2
Original line number Diff line number Diff line
@@ -217,9 +217,9 @@ int occ_update_response(struct occ *occ)
		return rc;

	/* limit the maximum rate of polling the OCC */
	if (time_after(jiffies, occ->last_update + OCC_UPDATE_FREQUENCY)) {
	if (time_after(jiffies, occ->next_update)) {
		rc = occ_poll(occ);
		occ->last_update = jiffies;
		occ->next_update = jiffies + OCC_UPDATE_FREQUENCY;
	} else {
		rc = occ->last_error;
	}
@@ -1165,6 +1165,7 @@ int occ_setup(struct occ *occ, const char *name)
		return rc;
	}

	occ->next_update = jiffies + OCC_UPDATE_FREQUENCY;
	occ_parse_poll_response(occ);

	rc = occ_setup_sensor_attrs(occ);
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ struct occ {
	u8 poll_cmd_data;		/* to perform OCC poll command */
	int (*send_cmd)(struct occ *occ, u8 *cmd);

	unsigned long last_update;
	unsigned long next_update;
	struct mutex lock;		/* lock OCC access */

	struct device *hwmon;
Loading