Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7d45fed authored by Linus Torvalds's avatar Linus Torvalds
Browse files


Pull Char / Misc driver fixes from Greg Kroah-Hartman:
 "Here are some small misc and w1 driver fixes for 3.6-rc3.  Nothing
  major, just some some bugfixes and a new device id for a w1 driver.

  Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org&gt;">

* tag 'char-misc-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  1-Wire: Add support for the maxim ds1825 temperature sensor
  ti-st: Fix check for pdata->chip_awake function pointer
  mei: add mei_quirk_probe function
  mei: fix device stall after wd is stopped
parents 9134e7d2 f3261dfb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ Kernel driver w1_therm

Supported chips:
  * Maxim ds18*20 based temperature sensors.
  * Maxim ds1825 based temperature sensors.

Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

@@ -15,6 +16,7 @@ supported family codes:
W1_THERM_DS18S20	0x10
W1_THERM_DS1822		0x22
W1_THERM_DS18B20	0x28
W1_THERM_DS1825		0x3B

Support is provided through the sysfs w1_slave file.  Each open and
read sequence will initiate a temperature conversion then provide two
+1 −1
Original line number Diff line number Diff line
@@ -1253,7 +1253,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
			if (dev->wd_timeout)
				*slots -= mei_data2slots(MEI_START_WD_DATA_SIZE);
			else
				*slots -= mei_data2slots(MEI_START_WD_DATA_SIZE);
				*slots -= mei_data2slots(MEI_WD_PARAMS_SIZE);
		}
	}
	if (dev->stop)
+27 −0
Original line number Diff line number Diff line
@@ -924,6 +924,27 @@ static struct miscdevice mei_misc_device = {
		.minor = MISC_DYNAMIC_MINOR,
};

/**
 * mei_quirk_probe - probe for devices that doesn't valid ME interface
 * @pdev: PCI device structure
 * @ent: entry into pci_device_table
 *
 * returns true if ME Interface is valid, false otherwise
 */
static bool __devinit mei_quirk_probe(struct pci_dev *pdev,
				const struct pci_device_id *ent)
{
	u32 reg;
	if (ent->device == MEI_DEV_ID_PBG_1) {
		pci_read_config_dword(pdev, 0x48, &reg);
		/* make sure that bit 9 is up and bit 10 is down */
		if ((reg & 0x600) == 0x200) {
			dev_info(&pdev->dev, "Device doesn't have valid ME Interface\n");
			return false;
		}
	}
	return true;
}
/**
 * mei_probe - Device Initialization Routine
 *
@@ -939,6 +960,12 @@ static int __devinit mei_probe(struct pci_dev *pdev,
	int err;

	mutex_lock(&mei_mutex);

	if (!mei_quirk_probe(pdev, ent)) {
		err = -ENODEV;
		goto end;
	}

	if (mei_device) {
		err = -EEXIST;
		goto end;
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ static void ll_device_want_to_wakeup(struct st_data_s *st_data)
	/* communicate to platform about chip wakeup */
	kim_data = st_data->kim_data;
	pdata = kim_data->kim_pdev->dev.platform_data;
	if (pdata->chip_asleep)
	if (pdata->chip_awake)
		pdata->chip_awake(NULL);
}

+9 −0
Original line number Diff line number Diff line
@@ -91,6 +91,11 @@ static struct w1_family w1_therm_family_DS28EA00 = {
	.fops = &w1_therm_fops,
};

static struct w1_family w1_therm_family_DS1825 = {
	.fid = W1_THERM_DS1825,
	.fops = &w1_therm_fops,
};

struct w1_therm_family_converter
{
	u8			broken;
@@ -120,6 +125,10 @@ static struct w1_therm_family_converter w1_therm_families[] = {
		.f		= &w1_therm_family_DS28EA00,
		.convert	= w1_DS18B20_convert_temp
	},
	{
		.f		= &w1_therm_family_DS1825,
		.convert	= w1_DS18B20_convert_temp
	}
};

static inline int w1_DS18B20_convert_temp(u8 rom[9])
Loading