i2c: add fwnode APIs
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 11 Jan 2023 10:54:21 +0000 (10:54 +0000)
committerWolfram Sang <wsa@kernel.org>
Tue, 17 Jan 2023 08:29:59 +0000 (09:29 +0100)
commit373c612d72461ddaea223592df31e62c934aae61
treefa74d0293994238fb9e4832671a9d3112f2e33bc
parent1b929c02afd37871d5afb9d498426f83432e71c2
i2c: add fwnode APIs

Add fwnode APIs for finding and getting I2C adapters, which will be
used by the SFP code. These are passed the fwnode corresponding to
the adapter, and return the I2C adapter. It is the responsibility of
the caller to find the appropriate fwnode.

We keep the DT and ACPI interfaces, but where appropriate, recode them
to use the fwnode interfaces internally.

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/i2c-core-acpi.c
drivers/i2c/i2c-core-base.c
drivers/i2c/i2c-core-of.c
include/linux/i2c.h