Use devm_hwmon_device_register_with_groups() to simplify the code
and reduce code size.
Cc: Clemens Ladisch <[email protected]>
Tested-by: Clemens Ladisch <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
This patch adds temperature monitoring support for F15h M60h processor.
- Add new pci device id for the relevant processor
- The functionality of REG_REPORTED_TEMPERATURE is moved to
D0F0xBC_xD820_0CA4 [Reported Temperature Control]
- So, use this to get CUR_TEMP value
- Since we need an indirect register access, protect this with
a mutex lock
- Add Kconfig, Doc entries to indicate support for this processor.
Signed-off-by: Aravind Gopalakrishnan <[email protected]>
Acked-by: Borislav Petkov <[email protected]>
Acked-by: Clemens Ladisch <[email protected]>
[Guenter Roeck: Declare new mutex and function static]
Signed-off-by: Guenter Roeck <[email protected]>
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Jean Delvare <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Clemens Ladisch <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
The temperature reporting interface stays the same, so we just
add the PCI-ID to the list.
Verified on AMD Olive Hill.
Signed-off-by: Wei Hu <[email protected]>
Acked-by: Clemens Ladisch <[email protected]>
Cc: [email protected] # 3.10+
Signed-off-by: Guenter Roeck <[email protected]>
Add the F3 PCI id of F15h, model 0x10 to pci_ids.h and to the amd_nb
code which generates the list of northbridges on an AMD box. Shorten
define name while at it so that it fits into pci_ids.h.
Acked-by: Clemens Ladisch <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Acked-by: Andreas Herrmann <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
This patch converts the drivers in drivers/hwmon/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.
Signed-off-by: Axel Lin <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Cc: Clemens Ladisch <[email protected]>
Cc: Rudolf Marek <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
The on-chip northbridge's temperature sensor of the upcoming
AMD Trinity CPUs works the same as for the previous CPUs.
Since it has a different PCI-ID, we just add the new one to the list
supported by k10temp.
This allows to use the k10temp driver on those CPUs.
Signed-off-by: Andre Przywara <[email protected]>
Cc: [email protected] # 3.0+
Signed-off-by: Guenter Roeck <[email protected]>
AMDs upcoming CPUs use the same mechanism for the internal
temperature reporting as the Fam10h CPUs, so we just needed to add
the appropriate PCI-ID to the list.
This allows to use the k10temp driver on those CPUs.
While at it change the Kconfig entry to be more generic.
Signed-off-by: Andre Przywara <[email protected]>
Acked-by: Clemens Ladisch <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Add the PCI ID to support the internal temperature sensor of the
AMD "Llano" and "Brazos" processor families.
Signed-off-by: Clemens Ladisch <[email protected]>
Cc: [email protected] # ca86828: x86, AMD, PCI: Add AMD northbridge PCI device
Cc: [email protected]
Signed-off-by: Guenter Roeck <[email protected]>
The id_table field of the struct pci_driver is constant in <linux/pci.h>
so it is worth to make pci_device_id also constant.
The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
// </smpl>
Signed-off-by: Márton Németh <[email protected]>
Cc: Julia Lawall <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
The latest version of the Revision Guide for AMD Family 10h Processors
lists two more processor revisions which may be affected by erratum 319.
Change the blacklisting code to correctly detect those processors, by
implementing AMD's recommended algorithm.
Signed-off-by: Clemens Ladisch <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Cc: Andreas Herrmann <[email protected]>
This adds a driver for the internal temperature sensor of AMD Family 10h
and 11h CPUs.
Signed-off-by: Clemens Ladisch <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>