diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-17 13:15:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-17 13:15:57 -0400 |
commit | d7d45fedf92b351500af99d03004e59531a3d070 (patch) | |
tree | 3d6a89e8b66770747c9df65186ec345a8babcebe | |
parent | 9134e7d2706a8954f216a9f11ef784e0f9ccd551 (diff) | |
parent | f3261dfb5538e2ff0264fde3050dbd4e922fa296 (diff) |
Merge tag 'char-misc-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* 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
-rw-r--r-- | Documentation/w1/slaves/w1_therm | 2 | ||||
-rw-r--r-- | drivers/misc/mei/interrupt.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/main.c | 27 | ||||
-rw-r--r-- | drivers/misc/ti-st/st_ll.c | 2 | ||||
-rw-r--r-- | drivers/w1/slaves/w1_therm.c | 9 | ||||
-rw-r--r-- | drivers/w1/w1_family.h | 1 |
6 files changed, 41 insertions, 2 deletions
diff --git a/Documentation/w1/slaves/w1_therm b/Documentation/w1/slaves/w1_therm index 0403aaaba878..874a8ca93feb 100644 --- a/Documentation/w1/slaves/w1_therm +++ b/Documentation/w1/slaves/w1_therm | |||
@@ -3,6 +3,7 @@ Kernel driver w1_therm | |||
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * Maxim ds18*20 based temperature sensors. | 5 | * Maxim ds18*20 based temperature sensors. |
6 | * Maxim ds1825 based temperature sensors. | ||
6 | 7 | ||
7 | Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru> | 8 | Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru> |
8 | 9 | ||
@@ -15,6 +16,7 @@ supported family codes: | |||
15 | W1_THERM_DS18S20 0x10 | 16 | W1_THERM_DS18S20 0x10 |
16 | W1_THERM_DS1822 0x22 | 17 | W1_THERM_DS1822 0x22 |
17 | W1_THERM_DS18B20 0x28 | 18 | W1_THERM_DS18B20 0x28 |
19 | W1_THERM_DS1825 0x3B | ||
18 | 20 | ||
19 | Support is provided through the sysfs w1_slave file. Each open and | 21 | Support is provided through the sysfs w1_slave file. Each open and |
20 | read sequence will initiate a temperature conversion then provide two | 22 | read sequence will initiate a temperature conversion then provide two |
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index c6ffbbe5a6c0..d78c05e693f7 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c | |||
@@ -1253,7 +1253,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list, | |||
1253 | if (dev->wd_timeout) | 1253 | if (dev->wd_timeout) |
1254 | *slots -= mei_data2slots(MEI_START_WD_DATA_SIZE); | 1254 | *slots -= mei_data2slots(MEI_START_WD_DATA_SIZE); |
1255 | else | 1255 | else |
1256 | *slots -= mei_data2slots(MEI_START_WD_DATA_SIZE); | 1256 | *slots -= mei_data2slots(MEI_WD_PARAMS_SIZE); |
1257 | } | 1257 | } |
1258 | } | 1258 | } |
1259 | if (dev->stop) | 1259 | if (dev->stop) |
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 092330208869..7422c7652845 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c | |||
@@ -925,6 +925,27 @@ static struct miscdevice mei_misc_device = { | |||
925 | }; | 925 | }; |
926 | 926 | ||
927 | /** | 927 | /** |
928 | * mei_quirk_probe - probe for devices that doesn't valid ME interface | ||
929 | * @pdev: PCI device structure | ||
930 | * @ent: entry into pci_device_table | ||
931 | * | ||
932 | * returns true if ME Interface is valid, false otherwise | ||
933 | */ | ||
934 | static bool __devinit mei_quirk_probe(struct pci_dev *pdev, | ||
935 | const struct pci_device_id *ent) | ||
936 | { | ||
937 | u32 reg; | ||
938 | if (ent->device == MEI_DEV_ID_PBG_1) { | ||
939 | pci_read_config_dword(pdev, 0x48, ®); | ||
940 | /* make sure that bit 9 is up and bit 10 is down */ | ||
941 | if ((reg & 0x600) == 0x200) { | ||
942 | dev_info(&pdev->dev, "Device doesn't have valid ME Interface\n"); | ||
943 | return false; | ||
944 | } | ||
945 | } | ||
946 | return true; | ||
947 | } | ||
948 | /** | ||
928 | * mei_probe - Device Initialization Routine | 949 | * mei_probe - Device Initialization Routine |
929 | * | 950 | * |
930 | * @pdev: PCI device structure | 951 | * @pdev: PCI device structure |
@@ -939,6 +960,12 @@ static int __devinit mei_probe(struct pci_dev *pdev, | |||
939 | int err; | 960 | int err; |
940 | 961 | ||
941 | mutex_lock(&mei_mutex); | 962 | mutex_lock(&mei_mutex); |
963 | |||
964 | if (!mei_quirk_probe(pdev, ent)) { | ||
965 | err = -ENODEV; | ||
966 | goto end; | ||
967 | } | ||
968 | |||
942 | if (mei_device) { | 969 | if (mei_device) { |
943 | err = -EEXIST; | 970 | err = -EEXIST; |
944 | goto end; | 971 | goto end; |
diff --git a/drivers/misc/ti-st/st_ll.c b/drivers/misc/ti-st/st_ll.c index 1ff460a8e9c7..93b4d67cc4a3 100644 --- a/drivers/misc/ti-st/st_ll.c +++ b/drivers/misc/ti-st/st_ll.c | |||
@@ -87,7 +87,7 @@ static void ll_device_want_to_wakeup(struct st_data_s *st_data) | |||
87 | /* communicate to platform about chip wakeup */ | 87 | /* communicate to platform about chip wakeup */ |
88 | kim_data = st_data->kim_data; | 88 | kim_data = st_data->kim_data; |
89 | pdata = kim_data->kim_pdev->dev.platform_data; | 89 | pdata = kim_data->kim_pdev->dev.platform_data; |
90 | if (pdata->chip_asleep) | 90 | if (pdata->chip_awake) |
91 | pdata->chip_awake(NULL); | 91 | pdata->chip_awake(NULL); |
92 | } | 92 | } |
93 | 93 | ||
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c index d90062b211f8..92d08e7fcba2 100644 --- a/drivers/w1/slaves/w1_therm.c +++ b/drivers/w1/slaves/w1_therm.c | |||
@@ -91,6 +91,11 @@ static struct w1_family w1_therm_family_DS28EA00 = { | |||
91 | .fops = &w1_therm_fops, | 91 | .fops = &w1_therm_fops, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static struct w1_family w1_therm_family_DS1825 = { | ||
95 | .fid = W1_THERM_DS1825, | ||
96 | .fops = &w1_therm_fops, | ||
97 | }; | ||
98 | |||
94 | struct w1_therm_family_converter | 99 | struct w1_therm_family_converter |
95 | { | 100 | { |
96 | u8 broken; | 101 | u8 broken; |
@@ -120,6 +125,10 @@ static struct w1_therm_family_converter w1_therm_families[] = { | |||
120 | .f = &w1_therm_family_DS28EA00, | 125 | .f = &w1_therm_family_DS28EA00, |
121 | .convert = w1_DS18B20_convert_temp | 126 | .convert = w1_DS18B20_convert_temp |
122 | }, | 127 | }, |
128 | { | ||
129 | .f = &w1_therm_family_DS1825, | ||
130 | .convert = w1_DS18B20_convert_temp | ||
131 | } | ||
123 | }; | 132 | }; |
124 | 133 | ||
125 | static inline int w1_DS18B20_convert_temp(u8 rom[9]) | 134 | static inline int w1_DS18B20_convert_temp(u8 rom[9]) |
diff --git a/drivers/w1/w1_family.h b/drivers/w1/w1_family.h index b00ada44a89b..a1f0ce151d53 100644 --- a/drivers/w1/w1_family.h +++ b/drivers/w1/w1_family.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #define W1_EEPROM_DS2431 0x2D | 39 | #define W1_EEPROM_DS2431 0x2D |
40 | #define W1_FAMILY_DS2760 0x30 | 40 | #define W1_FAMILY_DS2760 0x30 |
41 | #define W1_FAMILY_DS2780 0x32 | 41 | #define W1_FAMILY_DS2780 0x32 |
42 | #define W1_THERM_DS1825 0x3B | ||
42 | #define W1_FAMILY_DS2781 0x3D | 43 | #define W1_FAMILY_DS2781 0x3D |
43 | #define W1_THERM_DS28EA00 0x42 | 44 | #define W1_THERM_DS28EA00 0x42 |
44 | 45 | ||