Skip to content

Commit 7efc0eb

Browse files
committed
Merge tag 'char-misc-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char / miscdriver fixes from Greg KH: "Here is a small set of char/misc and IIO driver fixes for 6.8-rc5. Included in here are: - lots of iio driver fixes for reported issues - nvmem device naming fixup for reported problem - interconnect driver fixes for reported issues All of these have been in linux-next for a while with no reported the issues (the nvmem patch was included in a different branch in linux-next before sent to me for inclusion here)" * tag 'char-misc-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits) nvmem: include bit index in cell sysfs file name iio: adc: ad4130: only set GPIO_CTRL if pin is unused iio: adc: ad4130: zero-initialize clock init data interconnect: qcom: x1e80100: Add missing ACV enable_mask interconnect: qcom: sm8650: Use correct ACV enable_mask iio: accel: bma400: Fix a compilation problem iio: commom: st_sensors: ensure proper DMA alignment iio: hid-sensor-als: Return 0 for HID_USAGE_SENSOR_TIME_TIMESTAMP iio: move LIGHT_UVA and LIGHT_UVB to the end of iio_modifier staging: iio: ad5933: fix type mismatch regression iio: humidity: hdc3020: fix temperature offset iio: adc: ad7091r8: Fix error code in ad7091r8_gpio_setup() iio: adc: ad_sigma_delta: ensure proper DMA alignment iio: imu: adis: ensure proper DMA alignment iio: humidity: hdc3020: Add Makefile, Kconfig and MAINTAINERS entry iio: imu: bno055: serdev requires REGMAP iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC iio: pressure: bmp280: Add missing bmp085 to SPI id table iio: core: fix memleak in iio_device_register_sysfs interconnect: qcom: sm8550: Enable sync_state ...
2 parents 4b2981b + e20f378 commit 7efc0eb

File tree

23 files changed

+73
-27
lines changed

23 files changed

+73
-27
lines changed

Documentation/ABI/testing/sysfs-nvmem-cells

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ KernelVersion: 6.5
44
Contact: Miquel Raynal <miquel.raynal@bootlin.com>
55
Description:
66
The "cells" folder contains one file per cell exposed by the
7-
NVMEM device. The name of the file is: <name>@<where>, with
8-
<name> being the cell name and <where> its location in the NVMEM
9-
device, in hexadecimal (without the '0x' prefix, to mimic device
10-
tree node names). The length of the file is the size of the cell
11-
(when known). The content of the file is the binary content of
12-
the cell (may sometimes be ASCII, likely without trailing
13-
character).
7+
NVMEM device. The name of the file is: "<name>@<byte>,<bit>",
8+
with <name> being the cell name and <where> its location in
9+
the NVMEM device, in hexadecimal bytes and bits (without the
10+
'0x' prefix, to mimic device tree node names). The length of
11+
the file is the size of the cell (when known). The content of
12+
the file is the binary content of the cell (may sometimes be
13+
ASCII, likely without trailing character).
1414
Note: This file is only present if CONFIG_NVMEM_SYSFS
1515
is enabled.
1616

1717
Example::
1818

19-
hexdump -C /sys/bus/nvmem/devices/1-00563/cells/product-name@d
19+
hexdump -C /sys/bus/nvmem/devices/1-00563/cells/product-name@d,0
2020
00000000 54 4e 34 38 4d 2d 50 2d 44 4e |TN48M-P-DN|
2121
0000000a

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22010,6 +22010,14 @@ F: Documentation/devicetree/bindings/media/i2c/ti,ds90*
2201022010
F: drivers/media/i2c/ds90*
2201122011
F: include/media/i2c/ds90*
2201222012

22013+
TI HDC302X HUMIDITY DRIVER
22014+
M: Javier Carrasco <javier.carrasco.cruz@gmail.com>
22015+
M: Li peiyu <579lpy@gmail.com>
22016+
L: linux-iio@vger.kernel.org
22017+
S: Maintained
22018+
F: Documentation/devicetree/bindings/iio/humidity/ti,hdc3020.yaml
22019+
F: drivers/iio/humidity/hdc3020.c
22020+
2201322021
TI ICSSG ETHERNET DRIVER (ICSSG)
2201422022
R: MD Danish Anwar <danishanwar@ti.com>
2201522023
R: Roger Quadros <rogerq@kernel.org>

drivers/iio/accel/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,12 @@ config BMA400
219219

220220
config BMA400_I2C
221221
tristate
222+
select REGMAP_I2C
222223
depends on BMA400
223224

224225
config BMA400_SPI
225226
tristate
227+
select REGMAP_SPI
226228
depends on BMA400
227229

228230
config BMC150_ACCEL

drivers/iio/adc/ad4130.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ static int ad4130_setup_int_clk(struct ad4130_state *st)
18211821
{
18221822
struct device *dev = &st->spi->dev;
18231823
struct device_node *of_node = dev_of_node(dev);
1824-
struct clk_init_data init;
1824+
struct clk_init_data init = {};
18251825
const char *clk_name;
18261826
int ret;
18271827

@@ -1891,10 +1891,14 @@ static int ad4130_setup(struct iio_dev *indio_dev)
18911891
return ret;
18921892

18931893
/*
1894-
* Configure all GPIOs for output. If configured, the interrupt function
1895-
* of P2 takes priority over the GPIO out function.
1894+
* Configure unused GPIOs for output. If configured, the interrupt
1895+
* function of P2 takes priority over the GPIO out function.
18961896
*/
1897-
val = AD4130_IO_CONTROL_GPIO_CTRL_MASK;
1897+
val = 0;
1898+
for (i = 0; i < AD4130_MAX_GPIOS; i++)
1899+
if (st->pins_fn[i + AD4130_AIN2_P1] == AD4130_PIN_FN_NONE)
1900+
val |= FIELD_PREP(AD4130_IO_CONTROL_GPIO_CTRL_MASK, BIT(i));
1901+
18981902
val |= FIELD_PREP(AD4130_IO_CONTROL_INT_PIN_SEL_MASK, st->int_pin_sel);
18991903

19001904
ret = regmap_write(st->regmap, AD4130_IO_CONTROL_REG, val);

drivers/iio/adc/ad7091r8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static int ad7091r8_gpio_setup(struct ad7091r_state *st)
195195
st->reset_gpio = devm_gpiod_get_optional(st->dev, "reset",
196196
GPIOD_OUT_HIGH);
197197
if (IS_ERR(st->reset_gpio))
198-
return dev_err_probe(st->dev, PTR_ERR(st->convst_gpio),
198+
return dev_err_probe(st->dev, PTR_ERR(st->reset_gpio),
199199
"Error on requesting reset GPIO\n");
200200

201201
if (st->reset_gpio) {

drivers/iio/humidity/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ config HDC2010
4848
To compile this driver as a module, choose M here: the module
4949
will be called hdc2010.
5050

51+
config HDC3020
52+
tristate "TI HDC3020 relative humidity and temperature sensor"
53+
depends on I2C
54+
select CRC8
55+
help
56+
Say yes here to build support for the Texas Instruments
57+
HDC3020, HDC3021 and HDC3022 relative humidity and temperature
58+
sensors.
59+
60+
To compile this driver as a module, choose M here: the module
61+
will be called hdc3020.
62+
5163
config HID_SENSOR_HUMIDITY
5264
tristate "HID Environmental humidity sensor"
5365
depends on HID_SENSOR_HUB

drivers/iio/humidity/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ obj-$(CONFIG_AM2315) += am2315.o
77
obj-$(CONFIG_DHT11) += dht11.o
88
obj-$(CONFIG_HDC100X) += hdc100x.o
99
obj-$(CONFIG_HDC2010) += hdc2010.o
10+
obj-$(CONFIG_HDC3020) += hdc3020.o
1011
obj-$(CONFIG_HID_SENSOR_HUMIDITY) += hid-sensor-humidity.o
1112

1213
hts221-y := hts221_core.o \

drivers/iio/humidity/hdc3020.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int hdc3020_read_raw(struct iio_dev *indio_dev,
322322
if (chan->type != IIO_TEMP)
323323
return -EINVAL;
324324

325-
*val = 16852;
325+
*val = -16852;
326326
return IIO_VAL_INT;
327327

328328
default:

drivers/iio/imu/bno055/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ config BOSCH_BNO055
88
config BOSCH_BNO055_SERIAL
99
tristate "Bosch BNO055 attached via UART"
1010
depends on SERIAL_DEV_BUS
11+
select REGMAP
1112
select BOSCH_BNO055
1213
help
1314
Enable this to support Bosch BNO055 IMUs attached via UART.

drivers/iio/industrialio-core.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1584,10 +1584,13 @@ static int iio_device_register_sysfs(struct iio_dev *indio_dev)
15841584
ret = iio_device_register_sysfs_group(indio_dev,
15851585
&iio_dev_opaque->chan_attr_group);
15861586
if (ret)
1587-
goto error_clear_attrs;
1587+
goto error_free_chan_attrs;
15881588

15891589
return 0;
15901590

1591+
error_free_chan_attrs:
1592+
kfree(iio_dev_opaque->chan_attr_group.attrs);
1593+
iio_dev_opaque->chan_attr_group.attrs = NULL;
15911594
error_clear_attrs:
15921595
iio_free_chan_devattr_list(&iio_dev_opaque->channel_attr_list);
15931596

0 commit comments

Comments
 (0)