]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: p2sb: Don't fail if unknown CPU is found
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 4 Nov 2022 15:49:16 +0000 (17:49 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 7 Nov 2022 11:33:49 +0000 (12:33 +0100)
commit53eb64c88f17b14b324fbdfd417f56c5d3fa6fee
tree2e9f5eb0889db028f8cddc7f7f425e4d06ec8da8
parenta977ece5773b6746b814aac410da4776023db239
platform/x86: p2sb: Don't fail if unknown CPU is found

We have accessing P2SB from a very few places for quite known hardware.

When a new SoC appears in intel-family.h it's not obvious that it needs
to be added to p2sb.c as well. Instead, provide default BDF and refactor
p2sb_get_devfn() to always succeed. If in the future we would need to
exclude something, we may add a list of unsupported IDs.

Without this change the iTCO on Intel Comet Lake SoCs became unavailable:

  i801_smbus 0000:00:1f.4: failed to create iTCO device

Fixes: 5c7b9167ddf8 ("i2c: i801: convert to use common P2SB accessor")
Reported-and-tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221104154916.35231-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/p2sb.c