Commit 33f855cb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc driver fixes from Greg KH:
 "Here are a number of small char/misc and iio driver fixes for
  6.10-rc4. Included in here are the following:

   - iio driver fixes for a bunch of reported problems.

   - mei driver fixes for a number of reported issues.

   - amiga parport driver build fix.

   - .editorconfig fix that was causing lots of unintended whitespace
     changes to happen to files when they were being edited. Unless we
     want to sweep the whole tree and remove all trailing whitespace at
     once, this is needed for the .editorconfig file to be able to be
     used at all. This change is required because the original
     submitters never touched older files in the tree.

   - jfs bugfix for a buffer overflow

  The jfs bugfix is in here as I didn't know where else to put it, and
  it's been ignored for a while as the filesystem seems to be abandoned
  and I'm tired of seeing the same issue reported in multiple places.

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (25 commits)
  .editorconfig: remove trim_trailing_whitespace option
  jfs: xattr: fix buffer overflow for invalid xattr
  misc: microchip: pci1xxxx: Fix a memory leak in the error handling of gp_aux_bus_probe()
  misc: microchip: pci1xxxx: fix double free in the error handling of gp_aux_bus_probe()
  parport: amiga: Mark driver struct with __refdata to prevent section mismatch
  mei: vsc: Fix wrong invocation of ACPI SID method
  mei: vsc: Don't stop/restart mei device during system suspend/resume
  mei: me: release irq in mei_me_pci_resume error path
  mei: demote client disconnect warning on suspend to debug
  iio: inkern: fix channel read regression
  iio: imu: inv_mpu6050: stabilized timestamping in interrupt
  iio: adc: ad7173: Fix sampling frequency setting
  iio: adc: ad7173: Clear append status bit
  iio: imu: inv_icm42600: delete unneeded update watermark call
  iio: imu: inv_icm42600: stabilized timestamp in interrupt
  iio: invensense: fix odr switching to same value
  iio: adc: ad7173: Remove index from temp channel
  iio: adc: ad7173: Add ad7173_device_info names
  iio: adc: ad7173: fix buffers enablement for ad7176-2
  iio: temperature: mlx90635: Fix ERR_PTR dereference in mlx90635_probe()
  ...
parents e8b0264d 7da9dfdd
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@ root = true
[{*.{awk,c,dts,dtsi,dtso,h,mk,s,S},Kconfig,Makefile,Makefile.*}]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 8
@@ -13,7 +12,6 @@ indent_size = 8
[*.{json,py,rs}]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
@@ -26,7 +24,6 @@ indent_size = 8
[*.yaml]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = unset
insert_final_newline = true
indent_style = space
indent_size = 2
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ allOf:
                Voltage output range of the channel as <minimum, maximum>
                Required connections:
                  Rfb1x for: 0 to 2.5 V; 0 to 3V; 0 to 5 V;
                  Rfb2x for: 0 to 10 V; 2.5 to 7.5V; -5 to 5 V;
                  Rfb2x for: 0 to 10 V; -2.5 to 7.5V; -5 to 5 V;
              oneOf:
                - items:
                    - const: 0
+19 −18
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ struct ad7173_device_info {
	unsigned int id;
	char *name;
	bool has_temp;
	bool has_input_buf;
	bool has_int_ref;
	bool has_ref2;
	u8 num_gpios;
@@ -212,18 +213,21 @@ static const struct ad7173_device_info ad7173_device_info[] = {
		.num_configs = 4,
		.num_gpios = 2,
		.has_temp = true,
		.has_input_buf = true,
		.has_int_ref = true,
		.clock = 2 * HZ_PER_MHZ,
		.sinc5_data_rates = ad7173_sinc5_data_rates,
		.num_sinc5_data_rates = ARRAY_SIZE(ad7173_sinc5_data_rates),
	},
	[ID_AD7172_4] = {
		.name = "ad7172-4",
		.id = AD7172_4_ID,
		.num_inputs = 9,
		.num_channels = 8,
		.num_configs = 8,
		.num_gpios = 4,
		.has_temp = false,
		.has_input_buf = true,
		.has_ref2 = true,
		.clock = 2 * HZ_PER_MHZ,
		.sinc5_data_rates = ad7173_sinc5_data_rates,
@@ -237,6 +241,7 @@ static const struct ad7173_device_info ad7173_device_info[] = {
		.num_configs = 8,
		.num_gpios = 4,
		.has_temp = true,
		.has_input_buf = true,
		.has_int_ref = true,
		.has_ref2 = true,
		.clock = 2 * HZ_PER_MHZ,
@@ -251,18 +256,21 @@ static const struct ad7173_device_info ad7173_device_info[] = {
		.num_configs = 4,
		.num_gpios = 2,
		.has_temp = true,
		.has_input_buf = true,
		.has_int_ref = true,
		.clock = 16 * HZ_PER_MHZ,
		.sinc5_data_rates = ad7175_sinc5_data_rates,
		.num_sinc5_data_rates = ARRAY_SIZE(ad7175_sinc5_data_rates),
	},
	[ID_AD7175_8] = {
		.name = "ad7175-8",
		.id = AD7175_8_ID,
		.num_inputs = 17,
		.num_channels = 16,
		.num_configs = 8,
		.num_gpios = 4,
		.has_temp = true,
		.has_input_buf = true,
		.has_int_ref = true,
		.has_ref2 = true,
		.clock = 16 * HZ_PER_MHZ,
@@ -277,18 +285,21 @@ static const struct ad7173_device_info ad7173_device_info[] = {
		.num_configs = 4,
		.num_gpios = 2,
		.has_temp = false,
		.has_input_buf = false,
		.has_int_ref = true,
		.clock = 16 * HZ_PER_MHZ,
		.sinc5_data_rates = ad7175_sinc5_data_rates,
		.num_sinc5_data_rates = ARRAY_SIZE(ad7175_sinc5_data_rates),
	},
	[ID_AD7177_2] = {
		.name = "ad7177-2",
		.id = AD7177_ID,
		.num_inputs = 5,
		.num_channels = 4,
		.num_configs = 4,
		.num_gpios = 2,
		.has_temp = true,
		.has_input_buf = true,
		.has_int_ref = true,
		.clock = 16 * HZ_PER_MHZ,
		.odr_start_value = AD7177_ODR_START_VALUE,
@@ -532,6 +543,7 @@ static int ad7173_append_status(struct ad_sigma_delta *sd, bool append)
	unsigned int interface_mode = st->interface_mode;
	int ret;

	interface_mode &= ~AD7173_INTERFACE_DATA_STAT;
	interface_mode |= AD7173_INTERFACE_DATA_STAT_EN(append);
	ret = ad_sd_write_reg(&st->sd, AD7173_REG_INTERFACE_MODE, 2, interface_mode);
	if (ret)
@@ -705,7 +717,7 @@ static int ad7173_write_raw(struct iio_dev *indio_dev,
{
	struct ad7173_state *st = iio_priv(indio_dev);
	struct ad7173_channel_config *cfg;
	unsigned int freq, i, reg;
	unsigned int freq, i;
	int ret;

	ret = iio_device_claim_direct_mode(indio_dev);
@@ -721,16 +733,7 @@ static int ad7173_write_raw(struct iio_dev *indio_dev,

		cfg = &st->channels[chan->address].cfg;
		cfg->odr = i;

		if (!cfg->live)
			break;

		ret = ad_sd_read_reg(&st->sd, AD7173_REG_FILTER(cfg->cfg_slot), 2, &reg);
		if (ret)
			break;
		reg &= ~AD7173_FILTER_ODR0_MASK;
		reg |= FIELD_PREP(AD7173_FILTER_ODR0_MASK, i);
		ret = ad_sd_write_reg(&st->sd, AD7173_REG_FILTER(cfg->cfg_slot), 2, reg);
		cfg->live = false;
		break;

	default:
@@ -792,8 +795,7 @@ static const struct iio_chan_spec ad7173_channel_template = {
	.type = IIO_VOLTAGE,
	.indexed = 1,
	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
		BIT(IIO_CHAN_INFO_SCALE),
	.info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ),
		BIT(IIO_CHAN_INFO_SCALE) | BIT(IIO_CHAN_INFO_SAMP_FREQ),
	.scan_type = {
		.sign = 'u',
		.realbits = 24,
@@ -804,12 +806,11 @@ static const struct iio_chan_spec ad7173_channel_template = {

static const struct iio_chan_spec ad7173_temp_iio_channel_template = {
	.type = IIO_TEMP,
	.indexed = 1,
	.channel = AD7173_AIN_TEMP_POS,
	.channel2 = AD7173_AIN_TEMP_NEG,
	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
		BIT(IIO_CHAN_INFO_SCALE) | BIT(IIO_CHAN_INFO_OFFSET),
	.info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ),
		BIT(IIO_CHAN_INFO_SCALE) | BIT(IIO_CHAN_INFO_OFFSET) |
		BIT(IIO_CHAN_INFO_SAMP_FREQ),
	.scan_type = {
		.sign = 'u',
		.realbits = 24,
@@ -932,7 +933,7 @@ static int ad7173_fw_parse_channel_config(struct iio_dev *indio_dev)
			AD7173_CH_ADDRESS(chan_arr[chan_index].channel,
					  chan_arr[chan_index].channel2);
		chan_st_priv->cfg.bipolar = false;
		chan_st_priv->cfg.input_buf = true;
		chan_st_priv->cfg.input_buf = st->info->has_input_buf;
		chan_st_priv->cfg.ref_sel = AD7173_SETUP_REF_SEL_INT_REF;
		st->adc_mode |= AD7173_ADC_MODE_REF_EN;

@@ -989,7 +990,7 @@ static int ad7173_fw_parse_channel_config(struct iio_dev *indio_dev)

		chan_st_priv->ain = AD7173_CH_ADDRESS(ain[0], ain[1]);
		chan_st_priv->chan_reg = chan_index;
		chan_st_priv->cfg.input_buf = true;
		chan_st_priv->cfg.input_buf = st->info->has_input_buf;
		chan_st_priv->cfg.odr = 0;

		chan_st_priv->cfg.bipolar = fwnode_property_read_bool(child, "bipolar");
+2 −2
Original line number Diff line number Diff line
@@ -243,11 +243,11 @@ static void __ad9467_get_scale(struct ad9467_state *st, int index,
}

static const struct iio_chan_spec ad9434_channels[] = {
	AD9467_CHAN(0, 0, 12, 'S'),
	AD9467_CHAN(0, 0, 12, 's'),
};

static const struct iio_chan_spec ad9467_channels[] = {
	AD9467_CHAN(0, 0, 16, 'S'),
	AD9467_CHAN(0, 0, 16, 's'),
};

static const struct ad9467_chip_info ad9467_chip_tbl = {
+5 −1
Original line number Diff line number Diff line
@@ -60,11 +60,15 @@ EXPORT_SYMBOL_NS_GPL(inv_sensors_timestamp_init, IIO_INV_SENSORS_TIMESTAMP);
int inv_sensors_timestamp_update_odr(struct inv_sensors_timestamp *ts,
				     uint32_t period, bool fifo)
{
	uint32_t mult;

	/* when FIFO is on, prevent odr change if one is already pending */
	if (fifo && ts->new_mult != 0)
		return -EAGAIN;

	ts->new_mult = period / ts->chip.clock_period;
	mult = period / ts->chip.clock_period;
	if (mult != ts->mult)
		ts->new_mult = mult;

	return 0;
}
Loading