]> www.infradead.org Git - users/hch/misc.git/commitdiff
Merge branch 'togreg' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 May 2025 08:13:06 +0000 (18:13 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 May 2025 08:13:06 +0000 (18:13 +1000)
# Conflicts:
# drivers/iio/adc/ad7606.c

23 files changed:
1  2 
Documentation/devicetree/bindings/vendor-prefixes.yaml
MAINTAINERS
drivers/base/property.c
drivers/iio/accel/adxl355_core.c
drivers/iio/accel/fxls8962af-core.c
drivers/iio/adc/Kconfig
drivers/iio/adc/ad7266.c
drivers/iio/adc/ad7380.c
drivers/iio/adc/ad7606.c
drivers/iio/adc/ad7606_spi.c
drivers/iio/adc/ad7768-1.c
drivers/iio/adc/dln2-adc.c
drivers/iio/adc/rockchip_saradc.c
drivers/iio/chemical/pms7003.c
drivers/iio/chemical/sps30.c
drivers/iio/dac/adi-axi-dac.c
drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
drivers/iio/light/hid-sensor-prox.c
drivers/iio/magnetometer/ak8974.c
drivers/iio/temperature/maxim_thermocouple.c
drivers/staging/iio/adc/ad7816.c
include/linux/property.h

diff --cc MAINTAINERS
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
index 8ed65a35b4862315431a4852453639b4e056178e,aa96247d6757342b5216e311b61c664168c0fd29..185243dee86ed2e9ebc43b578003d0c010e97a9f
@@@ -726,17 -657,20 +657,18 @@@ static int ad7606_scan_direct(struct ii
        if (ret)
                goto error_ret;
  
-       chan = &indio_dev->channels[ch + 1];
+       chan = &indio_dev->channels[ch];
+       realbits = chan->scan_type.realbits;
  
 -      if (chan->scan_type.sign == 'u') {
 -              if (realbits > 16)
 -                      *val = st->data.buf32[ch];
 -              else
 -                      *val = st->data.buf16[ch];
 -      } else {
 -              if (realbits > 16)
 -                      *val = sign_extend32(st->data.buf32[ch], realbits - 1);
 -              else
 -                      *val = sign_extend32(st->data.buf16[ch], realbits - 1);
 -      }
 +      if (realbits > 16)
 +              *val = st->data.buf32[ch];
 +      else
 +              *val = st->data.buf16[ch];
 +
 +      *val &= GENMASK(realbits - 1, 0);
 +
 +      if (chan->scan_type.sign == 's')
 +              *val = sign_extend32(*val, realbits - 1);
  
  error_ret:
        if (!st->gpio_convst) {
Simple merge
Simple merge
Simple merge
Simple merge
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)
  {