5050 Patsburg (PCH) IDF 0x1d71 32 hard yes yes yes
5151 Patsburg (PCH) IDF 0x1d72 32 hard yes yes yes
5252 DH89xxCC (PCH) 0x2330 32 hard yes yes yes
53+ Panther Point (PCH) 0x1e22 32 hard yes yes yes
5354
5455 Features supported by this driver:
5556 Software PEC no
137138/* Older devices have their ID defined in <linux/pci_ids.h> */
138139#define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22
139140#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22
140- #define PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS 0x1e22
141141/* Patsburg also has three 'Integrated Device Function' SMBus controllers */
142142#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0 0x1d70
143143#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1 0x1d71
144144#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2 0x1d72
145+ #define PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS 0x1e22
145146#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS 0x2330
146147#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS 0x3b30
147148
@@ -159,6 +160,8 @@ static struct pci_driver i801_driver;
159160#define FEATURE_BLOCK_BUFFER (1 << 1)
160161#define FEATURE_BLOCK_PROC (1 << 2)
161162#define FEATURE_I2C_BLOCK_READ (1 << 3)
163+ /* Not really a feature, but it's convenient to handle it as such */
164+ #define FEATURE_IDF (1 << 15)
162165
163166static const char * i801_feature_names [] = {
164167 "SMBus PEC" ,
@@ -629,12 +632,13 @@ static const struct pci_device_id i801_ids[] = {
629632 { PCI_DEVICE (PCI_VENDOR_ID_INTEL , PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1 ) },
630633 { PCI_DEVICE (PCI_VENDOR_ID_INTEL , PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2 ) },
631634 { PCI_DEVICE (PCI_VENDOR_ID_INTEL , PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS ) },
635+ { PCI_DEVICE (PCI_VENDOR_ID_INTEL , PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS ) },
632636 { 0 , }
633637};
634638
635639MODULE_DEVICE_TABLE (pci , i801_ids );
636640
637- #if defined CONFIG_INPUT_APANEL || defined CONFIG_INPUT_APANEL_MODULE
641+ #if defined CONFIG_X86 && defined CONFIG_DMI
638642static unsigned char apanel_addr ;
639643
640644/* Scan the system ROM for the signature "FJKEYINF" */
@@ -664,11 +668,7 @@ static void __init input_apanel_init(void)
664668 }
665669 iounmap (bios );
666670}
667- #else
668- static void __init input_apanel_init (void ) {}
669- #endif
670671
671- #if defined CONFIG_SENSORS_FSCHMD || defined CONFIG_SENSORS_FSCHMD_MODULE
672672struct dmi_onboard_device_info {
673673 const char * name ;
674674 u8 type ;
@@ -734,7 +734,30 @@ static void __devinit dmi_check_onboard_devices(const struct dmi_header *dm,
734734 dmi_check_onboard_device (type , name , adap );
735735 }
736736}
737- #endif
737+
738+ /* Register optional slaves */
739+ static void __devinit i801_probe_optional_slaves (struct i801_priv * priv )
740+ {
741+ /* Only register slaves on main SMBus channel */
742+ if (priv -> features & FEATURE_IDF )
743+ return ;
744+
745+ if (apanel_addr ) {
746+ struct i2c_board_info info ;
747+
748+ memset (& info , 0 , sizeof (struct i2c_board_info ));
749+ info .addr = apanel_addr ;
750+ strlcpy (info .type , "fujitsu_apanel" , I2C_NAME_SIZE );
751+ i2c_new_device (& priv -> adapter , & info );
752+ }
753+
754+ if (dmi_name_in_vendors ("FUJITSU" ))
755+ dmi_walk (dmi_check_onboard_devices , & priv -> adapter );
756+ }
757+ #else
758+ static void __init input_apanel_init (void ) {}
759+ static void __devinit i801_probe_optional_slaves (struct i801_priv * priv ) {}
760+ #endif /* CONFIG_X86 && CONFIG_DMI */
738761
739762static int __devinit i801_probe (struct pci_dev * dev ,
740763 const struct pci_device_id * id )
@@ -754,6 +777,11 @@ static int __devinit i801_probe(struct pci_dev *dev,
754777
755778 priv -> pci_dev = dev ;
756779 switch (dev -> device ) {
780+ case PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0 :
781+ case PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1 :
782+ case PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2 :
783+ priv -> features |= FEATURE_IDF ;
784+ /* fall through */
757785 default :
758786 priv -> features |= FEATURE_I2C_BLOCK_READ ;
759787 /* fall through */
@@ -839,21 +867,7 @@ static int __devinit i801_probe(struct pci_dev *dev,
839867 goto exit_release ;
840868 }
841869
842- /* Register optional slaves */
843- #if defined CONFIG_INPUT_APANEL || defined CONFIG_INPUT_APANEL_MODULE
844- if (apanel_addr ) {
845- struct i2c_board_info info ;
846-
847- memset (& info , 0 , sizeof (struct i2c_board_info ));
848- info .addr = apanel_addr ;
849- strlcpy (info .type , "fujitsu_apanel" , I2C_NAME_SIZE );
850- i2c_new_device (& priv -> adapter , & info );
851- }
852- #endif
853- #if defined CONFIG_SENSORS_FSCHMD || defined CONFIG_SENSORS_FSCHMD_MODULE
854- if (dmi_name_in_vendors ("FUJITSU" ))
855- dmi_walk (dmi_check_onboard_devices , & priv -> adapter );
856- #endif
870+ i801_probe_optional_slaves (priv );
857871
858872 pci_set_drvdata (dev , priv );
859873 return 0 ;
@@ -913,7 +927,8 @@ static struct pci_driver i801_driver = {
913927
914928static int __init i2c_i801_init (void )
915929{
916- input_apanel_init ();
930+ if (dmi_name_in_vendors ("FUJITSU" ))
931+ input_apanel_init ();
917932 return pci_register_driver (& i801_driver );
918933}
919934
0 commit comments