Merge tag 'char-misc-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Jun 2025 18:50:47 +0000 (11:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Jun 2025 18:50:47 +0000 (11:50 -0700)
Pull char / misc / iio driver updates from Greg KH:
 "Here is the big char/misc/iio and other small driver subsystem pull
  request for 6.16-rc1.

  Overall, a lot of individual changes, but nothing major, just the
  normal constant forward progress of new device support and cleanups to
  existing subsystems. Highlights in here are:

   - Large IIO driver updates and additions and device tree changes

   - Android binder bugfixes and logfile fixes

   - mhi driver updates

   - comedi driver updates

   - counter driver updates and additions

   - coresight driver updates and additions

   - echo driver removal as there are no in-kernel users of it

   - nvmem driver updates

   - spmi driver updates

   - new amd-sbi driver "subsystem" and drivers added

   - rust miscdriver binding documentation fix

   - other small driver fixes and updates (uio, w1, acrn, hpet,
     xillybus, cardreader drivers, fastrpc and others)

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

* tag 'char-misc-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (390 commits)
  binder: fix yet another UAF in binder_devices
  counter: microchip-tcb-capture: Add watch validation support
  dt-bindings: iio: adc: Add ROHM BD79100G
  iio: adc: add support for Nuvoton NCT7201
  dt-bindings: iio: adc: add NCT7201 ADCs
  iio: chemical: Add driver for SEN0322
  dt-bindings: trivial-devices: Document SEN0322
  iio: adc: ad7768-1: reorganize driver headers
  iio: bmp280: zero-init buffer
  iio: ssp_sensors: optimalize -> optimize
  HID: sensor-hub: Fix typo and improve documentation
  iio: admv1013: replace redundant ternary operator with just len
  iio: chemical: mhz19b: Fix error code in probe()
  iio: adc: at91-sama5d2: use IIO_DECLARE_BUFFER_WITH_TS
  iio: accel: sca3300: use IIO_DECLARE_BUFFER_WITH_TS
  iio: adc: ad7380: use IIO_DECLARE_DMA_BUFFER_WITH_TS
  iio: adc: ad4695: rename AD4695_MAX_VIN_CHANNELS
  iio: adc: ad4695: use IIO_DECLARE_DMA_BUFFER_WITH_TS
  iio: introduce IIO_DECLARE_BUFFER_WITH_TS macros
  iio: make IIO_DMA_MINALIGN minimum of 8 bytes
  ...

14 files changed:
1  2 
Documentation/devicetree/bindings/trivial-devices.yaml
Documentation/devicetree/bindings/vendor-prefixes.yaml
Documentation/userspace-api/ioctl/ioctl-number.rst
MAINTAINERS
drivers/android/binderfs.c
drivers/base/property.c
drivers/hwmon/Kconfig
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/nvmem/Kconfig
drivers/nvmem/Makefile
drivers/uio/uio_hv_generic.c
include/linux/property.h
rust/kernel/miscdevice.rs

diff --cc MAINTAINERS
Simple merge
Simple merge
index 805f75b35115ff48353af3f2d80f8bad12b74b06,f42f32ff45fc2c29249d48baa826564839009e44..f626d5bbe8067d042b81a65d52daf342eae2891e
@@@ -943,8 -943,35 +943,35 @@@ unsigned int fwnode_get_child_node_coun
  
        return count;
  }
 -EXPORT_SYMBOL_GPL(device_get_child_node_count);
 +EXPORT_SYMBOL_GPL(fwnode_get_child_node_count);
  
+ /**
+  * fwnode_get_named_child_node_count - number of child nodes with given name
+  * @fwnode: Node which child nodes are counted.
+  * @name: String to match child node name against.
+  *
+  * Scan child nodes and count all the nodes with a specific name. Potential
+  * 'number' -ending after the 'at sign' for scanned names is ignored.
+  * E.g.::
+  *   fwnode_get_named_child_node_count(fwnode, "channel");
+  * would match all the nodes::
+  *   channel { }, channel@0 {}, channel@0xabba {}...
+  *
+  * Return: the number of child nodes with a matching name for a given device.
+  */
+ unsigned int fwnode_get_named_child_node_count(const struct fwnode_handle *fwnode,
+                                              const char *name)
+ {
+       struct fwnode_handle *child;
+       unsigned int count = 0;
+       fwnode_for_each_named_child_node(fwnode, child, name)
+               count++;
+       return count;
+ }
+ EXPORT_SYMBOL_GPL(fwnode_get_named_child_node_count);
  bool device_dma_supported(const struct device *dev)
  {
        return fwnode_call_bool_op(dev_fwnode(dev), device_dma_supported);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index bc5bfc98176baad5a95d929f7fe5c51217aeb1b9,3e83babac0b06cf026020ab72865a79d4bf88497..f718dd4789e51b6eedfcd5602e87bbe94836c273
@@@ -208,13 -220,16 +220,21 @@@ DEFINE_FREE(fwnode_handle, struct fwnod
  int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index);
  int fwnode_irq_get_byname(const struct fwnode_handle *fwnode, const char *name);
  
 -unsigned int device_get_child_node_count(const struct device *dev);
 +unsigned int fwnode_get_child_node_count(const struct fwnode_handle *fwnode);
 +
 +static inline unsigned int device_get_child_node_count(const struct device *dev)
 +{
 +      return fwnode_get_child_node_count(dev_fwnode(dev));
 +}
  
+ unsigned int fwnode_get_named_child_node_count(const struct fwnode_handle *fwnode,
+                                              const char *name);
+ static inline unsigned int device_get_named_child_node_count(const struct device *dev,
+                                                            const char *name)
+ {
+       return fwnode_get_named_child_node_count(dev_fwnode(dev), name);
+ }
  static inline int device_property_read_u8(const struct device *dev,
                                          const char *propname, u8 *val)
  {
index f33c13c3ff97d0cca58cf6c7d4e3cb8a611a102c,15d10e5c1db7da8f8686ed1c5d4174291231351b..939278bc7b03489a647b697012e09223871c90cd
@@@ -120,25 -119,9 +120,25 @@@ pub trait MiscDevice: Sized 
          drop(device);
      }
  
 +    /// Handle for mmap.
 +    ///
 +    /// This function is invoked when a user space process invokes the `mmap` system call on
 +    /// `file`. The function is a callback that is part of the VMA initializer. The kernel will do
 +    /// initial setup of the VMA before calling this function. The function can then interact with
 +    /// the VMA initialization by calling methods of `vma`. If the function does not return an
 +    /// error, the kernel will complete initialization of the VMA according to the properties of
 +    /// `vma`.
 +    fn mmap(
 +        _device: <Self::Ptr as ForeignOwnable>::Borrowed<'_>,
 +        _file: &File,
 +        _vma: &VmaNew,
 +    ) -> Result {
 +        build_error!(VTABLE_DEFAULT_ERROR)
 +    }
 +
      /// Handler for ioctls.
      ///
-     /// The `cmd` argument is usually manipulated using the utilties in [`kernel::ioctl`].
+     /// The `cmd` argument is usually manipulated using the utilities in [`kernel::ioctl`].
      ///
      /// [`kernel::ioctl`]: mod@crate::ioctl
      fn ioctl(