mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00:00
Char/Misc driver fixes for 6.9-rc7
Here are some small char/misc/other driver fixes and new device ids for 6.9-rc7 that resolve some reported problems. Included in here are: - iio driver fixes - mei driver fix and new device ids - dyndbg bugfix - pvpanic-pci driver bugfix - slimbus driver bugfix - fpga new device id All have been in linux-next with no reported problems. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZjdD2Q8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+yk38wCeJeUXW4/yQ4BTj7cHir0aOowVs+UAnAxCUwzt NpooaVg3v9tzLtvAOp1O =YfmA -----END PGP SIGNATURE----- Merge tag 'char-misc-6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char/misc/other driver fixes and new device ids for 6.9-rc7 that resolve some reported problems. Included in here are: - iio driver fixes - mei driver fix and new device ids - dyndbg bugfix - pvpanic-pci driver bugfix - slimbus driver bugfix - fpga new device id All have been in linux-next with no reported problems" * tag 'char-misc-6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: slimbus: qcom-ngd-ctrl: Add timeout for wait operation dyndbg: fix old BUG_ON in >control parser misc/pvpanic-pci: register attributes via pci_driver fpga: dfl-pci: add PCI subdevice ID for Intel D5005 card mei: me: add lunar lake point M DID mei: pxp: match against PCI_CLASS_DISPLAY_OTHER iio:imu: adis16475: Fix sync mode setting iio: accel: mxc4005: Reset chip on probe() and resume() iio: accel: mxc4005: Interrupt handling fixes dt-bindings: iio: health: maxim,max30102: fix compatible check iio: pressure: Fixes SPI support for BMP3xx devices iio: pressure: Fixes BME280 SPI driver data
This commit is contained in:
commit
b9158815de
@ -42,7 +42,7 @@ allOf:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: maxim,max30100
|
||||
const: maxim,max30102
|
||||
then:
|
||||
properties:
|
||||
maxim,green-led-current-microamp: false
|
||||
|
@ -78,6 +78,7 @@ static void cci_pci_free_irq(struct pci_dev *pcidev)
|
||||
#define PCIE_DEVICE_ID_SILICOM_PAC_N5011 0x1001
|
||||
#define PCIE_DEVICE_ID_INTEL_DFL 0xbcce
|
||||
/* PCI Subdevice ID for PCIE_DEVICE_ID_INTEL_DFL */
|
||||
#define PCIE_SUBDEVICE_ID_INTEL_D5005 0x138d
|
||||
#define PCIE_SUBDEVICE_ID_INTEL_N6000 0x1770
|
||||
#define PCIE_SUBDEVICE_ID_INTEL_N6001 0x1771
|
||||
#define PCIE_SUBDEVICE_ID_INTEL_C6100 0x17d4
|
||||
@ -101,6 +102,8 @@ static struct pci_device_id cci_pcie_id_tbl[] = {
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_PAC_D5005_VF),},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, PCIE_DEVICE_ID_SILICOM_PAC_N5010),},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, PCIE_DEVICE_ID_SILICOM_PAC_N5011),},
|
||||
{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL,
|
||||
PCI_VENDOR_ID_INTEL, PCIE_SUBDEVICE_ID_INTEL_D5005),},
|
||||
{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL,
|
||||
PCI_VENDOR_ID_INTEL, PCIE_SUBDEVICE_ID_INTEL_N6000),},
|
||||
{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL_VF,
|
||||
|
@ -5,6 +5,7 @@
|
||||
* Copyright (c) 2014, Intel Corporation.
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/iio/iio.h>
|
||||
@ -27,11 +28,16 @@
|
||||
#define MXC4005_REG_ZOUT_UPPER 0x07
|
||||
#define MXC4005_REG_ZOUT_LOWER 0x08
|
||||
|
||||
#define MXC4005_REG_INT_MASK0 0x0A
|
||||
|
||||
#define MXC4005_REG_INT_MASK1 0x0B
|
||||
#define MXC4005_REG_INT_MASK1_BIT_DRDYE 0x01
|
||||
|
||||
#define MXC4005_REG_INT_CLR0 0x00
|
||||
|
||||
#define MXC4005_REG_INT_CLR1 0x01
|
||||
#define MXC4005_REG_INT_CLR1_BIT_DRDYC 0x01
|
||||
#define MXC4005_REG_INT_CLR1_SW_RST 0x10
|
||||
|
||||
#define MXC4005_REG_CONTROL 0x0D
|
||||
#define MXC4005_REG_CONTROL_MASK_FSR GENMASK(6, 5)
|
||||
@ -39,6 +45,9 @@
|
||||
|
||||
#define MXC4005_REG_DEVICE_ID 0x0E
|
||||
|
||||
/* Datasheet does not specify a reset time, this is a conservative guess */
|
||||
#define MXC4005_RESET_TIME_US 2000
|
||||
|
||||
enum mxc4005_axis {
|
||||
AXIS_X,
|
||||
AXIS_Y,
|
||||
@ -62,6 +71,8 @@ struct mxc4005_data {
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
bool trigger_enabled;
|
||||
unsigned int control;
|
||||
unsigned int int_mask1;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -113,7 +124,9 @@ static bool mxc4005_is_readable_reg(struct device *dev, unsigned int reg)
|
||||
static bool mxc4005_is_writeable_reg(struct device *dev, unsigned int reg)
|
||||
{
|
||||
switch (reg) {
|
||||
case MXC4005_REG_INT_CLR0:
|
||||
case MXC4005_REG_INT_CLR1:
|
||||
case MXC4005_REG_INT_MASK0:
|
||||
case MXC4005_REG_INT_MASK1:
|
||||
case MXC4005_REG_CONTROL:
|
||||
return true;
|
||||
@ -330,23 +343,20 @@ static int mxc4005_set_trigger_state(struct iio_trigger *trig,
|
||||
{
|
||||
struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig);
|
||||
struct mxc4005_data *data = iio_priv(indio_dev);
|
||||
unsigned int val;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&data->mutex);
|
||||
if (state) {
|
||||
ret = regmap_write(data->regmap, MXC4005_REG_INT_MASK1,
|
||||
MXC4005_REG_INT_MASK1_BIT_DRDYE);
|
||||
} else {
|
||||
ret = regmap_write(data->regmap, MXC4005_REG_INT_MASK1,
|
||||
~MXC4005_REG_INT_MASK1_BIT_DRDYE);
|
||||
}
|
||||
|
||||
val = state ? MXC4005_REG_INT_MASK1_BIT_DRDYE : 0;
|
||||
ret = regmap_write(data->regmap, MXC4005_REG_INT_MASK1, val);
|
||||
if (ret < 0) {
|
||||
mutex_unlock(&data->mutex);
|
||||
dev_err(data->dev, "failed to update reg_int_mask1");
|
||||
return ret;
|
||||
}
|
||||
|
||||
data->int_mask1 = val;
|
||||
data->trigger_enabled = state;
|
||||
mutex_unlock(&data->mutex);
|
||||
|
||||
@ -382,6 +392,21 @@ static int mxc4005_chip_init(struct mxc4005_data *data)
|
||||
|
||||
dev_dbg(data->dev, "MXC4005 chip id %02x\n", reg);
|
||||
|
||||
ret = regmap_write(data->regmap, MXC4005_REG_INT_CLR1,
|
||||
MXC4005_REG_INT_CLR1_SW_RST);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(data->dev, ret, "resetting chip\n");
|
||||
|
||||
fsleep(MXC4005_RESET_TIME_US);
|
||||
|
||||
ret = regmap_write(data->regmap, MXC4005_REG_INT_MASK0, 0);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(data->dev, ret, "writing INT_MASK0\n");
|
||||
|
||||
ret = regmap_write(data->regmap, MXC4005_REG_INT_MASK1, 0);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(data->dev, ret, "writing INT_MASK1\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -469,6 +494,58 @@ static int mxc4005_probe(struct i2c_client *client)
|
||||
return devm_iio_device_register(&client->dev, indio_dev);
|
||||
}
|
||||
|
||||
static int mxc4005_suspend(struct device *dev)
|
||||
{
|
||||
struct iio_dev *indio_dev = dev_get_drvdata(dev);
|
||||
struct mxc4005_data *data = iio_priv(indio_dev);
|
||||
int ret;
|
||||
|
||||
/* Save control to restore it on resume */
|
||||
ret = regmap_read(data->regmap, MXC4005_REG_CONTROL, &data->control);
|
||||
if (ret < 0)
|
||||
dev_err(data->dev, "failed to read reg_control\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mxc4005_resume(struct device *dev)
|
||||
{
|
||||
struct iio_dev *indio_dev = dev_get_drvdata(dev);
|
||||
struct mxc4005_data *data = iio_priv(indio_dev);
|
||||
int ret;
|
||||
|
||||
ret = regmap_write(data->regmap, MXC4005_REG_INT_CLR1,
|
||||
MXC4005_REG_INT_CLR1_SW_RST);
|
||||
if (ret) {
|
||||
dev_err(data->dev, "failed to reset chip: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
fsleep(MXC4005_RESET_TIME_US);
|
||||
|
||||
ret = regmap_write(data->regmap, MXC4005_REG_CONTROL, data->control);
|
||||
if (ret) {
|
||||
dev_err(data->dev, "failed to restore control register\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = regmap_write(data->regmap, MXC4005_REG_INT_MASK0, 0);
|
||||
if (ret) {
|
||||
dev_err(data->dev, "failed to restore interrupt 0 mask\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = regmap_write(data->regmap, MXC4005_REG_INT_MASK1, data->int_mask1);
|
||||
if (ret) {
|
||||
dev_err(data->dev, "failed to restore interrupt 1 mask\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(mxc4005_pm_ops, mxc4005_suspend, mxc4005_resume);
|
||||
|
||||
static const struct acpi_device_id mxc4005_acpi_match[] = {
|
||||
{"MXC4005", 0},
|
||||
{"MXC6655", 0},
|
||||
@ -496,6 +573,7 @@ static struct i2c_driver mxc4005_driver = {
|
||||
.name = MXC4005_DRV_NAME,
|
||||
.acpi_match_table = mxc4005_acpi_match,
|
||||
.of_match_table = mxc4005_of_match,
|
||||
.pm = pm_sleep_ptr(&mxc4005_pm_ops),
|
||||
},
|
||||
.probe = mxc4005_probe,
|
||||
.id_table = mxc4005_id,
|
||||
|
@ -1289,6 +1289,7 @@ static int adis16475_config_sync_mode(struct adis16475 *st)
|
||||
struct device *dev = &st->adis.spi->dev;
|
||||
const struct adis16475_sync *sync;
|
||||
u32 sync_mode;
|
||||
u16 val;
|
||||
|
||||
/* default to internal clk */
|
||||
st->clk_freq = st->info->int_clk * 1000;
|
||||
@ -1350,8 +1351,9 @@ static int adis16475_config_sync_mode(struct adis16475 *st)
|
||||
* I'm keeping this for simplicity and avoiding extra variables
|
||||
* in chip_info.
|
||||
*/
|
||||
val = ADIS16475_SYNC_MODE(sync->sync_mode);
|
||||
ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
|
||||
ADIS16475_SYNC_MODE_MASK, sync->sync_mode);
|
||||
ADIS16475_SYNC_MODE_MASK, val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -1233,6 +1233,7 @@ const struct bmp280_chip_info bmp380_chip_info = {
|
||||
.chip_id = bmp380_chip_ids,
|
||||
.num_chip_id = ARRAY_SIZE(bmp380_chip_ids),
|
||||
.regmap_config = &bmp380_regmap_config,
|
||||
.spi_read_extra_byte = true,
|
||||
.start_up_time = 2000,
|
||||
.channels = bmp380_channels,
|
||||
.num_channels = 2,
|
||||
|
@ -96,15 +96,10 @@ static int bmp280_spi_probe(struct spi_device *spi)
|
||||
|
||||
chip_info = spi_get_device_match_data(spi);
|
||||
|
||||
switch (chip_info->chip_id[0]) {
|
||||
case BMP380_CHIP_ID:
|
||||
case BMP390_CHIP_ID:
|
||||
if (chip_info->spi_read_extra_byte)
|
||||
bmp_regmap_bus = &bmp380_regmap_bus;
|
||||
break;
|
||||
default:
|
||||
else
|
||||
bmp_regmap_bus = &bmp280_regmap_bus;
|
||||
break;
|
||||
}
|
||||
|
||||
regmap = devm_regmap_init(&spi->dev,
|
||||
bmp_regmap_bus,
|
||||
@ -127,7 +122,7 @@ static const struct of_device_id bmp280_of_spi_match[] = {
|
||||
{ .compatible = "bosch,bmp180", .data = &bmp180_chip_info },
|
||||
{ .compatible = "bosch,bmp181", .data = &bmp180_chip_info },
|
||||
{ .compatible = "bosch,bmp280", .data = &bmp280_chip_info },
|
||||
{ .compatible = "bosch,bme280", .data = &bmp280_chip_info },
|
||||
{ .compatible = "bosch,bme280", .data = &bme280_chip_info },
|
||||
{ .compatible = "bosch,bmp380", .data = &bmp380_chip_info },
|
||||
{ .compatible = "bosch,bmp580", .data = &bmp580_chip_info },
|
||||
{ },
|
||||
@ -139,7 +134,7 @@ static const struct spi_device_id bmp280_spi_id[] = {
|
||||
{ "bmp180", (kernel_ulong_t)&bmp180_chip_info },
|
||||
{ "bmp181", (kernel_ulong_t)&bmp180_chip_info },
|
||||
{ "bmp280", (kernel_ulong_t)&bmp280_chip_info },
|
||||
{ "bme280", (kernel_ulong_t)&bmp280_chip_info },
|
||||
{ "bme280", (kernel_ulong_t)&bme280_chip_info },
|
||||
{ "bmp380", (kernel_ulong_t)&bmp380_chip_info },
|
||||
{ "bmp580", (kernel_ulong_t)&bmp580_chip_info },
|
||||
{ }
|
||||
|
@ -423,6 +423,7 @@ struct bmp280_chip_info {
|
||||
int num_chip_id;
|
||||
|
||||
const struct regmap_config *regmap_config;
|
||||
bool spi_read_extra_byte;
|
||||
|
||||
const struct iio_chan_spec *channels;
|
||||
int num_channels;
|
||||
|
@ -115,6 +115,8 @@
|
||||
#define MEI_DEV_ID_ARL_S 0x7F68 /* Arrow Lake Point S */
|
||||
#define MEI_DEV_ID_ARL_H 0x7770 /* Arrow Lake Point H */
|
||||
|
||||
#define MEI_DEV_ID_LNL_M 0xA870 /* Lunar Lake Point M */
|
||||
|
||||
/*
|
||||
* MEI HW Section
|
||||
*/
|
||||
|
@ -122,6 +122,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
|
||||
{MEI_PCI_DEVICE(MEI_DEV_ID_ARL_S, MEI_ME_PCH15_CFG)},
|
||||
{MEI_PCI_DEVICE(MEI_DEV_ID_ARL_H, MEI_ME_PCH15_CFG)},
|
||||
|
||||
{MEI_PCI_DEVICE(MEI_DEV_ID_LNL_M, MEI_ME_PCH15_CFG)},
|
||||
|
||||
/* required last entry */
|
||||
{0, }
|
||||
};
|
||||
|
@ -236,8 +236,11 @@ static int mei_pxp_component_match(struct device *dev, int subcomponent,
|
||||
|
||||
pdev = to_pci_dev(dev);
|
||||
|
||||
if (pdev->class != (PCI_CLASS_DISPLAY_VGA << 8) ||
|
||||
pdev->vendor != PCI_VENDOR_ID_INTEL)
|
||||
if (pdev->vendor != PCI_VENDOR_ID_INTEL)
|
||||
return 0;
|
||||
|
||||
if (pdev->class != (PCI_CLASS_DISPLAY_VGA << 8) &&
|
||||
pdev->class != (PCI_CLASS_DISPLAY_OTHER << 8))
|
||||
return 0;
|
||||
|
||||
if (subcomponent != I915_COMPONENT_PXP)
|
||||
|
@ -44,8 +44,6 @@ static struct pci_driver pvpanic_pci_driver = {
|
||||
.name = "pvpanic-pci",
|
||||
.id_table = pvpanic_pci_id_tbl,
|
||||
.probe = pvpanic_pci_probe,
|
||||
.driver = {
|
||||
.dev_groups = pvpanic_dev_groups,
|
||||
},
|
||||
.dev_groups = pvpanic_dev_groups,
|
||||
};
|
||||
module_pci_driver(pvpanic_pci_driver);
|
||||
|
@ -1451,7 +1451,11 @@ static void qcom_slim_ngd_up_worker(struct work_struct *work)
|
||||
ctrl = container_of(work, struct qcom_slim_ngd_ctrl, ngd_up_work);
|
||||
|
||||
/* Make sure qmi service is up before continuing */
|
||||
wait_for_completion_interruptible(&ctrl->qmi_up);
|
||||
if (!wait_for_completion_interruptible_timeout(&ctrl->qmi_up,
|
||||
msecs_to_jiffies(MSEC_PER_SEC))) {
|
||||
dev_err(ctrl->dev, "QMI wait timeout\n");
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&ctrl->ssr_lock);
|
||||
qcom_slim_ngd_enable(ctrl, true);
|
||||
|
@ -302,7 +302,11 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords)
|
||||
} else {
|
||||
for (end = buf; *end && !isspace(*end); end++)
|
||||
;
|
||||
BUG_ON(end == buf);
|
||||
if (end == buf) {
|
||||
pr_err("parse err after word:%d=%s\n", nwords,
|
||||
nwords ? words[nwords - 1] : "<none>");
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
/* `buf' is start of word, `end' is one past its end */
|
||||
|
Loading…
Reference in New Issue
Block a user