Commit 0a6dce0a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc/iio driver fixes from Greg KH:
 "Here are some small char/misc/iio and some other minor driver
  subsystem fixes for 6.19-rc7. Nothing huge here, just some fixes for
  reported issues including:

   - lots of little iio driver fixes

   - comedi driver fixes

   - mux driver fix

   - w1 driver fixes

   - uio driver fix

   - slimbus driver fixes

   - hwtracing bugfix

   - other tiny bugfixes

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

* tag 'char-misc-6.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (36 commits)
  comedi: dmm32at: serialize use of paged registers
  mei: trace: treat reg parameter as string
  uio: pci_sva: correct '-ENODEV' check logic
  uacce: ensure safe queue release with state management
  uacce: implement mremap in uacce_vm_ops to return -EPERM
  uacce: fix isolate sysfs check condition
  uacce: fix cdev handling in the cleanup path
  slimbus: core: clean up of_slim_get_device()
  slimbus: core: fix of_slim_get_device() kernel doc
  slimbus: core: amend slim_get_device() kernel doc
  slimbus: core: fix device reference leak on report present
  slimbus: core: fix runtime PM imbalance on report present
  slimbus: core: fix OF node leak on registration failure
  intel_th: rename error label
  intel_th: fix device leak on output open()
  comedi: Fix getting range information for subdevices 16 to 255
  mux: mmio: Fix IS_ERR() vs NULL check in probe()
  interconnect: debugfs: initialize src_node and dst_node to empty strings
  iio: dac: ad3552r-hs: fix out-of-bound write in ad3552r_hs_write_data_source
  iio: accel: iis328dq: fix gain values
  ...
parents 11de40c0 88da5f4b
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -74,6 +74,37 @@ allOf:
            - description: aggre UFS CARD AXI clock
            - description: RPMH CC IPA clock

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,sa8775p-config-noc
              - qcom,sa8775p-dc-noc
              - qcom,sa8775p-gem-noc
              - qcom,sa8775p-gpdsp-anoc
              - qcom,sa8775p-lpass-ag-noc
              - qcom,sa8775p-mmss-noc
              - qcom,sa8775p-nspa-noc
              - qcom,sa8775p-nspb-noc
              - qcom,sa8775p-pcie-anoc
              - qcom,sa8775p-system-noc
    then:
      properties:
        clocks: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,sa8775p-clk-virt
              - qcom,sa8775p-mc-virt
    then:
      properties:
        reg: false
        clocks: false

unevaluatedProperties: false

examples:
+1 −0
Original line number Diff line number Diff line
@@ -13172,6 +13172,7 @@ F: Documentation/devicetree/bindings/interconnect/
F:	Documentation/driver-api/interconnect.rst
F:	drivers/interconnect/
F:	include/dt-bindings/interconnect/
F:	include/linux/interconnect-clk.h
F:	include/linux/interconnect-provider.h
F:	include/linux/interconnect.h
+1 −1
Original line number Diff line number Diff line
@@ -1155,7 +1155,7 @@ static int do_chaninfo_ioctl(struct comedi_device *dev,
		for (i = 0; i < s->n_chan; i++) {
			int x;

			x = (dev->minor << 28) | (it->subdev << 24) | (i << 16) |
			x = (it->subdev << 24) | (i << 16) |
			    (s->range_table_list[i]->length);
			if (put_user(x, it->rangelist + i))
				return -EFAULT;
+30 −2
Original line number Diff line number Diff line
@@ -330,6 +330,7 @@ static int dmm32at_ai_cmdtest(struct comedi_device *dev,

static void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec)
{
	unsigned long irq_flags;
	unsigned char lo1, lo2, hi2;
	unsigned short both2;

@@ -342,6 +343,9 @@ static void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec)
	/* set counter clocks to 10MHz, disable all aux dio */
	outb(0, dev->iobase + DMM32AT_CTRDIO_CFG_REG);

	/* serialize access to control register and paged registers */
	spin_lock_irqsave(&dev->spinlock, irq_flags);

	/* get access to the clock regs */
	outb(DMM32AT_CTRL_PAGE_8254, dev->iobase + DMM32AT_CTRL_REG);

@@ -354,6 +358,8 @@ static void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec)
	outb(lo2, dev->iobase + DMM32AT_CLK2);
	outb(hi2, dev->iobase + DMM32AT_CLK2);

	spin_unlock_irqrestore(&dev->spinlock, irq_flags);

	/* enable the ai conversion interrupt and the clock to start scans */
	outb(DMM32AT_INTCLK_ADINT |
	     DMM32AT_INTCLK_CLKEN | DMM32AT_INTCLK_CLKSEL,
@@ -363,13 +369,19 @@ static void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec)
static int dmm32at_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
	struct comedi_cmd *cmd = &s->async->cmd;
	unsigned long irq_flags;
	int ret;

	dmm32at_ai_set_chanspec(dev, s, cmd->chanlist[0], cmd->chanlist_len);

	/* serialize access to control register and paged registers */
	spin_lock_irqsave(&dev->spinlock, irq_flags);

	/* reset the interrupt just in case */
	outb(DMM32AT_CTRL_INTRST, dev->iobase + DMM32AT_CTRL_REG);

	spin_unlock_irqrestore(&dev->spinlock, irq_flags);

	/*
	 * wait for circuit to settle
	 * we don't have the 'insn' here but it's not needed
@@ -429,8 +441,13 @@ static irqreturn_t dmm32at_isr(int irq, void *d)
		comedi_handle_events(dev, s);
	}

	/* serialize access to control register and paged registers */
	spin_lock(&dev->spinlock);

	/* reset the interrupt */
	outb(DMM32AT_CTRL_INTRST, dev->iobase + DMM32AT_CTRL_REG);

	spin_unlock(&dev->spinlock);
	return IRQ_HANDLED;
}

@@ -481,14 +498,25 @@ static int dmm32at_ao_insn_write(struct comedi_device *dev,
static int dmm32at_8255_io(struct comedi_device *dev,
			   int dir, int port, int data, unsigned long regbase)
{
	unsigned long irq_flags;
	int ret;

	/* serialize access to control register and paged registers */
	spin_lock_irqsave(&dev->spinlock, irq_flags);

	/* get access to the DIO regs */
	outb(DMM32AT_CTRL_PAGE_8255, dev->iobase + DMM32AT_CTRL_REG);

	if (dir) {
		outb(data, dev->iobase + regbase + port);
		return 0;
		ret = 0;
	} else {
		ret = inb(dev->iobase + regbase + port);
	}
	return inb(dev->iobase + regbase + port);

	spin_unlock_irqrestore(&dev->spinlock, irq_flags);

	return ret;
}

/* Make sure the board is there and put it to a known state */
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ int do_rangeinfo_ioctl(struct comedi_device *dev,
	const struct comedi_lrange *lr;
	struct comedi_subdevice *s;

	subd = (it->range_type >> 24) & 0xf;
	subd = (it->range_type >> 24) & 0xff;
	chan = (it->range_type >> 16) & 0xff;

	if (!dev->attached)
Loading