Commit 10d48d70 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc driver fixes from Greg KH:
 "Here are a few small char/misc and other driver subsystem fixes for
  reported issues that have been in my tree.

  Included in here are fixes for:

   - iio driver fixes for reported problems

   - much reported bugfix for a lis3lv02d_i2c regression

   - comedi driver bugfix

   - mei new device ids

   - mei driver fixes

   - counter core fix

  All of these have been in linux-next with no reported issues, some for
  many weeks"

* tag 'char-misc-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  mei: gsc_proxy: match component when GSC is on different bus
  misc: fastrpc: Pass proper arguments to scm call
  comedi: comedi_test: Prevent timers rescheduling during deletion
  comedi: comedi_8255: Correct error in subdevice initialization
  misc: lis3lv02d_i2c: Fix regulators getting en-/dis-abled twice on suspend/resume
  iio: accel: adxl367: fix I2C FIFO data register
  iio: accel: adxl367: fix DEVID read after reset
  iio: pressure: dlhl60d: Initialize empty DLH bytes
  iio: imu: inv_mpu6050: fix frequency setting when chip is off
  iio: pressure: Fixes BMP38x and BMP390 SPI support
  iio: imu: inv_mpu6050: fix FIFO parsing when empty
  mei: Add Meteor Lake support for IVSC device
  mei: me: add arrow lake point H DID
  mei: me: add arrow lake point S DID
  counter: fix privdata alignment
parents 563c5b02 a0776c21
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -159,6 +159,7 @@ static int __subdev_8255_init(struct comedi_device *dev,
		return -ENOMEM;

	spriv->context = context;
	spriv->io      = io;

	s->type		= COMEDI_SUBD_DIO;
	s->subdev_flags	= SDF_READABLE | SDF_WRITABLE;
+26 −4
Original line number Diff line number Diff line
@@ -87,6 +87,8 @@ struct waveform_private {
	struct comedi_device *dev;	/* parent comedi device */
	u64 ao_last_scan_time;		/* time of previous AO scan in usec */
	unsigned int ao_scan_period;	/* AO scan period in usec */
	bool ai_timer_enable:1;		/* should AI timer be running? */
	bool ao_timer_enable:1;		/* should AO timer be running? */
	unsigned short ao_loopbacks[N_CHANS];
};

@@ -236,9 +238,13 @@ static void waveform_ai_timer(struct timer_list *t)
			time_increment = devpriv->ai_convert_time - now;
		else
			time_increment = 1;
		spin_lock(&dev->spinlock);
		if (devpriv->ai_timer_enable) {
			mod_timer(&devpriv->ai_timer,
				  jiffies + usecs_to_jiffies(time_increment));
		}
		spin_unlock(&dev->spinlock);
	}

overrun:
	comedi_handle_events(dev, s);
@@ -393,9 +399,12 @@ static int waveform_ai_cmd(struct comedi_device *dev,
	 * Seem to need an extra jiffy here, otherwise timer expires slightly
	 * early!
	 */
	spin_lock_bh(&dev->spinlock);
	devpriv->ai_timer_enable = true;
	devpriv->ai_timer.expires =
		jiffies + usecs_to_jiffies(devpriv->ai_convert_period) + 1;
	add_timer(&devpriv->ai_timer);
	spin_unlock_bh(&dev->spinlock);
	return 0;
}

@@ -404,6 +413,9 @@ static int waveform_ai_cancel(struct comedi_device *dev,
{
	struct waveform_private *devpriv = dev->private;

	spin_lock_bh(&dev->spinlock);
	devpriv->ai_timer_enable = false;
	spin_unlock_bh(&dev->spinlock);
	if (in_softirq()) {
		/* Assume we were called from the timer routine itself. */
		del_timer(&devpriv->ai_timer);
@@ -495,9 +507,13 @@ static void waveform_ao_timer(struct timer_list *t)
		unsigned int time_inc = devpriv->ao_last_scan_time +
					devpriv->ao_scan_period - now;

		spin_lock(&dev->spinlock);
		if (devpriv->ao_timer_enable) {
			mod_timer(&devpriv->ao_timer,
				  jiffies + usecs_to_jiffies(time_inc));
		}
		spin_unlock(&dev->spinlock);
	}

underrun:
	comedi_handle_events(dev, s);
@@ -517,9 +533,12 @@ static int waveform_ao_inttrig_start(struct comedi_device *dev,
	async->inttrig = NULL;

	devpriv->ao_last_scan_time = ktime_to_us(ktime_get());
	spin_lock_bh(&dev->spinlock);
	devpriv->ao_timer_enable = true;
	devpriv->ao_timer.expires =
		jiffies + usecs_to_jiffies(devpriv->ao_scan_period);
	add_timer(&devpriv->ao_timer);
	spin_unlock_bh(&dev->spinlock);

	return 1;
}
@@ -604,6 +623,9 @@ static int waveform_ao_cancel(struct comedi_device *dev,
	struct waveform_private *devpriv = dev->private;

	s->async->inttrig = NULL;
	spin_lock_bh(&dev->spinlock);
	devpriv->ao_timer_enable = false;
	spin_unlock_bh(&dev->spinlock);
	if (in_softirq()) {
		/* Assume we were called from the timer routine itself. */
		del_timer(&devpriv->ao_timer);
+4 −3
Original line number Diff line number Diff line
@@ -31,10 +31,11 @@ struct counter_device_allochelper {
	struct counter_device counter;

	/*
	 * This is cache line aligned to ensure private data behaves like if it
	 * were kmalloced separately.
	 * This ensures private data behaves like if it were kmalloced
	 * separately. Also ensures the minimum alignment for safe DMA
	 * operations (which may or may not mean cache alignment).
	 */
	unsigned long privdata[] ____cacheline_aligned;
	unsigned long privdata[] __aligned(ARCH_DMA_MINALIGN);
};

static void counter_device_release(struct device *dev)
+6 −2
Original line number Diff line number Diff line
@@ -1429,9 +1429,11 @@ static int adxl367_verify_devid(struct adxl367_state *st)
	unsigned int val;
	int ret;

	ret = regmap_read_poll_timeout(st->regmap, ADXL367_REG_DEVID, val,
				       val == ADXL367_DEVID_AD, 1000, 10000);
	ret = regmap_read(st->regmap, ADXL367_REG_DEVID, &val);
	if (ret)
		return dev_err_probe(st->dev, ret, "Failed to read dev id\n");

	if (val != ADXL367_DEVID_AD)
		return dev_err_probe(st->dev, -ENODEV,
				     "Invalid dev id 0x%02X, expected 0x%02X\n",
				     val, ADXL367_DEVID_AD);
@@ -1510,6 +1512,8 @@ int adxl367_probe(struct device *dev, const struct adxl367_ops *ops,
	if (ret)
		return ret;

	fsleep(15000);

	ret = adxl367_verify_devid(st);
	if (ret)
		return ret;
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@

#include "adxl367.h"

#define ADXL367_I2C_FIFO_DATA	0x42
#define ADXL367_I2C_FIFO_DATA	0x18

struct adxl367_i2c_state {
	struct regmap *regmap;
Loading